Message parallel processing method, system and device and storage medium
By dividing the transaction process of payment packets into multiple independent modules, and designing the processing status, payment status and transaction lock value fields of the packets, the problems of slow payment processing speed and transaction conflict in the prior art are solved, and more efficient parallel processing and abnormal data positioning are achieved.
Patent Information
- Application Number
- CN202411603349.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
When the prior art processes massive payment packets, the business process is complex and the business volume is huge, resulting in slow payment processing speed and it is difficult to effectively verify and process payment packets.
The transaction process of payment packets is divided into multiple independent modules, including data preprocessing module, business processing module, payment processing module and communication module. Each module is responsible for independent functions. By designing the processing status, payment status and transaction lock value fields of the packet, each module works together to improve the speed of parallel processing and avoid transaction conflicts.
Through modular design and collaborative work, the verification and processing speed of payment packets is significantly improved, transaction conflicts are avoided, and abnormal data is located more efficiently in the cluster.
Smart Images

Figure CN119558840A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the financial field, and in particular to a message parallel processing method, system, device and storage medium. Background Art
[0002] Faced with the payment messages frequently sent by a large number of users, the existing payment processing logic is to aggregate various parts into one module, and each part completes parallel processing work through clustering. However, for financial payment transactions, the business process lines are complex and the business volume is huge, making it difficult to locate them when they are aggregated together.
[0003] Therefore, how to improve the verification of payment messages and the payment processing speed is an urgent problem to be solved. Summary of the invention
[0004] Embodiments of the present application provide a message parallel processing method, system, device and storage medium to improve the verification of payment messages and the payment processing speed.
[0005] In a first aspect, the present application provides a message parallel processing method, which is applied to a message parallel processing system, wherein the system comprises: a data preprocessing module, a business processing module, a payment processing module, and a communication module; wherein the programs between each module are independent of each other; the method comprises:
[0006] The data preprocessing module receives the payment message and stores the payment message in a database;
[0007] The data preprocessing module marks the processing status of the payment message as pending, the lock value status as unlocked, and the payment status as an initial value;
[0008] The business processing module obtains the first payment message with a processing status of pending from the database, modifies the lock value status of the first payment message to locked, and verifies the user information corresponding to the first payment message to obtain a verification result;
[0009] The business processing module modifies the processing status of the first payment message and modifies the lock value status of the first payment message according to the verification result, wherein the modified processing status is success or failure;
[0010] The payment processing module obtains the second payment message, and if the processing status of the second payment message is successful and the payment status of the second payment message is an initial value, modifies the lock value status of the second payment message to locked;
[0011] The payment processing module executes a transaction according to the second payment message, obtains a payment result, and changes a payment status of the second payment message according to the payment result, wherein the payment status of the second payment message is payment success, payment failure, or payment unclear;
[0012] The payment processing module modifies the lock value status of the second payment message to unlocked;
[0013] The communication module obtains the payment status of the third payment message, and if the payment status of the third payment message is payment success or payment failure, sends the payment status of the third payment message to the user terminal corresponding to the third payment message.
[0014] In a possible implementation, the modifying the lock value status of the first payment message to locked includes:
[0015] According to the identifier of the business processing module, modify the lock value state of the first payment message to be locked; wherein the locked lock value state is associated with the identifier of the business processing module;
[0016] Correspondingly, the modifying the lock value status of the second payment message to locked includes:
[0017] According to the identifier of the payment processing module, the lock value status of the second payment message is modified to locked; wherein the locked lock value status is associated with the identifier of the payment processing module.
[0018] In a possible implementation, modifying the processing status of the first payment message and modifying the lock value status of the first payment message according to the verification result includes:
[0019] If the verification result indicates that the verification is successful, modifying the processing status of the first payment message to success, and modifying the lock value status of the first payment message to unlocked;
[0020] If the verification result indicates that the verification has failed, the processing status of the first payment message is modified to failed, and the lock value status of the first payment message is modified to suspended.
[0021] In a possible implementation, modifying the lock value status of the first payment message to be suspended includes:
[0022] According to the identifier of the business processing module, the lock value status of the first payment message is modified to suspended; wherein the suspended lock value status is associated with the identifier of the business processing module.
[0023] In a possible implementation, the system further includes an abnormality determination module, and the method further includes:
[0024] The abnormality determination module obtains any third payment message whose lock value status is suspended;
[0025] The abnormality determination module locates the module where the abnormality occurs according to the identifier of the business processing module associated with the lock value state.
[0026] In a possible implementation, the method further includes:
[0027] If the processing status of the second payment message is successful, and the payment status is payment unclear, the payment processing module re-transacts according to the second payment message within a preset time to obtain a new payment result;
[0028] If the new payment result indicates that the payment status is payment unclear, the payment processing module modifies the lock value status of the second payment message to suspended, and the suspended lock value status is associated with the identifier of the payment processing module.
[0029] In a second aspect, the present application also provides a message parallel processing system, which includes: a data preprocessing module, a business processing module, a payment processing module, and a communication module; wherein the programs between each module are independent of each other; and the system is used to execute the method described in any one of the first aspects.
[0030] In a third aspect, the present application further provides an electronic device, comprising: a memory, a processor;
[0031] The memory stores computer-executable instructions;
[0032] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method as described in any one of the first aspects.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0034] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementations of the first aspect.
[0035] The message parallel processing method, system, device and storage medium provided by the embodiment of the present application divide the transaction of the entire payment message into multiple modules, including a data preprocessing module, a business processing module, a payment processing module, and a communication module; each module works together to improve the speed of parallel processing. When multiple modules jointly process business data in parallel, by designing the three fields of the message processing status, payment status and transaction lock value, each module processes only when the corresponding field scanned meets the processing conditions of the module, and multiple modules work together to complete data processing, which can avoid transaction conflicts. At the same time, different modules are configured with different locking values, which can ensure that it is more efficient when locating abnormal data in the cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] Figure 1 A schematic diagram of the structure of the message parallel processing system provided in this application;
[0038] Figure 2 Schematic diagram of the process of parallel processing of messages provided in this application Figure 1 ;
[0039] Figure 3 Schematic diagram of the process of parallel processing of messages provided in this application Figure 2 ;
[0040] Figure 4 A schematic diagram of the structure of the electronic device provided in this application.
[0041] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0043] The existing payment processing logic is to aggregate various parts into one module. Although each part can complete parallel processing work through clustering, the financial payment transaction business process is complex and the business volume is huge, making it difficult to locate them when they are aggregated together.
[0044] If the entire payment process runs in one large module, each step needs to be performed in sequence. This will cause the speed of the entire process to be affected if there is a blockage or delay during the processing of a certain step. Especially when the processing volume is large, the serial process may cause a throughput bottleneck in the system.
[0045] In view of the above problems, this application splits the payment process into multiple independent modules, including data preprocessing module, business processing module, payment processing module, and communication module. Each module is responsible for independent functions, which are logically clear and single. For example, the data preprocessing module is only responsible for format verification and message status update, the business processing module is responsible for verification and locking of user information, and the payment processing module is responsible for fund operations and transaction status updates. This split reduces the coupling between modules, making it easier to test and modify the functions of a module separately without affecting the normal operation of other modules. Each module can be deployed through an independent service cluster to avoid the bottleneck of a single server and dynamically adjust resources to cope with business peaks.
[0046] It should be noted that the message parallel processing method and device of the present application can be used in the financial field, and can also be used in any field other than the financial field. The application field of the message parallel processing method and device of the present application is not limited.
[0047] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0048] Figure 1 The structural diagram of the message parallel processing system provided by this application is as follows: Figure 1 As shown, the message parallel processing system includes: a data preprocessing module, a business processing module, a payment processing module, and a communication module; wherein the programs between each module are independent of each other; the programs of each module are independent of each other, and each module can be deployed through an independent service cluster to avoid the bottleneck of a single server, or multiple modules can be deployed in a service cluster or a server.
[0049] The functions of each module in the above-mentioned message parallel processing system are introduced below by taking the message parallel processing method as an example.
[0050] Figure 2 Schematic diagram of the process of parallel processing of messages provided in this application Figure 1 ,like Figure 2 As shown, the following steps are included, and the following steps can be executed in a non-sequential order.
[0051] S101. The data preprocessing module receives a payment message and stores the payment message in a database.
[0052] This module is responsible for receiving and verifying payment messages, writing messages to the database, and setting the initial status. The service cluster that deploys the data preprocessing module polls the receiving queue to obtain payment messages. The technical field format of the payment message is verified to ensure that the format of the message is correct. The verified payment message is stored in the message table.
[0053] S102. The data preprocessing module marks the processing status of the payment message as pending, the lock value status as unlocked, and the payment status as the initial value.
[0054] After the storage is completed, the status of the payment message (processing status, lock status and payment status) will be initialized and set to the default value.
[0055] Exemplarily, the initial status of the message includes processing status: W (pending); payment status: I (initial value); and lock value status 00.
[0056] The business processing module starts to obtain the payment messages to be processed from the database and locks them to avoid concurrent processing.
[0057] S103. The business processing module obtains the first payment message whose processing status is pending from the database, modifies the lock value status of the first payment message to locked, and verifies the user information corresponding to the first payment message to obtain a verification result.
[0058] This module is responsible for verifying the user information of the message to be processed and modifying the status of the message according to the verification result. This module will obtain all payment messages with a processing status of W (to be processed) from the database.
[0059] In this step, the business processing module obtains the first payment message with a processing status of pending from the database, and then calls the customer information component to verify the user information corresponding to the first payment message. During the verification, the business processing module locks the message.
[0060] In one implementation, the lock value is associated with the identifier of the business module. Exemplarily, if the identifier of the business processing module is module 01, the lock value is set to A1. In another exemplary embodiment, if the identifier of the business processing module is module 02, the lock value is set to A2. In another exemplary embodiment, if the identifier of the business processing module is module 03, the lock value is set to A3. By associating the lock value with the identifier of the business module, when a transaction is abnormal, the abnormal module location can be quickly determined based on the lock value.
[0061] S104. The business processing module modifies the processing status of the first payment message and the lock value status of the first payment message according to the verification result, wherein the modified processing status is success or failure.
[0062] If the verification result indicates that the user information verification is successful, the message processing status is updated to S (success), the lock is released, and the lock value is updated to 00.
[0063] Similarly, if the verification result indicates that the user information verification fails, the message processing status is updated to F (success), the lock is released, and the lock value is updated to 00.
[0064] S105. The payment processing module obtains the second payment message. If the processing status of the second payment message is successful and the payment status of the second payment message is the initial value, the lock value status of the second payment message is modified to locked.
[0065] This module is responsible for processing payment transactions, including normal payments and abnormal payments.
[0066] Scan the payment messages in the database, for the message with a successful processing status and the second payment message with a payment status of 1 (initial value), it is indicated that transaction processing is required. Before transaction processing, the message also needs to be locked and a lock value is set to avoid conflicts with other modules.
[0067] In this step, the lock value is associated with the identifier of the payment processing module. For example, if the identifier of the payment processing module is module 10, the lock value is set to B10. For another example, if the identifier of the business processing module is module 12, the lock value is set to B12. When a transaction is abnormal, the location of the abnormal module can be quickly determined based on the lock value.
[0068] S106. The payment processing module executes a transaction according to the second payment message, obtains a payment result, and changes a payment status of the second payment message according to the payment result. The payment status of the second payment message is payment success, payment failure, or payment unclear.
[0069] The payment processing module calls the account processing module to process the transaction and obtain the payment result. The payment status is updated according to the payment result returned by the account processing module (S for success, F for failure, and U for unclear).
[0070] S107: The payment processing module modifies the lock value status of the second payment message to unlocked.
[0071] After updating the payment status, release the lock, that is, change the lock value to 00.
[0072] For messages with a payment status of U (undefined) and a lock value of 00, the payment component is re-invoked using the original serial number. If the payment transaction is repeated, the payment result is returned; otherwise, the payment process continues, the final payment result is returned, and the payment status is updated again.
[0073] S108. The communication module obtains the payment status of the third payment message. If the payment status of the third payment message is payment success or payment failure, the payment status of the third payment message is sent to the user terminal corresponding to the third payment message.
[0074] This module scans payment messages and obtains all messages with processing status S, payment status S or F, and transaction lock value 00. For messages that meet the conditions, the payment result (success or failure) is sent to the client. The message status is changed to success or failure according to the result of sending success or failure. The message status is used to indicate to the user whether the feedback is successful. If the feedback fails, a compensation retry can be performed after a preset time period.
[0075] This embodiment provides a message parallel processing method, which divides the entire payment message into multiple modules, and the entire large module is divided into: data preprocessing module, business processing module, payment processing module, communication module; each module works together to improve the speed of parallel processing. When multiple modules jointly process business data in parallel, the transaction conflict problem is solved by designing three fields: the processing status, payment status, and transaction lock value of the message. Each module only processes when the corresponding field scanned meets the processing conditions of the module. Multiple modules work together to complete data processing, which can avoid transaction conflicts. At the same time, the module splitting and the transaction lock value field, and then the locking values of each configuration file are different, which can ensure that abnormal data is located in the cluster more efficiently.
[0076] In serial processing mode, the various processing steps of the message (such as data preprocessing, business processing, payment processing, communication processing, etc.) are executed in sequence, and each step must wait for the previous step to be completed before it can continue. For example, data preprocessing must be completed first before business processing can begin, payment processing can only be performed after business processing is completed, and finally communication processing can be performed. This means that the processing of each message is linear and sequential. In parallel processing mode, the system divides the different processing modules of the message into multiple independent tasks, which can be executed simultaneously. Each module can run in parallel on different processing nodes, and different modules do not need to wait for other modules to complete. For example, data preprocessing, business processing, payment processing, communication modules, etc. can be performed simultaneously on multiple processing units (such as different servers, CPU cores, containers, etc.). Through parallelization, multiple modules can process multiple messages or different parts of tasks "at the same time".
[0077] Parallel processing can execute multiple tasks at the same time, thereby reducing the overall processing time of the message. By splitting the message processing into multiple independent modules or subtasks, different modules can be processed in parallel without blocking each other. The execution of each module is independent and there is no strict order dependency between them. Therefore, even if a module is delayed, other modules can still continue to process. In addition, parallel processing processes tasks through multi-threading, multi-process or distributed systems, and can utilize multiple processing units (such as multi-core CPUs or multiple computing nodes) at the same time, which can significantly improve the processing power of the system. Parallel computing can also improve the throughput and processing efficiency of the system, which is especially suitable for high-concurrency and high-load financial transaction scenarios.
[0078] In a parallel processing system, even if a module fails, other modules can still continue processing, and the overall availability of the system is higher. Through a distributed architecture (such as a microservice architecture), different modules can run independently. If a module fails, the task can be rescheduled to other nodes for processing, thereby reducing the risk of single point failure.
[0079] Based on the above embodiment, when an exception occurs in transaction processing, payment processing or sending processing, the lock value state can be set to a suspended state, and the problematic transaction can be quickly located after suspension. Figure 2 Schematic diagram of the process of parallel processing of messages provided in this application Figure 2 ,like Figure 2 As shown, the following steps are included:
[0080] S201. If the verification result indicates that the verification has failed, the business processing module modifies the processing status of the first payment message to failure, and modifies the lock value status of the first payment message to suspended.
[0081] When the payment message received by the business processing module fails the verification process (such as user information does not match, etc.), the business processing module will update the processing status of the message. The processing status of the message is marked as F (failed), indicating that the payment transaction cannot continue. The lock value of the message will be modified to the "suspended" state, usually with a specific value (such as Aa) to indicate that the lock value is in a suspended state.
[0082] Optionally, the suspended lock value state is associated with the identifier of the business processing module. By associating the identifier of the business processing module, the problematic module and device can be quickly located. For example, if the identifier of the business processing module is 01, the value after suspension is A01a.
[0083] In this way, a clear error tracking path can be provided when processing fails, making it easier for operation and maintenance personnel to handle faults in a timely manner and reduce system downtime or error accumulation.
[0084] S202: If the payment result indicates that the payment status is unclear, the payment processing module modifies the lock value status of the second payment message to suspended, and the suspended lock value status is associated with the identifier of the payment processing module.
[0085] In this step, when the payment result of the payment processing module shows that the payment status is "U", it means that the payment is unclear. For example, network fluctuations and timeouts during the payment process make it impossible to confirm the payment result. The payment processing module will modify the lock value status of the message to "suspended". The suspended identifier can be associated with the identifier of the payment processing module, so that it can be clearly determined which payment processing module caused the unclear status.
[0086] The payment result indicates that the payment status is unclear. The payment processing module can perform one or several compensatory retries to obtain a new payment result. If the new payment result is still unclear, the payment processing module modifies the lock value status of the second payment message to suspended.
[0087] S203. The abnormality determination module obtains any third payment message whose lock value status is suspended.
[0088] The abnormality determination module scans the lock value of the message in the database. When it scans a payment message with a lock value of "suspended", it further locates the source of the problem through the associated identifier.
[0089] S204: The abnormality determination module locates the module where the abnormality occurs according to the identifier of the business processing module associated with the lock value state.
[0090] When a module hangs more than the preset number of times, the specific location of the module is reported as abnormal. The abnormality determination module finds the identifier of the business processing module or payment processing module associated with the message through the suspended lock value. The identifier of each module or device can point to a specific processing system or physical device. Based on the located module or device, the operation and maintenance personnel can quickly determine the specific location of the fault, and then conduct troubleshooting and repair. For example, a server may be down, an interface may be unavailable, or the system load may be too high.
[0091] The entire process provides a fault tracking link through the association of lock value and identification. Through automatic scanning of the abnormal determination module, it can promptly discover and isolate problematic transactions or modules, improve recognition and processing speed, ensure the stability of transaction processing, and improve transaction efficiency.
[0092] The following is an example.
[0093] Figure 3 Schematic diagram of the process of parallel processing of messages provided in this application Figure 2 ,like Figure 3 As shown, the following steps are included:
[0094] 1. The enterprise platform sends payment messages to the external platform.
[0095] 2. The external platform performs technical verification, and after the verification passes, it is written into the database, with the message processing status as W and the payment status as I.
[0096] The configuration message processing state W and the payment state I are the initial state.
[0097] 3. Data lock Ai, send the message to the customer information component for verification.
[0098] The lock value Ai is determined according to the identifier of the business processing module that processes the business. If the business processing module is 01, the lock value is A01.
[0099] 4. Verification passed, and the message is returned.
[0100] The return message is used to indicate the verification result.
[0101] 5. The message processing status is changed to S and the lock is released.
[0102] 6. The message processing status is S, Ai is locked, and the payment processing component is called to perform the payment transaction.
[0103] The lock value Ai is determined by the identifier of the payment processing module.
[0104] 7. Return payment processing results.
[0105] 8. Update the payment status and release the lock based on the payment processing result.
[0106] 9. If the payment status is payment unknown, the message processing status is S, and the transaction is redone with the original serial number.
[0107] 10. Return the payment result.
[0108] 11. Update payment status.
[0109] The payment status includes I (initial value), S (payment successful), F (payment failed), and U (payment unnamed).
[0110] 12. Payment status (S or F), message processing status S, then the message is returned to the enterprise platform.
[0111] 13. The enterprise platform returns a response result.
[0112] 14. Update the message status (F or Y) according to the response result.
[0113] The entire process is mainly divided into two stages: initial verification and payment processing. In the initial stage, the peripheral platform will perform message verification, the customer information component will be verified, and then the message will enter the payment processing stage. Each step involves the update of status, especially the message processing status and payment status. According to the settings of the processing status and payment status, the module knows which transactions should be processed, and it also plays a key role in tracking and controlling payment results. The locking mechanism ensures the security of parallel processing, and there will be no data conflicts between different modules due to concurrent operations.
[0114] Under the locking mechanism, there may be problems such as intensified lock contention and even deadlock, which will affect the system's response time and concurrency performance.
[0115] If the lock is held for too long, other requests will not be able to access the locked resources in time, and the transaction will be shelved. You can set a maximum lock duration, and when this duration is exceeded, you need to roll back to the state before the lock.
[0116] Optionally, when locking, only necessary status updates or data changes can be performed, and other time-consuming operations (such as queries or API calls) can be performed outside of locking. In this way, the lock is held for a shorter time, and other requests can obtain the lock faster, reducing the lock contention in the system.
[0117] In addition, payment requests from multiple modules may come from different system nodes. If a global database lock is used, each node needs to compete through a centralized lock mechanism, leading to system performance bottlenecks. With a distributed lock, each payment request only locks its own related messages and resources (such as payment transactions, account balances, etc.), and sets a reasonable lock expiration time and retry mechanism to avoid deadlocks caused by locks not being released after expiration.
[0118] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. The electronic device may be a carrier for deploying any of the above modules. Figure 4 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0119] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0120] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0121] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0122] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0123] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0124] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0125] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0126] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0127] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0128] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0131] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0132] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0133] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application, are not limited to the precise structures described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for parallel processing of messages, characterized in that: Applied to a message parallel processing system, the system comprises: a data preprocessing module, a business processing module, a payment processing module, and a communication module; wherein the programs between each module are independent of each other; the method comprises: The data preprocessing module receives the payment message and stores the payment message in a database; The data preprocessing module marks the processing status of the payment message as pending, the lock value status as unlocked, and the payment status as an initial value; The business processing module obtains the first payment message with a processing status of pending from the database, modifies the lock value status of the first payment message to locked, and verifies the user information corresponding to the first payment message to obtain a verification result; The business processing module modifies the processing status of the first payment message and modifies the lock value status of the first payment message according to the verification result, wherein the modified processing status is success or failure; The payment processing module obtains the second payment message, and if the processing status of the second payment message is successful and the payment status of the second payment message is an initial value, modifies the lock value status of the second payment message to locked; The payment processing module executes a transaction according to the second payment message, obtains a payment result, and changes a payment status of the second payment message according to the payment result, wherein the payment status of the second payment message is payment success, payment failure, or payment unclear; The payment processing module modifies the lock value status of the second payment message to unlocked; The communication module obtains the payment status of the third payment message, and if the payment status of the third payment message is payment success or payment failure, sends the payment status of the third payment message to the user terminal corresponding to the third payment message.
2. The method according to claim 1, characterized in that The modifying the lock value status of the first payment message to be locked includes: According to the identifier of the business processing module, modify the lock value state of the first payment message to be locked; wherein the locked lock value state is associated with the identifier of the business processing module; Correspondingly, the modifying the lock value status of the second payment message to locked includes: According to the identifier of the payment processing module, the lock value status of the second payment message is modified to locked; wherein the locked lock value status is associated with the identifier of the payment processing module.
3. The method according to claim 1, characterized in that The modifying, according to the verification result, the processing status of the first payment message and the locking status of the first payment message comprises: If the verification result indicates that the verification is successful, modifying the processing status of the first payment message to success, and modifying the lock value status of the first payment message to unlocked; If the verification result indicates that the verification has failed, the processing status of the first payment message is modified to failed, and the lock value status of the first payment message is modified to suspended.
4. The method according to claim 3, characterized in that The modifying the lock value status of the first payment message to be suspended includes: According to the identifier of the business processing module, the lock value status of the first payment message is modified to suspended; wherein the suspended lock value status is associated with the identifier of the business processing module.
5. The method according to claim 4, characterized in that The system further includes an abnormality determination module, and the method further includes: The abnormality determination module obtains any third payment message whose lock value status is suspended; The abnormality determination module locates the module where the abnormality occurs according to the identifier of the business processing module associated with the lock value state.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If the processing status of the second payment message is successful, and the payment status is payment unclear, the payment processing module re-transacts according to the second payment message within a preset time to obtain a new payment result; If the new payment result indicates that the payment status is payment unclear, the payment processing module modifies the lock value status of the second payment message to suspended, and the suspended lock value status is associated with the identifier of the payment processing module.
7. A message parallel processing system, the system comprising: Data preprocessing module, business processing module, payment processing module, communication module; wherein the programs between each module are independent of each other; the system is used to execute the method as described in any one of claims 1-6.
8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.