Data Processing Method, Apparatus, Electronic Device and Storage Medium
By determining the target processing rules based on service identification and virtual value in the electronic coupon system, the cost liquidation and account balance update are automatically completed online, and the problem of the inability to complete cost liquidation and account balance updates simultaneously online in the existing technology is solved, which improves the liquidation efficiency and supports real-time adjustment of the liquidation ratio.
Patent Information
- Application Number
- CN202210335748.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-03-30
AI Technical Summary
The existing technology cannot complete the cost liquidation and account balance update of electronic coupons online at the same time, and cannot automatically complete the re-liquidation and account balance update of consumed coupons, and the liquidation rules cannot be adjusted in real time.
By determining the target processing rules based on the service identification, and combining the virtual value to perform cost liquidation and account balance updates, the cost liquidation and account balance updates are achieved automatically and quickly online, and the liquidation ratio is dynamically adjusted through preset ratios and historical service records.
It realizes automatic and rapid online cost liquidation and account balance updates when the coupon has been consumed and returned, improves the efficiency of coupon liquidation, saves resources, and supports real-time adjustment of liquidation ratios.
Smart Images

Figure CN114693358B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and particularly to a data processing method, apparatus, electronic device, storage medium, and program product. Background Art
[0002] After a virtual item such as an electronic coupon is used, it is necessary to perform cost settlement for the coupon to determine the issuer cost, merchant cost, and consumer cost. Currently, when performing cost settlement for a consumed coupon, first, it is determined online that the coupon has been used, and according to the settlement rules, the issuer cost is determined. Then, based on the issuer cost, the account balances of the issuer and the merchant are updated offline. Through the current method, it is impossible to complete cost settlement and account balance update online simultaneously. In addition, when a coupon that has already been settled is returned, manual re-settlement is required, and it is impossible to automatically complete cost settlement and account balance update online. Moreover, the settlement rules are a fixed ratio and cannot be modified in real time according to the actual situation. Summary of the Invention
[0003] In view of the above problems, the present disclosure provides a data processing method, apparatus, electronic device, storage medium, and program product that improve processing efficiency.
[0004] According to a first aspect of the present disclosure, there is provided a data processing method, including: determining a service identifier and a first virtual value according to a first service record, where the first service record includes a first user identifier; determining a target processing rule associated with the service identifier based on at least one processing rule; determining a second virtual value according to the target processing rule and the first virtual value; and determining the second virtual value as a target virtual value corresponding to the first user identifier when it is determined that the second virtual value passes verification.
[0005] According to an embodiment of the present disclosure, the determining a target processing rule associated with the service identifier based on at least one processing rule includes: when it is determined that there is a processing rule associated with the service identifier in the at least one processing rule, using the associated processing rule as the target processing rule; and when it is determined that there is no target processing rule associated with the service identifier in the at least one processing rule, using a preset processing rule as the target processing rule.
[0006] According to an embodiment of the present disclosure, when it is determined that there is no target processing rule associated with the service identifier in the at least one processing rule, the determining a second virtual value according to the target processing rule and the first virtual value includes: obtaining a preset ratio included in the target processing rule; and determining a second virtual value according to the preset ratio and the first virtual value.
[0007] According to an embodiment of the present disclosure, determining the second virtual value according to the target processing rule and the first virtual value includes: obtaining a second user identifier included in the first service record; determining at least one second service record associated with the second user identifier in the historical service records; calculating the number of the at least one second service record to obtain a first value; determining a third value according to the first value and a second value; and determining the second virtual value according to a sub-target processing rule, the third value, and the first virtual value, wherein the target processing rule includes the second value and the sub-target processing rule.
[0008] According to an embodiment of the present disclosure, determining the second virtual value according to the sub-target processing rule, the third value, and the first virtual value includes: determining a first pre-virtual value according to the sub-target processing rule and the third value; and calculating a difference between the first virtual value and the first pre-virtual value to obtain the second virtual value.
[0009] According to an embodiment of the present disclosure, the sub-target processing rule includes: a third virtual value, a fourth virtual value, a fifth virtual value, and
[0010] y(t) = min{y 1 (t), y 2 (t)}
[0011] y 1 (t) = max{(j - A), v}
[0012] y 2 (t) = max(q t , v)
[0013] where t is a timestamp included in the first service record, y(t) is the first pre-virtual value, j is the third virtual value, A is the third value, v is the fourth virtual value, and q t is the fifth virtual value.
[0014] According to an embodiment of the present disclosure, determining the second virtual value as the target virtual value corresponding to the first user identifier in the case where it is determined that the second virtual value passes the verification includes: determining a first virtual resource library identifier associated with the first user identifier among a plurality of virtual resource library identifiers; determining whether a first pre-stored virtual value corresponding to the first virtual resource library identifier is greater than or equal to the second virtual value; and in the case where it is determined that the first pre-stored virtual value is greater than or equal to the second virtual value, determining the second virtual value as the target virtual value corresponding to the first user identifier.
[0015] According to an embodiment of the present disclosure, the data processing method further includes: determining, among the multiple virtual resource library identifiers, a second virtual resource library identifier associated with the second user identifier; and updating the first pre-stored virtual value and the second pre-stored virtual value according to the first pre-stored virtual value, the second pre-stored virtual value corresponding to the second virtual resource library identifier, and the target virtual value.
[0016] Another aspect of the present disclosure provides a data processing apparatus, including: a first determination module, configured to determine a service identifier and a first virtual value according to a first service record, where the first service record includes a first user identifier; a matching module, configured to determine a target processing rule associated with the service identifier based on at least one processing rule; a second determination module, configured to determine a second virtual value according to the target processing rule and the first virtual value; and a third determination module, configured to determine the second virtual value as the target virtual value corresponding to the first user identifier when it is determined that the second virtual value passes the verification.
[0017] Another aspect of the present disclosure provides an electronic device, including: one or more processors; a memory, configured to store one or more programs, where when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the above data processing method.
[0018] Another aspect of the present disclosure further provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute the above data processing method.
[0019] Another aspect of the present disclosure further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above data processing method is implemented.
[0020] By determining a target processing rule according to a service identifier, performing cost liquidation on a coupon according to the target processing rule, and determining a target virtual value corresponding to a first user identifier. Then, according to the target virtual value, updating a first virtual resource library corresponding to the first user identifier and a second virtual resource library corresponding to the second user identifier. The above method of the present application realizes automatic and fast online cost liquidation and account balance update in the states where the coupon has been consumed and returned. In addition, through the method and the target processing rule for determining the target processing rule proposed by the present application, the liquidation ratio can be modified in real time, improving the efficiency of coupon liquidation and saving resources. Description of the Drawings
[0021] Through the following description of the embodiments of the present disclosure with reference to the drawings, the above content and other objects, features, and advantages of the present disclosure will become clearer. In the drawings:
[0022] Figure 1 Schematically shows an application scenario diagram of a data processing method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0023] Figure 2 Schematically shows a flowchart of a data processing method according to an embodiment of the present disclosure;
[0024] Figure 3 Schematically shows a flowchart of a data processing method according to another embodiment of the present disclosure;
[0025] Figure 4 Schematically shows a schematic diagram of a method for determining a target virtual value according to an embodiment of the present disclosure;
[0026] Figure 5 Schematically shows a schematic diagram of a method for updating a pre-stored virtual value according to an embodiment of the present disclosure;
[0027] Figure 6 Schematically shows a structural block diagram of a data processing apparatus according to an embodiment of the present disclosure; and
[0028] Figure 7 Schematically shows a block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure. Detailed implementation manners
[0029] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present disclosure.
[0030] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0031] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0032] In the case of using expressions such as "at least one of A, B, and C", generally, it should be interpreted according to the meaning that those skilled in the art usually understand this expression (for example, "a system having at least one of A, B, and C" should include but not be limited to a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0033] In the technical solutions of the present disclosure, the acquisition, collection, storage, use, processing, transmission, provision, disclosure, and application, etc., of data and user personal information all comply with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and public order and good customs are not violated.
[0034] An embodiment of the present disclosure provides a data processing method, which determines a service identifier and a first virtual value according to a first service record, where the first service record includes a first user identifier; determines a target processing rule associated with the service identifier based on at least one processing rule; determines a second virtual value according to the target processing rule and the first virtual value; and determines the second virtual value as the target virtual value corresponding to the first user identifier when it is determined that the second virtual value passes the verification.
[0035] Figure 1 A schematic application scenario diagram of data processing according to an embodiment of the present disclosure is shown.
[0036] As Figure 1 shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0037] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0038] The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.
[0039] The server 105 may be a server that provides various services, such as a background management server (only an example) that supports the websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process data such as user requests received, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the data processing method provided by the embodiments of the present disclosure can generally be executed by the server 105. Correspondingly, the data processing device provided by the embodiments of the present disclosure can generally be set in the server 105. The data processing method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and / or the server 105. Correspondingly, the data processing device provided by the embodiments of the present disclosure can also be set in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and / or the server 105.
[0041] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in
[0042] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. Figure 1 Hereinafter, based on Figures 2 to 5 the described scenario, the data processing method of the public embodiments will be described in detail through
[0043] Figure 2 FIG. schematically shows a flowchart of the data processing method according to an embodiment of the present disclosure.
[0044] As Figure 2 shown, this embodiment 200 includes operation S210 to operation S240, and this data processing method can be executed by a server.
[0045] In operation S210, according to the first service record, a service identifier and a first virtual value are determined, and the first service record includes a first user identifier.
[0046] According to an embodiment of the present disclosure, historical service records are monitored in real time. In one example, the historical service records include coupon usage records, for example, coupon consumption records and coupon return records. When the historical service records meet a preset condition, the first service record in the historical service records is obtained. The preset condition may include, for example, detecting that the number of coupon usage records stored in the database and unprocessed coupon usage records exceeds a threshold. When the preset condition is detecting that a coupon usage record is stored in the database, the coupon usage record stored in the database is used as the first service record.
[0047] The first service record includes a service cost virtual value, a service identifier, a first user identifier, and a second user cost virtual value. The service cost virtual value may include, for example, the coupon amount. For example, for a coupon of "minus 20 when reaching 300", the service cost virtual value is 20. If a consumer purchases a coupon of 100 virtual resources with 50 virtual resources, the service cost virtual value of the 100 virtual resource coupon is 100. The service identifier may include, for example, the identifier of the coupon. The first user identifier represents the identifier of the user who issues the coupon. The second user cost virtual value represents the virtual resources that the consumer needs to spend to obtain the coupon. As shown in Table 1 below, the meaning represented by this first service record is that the first user DID_36 issues a "minus 20 when reaching 300" coupon to the consumer. The identifier of the coupon is ID_123456, and the virtual value of the consumer cost is 0. Based on Table 1, it is determined that the service identifier is ID_123456, the service cost virtual value is 20, the first user identifier is DID_36, and the second user cost virtual value is 0.
[0048] Table 1
[0049] Coupon identifier Coupon Issuing user Consumer cost ID_123456 300 off 20 DID_36 0
[0050] The first virtual value is determined based on the service cost virtual value and the second user cost virtual value. For example, it may be the difference between the service cost virtual value and the second user cost virtual value. As shown in Table 1, the service cost virtual value is 20 and the second user cost virtual value is 0, then the first virtual value is 20. If a consumer purchases a coupon of 100 virtual resources with 50 virtual resources, it is determined that the service cost virtual value is 100 and the second user cost virtual value is 50, then the first virtual value is 50.
[0051] In operation S220, based on at least one processing rule, a target processing rule associated with the service identifier is determined.
[0052] According to an embodiment of the present disclosure, a processing rule is pre-configured for each service identifier. The determined service identifier is compared with the service identifiers associated with at least one processing rule to determine the associated service identifier that is consistent with the service identifier, and the processing rule corresponding to the associated service identifier is determined as the target processing rule.
[0053] According to another embodiment of the present disclosure, in the case where it is determined that there is a processing rule associated with the service identifier among at least one processing rule, the associated processing rule is used as the target processing rule; and in the case where it is determined that there is no target processing rule associated with the service identifier among at least one processing rule, the preset processing rule is used as the target processing rule.
[0054] The preset processing rule includes a first preset processing rule and a second preset processing rule. The first preset processing rule includes a preset ratio, and the second preset processing rule includes any one of the processing rules. For example, in the case where it is determined that there is no target processing rule associated with the service identifier among at least one processing rule, a processing rule is randomly selected as the target processing rule.
[0055] In operation S230, a second virtual value is determined according to the target processing rule and the first virtual value.
[0056] According to an embodiment of the present disclosure, in the case where it is determined that there is no target processing rule associated with the service identifier among at least one processing rule and the first preset processing rule is confirmed as the target processing rule, the preset ratio included in the target processing rule is obtained; and a second virtual value is determined according to the preset ratio and the first virtual value.
[0057] Determining the second virtual value according to the preset ratio and the first virtual value may include, for example, calculating the product of the preset ratio and the first virtual value to obtain the second virtual value.
[0058] For example, if the first virtual value is 20 and the preset ratio is 40%, the product of the first virtual value and the preset ratio is calculated to obtain 8, and 8 is determined as the second virtual value.
[0059] According to another embodiment of the present disclosure, the second user identifier included in the first service record is obtained; among the historical service records, at least one second service record associated with the second user identifier is determined; the number of at least one second service record is calculated to obtain a first numerical value; a third numerical value is determined according to the first numerical value and a second numerical value; and a second virtual value is determined according to the sub-target processing rule, the third numerical value, and the first virtual value, where the target processing rule includes the second numerical value and the sub-target processing rule. The target sub-processing rule may be, for example, a function of the merchant's cost virtual value and time. The second user identifier represents the identifier of the merchant.
[0060] Determining the second virtual value according to the sub-goal processing rule, the third numerical value, and the first virtual value includes: determining a first pre-virtual value according to the sub-goal processing rule and the third numerical value; and calculating the second virtual value by subtracting the first pre-virtual value from the first virtual value.
[0061] In the historical service records, extract the identifiers of the merchants included in each service record to obtain a plurality of merchant identifiers. Compare the plurality of merchant identifiers with the second user identifier, and determine the number of merchant identifiers that match the second user identifier among the plurality of merchant identifiers, which is denoted as the first numerical value.
[0062] Determining the third numerical value according to the first numerical value and the second numerical value includes the following formula:
[0063]
[0064] Where A is the third numerical value, Q is the first numerical value, U is the second numerical value, and e is the updated virtual value. The second numerical value can, for example, represent the coupon quantity threshold, and the updated virtual value can, for example, include a decreasing virtual value and a decreasing ratio.
[0065] For example, when the second user identifier is UID_10, the second numerical value is 300, the updated virtual value is 1, and there are 600 service records including UID_10 in the historical service records, the first numerical value is denoted as 600. Then the third numerical value can be calculated as 2.
[0066] In the case where the updated virtual value is a decreasing virtual value, the sub-goal processing rule may include: a third virtual value, a fourth virtual value, a fifth virtual value, and
[0067] y(t) = min{y 1 (t), y 2 (t)}
[0068] y 1 (t) = max{(j - A), v}
[0069] y 2 (t) = max(q t , v)
[0070] Where t is the timestamp included in the first service record, y(t) is the first pre-virtual value, j is the third virtual value, A is the third numerical value, v is the fourth virtual value, and q t is the fifth virtual value. The third virtual value can, for example, represent the fixed cost virtual value of the merchant, the fourth virtual value can, for example, represent the cost virtual value threshold of the merchant, and the fifth virtual value can, for example, represent the cost virtual value threshold of the merchant within a predetermined time interval.
[0071] For example, the third virtual value is 10, the fourth virtual value is 6, from March 18, 2010 to March 23 of the same year, the fifth virtual value is 8. The time of the first service record is March 20, 2010, and the third value is 2. Then, the first pre-virtual value of 8 can be obtained according to the above sub-goal processing rules. Given that the first virtual value is 20 and the first pre-virtual value is 8, the second virtual value can be determined to be 12.
[0072] The third virtual value can also be determined by the following formula, for example:
[0073] j = M × h
[0074] Where M can be, for example, the first virtual value, and h can be, for example, any proportional value.
[0075] It should be noted that in the case where the updated virtual value is a decreasing ratio, the sub-goal processing rules include the third virtual value, the fourth virtual value, the fifth virtual value, and
[0076] y(t) = min{y 1 (t), y 2 (t)}
[0077] y 1 (t) = max((j × (1 - A)), v)
[0078] y 2 (t) = max(q t , v)
[0079] For example, the third virtual value is 10, the fourth virtual value is 6, from March 18, 2010 to March 23 of the same year, the fifth virtual value is 8, and the updated virtual value is 20%. When the second user identifier is UID_10, the second value is 300, the updated virtual value is 20%, and there are 600 service records including UID_10 in the historical service records, the third value can be calculated to be 0.4. Based on the third value of 0.4, the first pre-virtual value can be determined to be 6.
[0080] According to another embodiment of the present disclosure, in the case where the updated virtual value is a decreasing ratio, after determining the first pre-virtual value according to the sub-goal processing rules and the third value, the second threshold is obtained by the following formula:
[0081] Y = M × (1 - y(t))
[0082] Where Y is the second threshold, M is the first virtual value, and y(t) is the first pre-virtual value.
[0083] Among them, the sub-goal processing rules can also include: the sixth virtual value, the seventh virtual value, the eighth virtual value, and
[0084] y(t) = min{y1 (t), y 2 (t)}
[0085] y 1 (t) = max((k × (1 - A)), g)
[0086] y 2 (t) = max(p t , g)
[0087] Where t is the timestamp included in the first service record, y(t) is the first pre-virtual value, k is the sixth virtual value, A is the third numerical value, g is the seventh virtual value, and p t is the eighth virtual value. The sixth virtual value represents the fixed cost ratio of the merchant, the seventh virtual value represents the cost ratio threshold of the merchant, and the eighth virtual value represents the cost ratio threshold of the merchant within a predetermined time period.
[0088] For example, the sixth virtual value is 60%, the seventh virtual value is 20%, from March 18, 2010 to March 23 of the year, the eighth virtual value is 30%, and the updated virtual value is 20%. When the second user identifier is UID_10, the second numerical value is 300, and there are 600 service records including UID_10 in the historical service records, the third numerical value can be calculated as 0.4. Based on the above sub-goal processing rules, the first pre-virtual value can be determined as 0.2. When the first pre-virtual value is 0.2 and the first virtual value is 20, the second virtual value is 16.
[0089] In operation S240, when it is determined that the second virtual value passes the verification, determine that the second virtual value is the target virtual value corresponding to the first user identifier.
[0090] According to the embodiments of the present disclosure, determine the type of the first service record, determine the verification rule according to the type of the first service record, and verify the second virtual value according to the verification rule and the target virtual value. When it is determined that the second virtual value passes the verification, determine that the second virtual value is the target virtual value corresponding to the first user identifier. The type of the first service record includes a first type and a second type. The first type represents that the coupon has been consumed, and the second type represents that the coupon has been returned.
[0091] According to another embodiment of the present disclosure, when the type of the first service record is the first type, among multiple virtual resource library identifiers, determine a first virtual resource library identifier associated with the first user identifier; determine whether a first pre-stored virtual value corresponding to the first virtual resource library identifier is greater than or equal to a second virtual value; and when it is determined that the first pre-stored virtual value is greater than or equal to the second virtual value, determine the second virtual value as the target virtual value corresponding to the first user identifier. The first virtual resource library represents the account of the user (the first user) who issues the coupon. The first pre-stored virtual value represents the balance of the user account that issues the coupon.
[0092] For example, the first user identifier is DID_36, the first pre-stored virtual value in the first virtual resource library corresponding to the first user identifier is 300, and by operation S230, it is determined that the second virtual value is 12. Since the second virtual value is less than the first pre-stored virtual value, it is determined that the target virtual value corresponding to DID_36 is 12.
[0093] According to another embodiment of the present disclosure, when the type of the first service record is the second type, among multiple virtual resource library identifiers, determine a second virtual resource library identifier associated with the second user identifier; determine whether a second pre-stored virtual value corresponding to the second virtual resource library identifier is greater than or equal to a second virtual value; and when it is determined that the second pre-stored virtual value is greater than or equal to the second virtual value, determine the second virtual value as the target virtual value corresponding to the first user identifier. The second virtual resource library represents the account of the merchant (the second user). The second pre-stored virtual value represents the balance of the merchant account.
[0094] Figure 3 Schematically shows a flowchart of data processing according to another embodiment of the present disclosure.
[0095] As Figure 3 shown, this embodiment 300 includes operation S330 to operation S352, and this data processing method can be executed by a server. It should be noted that this embodiment shows the case where the type of the first service record is the first type.
[0096] In operation S330, determine the second virtual value according to the target processing rule and the first virtual value.
[0097] According to an embodiment of the present disclosure, this operation S330 can determine the second virtual value according to the target processing rule and the first virtual value by a method similar to the method described in the previous operation S230. Details are not described herein again.
[0098] In operation S341, among multiple virtual resource library identifiers, determine a first virtual resource library identifier associated with the first user identifier.
[0099] According to an embodiment of the present disclosure, each virtual resource library has a virtual resource library identifier corresponding to it one by one. Each virtual resource library identifier has a user identifier corresponding to it one by one. According to the first user identifier, determine that the virtual resource library identifier associated with the first user identifier is the first virtual resource library identifier.
[0100] In operation S342, is the first pre-stored virtual value corresponding to the first virtual resource library identifier greater than or equal to the second virtual value?
[0101] In operation S343, determine that the second virtual value is the target virtual value corresponding to the first user identifier.
[0102] According to an embodiment of the present disclosure, after determining the first virtual resource library identifier, obtain the first pre-stored virtual value corresponding to the first virtual resource library identifier, perform operation S342, and determine whether the first pre-stored virtual value is greater than or equal to the second virtual value? When it is determined that the first pre-stored virtual value is greater than or equal to the second virtual value, perform operation S343 to determine that the second virtual value is the target virtual value corresponding to the first user identifier. When it is determined that the first pre-stored virtual value is less than the second virtual value, perform operation S330 to determine the second virtual value according to the target processing rule and the first virtual value.
[0103] In operation S351, among multiple virtual resource library identifiers, determine the second virtual resource library identifier associated with the second user identifier.
[0104] According to an embodiment of the present disclosure, among multiple virtual resource library identifiers stored in the database, match the corresponding second virtual resource library identifier based on the second user identifier.
[0105] According to another embodiment of the present disclosure, the virtual resource library identifier can also be divided into a first type of virtual resource library identifier and a second type of virtual resource library identifier, for example. The first type of virtual resource library identifier is associated with the first user identifier and is associated with at least one second type of virtual resource library identifier. The second type of virtual resource library identifier is associated with the second user identifier and is associated with the first type of virtual resource library identifier.
[0106] According to the first virtual resource library identifier, determine at least one second type of virtual resource library identifier associated with the first virtual resource library identifier. Among the at least one second type of virtual resource library identifier, determine the second virtual resource library identifier associated with the second user identifier.
[0107] In operation S352, update the first pre-stored virtual value and the second pre-stored virtual value according to the first pre-stored virtual value, the second pre-stored virtual value corresponding to the second virtual resource library identifier, and the target virtual value.
[0108] For example, it is determined that the target virtual value is 12, the first pre-stored virtual value is 205, and the second pre-stored virtual value is 643. Calculate the first pre-stored virtual value minus the target virtual value to obtain the target first pre-stored virtual value 193. Calculate the difference between the second pre-stored virtual value and the target virtual value to obtain the target second pre-stored virtual value 655.
[0109] Figure 4 Schematically shows the schematic diagram of the method for determining the target virtual value according to an embodiment of the present disclosure. The method 400 for determining the target virtual value can be executed by a server.
[0110] In the case where coupon status change information is monitored, obtain the first service record 401 corresponding to the coupon status change information, and based on the first service record, perform operation S210 to determine the first virtual value 402 and the service identifier.
[0111] According to the determined service identifier, determine whether there is a processing rule associated with the service identifier among at least one processing rule. In the case where it is determined that there is a processing rule associated with the service identifier among at least one processing rule, determine the associated processing rule 413 as the target processing rule. In the case where it is determined that there is no processing rule associated with the service identifier among at least one processing rule, obtain the current timestamp. Compare the current timestamp with at least one preset time period. In the case where it is determined that the current timestamp is within the preset time period, determine the second preset processing rule 412 as the target processing rule. In the case where it is determined that the current timestamp is not within the preset time period, determine the first preset processing rule 411 as the target processing rule. For example, the preset time period may include the Spring Festival and from November 10th to November 12th, etc. For example, if the current timestamp is November 11th, then the current timestamp is within the preset time period, and determine the second preset processing rule 412 as the target processing rule.
[0112] Based on the target processing rule and the first virtual value 402, perform operation 230 to determine the second virtual value 421. Furthermore, verify the second virtual value 421. In the case where the second virtual value 421 passes the verification, determine the second virtual value 421 as the target virtual value 422.
[0113] Those skilled in the art can understand that the above embodiments are only examples, and the specific number of the first service record and the target virtual value in the present disclosure is not limited thereto.
[0114] Figure 5 Schematically shows the schematic diagram of the method for updating the pre-stored virtual value according to an embodiment of the present disclosure. The method 500 for updating the pre-stored virtual value can be executed by a server.
[0115] According to the first service record 501, obtain the first user identifier 511 and the second user identifier 521 included in the first service record 501. For the first user identifier 511, determine the virtual resource library identifier associated with the first user identifier 511 according to the first user identifier 511, and determine the associated virtual resource library identifier as the first virtual resource library identifier 512. Furthermore, according to the first virtual resource library identifier 512, determine the first pre-stored virtual value 513 corresponding to the virtual resource library. For the second user identifier 521, in a similar way, determine the second virtual resource library identifier 522 and the second pre-stored virtual value 523.
[0116] Based on the method for determining the target virtual value as Figure 4 shown, obtain the target virtual value 502. Determine the update rule according to the type by judging the type of the first service record 501. Based on the update rule, the target virtual value 502, the first pre-stored virtual value 513, and the second pre-stored virtual value 523, obtain the target first pre-stored virtual value 514 and the target second pre-stored virtual value 524.
[0117] For example, when the type of the first service record 501 is the first type, the update rule includes calculating the difference between the first pre-stored virtual value 513 and the target virtual value 502 to obtain the target first pre-stored virtual value 514. Calculate the sum of the second pre-stored virtual value 523 and the target virtual value 502 to obtain the target second pre-stored virtual value 524. When the type of the first service record 501 is the second type, the update rule includes calculating the sum of the first pre-stored virtual value 513 and the target virtual value 502 to obtain the target first pre-stored virtual value 514. Calculate the difference between the second pre-stored virtual value 523 and the target virtual value 502 to obtain the target second pre-stored virtual value 524.
[0118] When the type of the first service record 501 is the first type, based on the target first pre-stored virtual value 514, reduce the virtual resources in the first virtual resource library corresponding to the first virtual resource library identifier 512 to be consistent with the target first pre-stored virtual value 514. Based on the target second pre-stored virtual value 524, increase the virtual resources in the second virtual resource library corresponding to the second virtual resource library identifier 522 to be consistent with the target second pre-stored virtual value 524.
[0119] When the type of the first service record 501 is the second type, based on the target first pre-stored virtual value 514, increase the virtual resources in the first virtual resource library corresponding to the first virtual resource library identifier 512 to be consistent with the target first pre-stored virtual value 514. Based on the target second pre-stored virtual value 524, reduce the virtual resources in the second virtual resource library corresponding to the second virtual resource library identifier 522 to be consistent with the target second pre-stored virtual value 524.
[0120] Those skilled in the art can understand that the above embodiments are only examples, and the specific number of the first service record and the target virtual value in the present disclosure is not limited thereto.
[0121] Based on the above data processing method, the present disclosure also provides a data processing device. The following will be combined with Figure 6 to describe the device in detail.
[0122] Figure 6 The structural block diagram of the data processing device according to the embodiment of the present disclosure is schematically shown.
[0123] As Figure 6 shown, the data processing device 600 in this embodiment includes a first determination module 610, a matching module 620, a second determination module 630, and a third determination module 640.
[0124] The first determination module 610 is used to determine a service identifier and a first virtual value according to the first service record, and the first service record includes a first user identifier. In one embodiment, the first determination module 610 can be used to perform the operation S210 described above, which will not be elaborated here.
[0125] The matching module 620 is used to determine a target processing rule associated with the service identifier based on at least one processing rule. In one embodiment, the matching module 620 can be used to perform the operation S220 described above, which will not be elaborated here.
[0126] According to the embodiment of the present disclosure, the matching module 620 is further used to, when it is determined that there is a processing rule associated with the service identifier among at least one processing rule, use the associated processing rule as the target processing rule; and when it is determined that there is no target processing rule associated with the service identifier among at least one processing rule, use the preset processing rule as the target processing rule.
[0127] The second determination module 630 is used to determine a second virtual value according to the target processing rule and the first virtual value. In one embodiment, the second determination module 630 can be used to perform the operation S230 described above, which will not be elaborated here.
[0128] According to the embodiment of the present disclosure, when it is determined that there is no target processing rule associated with the service identifier among at least one processing rule, the second determination module 630 is further used to obtain a preset ratio included in the target processing rule; and determine the second virtual value according to the preset ratio and the first virtual value.
[0129] According to an embodiment of the present disclosure, the second determination module 630 is further configured to obtain a second user identifier included in the first service record; determine at least one second service record associated with the second user identifier in the historical service records; calculate the number of at least one second service record to obtain a first value; determine a third value according to the first value and a second value; and determine a second virtual value according to a sub-goal processing rule, the third value, and a first virtual value, wherein the goal processing rule includes the second value and the sub-goal processing rule.
[0130] According to an embodiment of the present disclosure, the second determination module 630 is further configured to determine a first pre-virtual value according to the sub-goal processing rule and the third value; and calculate a difference between the first virtual value and the first pre-virtual value to obtain the second virtual value.
[0131] According to an embodiment of the present disclosure, the sub-goal processing rule includes: a third virtual value, a fourth virtual value, a fifth virtual value, and
[0132] y(t) = min{y 1 (t), y 2 (t)}
[0133] y 1 (t) = max{(j - A), v}
[0134] y 2 (t) = max(q t , v)
[0135] wherein, t is a timestamp included in the first service record, y(t) is the first pre-virtual value, j is the third virtual value, A is the third value, v is the fourth virtual value, and q t is the fifth virtual value.
[0136] The third determination module 640 is configured to determine the second virtual value as the target virtual value corresponding to the first user identifier when it is determined that the second virtual value passes the verification. In one embodiment, the third determination module 640 may be configured to perform the operation S240 described above, which will not be elaborated herein.
[0137] According to an embodiment of the present disclosure, the third determination module 640 is further configured to determine a first virtual resource library identifier associated with the first user identifier among a plurality of virtual resource library identifiers; determine whether a first pre-stored virtual value corresponding to the first virtual resource library identifier is greater than or equal to the second virtual value; and determine the second virtual value as the target virtual value corresponding to the first user identifier when it is determined that the first pre-stored virtual value is greater than or equal to the second virtual value.
[0138] According to an embodiment of the present disclosure, the data processing device of this embodiment further includes a fourth determination module and an update module.
[0139] The fourth determination module is configured to determine, among multiple virtual resource library identifiers, a second virtual resource library identifier associated with the second user identifier. In one embodiment, the fourth determination module may be configured to perform operation S351 described above, which will not be elaborated herein.
[0140] The update module is configured to update the first pre-stored virtual value and the second pre-stored virtual value according to the first pre-stored virtual value, the second pre-stored virtual value corresponding to the second virtual resource library identifier, and the target virtual value.
[0141] According to an embodiment of the present disclosure, any one or more of the first determination module 610, the matching module 620, the second determination module 630, and the third determination module 640 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first determination module 610, the matching module 620, the second determination module 630, and the third determination module 640 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., implemented by hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the first determination module 610, the matching module 620, the second determination module 630, and the third determination module 640 may be at least partially implemented as a computer program module, and when the computer program module is run, it can execute corresponding functions.
[0142] Figure 7 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown.
[0143] As Figure 7 shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 701 may also include on-board memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0144] In the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0145] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, and the input / output (I / O) interface 705 is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read from it is installed into the storage portion 708 as needed.
[0146] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0147] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include one or more memories other than the above-described ROM 702 and / or RAM 703 and / or ROM 702 and RAM 703.
[0148] An embodiment of the present disclosure further includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the item recommendation method provided by the embodiment of the present disclosure.
[0149] When the computer program is executed by the processor 701, it executes the above functions defined in the system / apparatus of the embodiment of the present disclosure. According to an embodiment of the present disclosure, the above-described systems, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0150] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and be downloaded and installed through the communication part 709, and / or be installed from the removable medium 711. The program code included in the computer program may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0151] In such an embodiment, the computer program may be downloaded and installed from the network through the communication part 709, and / or be installed from the removable medium 711. When the computer program is executed by the processor 701, it executes the above functions defined in the system of the embodiment of the present disclosure. According to an embodiment of the present disclosure, the above-described systems, devices, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0152] According to embodiments of the present disclosure, program code for executing the computer programs provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0153] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0154] Those skilled in the art can understand that the features recited in the various embodiments and / or claims of the present disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly recited in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features recited in the various embodiments and / or claims of the present disclosure can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.
[0155] The embodiments of the present disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should fall within the scope of the present disclosure.
Claims
1. A data processing method, comprising: determining a service identifier and a first virtual value according to a first service record, where the first service record includes a first user identifier; determining a target processing rule associated with the service identifier based on at least one processing rule; determining a second virtual value according to the target processing rule and the first virtual value; The determining the second virtual value according to the target processing rule and the first virtual value includes: obtaining a second user identifier included in the first service record; determining at least one second service record associated with the second user identifier in historical service records; calculating the number of the at least one second service record to obtain a first value; determining a third value according to the first value and a second value; determining the second virtual value according to a sub-target processing rule, the third value and the first virtual value, where the target processing rule includes the second value and the sub-target processing rule; The determining the second virtual value according to the sub-target processing rule, the third value and the first virtual value includes: determining a first pre-virtual value according to the sub-target processing rule and the third value; calculating a difference between the first virtual value and the first pre-virtual value to obtain the second virtual value; the sub-target processing rule includes: a third virtual value, a fourth virtual value, a fifth virtual value, and where t is the timestamp included in the first service record, y(t) is the first pre-virtual value, j is the third virtual value, A is the third numerical value, v is the fourth virtual value, and q t is the fifth virtual value; and in the case where it is determined that the second virtual value passes verification, determining the second virtual value as a target virtual value corresponding to the first user identifier.
2. The method according to claim 1, wherein, the determining a target processing rule associated with the service identifier based on at least one processing rule includes: in the case where it is determined that there is a processing rule associated with the service identifier in the at least one processing rule, using the associated processing rule as the target processing rule; and in the case where it is determined that there is no target processing rule associated with the service identifier in the at least one processing rule, using a preset processing rule as the target processing rule.
3. The method according to claim 2, wherein, in the case where it is determined that there is no target processing rule associated with the service identifier in the at least one processing rule, the determining the second virtual value according to the target processing rule and the first virtual value includes: obtaining a preset ratio included in the target processing rule; and determining the second virtual value according to the preset ratio and the first virtual value.
4. The method according to claim 1, wherein, the in the case where it is determined that the second virtual value passes verification, determining the second virtual value as a target virtual value corresponding to the first user identifier includes: determining a first virtual resource library identifier associated with the first user identifier among a plurality of virtual resource library identifiers; determining whether a first pre-stored virtual value corresponding to the first virtual resource library identifier is greater than or equal to the second virtual value; and in the case where it is determined that the first pre-stored virtual value is greater than or equal to the second virtual value, determining the second virtual value as a target virtual value corresponding to the first user identifier.
5. The method according to claim 4, further comprising: Among the multiple virtual resource library identifiers, determine a second virtual resource library identifier associated with the second user identifier; and Update the first pre-stored virtual value and the second pre-stored virtual value according to the first pre-stored virtual value, the second pre-stored virtual value corresponding to the second virtual resource library identifier, and the target virtual value.
6. A data processing device, comprising: A first determination module, configured to determine a service identifier and a first virtual value according to a first service record, where the first service record includes a first user identifier; A matching module, configured to determine a target processing rule associated with the service identifier based on at least one processing rule; A second determination module, configured to determine a second virtual value according to the target processing rule and the first virtual value; the second determination module is further configured to obtain a second user identifier included in the first service record; determine at least one second service record associated with the second user identifier in the historical service record; calculate the number of the at least one second service record to obtain a first value; determine a third value according to the first value and a second value; determine a second virtual value according to a sub-target processing rule, the third value, and the first virtual value, where the target processing rule includes the second value and the sub-target processing rule; the second determination module is further configured to determine a first pre-virtual value according to the sub-target processing rule and the third value; calculate a difference between the first virtual value and the first pre-virtual value to obtain a second virtual value; the sub-target processing rule includes: a third virtual value, a fourth virtual value, a fifth virtual value, and where t is the timestamp included in the first service record, y(t) is the first pre-virtual value, j is the third virtual value, A is the third numerical value, v is the fourth virtual value, and q t is the fifth virtual value; and A third determination module, configured to determine the second virtual value as a target virtual value corresponding to the first user identifier when it is determined that the second virtual value passes the verification.
7. An electronic device, comprising: One or more processors; A storage device, configured to store one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, having executable instructions stored thereon, and when the instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 5.
9. A computer program product, including a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Transaction processing method and device and electronic equipment
CN107729124A
Verification method and device of transaction voucher, electronic device and medium
CN110401630A