Data processing method and device
1. A method of data processing, the method comprising:
receiving a first request from a user terminal, wherein the first request is a request for continuously ordering a first service according to a preset period;
generating a first data packet according to the first request, wherein the information in the first data packet comprises: the identifier of the first data packet, the identifier of the first service, the identifier of the user identity sending the first request, information identifying the value of the first service, the type parameter of the first data packet, the subscription state of the first service, the time when the first service is subscribed for the first time, and the expiration time when the first service is subscribed for the first time, wherein the expiration time when the first service is subscribed for the first time is the time obtained by pushing a preset period after the first service is subscribed for the first time;
generating a second data packet when the expiration time of the first service subscribed for the first time comes and the first service subscribed for the first time continuously succeeds; the information in the second packet includes: the identifier of the first data packet, the identifier of the second data packet, the identifier of the first service, the identifier of the user identity sending the first request, information identifying the value of the first service, the type parameter of the second data packet, the subscription state of the first service, the time when the first service is continuously subscribed for the first time, and the expiration time when the first service is continuously subscribed for the first time, wherein the expiration time when the first service is continuously subscribed for the first time is the time when the first service is continuously subscribed for the first time and is later obtained by one preset period;
generating a third data packet when the expiration time of the first service of the first continuous subscription comes and the first service of the second continuous subscription succeeds; the information in the third data packet includes: the identifier of the first data packet, the identifier of the third data packet, the identifier of the first service, the identifier of the user identity sending the first request, the information identifying the value of the first service, the type parameter of the second data packet, the subscription state of the first service, the time when the first service is successfully subscribed for the second time continuously, and the expiration time when the first service is subscribed for the second time continuously, wherein the expiration time when the first service is subscribed for the second time continuously is the time when the first service is subscribed for the second time continuously, and the time when the first service is postponed by one preset period.
2. The data processing method of claim 1, wherein generating the second data packet when the expiration time of the first service being subscribed for the first time comes and the first service being subscribed for the first time consecutively succeeds comprises:
when the expiration time of the first service ordered for the first time comes and the first service ordered continuously succeeds, acquiring the type parameter of a second data packet to be generated and the time of successful first continuous ordering; acquiring an identifier of the first data packet, an identifier of the first service, an identifier of a user identity sending the first request, and information identifying a value of the first service in the first data packet;
generating an identifier of the second data packet according to the type parameter of the second data packet and the time when the first continuous ordering is successful;
configuring a subscription state of the first service to be a subscribed state;
and configuring the expiration time of the first continuous subscription of the first service according to the current time and the preset period.
3. The data processing method according to claim 2, wherein after said configuring an expiration time at which the first service is continuously subscribed for the first time according to the current time and the preset period, the method further comprises:
judging whether the expiration time of the first service which is continuously subscribed for the first time is successfully configured;
if the configuration fails, recording the configuration times;
judging whether the configuration times reach a set counting threshold value or not;
if the first service is not ordered continuously for the first time, returning to execute the operation of configuring the expiration time of the first service ordered continuously for the first time according to the current time and the preset period;
and if the counting threshold is reached, generating first prompt information, wherein the first prompt information is used for indicating that the configuration fails.
4. The data processing method of claim 2, wherein before the second data packet is generated when the expiration time of the first service being subscribed for the first time comes and the first service being subscribed for the first time consecutively succeeds, the method further comprises:
receiving a continuous ordering instruction from the user terminal, wherein the continuous ordering instruction carries a type parameter of a second data packet and the time when the first continuous ordering is successful;
packaging the type parameter of the second data packet, the time when the first continuous ordering is successful and the information in the first data packet into a data packet and caching;
the type parameter of the second data packet to be generated and the time when the first continuous ordering is successful are obtained; and obtaining an identifier of the first data packet, an identifier of the first service, an identifier of a user identity sending the first request, and information identifying a value of the first service in the first data packet, including:
decapsulating the data packet, and copying a type parameter of the second data packet, a time when the first continuous subscription is successful, an identifier of the first data packet in the first data packet, an identifier of the first service, an identifier of a user identity that sent the first request, and information identifying a value of the first service.
5. The data processing method of claim 1, wherein the first data packet further comprises a type parameter indicating subscription behavior, wherein the type parameter indicating subscription behavior is generated according to an identifier of the first service and an identifier of an application subscribing to the first service.
6. The method of any of claims 1-5, wherein after the expiration time of the first continuous subscription of the first service arrives and the second continuous subscription of the first service succeeds, generating a third data packet, the method further comprises:
receiving a use instruction of the first service from the user terminal;
recording the time when the use instruction is received;
and if the time of receiving the use instruction is before the expiration time of the second continuous subscription of the first service, allowing the user terminal to call the first service.
7. The method of claim 1, wherein after the expiration time of the first continuous subscription of the first service arrives and the second continuous subscription of the first service succeeds, generating a third data packet, the method further comprises:
receiving a data query instruction from the user terminal, wherein the data query instruction is used for indicating to query a data packet generated after the first service is subscribed;
and sending the first data packet, the second data packet and the third data packet to the user terminal.
8. A data processing apparatus, characterized in that the apparatus comprises:
an information receiving unit, configured to receive a first request from a user terminal, where the first request is a request for continuously ordering a first service according to a preset period;
a data packet generating unit, configured to generate a first data packet according to the first request, where information in the first data packet includes: the identifier of the first data packet, the identifier of the first service, the identifier of the user identity sending the first request, information identifying the value of the first service, the type parameter of the first data packet, the subscription state of the first service, the time when the first service is subscribed for the first time, and the expiration time when the first service is subscribed for the first time, wherein the expiration time when the first service is subscribed for the first time is the time obtained by pushing a preset period after the first service is subscribed for the first time;
the data packet generating unit is further used for generating a second data packet when the expiration time of the first service ordered for the first time comes and the first service ordered for the first time continuously succeeds; the information in the second packet includes: the identifier of the first data packet, the identifier of the second data packet, the identifier of the first service, the identifier of the user identity sending the first request, information identifying the value of the first service, the type parameter of the second data packet, the subscription state of the first service, the time when the first service is continuously subscribed for the first time, and the expiration time when the first service is continuously subscribed for the first time, wherein the expiration time when the first service is continuously subscribed for the first time is the time when the first service is continuously subscribed for the first time and is later obtained by one preset period;
the data packet generating unit is further used for generating a third data packet when the expiration time of the first service continuously subscribed for the first time comes and the first service is continuously subscribed for the second time successfully; the information in the third data packet includes: the identifier of the first data packet, the identifier of the third data packet, the identifier of the first service, the identifier of the user identity sending the first request, the information identifying the value of the first service, the type parameter of the second data packet, the subscription state of the first service, the time when the first service is successfully subscribed for the second time continuously, and the expiration time when the first service is subscribed for the second time continuously, wherein the expiration time when the first service is subscribed for the second time continuously is the time when the first service is subscribed for the second time continuously, and the time when the first service is postponed by one preset period.
9. An electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the data processing method of any one of claims 1 to 7.
10. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, are configured to implement the data processing method of any one of claims 1 to 7.
Background
The online shopping is one of the popular ways of purchasing commodities at present, and brings convenience to the life of users. The online shopping mode is mainly that a user selects a first service required by the user on a purchasing application, wherein the first service comprises a telephone package, a video application VIP and the like. Then, the first service is ordered, and the successful ordering represents that the online purchase of the first service is successful. In order to further bring convenience to the user and reduce the operation flow of the user, the user can select a renewal function and a renewal period before the successful subscription. And automatically ordering the first service after the renewal period expires, and finishing another online purchase of the first service after the ordering is successful.
In the above-described procedure, even if the operation of renewing the order is performed on the first service, only the order data packet generated when the order is first ordered for the first service is stored. When the user inquires the purchasing behavior of continuously ordering the first service according to the preset period, only feeding back the order data packet generated when the first service is ordered for the user. However, the order data packet generated at the time of first order has a low description integrity for the purchase behavior of the first service ordered continuously in a preset period.
Disclosure of Invention
The application provides a data processing method and a data processing device, which are used for solving the problem that the description integrity of an order data packet on the purchasing behavior of continuously ordering a first service according to a preset period is low when a user inquires the purchasing behavior of continuously ordering the first service according to the preset period.
In a first aspect, the present application provides a data processing method, including:
receiving a first request from a user terminal, wherein the first request is a request for continuously ordering a first service according to a preset period;
generating a first data packet according to the first request, wherein the information in the first data packet comprises: the first service is subscribed for the first time, and the first service is subscribed for the first time, wherein the first service is subscribed for the first time, and the first service is subscribed for the first time;
generating a second data packet when the expiration time of the first service ordered for the first time comes and the first service ordered for the first time continuously succeeds; the information in the second packet includes: the method comprises the steps that an identifier of a first data packet, an identifier of a second data packet, an identifier of a first service, an identifier of a user identity sending a first request, information identifying the value of the first service, type parameters of the second data packet, a subscription state of the first service, the time when the first service is continuously subscribed for the first time and the expiration time when the first service is continuously subscribed for the first time, wherein the expiration time when the first service is continuously subscribed for the first time is the time when the first service is continuously subscribed for the first time and is later obtained by a preset period;
generating a third data packet when the expiration time of the first service of the first continuous subscription comes and the first service of the second continuous subscription succeeds; the information in the third packet includes: the first data packet identifier, the third data packet identifier, the first service identifier, the first request-sending user identity identifier, the first service value identifier, the second data packet type parameter, the first service subscription status, the second continuous subscription time of the first service, and the second continuous subscription expiration time of the first service, wherein the second continuous subscription expiration time of the first service is the time after the second continuous subscription time of the first service by a preset period.
In a second aspect, the present application further provides a data processing apparatus, comprising:
the information receiving unit is used for receiving a first request from a user terminal, wherein the first request is a request for continuously ordering a first service according to a preset period;
and the data packet generating unit is used for generating a first data packet according to the first request. Wherein the information in the first data packet includes: the first service is subscribed for the first time, and the first service is subscribed for the first time.
And the data packet generating unit is also used for generating a second data packet when the expiration time of the first service subscribed for the first time comes and the first service subscribed for the first time continuously succeeds. Wherein the information in the second packet includes: the first service is continuously subscribed for the first time, and the expiration time of the first service for the first time is the time after the first service is continuously subscribed for the first time and is the time obtained by a preset period.
And the data packet generating unit is also used for generating a third data packet when the expiration time of the first service continuously subscribed for the first time comes and the first service is continuously subscribed for the second time successfully. Wherein the information in the third data packet includes: the first data packet identifier, the third data packet identifier, the first service identifier, the first request-sending user identity identifier, the first service value identifier, the second data packet type parameter, the first service subscription status, the second continuous subscription time of the first service, and the second continuous subscription expiration time of the first service, wherein the second continuous subscription expiration time of the first service is the time after the second continuous subscription time of the first service by a preset period.
In a third aspect, the present application further provides an electronic device, including: a memory, a processor;
a memory; a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data processing method as provided in the first aspect of the application.
In a fourth aspect, the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the data processing method provided in the first aspect of the present application is implemented.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the data processing method as provided in the first aspect of the present application.
The data processing method provided by the application comprises the steps of receiving a first request from a user terminal, wherein the first request is a request for continuously ordering a first service according to a preset period; then generating a first data packet according to the first request, and generating a second data packet when the expiration time of the first service ordered for the first time comes and the first service ordered for the first time continuously succeeds; then, when the expiration time of the first service being continuously subscribed for the first time comes and the first service being continuously subscribed for the second time is successful, a third data packet is generated. The contents contained in the first data packet, the second data packet and the third data packet are different. Therefore, when the user inquires the purchasing behavior of continuously ordering the first service according to the preset period, the first data packet, the second data packet and the third data packet are fed back to the user. It can be understood that the first data packet, the second data packet and the third data packet can completely describe the purchasing behavior of the user for subscribing the first service each time, and further, the description integrity of the purchasing behavior of the first service is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic diagram of interaction between a server and a user terminal according to an embodiment of the present application;
fig. 2 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 3 is a functional block diagram of a data processing apparatus according to an embodiment of the present application;
fig. 4 is a circuit connection block diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The application provides a data processing method applied to a server 100. As shown in fig. 1, the server 100 is communicatively connected to the user terminal 200 for data interaction. The user terminal 200 may be a smart phone or a tablet computer, and is not limited herein. As shown in fig. 2, the method includes:
s21: the server 100 receives a first request from the user terminal 200, the first request being a request for continuously subscribing to a first service at a preset period.
Here, the user may select the first service in the application for ordering goods on the user terminal 200, and select a function that is renewed according to a preset period for the first service. Then, after the third-party payment platform is invoked to successfully pay for the first service, the first request is sent to the server 100. For example, the user may select a target communication package subscribed once per month on the operator application, and call the third party payment platform to successfully pay for the target communication package, and then send the first request to the server 100.
S22: the server 100 generates a first data packet according to the first request.
The information in the first data packet includes: the first service is subscribed for the first time, and the first service is subscribed for the first time.
For example, the identification of the first data packet may be a subscription number for a first subscription to the first service; the order number may include a category parameter of the first subscription, a time when the first subscription to the first service is successful, and a configured random number. It is to be understood that, assuming that the category parameter of the first subscription is "OR", the time when the first subscription succeeds is 2021 year, 1 month, 1 day, 9 hours, 30 minutes, 15 seconds, and the random number is "00001", the order number may be "OR 2021119301500001". The identification of the first service may be a goods ID of the first service; the identifier of the user identity sending the first request may be a user account where the user logs in an application program for ordering goods or a terminal identity of the user terminal 200 in which the user logs in an application program for ordering goods; the information identifying the value of the first service may be an amount of the first service; the type parameter of the first data packet may be a field value for characterizing that the first service is subscribed for the first time, for example, the field value may be "0". The subscription status of the first service may be a field indicating that the first subscription to the first service is successful, e.g., the field value may be "true". The time at which the first service is first subscribed may be "20211193015"; if the preset period is 1 month, the expiration time when the first service is first ordered is 2021, 2 month, 1 day, 9 hours, 30 minutes, 15 seconds, and the expiration time when the first service in the first packet is first ordered may be "20211193015".
S23: the server 100 generates the second packet when the expiration time of the first service being first subscribed comes and the first service being successively subscribed for the first time succeeds.
The information in the second packet includes: the first service is continuously subscribed for the first time, and the expiration time of the first service for the first time is the time after the first service is continuously subscribed for the first time and is the time obtained by a preset period.
It is understood that, still taking the specific content included in the first data packet as an example, the identifier of the first data packet may be "OR 2021119301500001". The identifier of the second data packet may be an order number of the first continuous subscription to the first service, and assuming that the category parameter of the order number of the first continuous subscription is "ON", the time when the first continuous subscription succeeds is 30 minutes and 15 seconds at 9 of 2 months and 1 days of 2021 year, and the configured random number is "00001", the order number of the first continuous subscription may be "ON 2021219301500001". The identification of the first service may be a goods ID of the first service; the identifier of the user identity sending the first request may be a user account where the user logs in an application program for ordering goods or a terminal identity of the user terminal 200 in which the user logs in an application program for ordering goods; the information identifying the value of the first service may be an amount of the first service; the type parameter of the first data packet may be a field value for characterizing that the first service is continuously subscribed to, for example, the field value may be "1". The subscription status of the first service may be a field characterizing success of successive subscriptions to the first service, e.g., the field value may be "true". If the preset period is 1 month, the expiration time when the first service is continuously subscribed for the first time is 2021, 3, 1, 9, 30 minutes, 15 seconds, and the expiration time when the first service in the first packet is subscribed for the first time may be "20213193015".
Specifically, the process of generating the second data packet may include:
step 1: when the expiration time of the first service ordered for the first time comes and the first service ordered continuously succeeds, acquiring the type parameter of a second data packet to be generated and the time of successful first continuous ordering; and acquiring an identifier of the first data packet in the first data packet, an identifier of the first service, an identifier of a user identity sending the first request, and information identifying a value of the first service.
Optionally, in an embodiment, before generating the second data packet, the method further includes:
receiving a continuous ordering instruction from the user terminal 200, wherein the continuous ordering instruction carries the type parameter of the second data packet and the time when the first continuous ordering is successful; and encapsulating the type parameter of the second data packet, the time when the first continuous subscription is successful and the information in the first data packet into one data packet and caching the data packet. The specific implementation manner of step 1 may be: decapsulating the data packet, copying a type parameter of the second data packet, a time when the first continuous subscription is successful, an identifier of the first data packet in the first data packet, an identifier of the first service, an identifier of a user identity sending the first request, and information identifying a value of the first service. It can be understood that the efficiency of obtaining the data in step 1 can be improved by directly copying the content in the second data packet.
Step 2: and generating the identifier of the second data packet according to the type parameter of the second data packet and the time when the first continuous ordering is successful.
For example, the order number "OR 2021119301500001" is generated based on the type parameter of the first order being "OR", the time when the first order succeeds is 2021 year, 1 month, 1 day, 9 hours, 30 minutes, and 15 seconds, the random number being "00001".
And step 3: the subscription state of the first service is configured to be a subscribed state.
The ordered status may be the field "true" described above, among others.
And 4, step 4: and configuring the expiration time of the first service which is continuously subscribed for the first time according to the current time and a preset period.
The process of generating the second data packet may further include the steps of:
and 5: it is determined whether the expiration time at which the first service was first continuously subscribed is successfully configured.
Step 6: and if the configuration fails, recording the configuration times.
And 7: and judging whether the configuration times reach a set counting threshold value or not.
The count threshold may be 4, 5, 6, etc., and is not limited herein.
And 8: and if the first service is not ordered continuously for the first time, returning to execute the operation of configuring the expiration time of the first service ordered continuously for the first time according to the current time and the preset period.
And step 9: and if the counting threshold is reached, generating first prompt information, wherein the first prompt information is used for indicating that the configuration fails.
By steps 5-9, the reliability of updating the expiry time at which the configuration first service is continuously subscribed for the first time may be improved.
S24: the server 100 generates the third packet when the expiration time of the first service for the first continuous subscription comes and the first service for the second continuous subscription succeeds.
The information in the third packet includes: the first data packet identifier, the third data packet identifier, the first service identifier, the first request-sending user identity identifier, the first service value identifier, the second data packet type parameter, the first service subscription status, the second continuous subscription time of the first service, and the second continuous subscription expiration time of the first service, wherein the second continuous subscription expiration time of the first service is the time after the second continuous subscription time of the first service by a preset period.
It is understood that, still taking the specific content included in the first data packet as an example, the identifier of the first data packet may be "OR 2021119301500001". The identifier of the third packet may be an order number of a third consecutive subscription to the first service, and assuming that the category parameter of the order number of the second consecutive subscription is "ON", the time when the first consecutive subscription succeeds is 2021 year 4 month 1 day 9, 30 minutes and 15 seconds, and the configured random number is "00001", the order number of the first consecutive subscription may be "ON 2021419301500001". The identification of the first service may be a goods ID of the first service; the identifier of the user identity sending the first request may be a user account where the user logs in an application program for ordering goods or a terminal identity of the user terminal 200 in which the user logs in an application program for ordering goods; the information identifying the value of the first service may be an amount of the first service; the type parameter of the third data packet may be a field value for characterizing that the first service is continuously subscribed to, for example, the field value may be "1". The subscription status of the first service may be a field characterizing success of successive subscriptions to the first service, e.g., the field value may be "true". If the preset period is 1 month, the expiration time of the first service being continuously subscribed for the second time is 2021, 4, 1, 9, 30 minutes, 15 seconds, and the expiration time of the first service being subscribed for the second time in the third packet may be "20214193015".
It should be noted that the manner of generating the third data packet is the same as the manner of generating the second data packet, and is not described herein again.
In the data processing method provided by the application, a first request from a user terminal 200 is received, wherein the first request is a request for continuously ordering a first service according to a preset period; then generating a first data packet according to the first request, and generating a second data packet when the expiration time of the first service ordered for the first time comes and the first service ordered for the first time continuously succeeds; then, when the expiration time of the first service being continuously subscribed for the first time comes and the first service being continuously subscribed for the second time is successful, a third data packet is generated. The contents contained in the first data packet, the second data packet and the third data packet are different. Therefore, when the user inquires the purchasing behavior of continuously ordering the first service according to the preset period, the first data packet, the second data packet and the third data packet are fed back to the user. It can be understood that the first data packet, the second data packet and the third data packet can completely describe the purchasing behavior of the user for subscribing the first service each time, and further, the description integrity of the purchasing behavior of the first service is improved.
In a possible implementation manner, the first data packet, the second data packet, and the third data packet may further include a type parameter for indicating a subscription behavior. Wherein the type parameter indicative of the subscription behavior is generated based on an identification of the first service, an identification of an application subscribing to the first service. Further, the server 100 may recommend a service indicating the same type parameter of the ordering behavior to the user according to the type parameter indicating the ordering behavior, thereby providing convenience to the user.
In addition, the data processing method may further include: the server 100 receives a use instruction of the first service from the user terminal 200, and records the time when the use instruction is received; if the time of receiving the use instruction is before the expiration time at which the second service is continuously subscribed for the second time, the user terminal 200 is allowed to invoke the first service.
For example, if the first service is a target communication package and the user initiates a communication request at the user terminal 200, such as a call connection request, a short message transmission request, or a network communication request, the server 100 receives a use instruction of the first service from the user terminal 200. The server 100 records the time 2021 year, 3 month, 25 month, 9 day, 15 minutes and 30 seconds when the use instruction is received; and the expiration time of the first service being continuously subscribed for the second time is 30 minutes and 15 seconds at 9/1/4/2021, the server 100 recognizes the time of receiving the use instruction, and allows the user terminal 200 to invoke the first service before the expiration time of the second service being continuously subscribed for the second time. Such as allowing calls to be made, allowing text messages to be sent, or allowing network communications to be used.
When the user inquires the purchase behavior of ordering the first service continuously according to the preset period, an inquiry instruction may be input in the application program for ordering the goods on the user terminal 200. The user terminal 200 sends a query instruction to the server 100, and the server 100 receives a data query instruction from the user terminal 200, wherein the data query instruction is used for indicating to query a data packet generated after subscribing to the first service; the server 100 transmits the first packet, the second packet, and the third packet to the user terminal 200. And the user receives and displays the first data packet, the second data packet and the third data packet. It can be understood that the first data packet, the second data packet and the third data packet can completely describe the purchasing behavior of the user for subscribing the first service each time, and further, the description integrity of the purchasing behavior of the first service is improved.
Referring to fig. 3, the present application further provides a data processing apparatus 300 applied to the server 100. As shown in fig. 1, the server 100 is communicatively connected to the user terminal 200 for data interaction. The user terminal 200 may be a smart phone or a tablet computer, and is not limited herein. It should be noted that the data processing apparatus 300 provided in the embodiment of the present application has the same basic principle and technical effect as those of the above embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the above embodiments for the part of the embodiment of the present application that is not mentioned. The apparatus 300 comprises an information receiving unit 301, a data packet generating unit 302, wherein,
the information receiving unit 301 is configured to receive a first request from the user terminal 200, where the first request is a request for continuously subscribing to a first service according to a preset period.
A packet generating unit 302, configured to generate a first packet according to the first request.
Wherein the information in the first data packet includes: the first service is subscribed for the first time, and the first service is subscribed for the first time.
The data packet generating unit 302 is further configured to generate a second data packet when the expiration time of the first service being subscribed for the first time arrives and the first service being subscribed for the first time consecutively succeeds.
Wherein the information in the second packet includes: the first service is continuously subscribed for the first time, and the expiration time of the first service for the first time is the time after the first service is continuously subscribed for the first time and is the time obtained by a preset period.
In a possible implementation manner, the packet generating unit 302 may be specifically configured to, when the expiration time of the first service ordered for the first time arrives and the first service ordered continuously succeeds, obtain a type parameter of the second packet to be generated and a time when the first continuous ordering succeeds; acquiring an identifier of a first data packet in the first data packet, an identifier of a first service, an identifier of a user identity sending the first request, and information identifying the value of the first service; generating an identifier of the second data packet according to the type parameter of the second data packet and the time when the first continuous ordering is successful; configuring a subscription state of a first service to be a subscribed state; and configuring the expiration time of the first service which is continuously subscribed for the first time according to the current time and a preset period.
Optionally, the information receiving unit 301 may be further configured to receive a continuous subscription instruction from the user terminal 200, where the continuous subscription instruction carries the type parameter of the second data packet and a time when the first continuous subscription is successful;
the apparatus 300 may further comprise: and the data caching unit is used for packaging the type parameter of the second data packet, the successful moment of the first continuous subscription and the information in the first data packet into one data packet and caching the data packet.
The packet generating unit 302 may be specifically configured to decapsulate the packet, and copy the type parameter of the second packet, the time when the first continuous subscription is successful, the identifier of the first packet in the first packet, the identifier of the first service, the identifier of the user identity sending the first request, and the information identifying the value of the first service.
In addition, optionally, the data packet generating unit 302 may be further configured to determine whether to successfully configure an expiration time at which the first service is continuously subscribed for the first time; if the configuration fails, recording the configuration times; judging whether the configuration times reach a set counting threshold value or not; if the first service is not ordered continuously for the first time, returning to execute the operation of configuring the expiration time of the first service ordered continuously for the first time according to the current time and the preset period; and if the counting threshold is reached, generating first prompt information, wherein the first prompt information is used for indicating that the configuration fails.
The data packet generating unit 302 is further configured to generate a third data packet when the expiration time of the first service that is continuously subscribed for the first time arrives and the first service that is continuously subscribed for the second time succeeds.
Wherein the information in the third data packet includes: the first data packet identifier, the third data packet identifier, the first service identifier, the first request-sending user identity identifier, the first service value identifier, the second data packet type parameter, the first service subscription status, the second continuous subscription time of the first service, and the second continuous subscription expiration time of the first service, wherein the second continuous subscription expiration time of the first service is the time after the second continuous subscription time of the first service by a preset period.
In a possible implementation manner, the first data packet, the second data packet, and the third data packet may further include a type parameter for indicating a subscription behavior.
Optionally, the information receiving unit 301 is further configured to receive a usage instruction of the first service from the user terminal 200.
The apparatus 300 may further comprise: and the information recording unit is used for recording the time when the use instruction is received.
And a service calling unit for allowing the user terminal 200 to call the first service before the expiration time when the second service is continuously subscribed for the second time when the use instruction is received.
Optionally, the information receiving unit 301 may be further configured to receive a data query instruction from the user terminal 200, where the data query instruction is used to instruct to query a data packet generated after subscribing to the first service.
The apparatus 300 may further comprise: an information sending unit, configured to send the first data packet, the second data packet, and the third data packet to the user terminal 200.
Fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. Referring to fig. 4, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services. For example, the electronic device may be a host.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the non-volatile memory into the memory and runs it, forming the data processing device on a logical level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
receiving a first request from a user terminal, wherein the first request is a request for continuously ordering a first service according to a preset period;
generating a first data packet according to the first request, wherein the information in the first data packet comprises: the first service is subscribed for the first time, and the first service is subscribed for the first time, wherein the first service is subscribed for the first time, and the first service is subscribed for the first time;
generating a second data packet when the expiration time of the first service ordered for the first time comes and the first service ordered for the first time continuously succeeds; the information in the second packet includes: the method comprises the steps that an identifier of a first data packet, an identifier of a second data packet, an identifier of a first service, an identifier of a user identity sending a first request, information identifying the value of the first service, type parameters of the second data packet, a subscription state of the first service, the time when the first service is continuously subscribed for the first time and the expiration time when the first service is continuously subscribed for the first time, wherein the expiration time when the first service is continuously subscribed for the first time is the time when the first service is continuously subscribed for the first time and is later obtained by a preset period;
generating a third data packet when the expiration time of the first service of the first continuous subscription comes and the first service of the second continuous subscription succeeds; the information in the third packet includes: the first data packet identifier, the third data packet identifier, the first service identifier, the first request-sending user identity identifier, the first service value identifier, the second data packet type parameter, the first service subscription status, the second continuous subscription time of the first service, and the second continuous subscription expiration time of the first service, wherein the second continuous subscription expiration time of the first service is the time after the second continuous subscription time of the first service by a preset period.
The method performed by the data processing apparatus according to the embodiment shown in fig. 2 of the present application may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in this application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in this application may be directly implemented by a hardware decoding processor, or may be implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may also execute the method of fig. 2 and implement the functions of the data processing apparatus in the embodiment shown in fig. 2, which are not described herein again.
Of course, besides the software implementation, the electronic device of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
The present application also proposes a computer readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, are capable of causing the portable electronic device to perform the method of the embodiment shown in fig. 2.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the data processing method as shown in fig. 2 of the present application.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope of the disclosure being indicated.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种集中式包装类饮用水交易系统