Business consistency processing method and device, computer equipment and storage medium
After the process service fails, the process business is directly re-executed based on the cause of failure, and the problem of submission affecting performance and availability in the second stage of the existing technology is solved, and business consistency and efficient and reliable process services are achieved.
Patent Information
- Application Number
- CN202411414479.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-28
AI Technical Summary
Prior art When ensuring business consistency, the second-phase submission of agreements leads to complex financial business processes, affects performance, and in abnormal situations, which may lead to service efficiency and availability issues.
After the process service fails, obtain the cause of failure and determine the corresponding interface attributes based on the preset process, and directly re-execute the process business without node rollback, ensuring business consistency and high availability.
It realizes that business consistency can be maintained without borrowing the second-stage processing process in abnormal situations, improves process service efficiency, ensures uninterrupted services, and improves the high availability of the system.
Smart Images

Figure CN119536919A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of data processing technology and financial technology, and in particular to a method, device, computer equipment and storage medium for processing business consistency. Background Art
[0002] The process system is a database system that adopts the concept of distributed systems. It achieves high availability, high performance and high reliability by distributing different functions to different nodes and collaborating through the network. In the system, each node has its own database, and they can collaborate through the network to complete transactions in one or more databases.
[0003] In order to ensure data consistency between different nodes, the process system uses database rollback to achieve transaction consistency. Database rollback is a technology that changes the state of the database before the transaction is committed. Through database rollback, it can ensure that the database on all nodes is consistent, even if there are network failures or crashes between nodes.
[0004] However, under the premise of ensuring business consistency, the existing two-phase commit (two-phase commit is a classic distributed transaction protocol used to ensure that all nodes in a distributed system maintain consistency when submitting transactions, which is divided into preparation phase and submission phase) will lock financial resource data and take a long time, which can easily lead to complex financial business processes and have a significant impact on the performance of financial services, such as affecting the financial services in the order system. At the same time, when an abnormality occurs in a financial service, if the entire node is rolled back, the efficiency of the financial service will be affected. If the service is interrupted, the availability of the financial service will be affected.
[0005] Therefore, those skilled in the art are in urgent need of finding a new technical solution to solve the above problems. Summary of the invention
[0006] Based on this, a business consistency processing method, apparatus, computer equipment and storage medium are provided to solve the technical problems of the prior art that affect process service performance, process service efficiency and process service availability.
[0007] A method for processing business consistency includes: After determining that the process service fails due to the user operating the business process, obtain the cause of the process service failure; Determining, by a preset process, an interface attribute corresponding to a cause of the process service failure; Execute corresponding process services according to the interface attributes.
[0008] A service consistency processing device, comprising: An acquisition module is used to obtain the cause of the process service failure after determining that the user operates the business process and causes the process service failure; A determination module, used to determine the interface attribute corresponding to the cause of the process service failure through a preset process; An execution module is used to execute corresponding process services according to the interface attributes.
[0009] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned service consistency processing method when executing the computer program.
[0010] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processing method for implementing the above-mentioned business consistency is implemented.
[0011] The above-mentioned business consistency processing method, device, computer equipment and storage medium obtain the cause of process service failure after determining that the user operates the business process and causes the process service failure; determine the interface attribute corresponding to the cause of process service failure through the preset process; and execute the corresponding process service according to the interface attribute. Abnormal process services are processed through the interface attributes specially set for the process to maintain business consistency without borrowing the existing two-stage processing flow. At the same time, due to the interface attributes, the corresponding process business can be directly re-executed without node rollback, ensuring the efficiency of process service. When an abnormal process service occurs, it is processed in time through the interface attributes to ensure that the process service is not interrupted, thereby ensuring the high availability of the process service. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0013] Figure 1 It is a schematic diagram of an application environment of a method for processing service consistency in one embodiment of the present invention; Figure 2 is a process diagram of a method for processing service consistency in one embodiment of the present invention; Figure 3 is a schematic diagram of the structure of a device for processing service consistency in one embodiment of the present invention; Figure 4 is a schematic diagram of a computer device in one embodiment of the present invention; Figure 5It is a service flow diagram of a method for processing business consistency in one embodiment of the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0015] The service consistency processing method provided by the present invention can be applied in the following aspects: Figure 1 In an application environment, a client communicates with a server via a network. The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0016] In one embodiment, if Figure 2 As shown, a method for processing business consistency is provided, and the method is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps: S10, after determining that the user operates the business process and causes the process service failure, obtain the cause of the process service failure.
[0017] It can be understood that the user operation business process can create one or more of the services such as order creation, QR code payment, app payment and notification for the user; process service failure includes one or more of process service exception, process service response time is too long or maintenance is in progress; the cause of process service failure is corresponding to the process service failure mentioned above, including multiple service exceptions, service response time is too long and the current service is under maintenance.
[0018] S20, determining an interface attribute corresponding to the cause of the process service failure through a preset process.
[0019] Understandably, the preset process is Process, which can be used to process process services; the interface attributes include one or more of the retry count attribute (maxRetry), the time attribute of the timeout (continue.time) and the interval time attribute (continue.groups), wherein the interface attributes are based on the business execution interface, the query interface, the rollback interface and the event listening interface to handle the abnormal situation corresponding to the cause of the process service failure. Specifically, the above interfaces are used to notify the relevant business components to perform corresponding processing; more specifically, the following interfaces are designed: ProcessService interface: used to execute business logic, such as processing orders, transactions, etc.; Queryable interface: used to query the business status and check whether the execution is successful; Reversible interface: used to perform rollback operations in the event of an exception or failure to prevent data inconsistency; ElementListener interface: used to monitor and process events (such as exceptions, successes, etc.) occurring during the business execution process, and notify related components; exception handling mechanism: when the business execution fails or is abnormal, EventListener is triggered, the business status is checked through Query, and corresponding rollback or compensation operations are performed according to the status; by defining the processing method of the interface: ProcessService interface: define the execute() method to process the core business logic. Throw a custom BusinessException in an abnormal situation for subsequent processing; Queryable interface: defines the checkStatus() method to query the execution status of the business and check whether the process is successful; Reversible interface: defines the reverse() method to roll back the business. When the business execution fails, the status will be set to "FAILURE" and the executed operation will be undone through the rollback method; ElementListene interface: listens to the events of business execution. According to different event types (such as "SUCCESS" or "FAILURE"), the corresponding operation is triggered. In case of failure, the event handler will call reverse() to roll back the operation; Event-driven mechanism: In the execute() method, when the business processing succeeds or fails, the corresponding event will be triggered, and these events will be handled by the onEvent() method.
[0020] S30: Execute corresponding process services according to the interface attributes.
[0021] It can be understood that based on the interface properties mentioned above, the achievable process services include one or more of retrying the service according to a specified number of times, re-pulling the service, or retrying the service according to a specified time, wherein the data involved in the process service may be order data, payment data, or notification data in the order system.
[0022] In this embodiment, abnormal process services are handled through interface attributes specially set by the process to maintain business consistency without borrowing the existing two-stage processing flow. At the same time, due to the interface attributes, the corresponding process business can be directly re-executed without node rollback, thereby ensuring process service efficiency. When an abnormal process service occurs, it is handled in a timely manner through the interface attributes to ensure that the process service is not interrupted, thereby ensuring the high availability of the process service.
[0023] Further, the determining, by a preset process, the interface attribute corresponding to the cause of the process service failure includes: When the cause of the process service failure is multiple service exceptions, determining a retry count attribute corresponding to the multiple service exceptions; or / and, when the cause of the process service failure is that the service response time is too long, determining a time attribute of a timeout corresponding to the service response time being too long; or / and, when the cause of the process service failure is that the service response time is too long, determining an interval time attribute corresponding to the service response time being too long; Or / and, when the cause of the process service failure is that the current service is under maintenance, determining an interval time attribute corresponding to the current service being under maintenance.
[0024] Understandably, the maxRetry (number of retries) attribute indicates the maximum number of times a user can try to retrieve data. If the result of the user's operation causes the service to have multiple exceptions, the preset process can obtain the latest data by retrying to ensure the consistency and integrity of the data; the continue.time (timeout time) attribute indicates how many seconds the service can wait before continuing to try to obtain data after receiving a user request. If the result of the user's operation causes the service to take too long to respond, the preset process can restart the service to ensure the timeliness of the data; the continue.groups (interval time) attribute indicates that after the service receives a user request, if no new data is generated within a period of time, the preset process will continue to try to obtain data. If the result of the user's operation causes the service to take too long to respond, or the service is currently under maintenance, the preset process can retry to obtain data through the set continue.groups (interval time) to ensure the timeliness and reliability of the data; Specifically, the retry count attribute will continue to try according to the set retry count until the maximum number of times is reached; the timeout time attribute will terminate the current attempt if it is determined that no data is returned within the timeout period, and immediately retry to obtain data; the interval time attribute will initiate a request again if no new data is obtained within the specified interval time, until the acquisition is successful or the maximum number of retries is reached; This embodiment ensures that services can be obtained in a timely and reliable manner under abnormal circumstances, thereby ensuring system stability and business consistency through the single practical use or / and combination of the retry number, timeout time and interval time attributes.
[0025] like Figure 5 As shown, the relationship between the process service and the preset process is given. Further, before executing the corresponding process service according to the interface attribute, it also includes: Establishing the association relationship between the process services in advance; each process service can be transferred in a preset order; An association relationship between the preset process and the process service is established in advance; the preset process can be associated with the process service respectively.
[0026] Understandably, the association relationship between process services is a sequential relationship (each process service has an association relationship, but each process service is relatively independent, such as creating an order service only creates an order service, and a payment service only does payment-related business. In this way, the business process is clear and conducive to development), that is, after the previous process service is completed, the next node can enter the next sequential process service. The process service in each node is a transaction executed by a database. In this embodiment, a DB (Database) database can be preferably selected on the node, which refers to a warehouse for storing data. It is a collection of data organized, stored and managed according to a certain data structure; the association relationship between the preset process and the process service is that the processing of the process service needs to be executed based on the preset process. After the preset process is executed, the state of the process service can be changed; This embodiment pre-sets the association relationship between process services, which can automatically flow in a predetermined order, reduce manual intervention, and improve the automation level and execution efficiency of the workflow; different preset processes can be executed through associated process services, improving the execution efficiency of the service process.
[0027] Further, executing the corresponding process service according to the interface attribute includes: Execute a process service with a preset number of retries according to the retry number attribute; or / and, disconnecting the process service according to the time attribute of the timeout, and re-executing the process service; Or / and, executing process services at multiple time intervals according to the interval time attribute.
[0028] It can be understood that what is described here is the case of executing the corresponding process service according to the interface attributes, and the specific execution process is consistent with the above; The retry mechanism of this embodiment effectively improves the fault tolerance of the system and reduces the risk of failure of the entire process due to one-time errors; the timeout mechanism avoids the situation where the process service is stuck or suspended for a long time, ensuring that the process can continue to move forward, improving the overall efficiency and response speed of the system; the interval time mechanism can execute multiple process services in sequence according to preset time intervals, which is suitable for process services that need to be repeatedly executed within a specific time period, and provides a flexible scheduling mechanism.
[0029] Further, the executing corresponding process service according to the interface attribute includes: When the process service is to create an order, under the interface attributes, the insertion operation of the order is processed through the first preset interface, and the rollback or invalidation operation of the order is processed through the second preset interface.
[0030] Understandably, the process service for creating an order implements operations through two preset interfaces. During the operation, it will determine whether the process service has an exception. In the event of an exception, the corresponding processing is performed through the interface attributes. The preset interfaces include the first preset interface Executor (normal business writes data into the table) and the second preset interface Reverser (rollback business, roll back or invalidate the data in the executor; Specifically, through the first preset interface, data is written into the specified database table according to business rules, for example, order data is written into the order table, and inventory changes are written into the inventory table; when performing the write operation, ensure that all related business operations (such as multi-table writes) can be successfully completed; call the second preset interface under specific trigger adjustments, such as: business operation failure, user cancellation operation, system error, etc. After the condition is detected, the second preset interface is then called to perform a rollback operation, and before performing the rollback operation, obtain the operation-related data previously performed through the first preset interface (the data is usually obtained through the log or status information in the database), and find the record corresponding to the operation to be rolled back to ensure the accuracy of the rollback, wherein the rollback operation includes: deleting data: deleting the records previously written through the first preset interface from the database; marking data invalid: if you do not want to completely delete the data, you can update the status field of the record and mark it as "invalid" or "rolled back" so that the record is no longer effective; reverse operation: in some cases, you may need to perform an operation opposite to the original operation. For example, if the first preset interface increases the inventory, the first preset interface will reduce the corresponding inventory; The first preset interface in this embodiment is used to perform normal business operations, ensure that the business logic is completed smoothly, and record the status; the second preset interface is used to perform rollback or failure processing according to the operation log or status information to ensure that it can be restored to a safe state when a problem occurs. In summary, this embodiment can ensure that the system has the ability to automatically execute and roll back when the process service is to create an order, thereby improving availability and fault tolerance.
[0031] Further, executing the corresponding process service according to the interface attribute includes: When the process service is payment, different payment services are selected through business parameters under the interface attributes; Calling a preset payment interface through a first preset interface, and determining a payment status of the preset payment interface; Different processing strategies are implemented according to the payment situation.
[0032] Understandably, when the process service is payment, the business parameter can be one or more of QR code payment and APP payment. Both QR code payment and APP payment select payment services based on Condition. The first preset interface is still the Executor interface, which implements the call to the third-party payment interface. When there is an interaction anomaly (such as timeout or network anomaly) in the third-party payment interface, it is necessary to reversely check whether the payment result is successful, failed or unknown through the Query interface. If the payment situation is unknown, the processing strategy is to wait for the next interval to continue the query. If the payment situation returns successfully, the processing strategy is to continue the next process. If the payment situation fails, the processing strategy is to monitor the failure event and send a rollback. The rollback is to reversely roll back the execution of the Reverser interface in the process service in the order of the preset process configuration service. Specifically, under the interface properties, different payment methods are selected according to the Condition conditions; payment operations are executed through the Executor interface. When payment exceptions occur (such as timeouts, network problems), the payment results are checked through the Query interface to determine the actual status of the payment; when the payment status is unknown, wait for a period of time and query again until the payment result is clear (successful or failed); after the payment is successful, the system continues the subsequent process services; when the payment fails, a rollback is triggered in the configured order, and the Reverser interface is called to undo the executed operations; rollback or failure events are recorded, and tracked and alarmed through the monitoring system; This embodiment ensures that in the event of payment anomalies or failures, it can be reliably rolled back to a safe state, thereby ensuring system stability and business consistency.
[0033] Further, executing the corresponding process service according to the interface attribute includes: When the process service is a subsequent notification, determining whether the business is a core business; When it is a non-core business, an asynchronous operation is performed under the interface attributes. Understandably, the objects of subsequent notification include accounts associated with various systems; non-core business often refers to those operations that do not directly affect the main business process. If these operations are executed slowly or fail, they usually will not interrupt the main process.
[0034] Specifically, under the interface attributes, the payment request submitted by the user on the payment page is obtained, and the payment result is processed and synchronously returned to the user through the payment system. The payment system sends an asynchronous notification to the order system to update the payment status; the account system is asynchronously notified through the message queue or callback mechanism to update the user's account balance or points information; after confirming that each system has received the asynchronous notification, data processing and result confirmation are performed; The asynchronous operation of this embodiment can make the payment process more efficient and flexible. At the same time, asynchronous operations are performed on non-core businesses to improve the efficiency and response efficiency of the system.
[0035] It should be noted that in the above-mentioned implementation method of executing the corresponding process service according to the interface attributes, that is, when the process service is to create an order, when the process service is to provide subsequent notifications, and when the process service is to provide subsequent notifications, corresponding data processing will be performed through the interface attributes in the event of an exception.
[0036] To sum up, the above provides a method for processing business consistency. After determining that the user operates the business process and causes the process service to fail, the cause of the process service failure is obtained; the interface attributes corresponding to the cause of the process service failure are determined through a preset process; and the corresponding process service is executed according to the interface attributes. The interface attributes specially set by the process are used to handle abnormal process services to maintain business consistency, without borrowing the existing two-stage processing flow. At the same time, due to the interface attributes, the corresponding process business can be directly re-executed without node rollback, ensuring the efficiency of process services. When abnormal process services occur, timely processing is performed through the interface attributes to ensure that the process services are not interrupted, thereby ensuring the high availability of process services; the existing two-stage processing stage can only be used for core business processes (such as payment, accounting and other strong transaction process designs), which is not suitable for all microservice designs. This method uses the TCC (Try-Confirm-Cancel) mode, which is a strong transaction solution for distributed transaction management. It is mainly used to ensure consistency and data reliability in multiple distributed systems. The interface and interface attributes are used to notify the business component to process. Try: reserve resources or lock the required business resources, but do not actually execute the transaction operation, check the availability of the business system, and prepare to execute the operation. Confirm: actually execute the transaction operation, submit the reserved resources, and execute after the Try succeeds and ensures that all business logics are normal. Cancel: if the Try stage fails or Confirm If the stage fails to execute, a rollback operation is performed to release the reserved resources; the preset process adopts the interface attribute processing method to achieve high availability, high performance and high reliability, and through the idea of distributed system and the interface backwash method, transaction consistency can be achieved between multiple nodes, and the stability and scalability of the system can be guaranteed. That is, in the strong transaction stage, according to the cause of process service failure corresponding to different exceptions after user operations, the preset process can take different measures to restart the service, and help business components better handle exceptions through the set interface attributes, thereby ensuring business consistency and integrity.
[0037] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0038] In one embodiment, a service consistency processing device is provided, and the service consistency processing device corresponds to the service consistency processing method in the above embodiment. Figure 3 As shown, the service consistency processing device includes an acquisition module 11, a determination module 12 and an execution module 13. Each functional module is described in detail as follows: An acquisition module 11 is used to acquire the cause of the process service failure after determining that the process service fails due to the user operating the business process; A determination module 12, configured to determine, through a preset process, an interface attribute corresponding to the cause of the process service failure; The execution module 13 is used to execute the corresponding process service according to the interface attribute.
[0039] Further, the determination module 12 includes: A first determination submodule, configured to determine, when the cause of the process service failure is multiple service exceptions, a retry count attribute corresponding to the multiple service exceptions; or / and, a second determining submodule, configured to determine a time attribute of a timeout corresponding to a too long service response time when the cause of the process service failure is a too long service response time; or / and, a third determining submodule, configured to determine, when the cause of the process service failure is that the service response time is too long, an interval time attribute corresponding to the service response time being too long; Or / and, a fourth determining submodule, configured to determine, when the cause of the process service failure is that the current service is under maintenance, an interval time attribute corresponding to the current service being under maintenance.
[0040] Furthermore, the service consistency processing device also includes: The first establishment module is used to pre-establish the association relationship between the process services; each of the process services can be transferred in a preset order; The second establishing module is used to pre-establish the association relationship between the preset process and the process service; the preset process can be associated with the process service respectively.
[0041] Furthermore, the execution module includes: A first execution submodule, configured to execute a process service with a preset number of retries according to the retry number attribute; or / and, a second execution submodule, configured to disconnect the process service according to the time attribute of the timeout, and re-execute the process service; Or / and, a third execution submodule, configured to execute process services at multiple time intervals according to the interval time attribute.
[0042] Furthermore, the execution module includes: The operation submodule is used to process the insertion operation of the order through the first preset interface under the interface attributes when the process service is to create an order, and to process the rollback or invalidation operation of the order through the second preset interface.
[0043] Furthermore, the execution module includes: A selection submodule, for selecting different payment services through business parameters under the interface attributes when the process service is payment; A fifth determination submodule, configured to call a preset payment interface through the first preset interface and determine a payment status of the preset payment interface; The fourth execution submodule is used to execute different processing strategies according to the payment situation.
[0044] Furthermore, the execution module includes: A sixth determination submodule, configured to determine whether the service is a core service when the process service is a subsequent notification; The fifth execution submodule is used to execute asynchronous operations under the interface attributes when it is a non-core business.
[0045] For the specific definition of the processing device for business consistency, please refer to the definition of the processing method for business consistency in the above text, which will not be repeated here. Each module in the above-mentioned processing device for business consistency can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0046] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the business consistency processing method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business consistency processing method is implemented.
[0047] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for processing service consistency in the above embodiment are implemented, such as Figure 2 Steps S10 to S30 shown include the following steps: After determining that the process service fails due to the user operating the business process, obtain the cause of the process service failure; Determining, by a preset process, an interface attribute corresponding to a cause of the process service failure; Execute corresponding process services according to the interface attributes.
[0048] Alternatively, when the processor executes the computer program, the functions of the modules / units of the service consistency processing device in the above embodiment are realized, for example Figure 3 The functions of modules 11 to 13 are shown in Figure 1. To avoid repetition, they will not be described here.
[0049] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for processing service consistency in the above embodiment are implemented, such as Figure 2 Steps S10 to S30 shown include the following steps: After determining that the process service fails due to the user operating the business process, obtain the cause of the process service failure; Determining, by a preset process, an interface attribute corresponding to a cause of the process service failure; Execute corresponding process services according to the interface attributes.
[0050] Alternatively, when the computer program is executed by the processor, the functions of the modules / units of the service consistency processing device in the above embodiment are realized, for example Figure 3 The functions of modules 11 to 13 are shown in Figure 1. To avoid repetition, they will not be described here.
[0051] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0052] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0053] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for processing service consistency, characterized in that: include: After determining that the process service fails due to the user operating the business process, obtain the cause of the process service failure; Determining, by a preset process, an interface attribute corresponding to a cause of the process service failure; Execute corresponding process services according to the interface attributes.
2. The method for processing service consistency according to claim 1, characterized in that: The determining, by a preset process, the interface attribute corresponding to the cause of the process service failure includes: When the cause of the process service failure is multiple service exceptions, determining a retry count attribute corresponding to the multiple service exceptions; or / and, when the cause of the process service failure is that the service response time is too long, determining a time attribute of a timeout corresponding to the service response time being too long; or / and, when the cause of the process service failure is that the service response time is too long, determining an interval time attribute corresponding to the service response time being too long; Or / and, when the cause of the process service failure is that the current service is under maintenance, determining an interval time attribute corresponding to the current service being under maintenance.
3. The method for processing service consistency according to claim 1, characterized in that: Before executing the corresponding process service according to the interface attribute, the method further includes: Establishing the association relationship between the process services in advance; each process service can be transferred in a preset order; An association relationship between the preset process and the process service is established in advance; the preset process can be associated with the process service respectively.
4. The method for processing service consistency according to claim 2, characterized in that: The executing corresponding process service according to the interface attribute includes: Execute a process service with a preset number of retries according to the retry number attribute; or / and, disconnecting the process service according to the time attribute of the timeout, and re-executing the process service; Or / and, executing process services at multiple time intervals according to the interval time attribute.
5. The method for processing service consistency according to claim 1, characterized in that: The executing corresponding process service according to the interface attribute includes: When the process service is to create an order, under the interface attributes, the insertion operation of the order is processed through the first preset interface, and the rollback or invalidation operation of the order is processed through the second preset interface.
6. The method for processing service consistency according to claim 1, characterized in that: The executing corresponding process service according to the interface attribute includes: When the process service is payment, different payment services are selected through business parameters under the interface attributes; Calling a preset payment interface through a first preset interface, and determining a payment status of the preset payment interface; Different processing strategies are implemented according to the payment situation.
7. The method for processing service consistency according to claim 1, characterized in that: The executing corresponding process service according to the interface attribute includes: When the process service is a subsequent notification, determining whether the business is a core business; When it is a non-core business, an asynchronous operation is performed under the interface attributes.
8. A service consistency processing device, characterized in that: include: An acquisition module is used to obtain the cause of the process service failure after determining that the user operates the business process and causes the process service failure; A determination module, used to determine the interface attribute corresponding to the cause of the process service failure through a preset process; An execution module is used to execute corresponding process services according to the interface attributes.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for processing service consistency as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for processing service consistency as claimed in any one of claims 1 to 7 is implemented.