Data processing method and device, computer equipment, storage medium and program product
Through the preset order identification database and status detection mechanism, combined with message idempotence checking and historical database query, order processing is automated, and the loss of profit caused by manual operation errors is solved, and the commission status management is achieved with high accuracy and consistency , improving the platform's profitability and resource utilization efficiency.
Patent Information
- Application Number
- CN202411096811.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-27
Smart Images

Figure CN119205244A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, computer equipment, storage medium and program product. Background Art
[0002] With the rapid development of Internet technology and the rise of the sharing economy model, online car-hailing and designated driver services have become an indispensable part of modern urban life. In order to improve user experience, enhance driver enthusiasm, and ensure service quality and safety, online car-hailing and designated driver platforms generally adopt a variety of incentives in marketing activities, among which commission-free card activities have become an important means. Commission-free card activities directly increase drivers' income expectations by exempting them from commissions under certain conditions or at certain times, thereby stimulating them to increase their driving time and order volume, bringing more active transportation resources to the platform.
[0003] Currently, among a large number of historical orders, if some historical orders need to change their commission-free status, manual intervention is required to change the commission-free status of the historical orders, such as changing the commission-free status to a non-commission-free status.
[0004] However, manual operations are often accompanied by the risk of errors. When processing a large number of orders, staff may make mistakes due to negligence, fatigue or other reasons, such as mistakenly changing the commission-free status of an order, which will cause losses to the interests of drivers and the platform. Summary of the invention
[0005] In view of this, the present invention provides a data processing method, apparatus, computer equipment, storage medium and program product to solve the problem that if the commission-free status of an order is erroneously changed by human operation, it will cause losses to the interests of the driver and the platform.
[0006] In a first aspect, the present invention provides a data processing method, which includes: obtaining order information; wherein the order information includes: order identification, order status and order operation type; detecting whether the order identification exists in a preset order identification library; if the order identification exists in the preset order identification library, detecting whether the order status meets the preset status; if the order status meets the preset status, processing the order based on the order operation type.
[0007] The data processing method provided in this embodiment can automatically verify the validity of the order and whether the status meets the preset conditions through the preset order identification library and status detection mechanism. Once the conditions are met, the order can be automatically processed according to the order operation type. This method avoids the negligence and errors that may be caused by manual intervention, thereby improving accuracy.
[0008] In an optional embodiment, the method further includes: obtaining a message identifier and an order identifier from a message queue; performing a message idempotence check on the message identifier and the order identifier to obtain a check result; wherein, if the check result meets a preset condition, executing the step of obtaining order information.
[0009] In the data processing method provided in this embodiment, message idempotence check is a key mechanism to ensure that the same message (or messages with the same business significance) will not be processed repeatedly. By checking the message identifier and the order identifier, it is possible to identify duplicate messages and avoid repeated processing of them, thereby ensuring the uniqueness and accuracy of order processing.
[0010] In an optional implementation, a message idempotence check is performed on the message identifier and the order identifier to obtain a check result; wherein, if the check result satisfies a preset condition, a step of obtaining order information is executed, including: detecting whether the message identifier and the order identifier exist in a historical database; if both the message identifier and the order identifier exist in the historical database, stopping the step of obtaining order information; if neither the message identifier nor the order identifier exists in the historical database, storing the message identifier and the order identifier in the historical database, and executing the step of obtaining order information.
[0011] The data processing method provided in this embodiment can quickly identify which messages and orders have been processed by querying the message identifier and order identifier in the historical database. If it is found that they already exist in the historical database, the subsequent processing is directly stopped, thereby effectively preventing the problem of repeated processing, thereby avoiding problems such as waste of resources, data inconsistency or business logic errors caused by repeated processing. In addition, if the message identifier and order identifier do not exist in the historical database, the message identifier and order identifier are stored in the historical database, and a record of which messages and orders have been processed is maintained to ensure data consistency.
[0012] In an optional embodiment, the order operation type includes: risk control type; wherein, processing the order based on the order operation type includes: converting the initial state of the order to the risk control state; wherein, the initial state is used to indicate that the order is an order exempted from commission, and the risk control state is used to indicate that the order is an order not exempted from commission.
[0013] The data processing method provided in this embodiment can manage the commission status of orders more flexibly by subdividing order operation types into risk control types. In certain circumstances, such as when an order has risks, violates regulations, or requires special review, the order can be quickly converted from a commission-free state to a non-commission-free state, thereby achieving precise control of the commission.
[0014] In an optional embodiment, the order operation type includes: a supplementary entry type; wherein, the order is processed based on the order operation type, including: determining the order identifier, order status and order operation type corresponding to the order; packaging the order identifier, order status and order operation type to obtain packaged data; and storing the packaged data in a historical database.
[0015] The data processing method provided in this embodiment can ensure that the missing order information is recorded completely and consistently by encapsulating the order identification, order status and order operation type and storing the encapsulated data in the historical database. This helps maintain the accuracy and integrity of the order data and provides a reliable basis for subsequent data analysis, business decision-making or audit monitoring.
[0016] In addition, encapsulating and storing orders and related information in a historical database can greatly improve data traceability. When you need to query the historical processing of an order or track the evolution of a business process, you can directly extract relevant data from the historical database for analysis. This traceability helps to quickly locate problems, identify causes, and take appropriate remedial measures.
[0017] In an optional embodiment, the order information also includes: the order amount; wherein the method further includes: when the status of the order is a risk control status, determining the commission corresponding to the order; based on the order amount and the commission, determining the target amount corresponding to the order.
[0018] The data processing method provided in this embodiment can ensure that the calculation of commissions is more accurate and reasonable by analyzing the order amount in detail under the risk control state and determining the commission accordingly. This precise commission management method helps the platform to better control costs and improve profitability.
[0019] In a second aspect, the present invention provides a data processing device, comprising: a first acquisition module, used to acquire order information; wherein the order information includes: order identification, order status and order operation type; a first detection module, used to detect whether the order identification exists in a preset order identification library; a second detection module, used to detect whether the order status meets the preset status if the order identification exists in the preset order identification library; a processing module, used to process the order based on the order operation type if the order status meets the preset status.
[0020] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data processing method of the first aspect or any corresponding embodiment thereof.
[0022] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data processing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention;
[0025] Figure 2 is a structural block diagram of a data processing device according to an embodiment of the present invention;
[0026] Figure 3 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0028] Based on relevant technologies, it can be seen that with the rapid development of Internet technology and the rise of the sharing economy model, online car-hailing and designated driver services have become an indispensable part of modern urban life. In order to improve user experience, enhance driver enthusiasm, and ensure service quality and safety, online car-hailing and designated driver platforms generally adopt a variety of incentives in marketing activities, among which commission-free card activities have become an important means. Commission-free card activities directly increase drivers' income expectations by exempting them from commissions under certain time or conditions, thereby stimulating them to increase their driving time and order volume, bringing more active transportation resources to the platform.
[0029] Currently, among a large number of historical orders, if some historical orders need to change their commission-free status, manual intervention is required to change the commission-free status of the historical orders, such as changing the commission-free status to a non-commission-free status.
[0030] However, manual operations are often accompanied by the risk of errors. When processing a large number of orders, staff may make mistakes due to negligence, fatigue or other reasons, such as mistakenly changing the commission-free status of an order, which will cause losses to the interests of drivers and the platform.
[0031] Based on this, the present invention provides a data processing method. Through a preset order identification library and status detection mechanism, the system can automatically verify the validity of the order and whether the status meets the preset conditions. Once the conditions are met, the order can be automatically processed according to the order operation type. This method avoids the negligence and errors that may be caused by manual intervention, thereby improving accuracy.
[0032] According to an embodiment of the present invention, a data processing method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] In this embodiment, a data processing method is provided, which can be used in computer equipment, such as computers, servers, etc. Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0034] Step S101, obtaining order information; wherein the order information includes: order identification, order status and order operation type.
[0035] The order ID can be a code or number that uniquely identifies an order, used to distinguish different orders. The order status can be a label that indicates the current stage or status of the order, such as prepaid order, scheduled order, completed order, etc. Order operation type: a label that classifies orders according to the characteristics of the order or business needs, such as normal order, risk control order, supplementary order, etc., which are not specifically limited here.
[0036] Step S102, detecting whether the order identifier exists in a preset order identifier library.
[0037] The preset order identification library may be a collection storing all known or processed order identifications, and is used to quickly retrieve and verify the uniqueness of an order. Specifically, according to the order identification obtained in step S101, the preset order identification library (which may be a database table, cache, memory data structure, etc.) is queried to check whether the order identification already exists in the library. For example, the preset order identification library may be the order identification library of AutoNavi. By detecting whether the order identification exists in the preset order identification library, it is possible to detect whether the order corresponding to the order identification is transmitted from the AutoNavi system.
[0038] Step S103: if the order ID exists in the preset order ID library, check whether the order status meets the preset status.
[0039] The preset state may be a set of order states defined according to business requirements, which is used to determine whether the order can proceed to the next step. The preset state may indicate that the order state is a completed order state. The completed order state may be a passenger placing an order - a driver providing services to the passenger - a driver sending the passenger to the destination - an order is completed. Specifically, if the order identifier exists, it is further checked whether the order state meets the preset conditions or state set (such as only allowing the delivery of paid orders). Based on the check result, a Boolean value or a corresponding status code is output to indicate whether the order state meets the preset conditions.
[0040] Step S104: if the order status meets the preset status, the order is processed based on the order operation type.
[0041] Specifically, according to the order operation type, the corresponding order processing logic is executed. For example, if it is a risk control order, additional review or restriction processing is performed; if it is a supplementary order, information is supplemented, etc. The order status is updated, the processing log is recorded, and notifications are sent to reflect the results of the order processing. For example: if it is a risk control order, a commission-free order can be modified to a non-commission-free order, etc., which is not specifically limited here.
[0042] The data processing method provided in this embodiment can automatically verify the validity of the order and whether the status meets the preset conditions through the preset order identification library and status detection mechanism. Once the conditions are met, the order can be automatically processed according to the order operation type. This method avoids the negligence and errors that may be caused by manual intervention, thereby improving accuracy.
[0043] In an optional embodiment, the above method further includes:
[0044] Step a1, obtaining the message ID and order ID from the message queue.
[0045] A message queue can be a middleware used to asynchronously transmit messages between different systems or components. A message identifier can be a code or number that uniquely identifies a message and is used to distinguish different messages. Specifically, the system listens to and connects to one or more message queues (such as RabbitMQ, Kafka, ActiveMQ, etc.). When a new message arrives in a message queue, the system pulls (or pushes) the message from the queue. The message content is parsed to extract the message identifier (Message ID) and the order identifier (Order ID). These two identifiers are usually used to uniquely identify messages and orders to ensure the accuracy and consistency of data. For example: in a scenario using Kafka, you can write a Kafka consumer (Consumer) that subscribes to a specific topic (Topic) and pulls messages from the topic. The message contains a string in JSON format, and the message identifier and order identifier can be obtained by parsing this string.
[0046] Step a2, performing message idempotence check on the message identifier and the order identifier to obtain a check result; wherein, if the check result meets a preset condition, executing the step of obtaining order information.
[0047] The preset condition may be that the message identifier and the order identifier do not exist in the database. Specifically, the idempotency check logic is executed using the message identifier and the order identifier as input. Idempotency checks are generally used to ensure that even if the same message is processed repeatedly, it will not cause inconsistency in the system state or duplication of data. The check logic may include checking whether a record with the same message identifier or order identifier already exists in the database, or checking whether a specific business status has been met. If the check result meets the preset condition (for example, the message has not been processed or the order status allows further processing), the subsequent steps (such as obtaining order information) are executed.
[0048] Specifically, the above step a2 includes:
[0049] Step a21, detecting whether the message identifier and the order identifier exist in the history database.
[0050] Get the message ID and order ID from the message queue. Query the historical database (which may be a relational database, NoSQL database, or in-memory database, etc.) to check whether the two IDs exist in a table or collection in the database. If it is a Boolean value or status code, it indicates whether the message ID and order ID exist in the historical database.
[0051] Step a22: If both the message identifier and the order identifier exist in the history database, the step of obtaining the order information is stopped.
[0052] If both identifiers exist in the historical database, then according to the principle of idempotence verification, it is considered that the message has been processed, so the subsequent steps of obtaining order information are no longer executed.
[0053] Step a23: If the message identifier and the order identifier do not exist in the history database, the message identifier and the order identifier are stored in the history database, and the step of obtaining order information is performed.
[0054] If both identifiers do not exist in the historical database, they are inserted into the corresponding table or collection of the historical database to record that the message has been received and processed. After that, the step of obtaining order information is executed to further process the order.
[0055] The data processing method provided in this embodiment can quickly identify which messages and orders have been processed by querying the message identifier and order identifier in the historical database. If it is found that they already exist in the historical database, the subsequent processing is directly stopped, thereby effectively preventing the problem of repeated processing, thereby avoiding problems such as waste of resources, data inconsistency or business logic errors caused by repeated processing. In addition, if the message identifier and order identifier do not exist in the historical database, the message identifier and order identifier are stored in the historical database, and a record of which messages and orders have been processed is maintained to ensure data consistency.
[0056] In an optional embodiment, the order operation type includes: risk control type; wherein the above step S104 includes: converting the initial state of the order to the risk control state; wherein the initial state is used to indicate that the order is an order exempted from commission, and the risk control state is used to indicate that the order is an order not exempted from commission.
[0057] The initial status is used to indicate that the order is a commission-free order. The risk control status is used to indicate that the order is not a commission-free order. Specifically, locate the specific order record in the database based on the order identifier (such as the order number). Update the status field in the order record from the initial status (such as "commission-free") to the risk control status (such as "not commission-free"). After the status changes, it may be necessary to trigger a series of business logic related to the risk control status, such as calculating commissions, sending notifications, and updating related statistical data.
[0058] The data processing method provided in this embodiment can manage the commission status of orders more flexibly by subdividing order operation types into risk control types. In certain circumstances, such as when an order has risks, violates regulations, or requires special review, the order can be quickly converted from a commission-free state to a non-commission-free state, thereby achieving precise control of the commission.
[0059] In an optional implementation, the order operation type includes: supplementary recording type; wherein the above step S104 includes:
[0060] Step b1, receiving the order ID, order status and order operation type corresponding to the order.
[0061] If the order operation type is a supplementary type, and if the order information already exists in the memory in the form of an object, the required order ID, order status, and order operation type can be directly obtained from the order. If the order information comes from an external system, it may be necessary to obtain this information by calling the interface of the external system, etc., which is not specifically limited here and can be implemented by those skilled in the art.
[0062] Step b2, encapsulating the order identification, order status and order operation type to obtain encapsulated data.
[0063] The encapsulated data may be a data structure obtained after encapsulation processing, including multiple related data items. Specifically, a DTO class including order identification, order status, and order operation type attributes may be defined, and the class may be instantiated to encapsulate data. Maps may also be used to store data in the form of key-value pairs, etc., which are not specifically limited here and may be implemented by those skilled in the art.
[0064] Step b3, storing the packaged data in a historical database.
[0065] Specifically, the DTO or entity object can be directly saved in the database by defining a mapping relationship. The Java Database Connectivity (JDBC) API can also be directly used to execute SQL statements to insert data into the database, etc., which is not specifically limited here and can be implemented by those skilled in the art.
[0066] The data processing method provided in this embodiment can ensure that the missing order information is recorded completely and consistently by encapsulating the order identification, order status and order operation type and storing the encapsulated data in the historical database. This helps maintain the accuracy and integrity of the order data and provides a reliable basis for subsequent data analysis, business decision-making or audit monitoring.
[0067] In an optional implementation, the order information further includes: the order amount; wherein the above method further includes:
[0068] Step c1: when the order status is in risk control status, determine the commission corresponding to the order.
[0069] First, check whether the order status is "risk control status". If the order is indeed in risk control status, the commission corresponding to the order needs to be determined according to certain rules or strategies. The calculation of commission may be based on a variety of factors such as order amount, product type, membership level, promotional activities, etc. Specifically, the commission can be determined in the following ways.
[0070] (1) Regardless of the order amount, the commission is calculated according to a fixed ratio. For example, the commission for all orders in risk control status is 5% of the order amount. (2) Different commission ratios are set according to different ranges of order amounts. For example, the commission for orders between 0-100 yuan is 5%, for orders between 100-500 yuan is 3%, and for orders above 500 yuan is 1%. (3) The specific amount of the commission may be stored in an external system, and the commission information needs to be obtained from the external system through API calls or other methods. Assume that a fixed commission ratio is adopted, and the commission ratio for orders in risk control status is 5% of the order amount. If the amount of an order in risk control status is 1,000 yuan, then the commission for the order is 1,000*5%=50 yuan.
[0071] Step c2, based on the order amount and commission, determine the target amount corresponding to the order.
[0072] The target amount usually refers to the actual amount that can be received after deducting the commission. Specifically, the commission amount is directly subtracted from the order amount to get the target amount. For example, if the order amount is 1,000 yuan and the commission is 50 yuan, the target amount is 1,000-50=950 yuan.
[0073] The data processing method provided in this embodiment can ensure that the calculation of commissions is more accurate and reasonable by analyzing the order amount in detail under the risk control state and determining the commission accordingly. This precise commission management method helps the platform to better control costs and improve profitability.
[0074] In the present embodiment, a data processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0075] This embodiment provides a data processing device, such as Figure 2As shown, it includes: a first acquisition module 201, used to obtain order information; wherein the order information includes: order identification, order status and order operation type; a first detection module 202, used to detect whether the order identification exists in a preset order identification library; a second detection module 203, used to detect whether the order status meets the preset status if the order identification exists in the preset order identification library; a processing module 204, used to process the order based on the order operation type if the order status meets the preset status.
[0076] In an optional embodiment, the above-mentioned device also includes: a second acquisition module, used to obtain a message identifier and an order identifier from a message queue; a verification module, used to perform a message idempotence check on the message identifier and the order identifier to obtain a verification result; wherein, if the verification result meets a preset condition, the step of obtaining the order information is executed.
[0077] In an optional embodiment, the verification module includes: a first detection unit, used to detect whether the message identifier and the order identifier exist in the historical database; a stop execution unit, used to stop executing the step of obtaining the order information if both the message identifier and the order identifier exist in the historical database; and a storage execution unit, used to store the message identifier and the order identifier in the historical database and execute the step of obtaining the order information if both the message identifier and the order identifier do not exist in the historical database.
[0078] In an optional embodiment, the order operation type includes: risk control type; wherein the above-mentioned processing module 204 is used to convert the initial state of the order into a risk control state; wherein the initial state is used to indicate that the order is an order exempted from commission, and the risk control state is used to indicate that the order is an order not exempted from commission.
[0079] In an optional embodiment, the order operation type includes: supplementary recording type; wherein the above-mentioned processing module 204 includes: a receiving unit, used to receive the order identification, order status and order operation type corresponding to the order; an encapsulation processing unit, used to encapsulate the order identification, order status and order operation type to obtain encapsulated data; a storage unit, used to store the encapsulated data in a historical database.
[0080] In an optional embodiment, the order information also includes: the order amount; wherein the above-mentioned device also includes: a commission determination module, which is used to determine the commission corresponding to the order when the status of the order is a risk control state; a target amount determination module, which is used to determine the target amount corresponding to the order based on the order amount and the commission.
[0081] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0082] The data processing device in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0083] The embodiment of the present invention also provides a computer device having the above Figure 2 The data processing device shown.
[0084] See also Figure 3 , Figure 3 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 3 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 10 is taken as an example.
[0085] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0086] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0087] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0088] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0089] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0090] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0091] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0092] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining order information; wherein the order information includes: order identification, order status and order operation type; Detecting whether the order identifier exists in a preset order identifier library; If the order identifier exists in a preset order identifier library, detecting whether the order status satisfies a preset status; If the order status meets the preset status, the order is processed based on the order operation type.
2. The data processing method according to claim 1, characterized in that: The method further comprises: Get the message ID and order ID from the message queue; A message idempotence check is performed on the message identifier and the order identifier to obtain a check result; wherein, if the check result meets a preset condition, a step of obtaining order information is executed.
3. The data processing method according to claim 2, characterized in that: Performing a message idempotence check on the message identifier and the order identifier to obtain a check result; wherein, if the check result meets a preset condition, executing a step of obtaining order information includes: Detecting whether the message identifier and the order identifier exist in a history database; If both the message identifier and the order identifier exist in the historical database, then the step of obtaining the order information is stopped; If neither the message identifier nor the order identifier exists in the historical database, the message identifier and the order identifier are stored in the historical database, and the step of acquiring order information is performed.
4. The data processing method according to claim 1, characterized in that: The order operation type includes: risk control type; wherein the processing of the order based on the order operation type includes: Convert the initial state of the order to a risk control state; wherein the initial state is used to indicate that the order is an order exempted from commission, and the risk control state is used to indicate that the order is an order not exempted from commission.
5. The data processing method according to claim 1, characterized in that: The order operation type includes: a supplementary recording type; wherein the processing of the order based on the order operation type includes: Receive an order ID, an order status, and an order operation type corresponding to the order; Encapsulating the order identifier, order status and order operation type to obtain encapsulated data; The packaged data is stored in a historical database.
6. The data processing method according to claim 4, characterized in that: The order information also includes: the order amount; wherein the method further includes: When the status of the order is a risk control status, determining a commission corresponding to the order; Based on the order amount and the commission, a target amount corresponding to the order is determined.
7. A data processing device, characterized in that: The device comprises: The first acquisition module is used to acquire order information; wherein the order information includes: order identification, order status and order operation type; A first detection module, used to detect whether the order identifier exists in a preset order identifier library; A second detection module is used to detect whether the order status meets a preset status if the order identifier exists in a preset order identifier library; A processing module is used to process the order based on the order operation type if the order status meets the preset status.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data processing method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data processing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the data processing method according to any one of claims 1 to 6.
