Task processing method and device, medium and product
By determining task allocation through task data hash values and using message queues to calculate credit card consumption rewards, the problem of low efficiency in the credit card consumption reward business is solved, and real-time determination of reward values and automatic matching calculation of rules are achieved.
Patent Information
- Application Number
- CN202510690236.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-05
AI Technical Summary
Due to the diversity of scenarios and rules, the credit card consumption reward business has low efficiency in calculating and processing consumption rewards.
The task allocation result is determined by the hash value of the task data, the task data is obtained using the message queue, and the matching degree between the task data and the preset reward rule set is calculated to determine the reward value.
The efficiency and flexibility of reward value calculation are improved, and real-time determination of reward value and automatic matching calculation of rules are realized.
Smart Images

Figure CN120596293A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a task processing method, device, medium, and product. Background Art
[0002] Credit card spending is a mainstream consumption method, and different credit card spending rewards programs are available in different scenarios. However, due to the current diversity of credit card spending scenarios and consumption reward rules, the efficiency of consumption reward calculation and processing needs to be improved. Summary of the Invention
[0003] Embodiments of the present invention provide a task processing method, device, medium, and product, which can improve the efficiency and flexibility of task processing.
[0004] In a first aspect, an embodiment of the present invention provides a task processing method, the method comprising:
[0005] Obtaining a first queue task in a task message queue that has undergone task assignment, and determining task data corresponding to the first queue task; wherein the task assignment result in the task message queue is determined based on a hash value of the task data of each queue task;
[0006] Calculate the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set;
[0007] The reward matching value of the first queue task is calculated according to the rule matching degree, and when the reward matching value meets the preset reward conditions, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task.
[0008] In a second aspect, an embodiment of the present invention provides a task processing device, the device comprising:
[0009] a task data determination module, configured to obtain a first queue task in a task message queue that has undergone task allocation, and determine task data corresponding to the first queue task; wherein the task allocation result in the task message queue is determined based on a hash value of the task data of each queue task;
[0010] A rule matching degree determination module is used to calculate the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set;
[0011] The reward value determination module is used to calculate the reward matching value of the first queue task based on the rule matching degree, and when the reward matching value meets the preset reward conditions, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task.
[0012] In a third aspect, an embodiment of the present invention further provides a computer device, comprising:
[0013] one or more processors;
[0014] a memory for storing one or more programs;
[0015] When the one or more programs are executed by one or more processors, the one or more processors implement the task processing method provided by any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the task processing method provided by any embodiment of the present invention.
[0017] In a fifth aspect, an embodiment of the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the task processing method provided by any embodiment of the present invention.
[0018] The embodiments of the above invention have the following advantages or beneficial effects:
[0019] The embodiment of the present invention obtains the first queue task in the task message queue that has been task assigned, and determines the task data corresponding to the first queue task; wherein the task assignment result in the task message queue is determined based on the task data hash value of each queue task; calculates the rule matching degree of each data item in the task data with each task reward rule in the preset task reward rule set; calculates the reward matching value of the first queue task based on the rule matching degree, and when the reward matching value meets the preset reward condition, determines the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value as the reward value of the first queue task. The technical solution of the embodiment of the present invention solves the current problem of low efficiency in reward value determination, and can perform real-time task assignment through hash value, obtain reward calculation tasks through message queue, automatically match and calculate task data with the rules of the rule set, and improve the efficiency of reward value calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flowchart of a task processing method provided by an embodiment of the present invention;
[0021] Figure 2 is a flowchart of a task processing method provided by an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of task allocation provided by an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram of updating a preset task reward rule set provided by an embodiment of the present invention;
[0024] Figure 5 is a schematic diagram of determining a reward value provided by an embodiment of the present invention;
[0025] Figure 6 is a flowchart of a task processing method provided by an embodiment of the present invention;
[0026] Figure 7 is a structural diagram of a task processing device provided by an embodiment of the present invention;
[0027] Figure 8 It is a structural diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0029] Figure 1 This is a flowchart of a task processing method provided by an embodiment of the present invention. This embodiment is applicable to task processing scenarios. The method can be executed by a task processing device, which can be implemented in software and / or hardware and integrated into a computer device with application development capabilities.
[0030] like Figure 1 As shown, the task processing method of this embodiment includes the following steps:
[0031] S110: Acquire a first queue task in a task message queue that has undergone task allocation, and determine task data corresponding to the first queue task.
[0032] This embodiment is applicable to scenarios where a task load balancing server in a distributed system distributes data processing tasks to servers that perform specific task processing functions. Message queues provide an ordered, persistent, and repeatable message stream. Queued tasks can be retrieved using blocking or non-blocking message methods. Features such as message confirmation mechanisms and message queue monitoring ensure stable task processing.
[0033] The task allocation results in the task message queue are determined based on the hash value of the task data of each queue task. Specifically, the hash value of the task data of each task is calculated, and sharding is performed based on the hash value. The range of the hash value is divided into multiple intervals, each interval corresponds to a shard server, and the data falls into the corresponding shard based on the hash value. The task message queue may include at least one queue task for payment data processing. In the task message queue, through polling, the first queue task to be processed is determined in at least one payment data processing task, and the task data corresponding to the first queue task is obtained through data extraction and format conversion. The task data is consumption data, which can specifically be credit card consumption data, including merchants, payment channels, and locations related to credit card consumption.
[0034] That is to say, when a task processing device performs task processing, the hash value of the task data obtained from the task message queue is in the same numerical range, and the task data between different task queue messages have certain similarities. For the task processing device, the task processing process or the subsequent matched algorithm has certain similarities, which can improve the smoothness of task processing and improve the task processing efficiency to a certain extent.
[0035] S120 , calculating the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set.
[0036] The task data includes at least one data item, which may include but is not limited to user information of the payment object, transaction time, transaction location, amount, merchant and consumption channel, among which the consumption channel is the path or method for the user to complete the transaction.
[0037] The task reward rule may include a reward condition and a reward value, that is, if the task data meets the reward condition, the reward value corresponding to the task reward rule may be issued.
[0038] The preset task reward rule set includes multiple task reward rules. Each task reward rule includes a set of rule matching components corresponding to reward sub-rules. The reward sub-rules are the reward conditions. The rule matching components calculate the data items in the task data to obtain the rule matching degree of the multiple reward sub-rules corresponding to each task reward rule. Different rule matching components may require different data items for calculation, which are specifically determined by the reward dimension of the reward sub-rule. For example, for a rule matching component that matches reward participation time, the transaction time data item in the data item is required to calculate the rule matching degree.
[0039] S130. Calculate the reward matching value of the first queue task based on the rule matching degree, and when the reward matching value meets the preset reward condition, determine the reward value corresponding to the task reward rule corresponding to the maximum matching value among the reward matching values as the reward value of the first queue task.
[0040] The reward matching value of the first queue task corresponding to different task reward rules is calculated using a preset reward matching value calculation method. For example, the reward matching value is obtained by multiplying the multiple rule matching degrees of the task reward rules.
[0041] Determine the task reward rules whose reward matching values meet the preset reward conditions. If the number of task reward rules that meet the conditions is greater than 1, sort the reward matching values of each task reward rule, and determine the reward value corresponding to the task reward rule corresponding to the maximum matching value among the reward matching values as the reward value of the first queue task. The reward value can be the reward amount or other reward information.
[0042] The preset reward condition may be whether the reward matching value is greater than or equal to a preset reward matching value threshold. The preset reward matching value threshold can be adjusted according to the preset reward matching value calculation method and actual needs, and is not limited in this embodiment.
[0043] The technical solution of this embodiment is to obtain the first queue task in the task message queue after task assignment, and determine the task data corresponding to the first queue task; wherein, the task assignment result in the task message queue is determined based on the task data hash value of each queue task; calculate the rule matching degree of each data item in the task data with each task reward rule in the preset task reward rule set; calculate the reward matching value of the first queue task according to the rule matching degree, and when the reward matching value meets the preset reward condition, determine the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value as the reward value of the first queue task. The technical solution of the embodiment of the present invention solves the current problem of low efficiency in reward value determination, and can perform real-time task assignment through hash value, obtain reward calculation tasks through message queue, automatically match and calculate task data with the rules of the rule set, and improve the efficiency of reward value calculation.
[0044] Figure 2 This is a flowchart of a task processing method provided in an embodiment of the present invention. This embodiment, which shares the same inventive concept as the task processing method described in the previous embodiment, further describes the process of determining a reward value. This method can be executed by a task processing device, which can be implemented in software and / or hardware and integrated into a computer device with application development capabilities.
[0045] like Figure 2 As shown, the task processing method of this embodiment includes the following steps:
[0046] S210: Acquire a first queue task in a task message queue that has undergone task allocation, and determine task data corresponding to the first queue task.
[0047] The task data includes at least one of the following: payment recipient information, payment location information, payment amount, payment merchant information, and payment channel information corresponding to the preset order payment method. The payment channel information can be the payment path or method, such as online payment and offline payment, where online payment includes payment through different applications.
[0048] In an optional embodiment, the process of queue task allocation in the task message queue may be to obtain order payment request data initiated by any account, and perform data source and data accuracy verification on the order payment request data; perform data risk verification on the order payment request data that passes the data source and data accuracy verification; perform hash calculation on the order payment request data that passes the data risk verification to obtain the corresponding hash value, and send the order payment request data to the task message queue that matches the hash value according to the hash value.
[0049] like Figure 3 As shown, the order payment request data initiated by any account is obtained through the order payment request message queue, and the data content and format of the order payment request data are filtered according to the data cleaning rules. Specifically, the transaction type and transaction direction of the data are preliminarily screened to determine the data source and accuracy of the order payment request data.
[0050] Risk verification is performed on order payment request data that has passed data source and data accuracy verification. Risk verification can verify the legitimacy of transaction data, such as whether the payment recipient is on the sanctions list, and is used to eliminate abnormal order payment request data.
[0051] Calculate the hash value, i.e., the characteristic value, of the order payment request data that has undergone data risk verification. Specifically, calculate the hash value using a preset hash algorithm based on the payment object information, payment location information, amount, payment merchant information, and payment channel information in the payment data. Preset hash algorithms include SHA-256, SHA-512, and HMAC-SHA256. You can select a hash algorithm based on actual needs. Different hash algorithms can be used for different data items. After obtaining the hash value of each data item, concatenate them to obtain the hash value of the order payment request data.
[0052] Data is sharded based on hash values. Through policy distribution, the bypass listener assigns tasks to the sharded data and sends the tasks to the task message queue that matches the hash value determined by the data shard. The listener also monitors the performance of the task server, mainly using indicators such as the server's CPU utilization, GPU utilization, and memory utilization to make reasonable allocations, ensuring that each task server can operate at full capacity within the load range, achieving optimal resource utilization.
[0053] This embodiment can improve the efficiency and rationality of task allocation by sharding the similarity features of credit card payment data. Through dynamic task allocation technology based on message queues, real-time data processing is achieved, achieving millisecond-level response, thereby improving the real-time performance of reward value issuance.
[0054] S220 , calculating the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set.
[0055] It can be understood that since the reward activities are dynamic, the preset task reward rule set may support rule updates. In an optional implementation, when the rule queue message in the task reward rule message queue is monitored, the rule queue message is obtained, and the task reward rule corresponding to the rule queue message is added to the preset task reward rule set.
[0056] like Figure 4 As shown, the rule setting user can configure the rules on the rule configuration interface, and package the configured new task reward rules to generate a rule queue message and send it to the server. The server obtains the rule queue message, parses the rule queue message to obtain the corresponding task reward rule, and adds the task reward rule to the preset task reward rule set.
[0057] In an optional embodiment, the process of generating a rule queue message may be to set an input operation according to the reward rule to obtain the rule details information of the task reward rule; review the rule details information, and if the rule details information is reviewed and approved, determine the rule queue message based on the rule details information, and send the rule queue message to the task reward rule message queue; wherein the rule details information includes at least one of the number of rewards for a single person, the method of calculating the reward amount, the time when the reward can be participated, the objects that can participate in the reward, the reward order channel and the total reward fund pool.
[0058] like Figure 4As shown, based on the reward rule setting input operation of the rule configuration interface, the rule details of the task reward rule are obtained and submitted to the management system for review; the management system performs preset review rule review and manual review on the rule details. When the rule details are reviewed and approved, the task reward rule is determined based on the rule details, the rule queue message is determined according to the task reward rule, and the rule queue message is sent to the task reward rule message queue.
[0059] The preset review rules are used to conduct a preliminary verification of the rationality of the rules. Specifically, they may include restrictions on different types of rule details, including merchant support, fund rationality, and reward amount rationality. For example, for the total reward fund pool, the restriction may be the fund amount range corresponding to the upper and lower limits of the total reward fund pool. Outside of this reasonable fund amount range, the review will not be passed. For reward order channels, restrictions can be set so that channels belonging to the preset reward order channels can pass the review. For example, if the preset reward order channels include channels A and B, then channel C will not pass the review. After the preset review rules are passed, they will be reviewed again by the auditor to further ensure the rationality of the rules.
[0060] The task processing method of this embodiment can realize the payment reward function that supports multiple payment channels, can flexibly configure business rules and make them take effect in real time, reduces development and maintenance costs, and provides good support for business scalability.
[0061] S230. Multiply the matching degree of each rule to obtain a calculation result, and use the calculation result as the reward matching value of the first queue task. When the reward matching value meets the preset reward conditions, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task.
[0062] like Figure 5 As shown, after completing the task claiming and rule matching calculation, the rule matching component of the task reward rule is multiplied according to each rule matching degree determined by the data item to obtain the reward matching value of the first queue task and each task reward rule.
[0063] Specifically, the minimum value of the rule matching degree is 0, which represents no match. When the rule matching degree is greater than 0, the larger the number, the higher the matching degree of the reward sub-rule corresponding to the rule matching component. In this embodiment, the preset reward condition can be that the reward matching value is not 0. It can be understood that if the rule matching degree of any reward sub-rule of the task reward rule is 0, the resulting product is also 0, that is, it cannot match all the reward sub-rules. Therefore, after excluding the rules with a reward matching value of 0, the most matching task reward rule is determined among the task reward rules that are not 0. The larger the reward matching value obtained by multiplying the matching degrees of all rules, the higher the comprehensive matching degree of the first queue task to the task reward rule. Therefore, when the reward matching value meets the preset reward condition, the task reward rule corresponding to the maximum matching value in the reward matching value is used as the most matching task reward rule, and the reward value corresponding to the most matching task reward rule is determined as the reward value of the first queue task.
[0064] The reward issuing component issues the reward value and reward information to the payment object and notifies the payment object. The payment object in this embodiment is the object that initiates the payment behavior.
[0065] The technical solution of this embodiment is to obtain the first queue task in the task message queue after task assignment and determine the task data corresponding to the first queue task; wherein, the task assignment result in the task message queue is determined based on the task data hash value of each queue task; calculate the rule matching degree of each data item in the task data with each task reward rule in the preset task reward rule set; multiply each rule matching degree to obtain the calculation result, and use the calculation result as the reward matching value of the first queue task, and when the reward matching value meets the preset reward condition, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task. The technical solution of the embodiment of the present invention solves the current problem of low efficiency in reward value determination, and can perform real-time task assignment through hash value, obtain reward calculation tasks through message queue, automatically match and calculate task data with the rules of the rule set, use the matching product as the reward value, and compare the reward values of different pairs, thereby improving the rationality of rule matching and improving the efficiency of reward value calculation.
[0066] Figure 6 This is a flowchart of a task processing method provided in an embodiment of the present invention. This embodiment, which shares the same inventive concept as the task processing method described in the previous embodiment, further describes the process of determining the rule matching degree. This method can be executed by a task processing device, which can be implemented in software and / or hardware and integrated into a computer device with application development capabilities.
[0067] like Figure 6As shown, the task processing method of this embodiment includes the following steps:
[0068] S310: Acquire a first queue task in a task message queue that has undergone task allocation, and determine task data corresponding to the first queue task.
[0069] S320. Through the preset reward number rule matching component, reward fund pool rule matching component, reward participation time rule matching component, reward object rule matching component, order channel rule matching component and reward amount calculation component, the corresponding data items in the task data are verified or calculated respectively, and the rule matching degree with each task reward rule in the preset task reward rule set is determined based on the verification result or calculation result.
[0070] Different rule components determine the degree of rule matching by verifying according to preset values or calculating according to preset matching calculation methods. For components that require verification, if the verification fails, the rule matching degree is 0. For components that require calculation, there can be a preset mapping relationship between the calculation result and the rule matching degree, so that the rule matching degree is determined based on the calculation result. For example, for the reward participation time rule matching component, the rule matching degree is determined to be 0 or 1 by verifying whether the payment time data item in the task data meets the time range of the reward participation time rule, where 0 represents non-compliance and 1 represents compliance.
[0071] This embodiment implements the screening of task data and reward calculation through the rule matching component of the task reward rule of the rule set, thereby realizing the reward issuance of credit card payment data and improving data processing efficiency.
[0072] S330. Calculate the reward matching value of the first queue task based on the rule matching degree, and when the reward matching value meets the preset reward condition, determine the reward value corresponding to the task reward rule corresponding to the maximum matching value among the reward matching values as the reward value of the first queue task.
[0073] The technical solution of this embodiment is to obtain the first queue task in the task message queue after task assignment and determine the task data corresponding to the first queue task; verify or calculate the corresponding data items in the task data through the preset reward number rule matching component, reward fund pool rule matching component, reward participation time rule matching component, reward object rule matching component, order channel rule matching component and reward amount calculation component, and determine the rule matching degree with each task reward rule in the preset task reward rule set based on the verification result or calculation result; multiply each rule matching degree to obtain a calculation result, and use the calculation result as the reward matching value of the first queue task, and when the reward matching value meets the preset reward condition, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task. The technical solution of the embodiment of the present invention solves the problem of low efficiency in reward value determination. It can be used to allocate tasks in real time through hash values, obtain reward calculation tasks through message queues, and automatically match and calculate task data with the rules of the rule set through the multi-dimensional rule matching component, thereby improving the efficiency of reward value calculation and the richness of reward value determination rules.
[0074] Figure 7 This is a schematic diagram of the structure of a task processing device provided by an embodiment of the present invention. This embodiment is applicable to task processing scenarios. The task processing device can be implemented by software and / or hardware and integrated into a computer terminal device with application development capabilities.
[0075] like Figure 7 As shown, the task processing device includes: a task data determination module 410 , a rule matching degree determination module 420 and a reward value determination module 430 .
[0076] Among them, the task data determination module 410 is used to obtain the first queue task in the task message queue that has been task assigned, and determine the task data corresponding to the first queue task; wherein, the task assignment result in the task message queue is determined based on the task data hash value of each queue task; the rule matching degree determination module 420 is used to calculate the rule matching degree of each data item in the task data and each task reward rule in the preset task reward rule set; the reward value determination module 430 is used to calculate the reward matching value of the first queue task according to the rule matching degree, and when the reward matching value meets the preset reward condition, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task.
[0077] The technical solution of this embodiment is to obtain the first queue task in the task message queue after task assignment, and determine the task data corresponding to the first queue task; wherein, the task assignment result in the task message queue is determined based on the task data hash value of each queue task; calculate the rule matching degree of each data item in the task data with each task reward rule in the preset task reward rule set; calculate the reward matching value of the first queue task according to the rule matching degree, and when the reward matching value meets the preset reward condition, determine the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value as the reward value of the first queue task. The technical solution of the embodiment of the present invention solves the current problem of low efficiency in reward value determination, and can perform real-time task assignment through hash value, obtain reward calculation tasks through message queue, automatically match and calculate task data with the rules of the rule set, and improve the efficiency of reward value calculation.
[0078] In an optional implementation, the task data includes at least one of payment object information, payment location information, amount, payment merchant information, and payment channel information corresponding to the preset order payment method.
[0079] In an optional embodiment, the device further comprises:
[0080] The task allocation module is used to obtain the order payment request data initiated by any account and verify the data source and data accuracy of the order payment request data; perform data risk verification on the order payment request data that passes the data source and data accuracy verification; perform hash calculation on the order payment request data that passes the data risk verification to obtain the corresponding hash value, and send the order payment request data to the task message queue that matches the hash value based on the hash value.
[0081] In an optional embodiment, the device further comprises:
[0082] The task reward rule set determination module is used to obtain the rule queue message when monitoring the rule queue message in the task reward rule message queue, and add the task reward rule corresponding to the rule queue message to the preset task reward rule set.
[0083] In an optional embodiment, the task reward rule set determination module is further configured to:
[0084] According to the reward rule settings, input operations are performed to obtain detailed rule information of the task reward rule; the detailed rule information is reviewed, and if the detailed rule information is reviewed and approved, a rule queue message is determined based on the detailed rule information, and the rule queue message is sent to the task reward rule message queue; wherein the detailed rule information includes at least one of the number of rewards for a single person, the method for calculating the reward amount, the time during which the reward can be participated, the objects that can participate in the reward, the reward order channel, and the total reward fund pool.
[0085] In an optional embodiment, the reward value determination module 430 is specifically configured to:
[0086] The product of each rule matching degree is calculated to obtain the calculation result, and the calculation result is used as the reward matching value of the first queue task.
[0087] In an optional implementation, the rule matching degree determination module 420 is specifically configured to:
[0088] Through the preset reward number rule matching component, reward fund pool rule matching component, reward participation time rule matching component, reward object rule matching component, order channel rule matching component and reward amount calculation component, the corresponding data items in the task data are verified or calculated respectively, and the rule matching degree with each task reward rule in the preset task reward rule set is determined based on the verification result or calculation result.
[0089] The task processing device provided by the embodiment of the present invention can execute the task processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0090] Figure 8 A schematic structural diagram of a computer device provided in an embodiment of the present invention. Figure 8 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The computer device 12 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capabilities, such as an intelligent controller, a server, a mobile phone, or other terminal devices.
[0091] like Figure 8 As shown, computer device 12 is implemented as a general-purpose computing device. Components of computer device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing unit 16).
[0092] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0093] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0094] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 8 Not shown, often called a "hard drive"). Although Figure 8 Not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0095] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0096] The computer device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, a pointing device, a display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RFID systems, tape drives, and data backup storage systems.
[0097] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the task processing method provided in the embodiment of the present invention, which includes:
[0098] Obtaining a first queue task in a task message queue that has undergone task assignment, and determining task data corresponding to the first queue task; wherein the task assignment result in the task message queue is determined based on a hash value of the task data of each queue task;
[0099] Calculate the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set;
[0100] The reward matching value of the first queue task is calculated according to the rule matching degree, and when the reward matching value meets the preset reward conditions, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task.
[0101] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the task processing method provided in any embodiment of the present invention is implemented. The method includes:
[0102] Obtaining a first queue task in a task message queue that has undergone task assignment, and determining task data corresponding to the first queue task; wherein the task assignment result in the task message queue is determined based on a hash value of the task data of each queue task;
[0103] Calculate the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set;
[0104] The reward matching value of the first queue task is calculated according to the rule matching degree, and when the reward matching value meets the preset reward conditions, the reward value corresponding to the task reward rule corresponding to the maximum matching value in the reward matching value is determined as the reward value of the first queue task.
[0105] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0106] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0107] Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0108] Computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, Python, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0109] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the task processing method provided in any embodiment of the present application.
[0110] The computer program product, during implementation, may be written in one or more programming languages, or a combination thereof, for performing the operations of the present invention. The programming languages include object-oriented programming languages such as Java, Smalltalk, Python, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0111] Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computer device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
[0112] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A task processing method, characterized in that: include: Obtaining a first queue task in a task message queue that has undergone task assignment, and determining task data corresponding to the first queue task; wherein the task assignment result in the task message queue is determined based on a hash value of the task data of each queue task; Calculating the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set; The reward matching value of the first queue task is calculated according to the rule matching degree, and when the reward matching value meets the preset reward condition, the reward value corresponding to the task reward rule corresponding to the maximum matching value among the reward matching values is determined as the reward value of the first queue task.
2. The method according to claim 1, characterized in that The task data includes at least one of payment object information, payment location information, amount, payment merchant information and payment channel information corresponding to the preset order payment method.
3. The method according to claim 1 or 2, characterized in that The process of allocating queue tasks in the task message queue includes: Obtain order payment request data initiated by any account and verify the data source and data accuracy of the order payment request data; Conduct data risk verification on order payment request data that has passed data source and data accuracy verification; A hash calculation is performed on the order payment request data that has passed the data risk verification to obtain a corresponding hash value, and the order payment request data is sent to a task message queue that matches the hash value according to the hash value.
4. The method according to claim 1, wherein The method further comprises: When a rule queue message in the task reward rule message queue is monitored, the rule queue message is acquired, and the task reward rule corresponding to the rule queue message is added to the preset task reward rule set.
5. The method according to claim 4, characterized in that The process of generating the rule queue message includes: According to the reward rule setting input operation, detailed information of the task reward rule is obtained; Reviewing the rule details information, and if the rule details information passes the review, determining a rule queue message based on the rule details information, and sending the rule queue message to the task reward rule message queue; The detailed rule information includes at least one of the number of rewards for a single person, the method for calculating the reward amount, the time period for participating in the reward, the objects for participating in the reward, the reward order channel, and the total reward fund pool.
6. The method according to claim 1, characterized in that Calculating the reward matching value of the first queue task according to the rule matching degree includes: Perform product calculation on each of the rule matching degrees to obtain a calculation result, and use the calculation result as the reward matching value of the first queue task.
7. The method according to claim 1, characterized in that The calculating the rule matching degree between each data item in the task data and each task reward rule in the preset task reward rule set includes: Through the preset reward number rule matching component, reward fund pool rule matching component, reward participation time rule matching component, reward object rule matching component, order channel rule matching component and reward amount calculation component, the corresponding data items in the task data are verified or calculated respectively, and the rule matching degree with each task reward rule in the preset task reward rule set is determined based on the verification result or calculation result.
8. A computer device, characterized in that: The computer device comprises: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the task processing method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the task processing method according to any one of claims 1 to 7 is implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the task processing method according to any one of claims 1 to 7.