Work order processing method, device, system, storage medium and program product
By introducing message queues and automatic proxy servers into the automated work ticket system, the data consistency problem in distributed processing is solved, and the stability and orderliness of work ticket processing are achieved.
Patent Information
- Application Number
- CN202011631162.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2041-05-27
AI Technical Summary
The existing automated work order system cannot effectively ensure data consistency during distributed processing, resulting in the occurrence of dirty data and instability of work order processing.
By introducing a message queue (such as Kafka) and an automatic proxy server, the pending work orders are obtained and the target data status in the database is changed, and the work orders are recorded as processing status, and then the work orders are added to the message queue, and sent to the work order processing terminal for processing through the message queue. Finally, the processing result is updated through the database status through the message queue.
It realizes data consistency in the distributed system, avoids the emergence of dirty data, and ensures the stability and orderliness of work order processing.
Smart Images

Figure CN112632093B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to communication technologies, and in particular, to a work order processing method, device, system, storage medium, and program product. Background Art
[0002] A work order processing system, also known as a work order management system, can perform a series of operations such as managing, processing, maintaining, and tracking a work order in a targeted manner according to the needs of different organizations, departments, and external customers.
[0003] Existing automated work order systems usually adopt distributed transaction solutions to perform distributed processing on work orders, such as the 2PC (Two Phase Commit) solution, the TCC (Try-Confirm / Cancel) transaction, the MQ (Message Queue) transaction, etc. However, when existing automated work order systems perform distributed processing on work orders, they cannot effectively ensure data consistency in the distributed system, resulting in dirty data in the distributed system and being unable to stably and reliably process work orders in an orderly manner. Summary of the Invention
[0004] Embodiments of the present disclosure provide a work order processing method, device, system, storage medium, and program product to solve the data consistency problem of the automated work order system and stably and reliably process work orders in an orderly manner.
[0005] In a first aspect, an embodiment of the present disclosure provides a work order processing method applied to an automatic proxy server. The method includes:
[0006] Obtain a work order to be processed, change the corresponding target data in the database according to the work order to be processed, and record the status of the target data as the processing status;
[0007] Add the work order to be processed to a message queue, so that the message queue sends the work order to be processed to any work order processing terminal in the work order processing terminal cluster, and the work order processing terminal processes the target data in the service cluster according to the work order to be processed;
[0008] Receive the processing result sent by the work order processing terminal through the message queue;
[0009] Update the status of the target data in the database according to the processing result.
[0010] In a second aspect, an embodiment of the present disclosure provides a work order processing method applied to a work order processing terminal. The method includes:
[0011] Receive the work order to be processed sent by the message queue, where the work order to be processed is obtained by the automatic proxy server, changes the corresponding target data in the database, records the status of the target data as the processing status, and then adds it to the message queue;
[0012] Process the target data in the service cluster according to the work order to be processed;
[0013] Send the processing result to the automatic proxy server through the message queue, so that the automatic proxy server updates the status of the target data in the database according to the processing result.
[0014] Thirdly, an embodiment of the present disclosure provides an automatic proxy server, including:
[0015] An acquisition module, configured to acquire a work order to be processed;
[0016] A processing module, configured to change the corresponding target data in the database according to the work order to be processed, and record the status of the target data as the processing status;
[0017] A sending module, configured to add the work order to be processed to the message queue, so that the message queue sends the work order to be processed to any work order processing terminal in the work order processing terminal cluster, and the work order processing terminal processes the target data in the service cluster according to the work order to be processed;
[0018] A receiving module, configured to receive the processing result sent by the work order processing terminal through the message queue;
[0019] The processing module is further configured to update the status of the target data in the database according to the processing result.
[0020] Fourthly, an embodiment of the present disclosure provides a work order processing terminal, including:
[0021] A receiving module, configured to receive the work order to be processed sent by the message queue, where the work order to be processed is obtained by the automatic proxy server, changes the corresponding target data in the database, records the status of the target data as the processing status, and then adds it to the message queue;
[0022] A processing module, configured to process the target data in the service cluster according to the work order to be processed;
[0023] A sending module, configured to send the processing result to the automatic proxy server through the message queue, so that the automatic proxy server updates the status of the target data in the database according to the processing result.
[0024] Fifthly, an embodiment of the present disclosure provides an automatic proxy server, including: a memory and a processor;
[0025] The memory is used to store program instructions;
[0026] The processor is used to call the program instructions in the memory to execute the method described in the first aspect.
[0027] In a sixth aspect, an embodiment of the present disclosure provides a work order processing terminal, including: a memory and a processor;
[0028] The memory is used to store program instructions;
[0029] The processor is used to call the program instructions in the memory to execute the method described in the second aspect.
[0030] In a seventh aspect, an embodiment of the present disclosure provides a work order processing system, including: the automatic proxy server described in the fifth aspect, the work order processing terminal described in the sixth aspect, a message queue server, and a service cluster.
[0031] In an eighth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored; when the computer program is executed, the method described in the first aspect is implemented.
[0032] In a ninth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored; when the computer program is executed, the method described in the second aspect is implemented.
[0033] In a tenth aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions, and when the computer execution instructions are executed by a processor, the method described in the first aspect is implemented.
[0034] In an eleventh aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions, and when the computer execution instructions are executed by a processor, the method described in the second aspect is implemented.
[0035] The work order processing method, device, system, storage medium and program product provided by the embodiments of the present disclosure obtain the work order to be processed through an automatic proxy server, change the corresponding target data in the database according to the work order to be processed, record the status of the target data as the processing status, then add the work order to the message queue, and the message queue sends the work order to any work order processing terminal in the work order processing terminal cluster. The work order processing terminal processes the target data in the service cluster according to the work order to be processed; the work order processing terminal sends the processing result to the automatic proxy server through the message queue, and the automatic proxy server can update the status of the target data in the database according to the processing result. By recording the status of the target data changed according to the work order to be processed in the database as the processing status through the automatic proxy server, and then updating the status of the target data in the database according to the processing result after the work order to be processed is completed, the target data in the database and the target data in the service cluster can be ensured to be consistent, effectively avoiding the appearance of dirty data, and being able to process work orders stably and reliably in an orderly manner.
[0036] Various feasible embodiments of the present disclosure and their technical advantages will be described in detail below. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0038] Figure 1 It is a schematic diagram of a work order processing system provided by an embodiment of the present disclosure;
[0039] Figure 2 It is a flowchart of a work order processing method provided by an embodiment of the present disclosure;
[0040] Figure 3 It is a flowchart of a work order processing method provided by another embodiment of the present disclosure;
[0041] Figure 4 It is a flowchart of a work order processing method provided by another embodiment of the present disclosure;
[0042] Figure 5 It is a structural diagram of an automatic proxy server provided by an embodiment of the present disclosure;
[0043] Figure 6 It is a structural diagram of a work order processing terminal provided by an embodiment of the present disclosure;
[0044] Figure 7 It is a structural diagram of an automatic proxy server provided by another embodiment of the present disclosure;
[0045] Figure 8 It is a structural diagram of a work order processing terminal provided by another embodiment of the present disclosure.
[0046] Through the above-mentioned accompanying drawings, specific embodiments of the present disclosure have been shown, and will be described in more detail hereinafter. These drawings and the written description are not intended to limit the scope of the concept of the present disclosure in any way, but to illustrate the concept of the present disclosure to those skilled in the art by reference to specific embodiments. Detailed Description of the Embodiments
[0047] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0048] Existing automated work order systems usually adopt distributed transaction solutions to process work orders distributively, such as the 2PC (Two Phase Commit) solution, the TCC (Try-Confirm / Cancel) transaction, the MQ (Message Queue) transaction, etc.
[0049] For example, for the 2PC solution, it is divided into a preparation phase and a commit phase. In the preparation phase, the coordinator sends the transaction content to all participants, asks whether the transaction can be committed, and waits for the answers of all participants. Each participant executes the transaction operation and records the undo and redo information in the transaction log (without committing the transaction). If the participant executes successfully, it feedbacks yes to the coordinator, indicating that it can be committed; if the execution fails, it feedbacks no to the coordinator, indicating that it cannot be committed. In the commit phase, if the coordinator receives a failure message from a participant or times out without receiving a message, it directly sends a rollback message to each participant. Otherwise, it sends a commit message, and the participant executes the commit or rollback operation according to the message sent by the coordinator, and releases all resources used in the transaction processing.
[0050] The 2PC solution has the following problems: performance problems, all participants are in a synchronous blocking state during the transaction commit phase, occupying system resources and easily causing performance bottlenecks; reliability problems, if there is a single point of failure problem with the coordinator, the participants will be in a locked state all the time; data inconsistency problems, in the commit phase, if a local network problem occurs, some transaction participants receive the commit message while others do not, resulting in inconsistent node data.
[0051] For TCC transactions, their origin mainly includes: cross-database, distributed transactions brought about by horizontal database splitting, to ensure the atomicity of cross-database operations; cross-application, distributed transactions brought about by application splitting, to ensure the atomicity of cross-application business operations.
[0052] The TCC solution is divided into two phases: Try and Confirm / Cancel. In the Try phase, all business checks (consistency) are completed, necessary business resources are reserved (isolation type), and the business is attempted to be executed. In the Confirm / Cancel phase, depending on whether all operations in the Try phase are executed normally, Confirm or Cancel is continued. The Confirm and Cancel operations are idempotent. When all services in the Try phase are executed normally, the Confirm operation is executed to confirm the business logic operation. When there is a service execution failure in the Try phase, the Cancel operation is executed to release the business resources reserved in the Try phase.
[0053] TCC is an application-layer transaction 2PC. Its emergence is to solve the problem of atomicity of cross-application business operations brought about by application splitting. The TCC distributed transaction solution is used to ensure that the calls of each interface are either all successful or all rolled back. For example, the three most core services of an Internet finance enterprise: transactions, payments, and accounting. However, the Try, Confirm, and Cancel operations all need to be provided by the business, resulting in high development costs. At the same time, in the actual system development process, the calls between services may be asynchronous, that is, a service sends a message to MQ, and then another service consumes a message from MQ for processing.
[0054] For MQ transactions, MQ transactions across services are divided into a transaction active party and a transaction passive party. The implementation process is as follows: the active party sends a half message to the MQ Server. After the MQ Server persists the message successfully, it sends an ack confirmation message to the active party. The transaction active party starts to execute the local transaction logic (such as updating the database), and submits a second confirmation to the MQ Server according to the execution of the local transaction. If the MQ Server receives the commit status, it marks the half message as deliverable, and the transaction passive party will finally receive the message. If the MQ Server receives a rollback, it deletes the half message, and the subscriber will not receive the message.
[0055] One of the biggest dependencies for MQ transactions to ensure high service availability is the high availability of MQ. MQ transactions are applicable when the participating parties in the transaction support idempotent operations, have low requirements for data consistency, can tolerate data inconsistency up to a manual inspection cycle in business, and have a reconciliation / verification system as a backup in business.
[0056] In summary, when the existing automated work order system performs distributed processing on work orders based on various distributed transactions, it cannot effectively ensure data consistency in the distributed system, resulting in dirty data in the distributed system and unable to process work orders stably and reliably in an orderly manner.
[0057] To solve the above technical problems, the embodiments of the present disclosure provide a work order processing method, which can ensure data consistency in the distributed system, effectively avoid the occurrence of dirty data, and can process work orders stably and reliably in an orderly manner. Based on this, a message queue, such as Kafka, is introduced in the embodiments of the present disclosure. Kafka is a high-throughput distributed publish-subscribe message system. Based on its single partition characteristic, it can ensure the order of work orders. At the same time, the asynchronous characteristic of decoupling applications can ensure the service scalability of the work order processing system. Based on the message queue, an API interface (Application Programming Interface) for receiving work orders to be processed can be provided through an automatic proxy server (Autoproxy), receive the work orders to be processed (API requests) sent by users, and change the corresponding target data in the database according to the work orders to be processed. At the same time, record the status of the target data as the processing status (i.e., the intermediate state), and then add the work orders to be processed to the message queue. The message queue caches the messages and communicates with any work order processing terminal in the backend work order processing terminal cluster, that is, sends the work orders to be processed to any work order processing terminal in the work order processing terminal cluster in sequence. The work order processing terminal processes the target data in the service cluster by calling the target network device in the service cluster according to the work order to be processed. After the work order processing terminal finishes processing, it sends the processing result to the automatic proxy server through the message queue. The automatic proxy server can update the status of the target data in the database according to the processing result.
[0058] For example, if the processing result is successful, the automatic proxy server updates the status of the target data in the database to the processing completed state (i.e., the final state). At this time, it can be ensured that the target data in the database and the target data in the service cluster are both the latest data after successful processing. If the processing result is a failure, a data rollback operation is performed on the target data. At this time, the target data in the database and the target data in the service cluster are both in the initial state before the work order to be processed. Through the above process, the data in the database and the data in the service cluster in the distributed work order processing system can be ensured to be consistent, effectively avoiding the occurrence of dirty data.
[0059] The operation of the automatic proxy server database is a local transaction. Sending the work order to be processed to the message queue constitutes a distributed transaction and is the active party of the MQ transaction. The work order processing terminal receives the work order to be processed sent by the message queue and acts as the passive party of the MQ transaction. The work order processing terminal can operate the service cluster. In theory, the work order processing terminal is also the transaction coordinator. If the processing of the work order to be processed fails, a rollback is required, but this is a low-probability event. The work order processing terminal does not support rollback, but as a consumer of the message queue, it needs to support idempotency. The automatic proxy server can perform a rollback on the operation database when the processing of the work order to be processed fails.
[0060] The work order processing method of the present disclosure embodiment is applicable to a work order processing system as Figure 1 shown, including an automatic proxy server 101, a message queue 102, a database 103, a work order processing terminal 104, and a service cluster 105. Among them, the automatic proxy server 101 can act as an API proxy, support reading and writing of control plane parameters related to each network service of the service cluster 105, and together with the work order processing terminal 104, complete the addition, deletion, modification, and query of control planes related to each network service of the service cluster 105. One or more automatic proxy servers 101 can be deployed. The automatic proxy server 101 can receive a work order to be processed (API request), change the corresponding target data in the database 103 according to the work order to be processed, and record the status of the target data as the processing status, and then add the work order to be processed to the message queue 102. The message queue 102 can be deployed on a separate server or in the automatic proxy server 101 or the work order processing terminal 104. The automatic proxy server 101 is connected to the work order processing terminal cluster through the message queue 102. The work order processing terminal cluster includes multiple work order processing terminals 104, that is, the work order processing terminal 104 can consume the work order to be processed from the message queue 102, and the work order processing terminal 104 is communicatively connected to the service cluster 105 and can process the target data in the service cluster 105 according to the work order to be processed. The service cluster 105 can include, but is not limited to, a data gateway cluster, a DNS (Domain Name System) cluster, a NAT (Network Address Translation) cluster, etc. Further, after the work order processing terminal 104 finishes processing the work order to be processed, it can send the processing result to the automatic proxy server 101 through the message queue 102, and the automatic proxy server 101 can update the status of the target data in the database 103 according to the processing result.
[0061] The following uses specific embodiments to elaborate in detail on the technical solutions of the embodiments of the present disclosure and how the technical solutions of this application solve the above technical problems. The following several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The following will describe the embodiments of the present disclosure in conjunction with the accompanying drawings.
[0062] Figure 2 This is a flowchart of a work order processing method provided by an embodiment of the present invention. This embodiment provides a work order processing method, and its execution entity is an automatic proxy server (Autoproxy), or other devices capable of implementing this method are also acceptable. The specific steps of this work order processing method are as follows:
[0063] S201. Obtain the work order to be processed, change the corresponding target data in the database according to the work order to be processed, and record the status of the target data as the processing status.
[0064] In this embodiment, the automatic proxy server can act as an API proxy, support reading and writing of control plane parameters related to each network service in the service cluster, and can receive work orders sent by users to the API interface through the network. Different interfaces can receive different types or different functions of work orders. In addition, the automatic proxy server also needs to support the operation of distributed transactions, centralized control of multiple computer rooms, and ensure the high availability of the system.
[0065] The local transaction of the automatic proxy server can be divided into the Try stage and the Confirm / Cancel stage. In the Try stage, after completing the database verification, the corresponding target data in the database can be changed according to the work order to be processed, and the status of the target data is recorded as the processing status (intermediate state). The corresponding target data in the database is the target data (target field) that the work order to be processed needs to operate on in the service cluster. The Confirm / Cancel stage is carried out after the work order to be processed is added to the message queue and the work order processing terminal returns the processing result after processing. Specifically, it can execute Confirm or Cancel according to the status of the target data in the database and whether the processing result is successful. Confirm and Cancel rely on the idempotency supported by the native database operations. If the processing result is successful, the automatic proxy server updates the status of the target data in the database to the processing completed status (i.e., the final state); if the processing result is a failure, a data rollback operation is performed on the target data. In addition, the automatic proxy server can implement computer room concurrency based on the golang channel mechanism. Specifically, for the characteristics of different work order processing terminals in multiple computer rooms, relying on the golang channel mechanism, computer room and cluster concurrency are achieved, the interface throughput is improved, and the operations between computer rooms are not affected.
[0066] S202. Add the to-be-processed work order to the message queue, so that the message queue sends the to-be-processed work order to any work order processing terminal in the work order processing terminal cluster, and the work order processing terminal processes the target data in the service cluster according to the to-be-processed work order.
[0067] In this embodiment, after the automatic proxy server finishes recording the status of the target data as the processing status in the database, it adds the to-be-processed work order to the message queue, and the message queue sequentially sends each to-be-processed work order added to the message queue to any work order processing terminal in the work order processing terminal cluster, so that the work order processing terminal processes the target data in the service cluster according to the to-be-processed work order.
[0068] Among them, the message queue can be Kafka, and of course it can also be other message queues. Taking Kafka as an example, the to-be-processed work orders in Kafka use partition as the smallest storage unit, and the storage of the to-be-processed work orders within the same partition can ensure orderliness. When sending the to-be-processed work order to Kafka, it can be set that the to-be-processed work order is sent to the same topic, and this topic has only one partition to ensure the orderliness of the storage of the to-be-processed work orders. Correspondingly, the work order processing terminal is a consumer of Kafka, and multiple work order processing terminals can respectively form different consumer groups. The consumers in one group subscribe to the to-be-processed work orders of the same topic, and each consumer corresponds to consuming one partition. When consuming the same topic and the same partition in a group, if the number of consumers is greater than the number of partitions, the extra consumers can be idle to ensure the orderliness of work order consumption.
[0069] In addition, there is only one consumer in the consumer group at the same time, that is, there is only one work order processing terminal consuming the to-be-processed work orders in the message queue; and after consuming the to-be-processed work orders, the uniqueness of work order execution can be further ensured through a distributed lock.
[0070] Furthermore, when the work order processing terminal receives the to-be-processed work order sent by the message queue, it processes the target data in the service cluster according to the to-be-processed work order. Specifically, it can call the proxy module to operate the network devices in the service cluster to process the to-be-processed work order, that is, process the target data in the service cluster according to the to-be-processed work order, where the network devices in the service cluster include but are not limited to data gateway clusters, DNS clusters, NAT clusters, etc.
[0071] S203. Receive the processing result sent by the work order processing terminal through the message queue.
[0072] In this embodiment, after the processing of the work order to be processed is completed, the work order processing terminal can send the processing result to the automatic proxy server through the message queue, that is, the automatic proxy server can obtain the processing result of the work order processing terminal for the work order to be processed from the message queue.
[0073] S204. Update the status of the target data in the database according to the processing result.
[0074] In this embodiment, after obtaining the processing result of the work order processing terminal for the work order to be processed, the above-mentioned Confirm / Cancel phase can be further executed, that is, the status of the target data in the database is updated according to the processing result.
[0075] Specifically, for example, if the processing result is successful, the automatic proxy server updates the status of the target data in the database to the processed completion status (i.e., the final state). At this time, it can be ensured that the target data in the database and the target data in the service cluster are both the latest data after successful processing. If the processing result is a failure, a data rollback operation is performed on the target data. At this time, the target data in the database and the target data in the service cluster are both in the initial state before the processing of the work order to be processed. Through the above process, the data in the database and the data in the service cluster in the distributed work order processing system can be ensured to be consistent, effectively avoiding the appearance of dirty data.
[0076] In addition, optionally, if the processing result is not received within the first preset time, it indicates that the work order processing terminal is likely to have failed to process the work order to be processed. Then, a data rollback operation is performed on the target data in the database; or, if it is determined that the process of adding the work order to be processed to the message queue fails, that is, the process of sending it to the message queue has already failed, then the work order processing terminal simply cannot process the target data in the service cluster according to the work order to be processed. That is, the target data in the service cluster is still in the initial state. Therefore, a data rollback operation is performed on the target data in the database to roll back the target data in the database to the initial state before the processing of the work order to be processed.
[0077] The work order processing method provided in this embodiment obtains the work order to be processed through an automatic proxy server, changes the corresponding target data in the database according to the work order to be processed, and records the status of the target data as the processed status. Then, the work order to be processed is added to the message queue, and the message queue sends the work order to be processed to any work order processing terminal in the work order processing terminal cluster. The work order processing terminal processes the target data in the service cluster according to the work order to be processed. The work order processing terminal sends the processing result to the automatic proxy server through the message queue, and the automatic proxy server can update the status of the target data in the database according to the processing result. By using the automatic proxy server to record the target data changed according to the work order to be processed in the database as the processed status, and updating the status of the target data in the database according to the processing result after the work order to be processed is completed, the target data in the database and the target data in the service cluster can be ensured to be consistent, effectively avoiding the appearance of dirty data, and being able to process work orders stably and reliably in an orderly manner.
[0078] Based on any of the above embodiments, there are multiple automatic proxy servers. In S201 of the above embodiments, changing the corresponding target data in the database according to the work order to be processed includes:
[0079] If the target data in the database is not locked, lock the target data, change the target data according to the work order to be processed, and release the lock after the target data is changed; or
[0080] If the target data in the database is locked by another automatic proxy server, wait until the lock of the target data is released, then lock the target data, change the target data according to the work order to be processed, and release the lock after the target data is changed; or
[0081] If the target data in the database is locked by another automatic proxy server, do not execute the change of the target data.
[0082] In this embodiment, there are multiple automatic proxy servers. The multiple automatic proxy servers can receive work orders to be processed simultaneously, but there is competition for the common resource, namely the database. To ensure the high availability (HA) of the automatic proxy servers in the case of multiple automatic proxy servers, a distributed lock mechanism can be added to the database. Here, high availability refers to improving the availability of the system and applications by minimizing the downtime caused by daily operations and sudden system crashes. Specifically, only one automatic proxy server can operate on the target data in the database at the same time. When operating, a lock is added to the target data, and other automatic proxy servers cannot operate on the target data and can only wait for the lock to be released before operating on the target data, or directly not operate. Optionally, in this embodiment, the distributed lock can be implemented through database transactions or ETCD, where ETCD is a distributed system for reliable key-value storage. The specific process of implementing the distributed lock is not limited here.
[0083] Based on any of the above embodiments, as Figure 3 shown, the method further includes:
[0084] S301. Monitor the status of each target data in the database through a monitoring thread, and find the first target data in the database whose processing status time exceeds a second preset time;
[0085] S302. According to the first target data, find the corresponding second target data in the service cluster;
[0086] S303. According to the second target data, update the status of the first target data in the database.
[0087] In this embodiment, to further ensure the consistency of the target data in the database and the target data in the service cluster, a monitoring thread and a self-healing thread are added to the automatic proxy server. The monitoring thread is used to monitor the status of each target data in the database, especially the target data in the processing state, and find the first target data whose processing status time exceeds the second preset time. That is, the first target data has been in the processing state for a long time, has not been changed to the processed completed state, and has not been rolled back. For such first target data, it is very likely that it is inconsistent with the corresponding target data (denoted as the second target data) in the service cluster. Therefore, the self-healing thread can be used to find the corresponding second target data in the service cluster, determine whether the second target data has been processed by the work order processing terminal according to the work order to be processed, and thus update the status of the first target data in the database according to the second target data.
[0088] Specifically, based on the second target data, it is determined whether the corresponding work order to be processed has been successfully processed. If the corresponding work order to be processed has been successfully processed, it indicates that the second target data has been successfully changed by the work order processing terminal, but the work order processing terminal fails to successfully return the processing result to the automatic proxy server, or the automatic proxy server does not update the status of the corresponding first target data in the database after receiving the processing result returned by the work order processing terminal. In this case, the status of the first target data in the database is updated to the processed completed status. Or, if the corresponding work order to be processed has not been successfully processed, it indicates that the second target data has not been successfully changed by the work order processing terminal. Then, in order to keep the first target data in the database consistent with the second target data, a data rollback operation is performed on the first target data.
[0089] Based on the above embodiments, the monitoring thread can also issue an alarm when a serious error occurs in the system and take manual intervention. For the work order processing terminal, when it monitors that the error type is the failure of a service update in the cluster, it can issue an alarm by means of text messages and / or emails, etc., and manual intervention is involved. In addition, it can also rely on the monitoring thread and the network traffic collection module to provide monitoring of abnormal traffic in the business network. The monitoring thread is transformed based on open-falcon (a monitoring system based on golang and python). For example, data is collected every 10s, cleaned, and then sent to the message queue. When abnormal traffic such as invalid traffic occurs, an alarm can be issued, and manual data update is supported, based on the requirements of the actual business party.
[0090] Figure 4 This is the flowchart of the work order processing method provided by the embodiments of the present invention. This embodiment provides a work order processing method, and the execution subject is any work order processing terminal in the work order processing terminal cluster. The specific steps of this work order processing method are as follows:
[0091] S401. Receive the work order to be processed sent by the message queue, where the work order to be processed is obtained by the automatic proxy server, changes the corresponding target data in the database, records the status of the target data as the processing status, and then adds it to the message queue;
[0092] S402. Process the target data in the service cluster according to the work order to be processed;
[0093] S403. Send the processing result to the automatic proxy server through the message queue, so that the automatic proxy server updates the status of the target data in the database according to the processing result.
[0094] The work order processing method described in this embodiment is the method flow on the work order processing terminal side in the above embodiments. The implementation principle and technical effects can be referred to the above embodiments, and will not be elaborated here.
[0095] Based on the above embodiments, the receipt of the work orders to be processed sent by the message queue includes:
[0096] Receiving multiple work orders to be processed with a preset topic sent by the message queue, and sorting the multiple work orders by time;
[0097] The processing of the target data in the service cluster according to the work order to be processed includes:
[0098] Processing the target data in the service cluster according to the multiple work orders to be processed in sequence according to the time order.
[0099] Based on the above embodiments, the processing of the target data in the service cluster in S402 according to the work order to be processed may specifically include:
[0100] If the target data in the service cluster or the corresponding service device is not locked, lock the target data or the corresponding service device, process the target data in the service cluster according to the work order to be processed, and release the lock after the processing is completed; or
[0101] If the target data in the service cluster or the corresponding service device is locked, wait until the lock is released, lock the target data or the corresponding service device, process the target data in the service cluster according to the work order to be processed, and release the lock after the processing is completed; or
[0102] If the target data in the service cluster or the corresponding service device is locked, do not perform the processing of the target data in the service cluster.
[0103] In this embodiment, since multiple work order processing terminals may operate on the same target data in the service cluster simultaneously, involving competition for the service cluster, in order to ensure high availability, the target data in the service cluster or the corresponding service device (data gateway, DNS, NAT, etc.) can be locked. Specifically, only one work order processing terminal can operate on the target data or target service device in the service cluster at the same time. When operating, lock the target data or target service device. Other work order processing terminals cannot operate on the target data and can only wait for the lock to be released to operate on the target data, or directly do not operate. Optionally, in this embodiment, a distributed lock can be implemented through a database transaction or ETCD. The specific process of implementing the distributed lock is not limited here.
[0104] Based on any of the above embodiments, the high availability of the work order processing system is mainly manifested in that when the number of work order processing systems changes, the work order processing system can still provide services stably. Specifically, the extra consumers in the above consumer group are idle, and the situations of increasing or decreasing the work order processing system are discussed:
[0105] When the work order processing system increases, the consumption rebalancing of the message queue cluster is immediately triggered, and the consumers of the work orders to be processed in the consumption message queue will re-elect, and the situation of duplicate execution of work orders will occur. Combining the above lock mechanism and the fact that the execution of work orders takes a certain amount of time, if the consumer A that is currently executing consumption has consumed message 1 and started to execute the work order, and a new consumer B is added at this time, triggering rebalancing, consumer B obtains the message, while the work order in A is still being executed, the offset (message offset, used to locate the position of the message) is not submitted, and the lock is not released. At this time, consumer B will still consume message 1 and wait for consumer A to release the lock and execute the work order again. For this situation, only idempotency guarantee needs to be added when the work order processing system executes the work order.
[0106] When the work order processing system decreases, the message queue cluster rebalancing is triggered after waiting for the session.Timeout duration, and the consumers of the consumed messages will re-elect, and the situation of duplicate consumption of work orders will occur, but the work orders will not be lost. Assume that consumer A consumes the message and then executes the work order, and does not submit the offset. After triggering rebalancing, consumer B consumes the message according to the offset that was last submitted by consumer A before crashing and maintained in the partition, resulting in duplicate consumption and executing the work order again. For this situation, only idempotency guarantee needs to be added when the work order processing system executes the work order.
[0107] In addition, the high availability of the work order processing system is also manifested in the stability of the consumption of work orders to be processed. Specifically, the consumption of work orders to be processed is based on the consumer group mechanism. First, the message consumption is maintained by the offset, which can avoid data loss caused by the latest offset (offsetNewest) and the problem of duplicate messages caused by the oldest offset (offsetOldest). At the same time, the offset of the message consumption is maintained by the message queue itself, rather than the local database, reducing the dependence on the work order execution and increasing the stability of the consumption of work orders to be processed, thus ensuring the high availability of the work order processing system.
[0108] Figure 5 This is the structural diagram of the automatic proxy server in the embodiment of the present invention. The automatic proxy server provided in this embodiment can execute the processing flow provided by the work order processing method embodiment on the automatic proxy server side, such as Figure 5As shown in the figure, the automatic proxy server 500 includes: an acquisition module 501, a processing module 502, a sending module 503, and a receiving module 504.
[0109] The acquisition module 501 is used to acquire the work order to be processed;
[0110] The processing module 502 is used to change the corresponding target data in the database according to the work order to be processed, and record the status of the target data as the processing status;
[0111] The sending module 503 is used to add the work order to be processed to the message queue, so that the message queue sends the work order to be processed to any work order processing terminal in the work order processing terminal cluster, and the work order processing terminal processes the target data in the service cluster according to the work order to be processed;
[0112] The receiving module 504 is used to receive the processing result sent by the work order processing terminal through the message queue;
[0113] The processing module 502 is further used to update the status of the target data in the database according to the processing result.
[0114] On the basis of any of the above embodiments, there are multiple automatic proxy servers; when the processing module 502 changes the corresponding target data in the database according to the work order to be processed, it is used for:
[0115] If the target data in the database is not locked, lock the target data, change the target data according to the work order to be processed, and release the lock after the target data is changed; or
[0116] If the target data in the database is locked by other automatic proxy servers, wait until the lock of the target data is released, lock the target data, change the target data according to the work order to be processed, and release the lock after the target data is changed; or
[0117] If the target data in the database is locked by other automatic proxy servers, do not execute the change of the target data.
[0118] On the basis of any of the above embodiments, when the processing module 502 updates the status of the target data in the database according to the processing result, it is used for:
[0119] If the processing result is successful, update the status of the target data in the database to the processing completed state; or
[0120] If the processing result is a failure, perform a data rollback operation on the target data.
[0121] Based on any of the above embodiments, the processing module 502 is further configured to:
[0122] If the processing result is not received within the first preset time, perform a data rollback operation on the target data; or
[0123] If it is determined that the process of adding the work order to be processed to the message queue fails, perform a data rollback operation on the target data.
[0124] Based on any of the above embodiments, the automatic proxy server further includes:
[0125] A monitoring module, configured to monitor the status of each target data in the database through a monitoring thread, and find the first target data in the database whose processing status time exceeds the second preset time; according to the first target data, find the corresponding second target data in the service cluster;
[0126] A self-healing module, configured to update the status of the first target data in the database according to the second target data.
[0127] Based on any of the above embodiments, when the self-healing module updates the status of the first target data in the database according to the second target data, it is configured to:
[0128] Judge whether the corresponding work order to be processed has been successfully processed according to the second target data;
[0129] If the corresponding work order to be processed has been successfully processed, update the status of the first target data in the database to the processed completion status; or
[0130] If the corresponding work order to be processed has not been successfully processed, perform a data rollback operation on the first target data.
[0131] The automatic proxy server provided by the embodiments of the present invention can be specifically used to execute the Figure 2-3 method embodiments on the automatic proxy server side provided above, and the specific functions are not described herein again.
[0132] Figure 6 It is a structural diagram of a work order processing terminal according to an embodiment of the present invention. The work order processing terminal provided in this embodiment can execute the processing flow provided by the method embodiment on the work order processing terminal side, as Figure 6 shown, the work order processing terminal 600 includes: a receiving module 601, a processing module 602, and a sending module 603.
[0133] A receiving module 601, configured to receive a work order to be processed sent by a message queue, where the work order to be processed is obtained by an automatic proxy server, changes corresponding target data in a database, records the status of the target data as a processing status, and then adds it to the message queue;
[0134] A processing module 602, configured to process target data in a service cluster according to the work order to be processed;
[0135] A sending module 603, configured to send a processing result to the automatic proxy server through the message queue, so that the automatic proxy server updates the status of the target data in the database according to the processing result.
[0136] Based on any of the above embodiments, when the processing module 602 processes the target data in the service cluster according to the work order to be processed, it is configured to:
[0137] If the target data in the service cluster or the corresponding service device is not locked, lock the target data or the corresponding service device, process the target data in the service cluster according to the work order to be processed, and release the lock after the processing is completed; or
[0138] If the target data in the service cluster or the corresponding service device is locked, wait until the lock is released, then lock the target data or the corresponding service device, process the target data in the service cluster according to the work order to be processed, and release the lock after the processing is completed; or
[0139] If the target data in the service cluster or the corresponding service device is locked, do not perform the processing of the target data in the service cluster.
[0140] Based on any of the above embodiments, when the receiving module 601 receives a work order to be processed sent by a message queue, it is configured to:
[0141] Receive multiple work orders to be processed with a preset theme sent by the message queue, and the multiple work orders to be processed are sorted by time;
[0142] When the processing module 602 processes the target data in the service cluster according to the work order to be processed, it is configured to:
[0143] Process the target data in the service cluster according to the multiple work orders to be processed in chronological order.
[0144] The work order processing terminal provided by the embodiments of the present invention can be specifically used to execute the method embodiments on the work order processing terminal side provided above, and the specific functions are not described herein again. Figure 4
[0145] Figure 7 The structural schematic diagram of the automatic proxy server provided by the embodiment of the present invention. The automatic proxy server provided by the embodiment of the present invention can execute the processing flow provided by the work order processing method embodiment on the automatic proxy server side, such as Figure 7 As shown, the automatic proxy server 70 includes a memory 71, a processor 72, a computer program, and a communication interface 73; wherein, the computer program is stored in the memory 71 and is configured to be executed by the processor 72 to perform the work order processing method on the automatic proxy server side described in the above embodiments.
[0146] Figure 7 The automatic proxy server in the shown embodiment can be used to execute the technical solution of the work order processing method embodiment on the automatic proxy server side described above. Its implementation principle and technical effects are similar and will not be elaborated here.
[0147] Figure 8 The structural schematic diagram of the work order processing terminal provided by the embodiment of the present invention. The work order processing terminal provided by the embodiment of the present invention can execute the processing flow provided by the work order processing method embodiment on the work order processing terminal side, such as Figure 8 As shown, the work order processing terminal 80 includes a memory 81, a processor 82, a computer program, and a communication interface 83; wherein, the computer program is stored in the memory 81 and is configured to be executed by the processor 82 to perform the work order processing method on the work order processing terminal side described in the above embodiments.
[0148] Figure 8 The work order processing terminal in the shown embodiment can be used to execute the technical solution of the work order processing method embodiment on the work order processing terminal side described above. Its implementation principle and technical effects are similar and will not be elaborated here.
[0149] In addition, this embodiment also provides a non-temporary computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method on the automatic proxy server side described in the above embodiments.
[0150] In addition, this embodiment also provides a non-temporary computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method on the work order processing terminal side described in the above embodiments.
[0151] In addition, this embodiment also provides a computer program product, including computer execution instructions, and the computer execution instructions are executed by a processor to implement the method on the automatic proxy server side described in the above embodiments.
[0152] In addition, this embodiment also provides a computer program product, including computer execution instructions, and the computer execution instructions are executed by a processor to implement the method on the work order processing terminal side described in the above embodiments.
[0153] In several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, 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 displayed or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the apparatus or unit can be in electrical, mechanical, or other forms.
[0154] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0155] In addition, in each embodiment of the embodiments of the present invention, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a hardware plus software functional unit.
[0156] The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit stored in a storage medium includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods described in the embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0157] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. The specific working process of the apparatus described above can refer to the corresponding process in the foregoing method embodiments and will not be elaborated here.
[0158] The above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them; although the embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0159] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The embodiments of the present disclosure are intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0160] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A work order processing method, characterized in that, applied to an automatic proxy server, the method includes: Obtain a work order to be processed, change the corresponding first target data in the database according to the work order to be processed, and record the status of the first target data as the processing status; Add the work order to the message queue, so that the message queue sends the work order to any work order processing terminal in the work order processing terminal cluster, and the work order processing terminal processes the second target data corresponding to the first target data in the service cluster according to the work order to be processed; Receive the processing result sent by the work order processing terminal through the message queue; According to the processing result, update the status of the first target data in the database to ensure that the first target data in the database is consistent with the second target data in the service cluster; Wherein the updating the status of the first target data in the database according to the processing result includes: If the processing result is successful, update the status of the first target data in the database to the processing completed state to ensure that both the first target data in the database and the second target data in the service cluster are the latest data after successful processing; or If the processing result is a failure, perform a data rollback operation on the first target data so that both the first target data in the database and the second target data in the service cluster are in the initial state before the work order to be processed.
2. The method according to claim 1, characterized in that, There are multiple automatic proxy servers; the changing the corresponding first target data in the database according to the work order to be processed includes: If the first target data in the database is not locked, lock the first target data, change the first target data according to the work order to be processed, and release the lock after the first target data is changed; or If the first target data in the database is locked by other automatic proxy servers, wait until the lock of the first target data is released, lock the first target data, change the first target data according to the work order to be processed, and release the lock after the first target data is changed; or If the first target data in the database is locked by other automatic proxy servers, do not perform the operation of changing the first target data.
3. The method according to claim 1, characterized in that, The method further includes: If the processing result is not received within the first preset time, perform a data rollback operation on the first target data; or If it is determined that the process of adding the work order to be processed to the message queue fails, perform a data rollback operation on the first target data.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: Monitor the status of each first target data in the database through a monitoring thread, and find the first target data in the database whose processing status time exceeds the second preset time; Find the corresponding second target data in the service cluster according to the first target data found; Update the status of the first target data found in the database according to the second target data found.
5. The method according to claim 4, wherein, the updating the status of the first target data found in the database according to the second target data found includes: Judging whether the corresponding work order to be processed has been successfully processed according to the second target data found; If the corresponding work order to be processed has been successfully processed, update the status of the first target data found in the database to the processed completion status; or If the corresponding work order to be processed has not been successfully processed, perform a data rollback operation on the first target data found.
6. A work order processing method, wherein, applied to a work order processing terminal, the method includes: Receiving a work order to be processed sent by a message queue, wherein the work order to be processed is obtained by an automatic proxy server, changes the corresponding first target data in the database, records the status of the first target data as the processing status, and then adds it to the message queue; Processing the second target data corresponding to the first target data in the service cluster according to the work order to be processed; Sending the processing result to the automatic proxy server through the message queue, so that the automatic proxy server updates the status of the first target data in the database according to the processing result, to ensure that the first target data in the database is consistent with the second target data in the service cluster; wherein sending the processing result to the automatic proxy server through the message queue includes: Sending the processing result to the automatic proxy server through the message queue, so that if the automatic proxy server determines that the processing result is successful based on the processing result, update the status of the first target data in the database to the processed completion status, to ensure that the first target data in the database and the second target data in the service cluster are both the latest data after successful processing, or if the automatic proxy server determines that the processing result is a failure based on the processing result, perform a data rollback operation on the first target data, so that the first target data in the database and the second target data in the service cluster are both in the initial state before the work order to be processed is processed.
7. The method according to claim 6, wherein, the processing the second target data in the service cluster according to the work order to be processed includes: If the second target data in the service cluster or the corresponding service device is not locked, lock the second target data or the corresponding service device, process the second target data in the service cluster according to the work order to be processed, and release the lock after the processing is completed; or If the second target data or the corresponding service device in the service cluster is locked, wait until the lock is released, then lock the second target data or the corresponding service device, process the second target data in the service cluster according to the work order to be processed, and release the lock after the processing is completed; or If the second target data or the corresponding service device in the service cluster is locked, do not perform the processing of the second target data in the service cluster.
8. The method according to claim 6 or 7, characterized in that the receiving of the work order to be processed sent by the message queue includes:[[]] receiving a plurality of work orders to be processed of a preset topic sent by the message queue, and the plurality of work orders to be processed are sorted according to time; the processing of the second target data in the service cluster according to the work order to be processed includes:[[]] processing the second target data in the service cluster according to the plurality of work orders to be processed in sequence according to the time order.
9. An automatic proxy server, characterized in that it includes:[[]] an acquisition module for acquiring a work order to be processed; a processing module for changing the corresponding first target data in the database according to the work order to be processed and recording the state of the first target data as a processing state; a sending module for adding the work order to be processed to the message queue so that the message queue sends the work order to be processed to any work order processing terminal in the work order processing terminal cluster, and the work order processing terminal processes the second target data corresponding to the first target data in the service cluster according to the work order to be processed; a receiving module for receiving the processing result sent by the work order processing terminal through the message queue; the processing module is further configured to update the state of the first target data in the database according to the processing result to ensure that the first target data in the database is consistent with the second target data in the service cluster; wherein when the processing module updates the state of the target data in the database according to the processing result, it is configured to:[[]] if the processing result is successful processing, update the state of the first target data in the database to a processing completed state to ensure that both the first target data in the database and the second target data in the service cluster are the latest data after successful processing; or if the processing result is failed processing, perform a data rollback operation on the first target data so that both the first target data in the database and the second target data in the service cluster are in the initial state before the processing of the work order to be processed.
10. The automatic proxy server according to claim 9, characterized in that there are multiple automatic proxy servers; when the processing module changes the corresponding first target data in the database according to the work order to be processed, it is configured to:[[]] if the first target data in the database is not locked, lock the first target data, change the first target data according to the work order to be processed, and release the lock after the change of the first target data is completed; or If the first target data in the database is locked by other automatic proxy servers, wait until the lock of the first target data is released, then lock the first target data, change the first target data according to the work order to be processed, and release the lock after the change of the first target data is completed; Or If the first target data in the database is locked by other automatic proxy servers, do not execute the change of the first target data.
11. The automatic proxy server according to claim 9, wherein, the processing module is further configured to: if the processing result is not received within the first preset time, perform a data rollback operation on the first target data; or if it is determined that the process of adding the work order to be processed to the message queue fails, perform a data rollback operation on the first target data.
12. The automatic proxy server according to any one of claims 9-11, wherein, further comprising: a monitoring module, configured to monitor the status of each first target data in the database through a monitoring thread, and find the first target data in the database whose processing status time exceeds the second preset time; find the corresponding second target data in the service cluster according to the found first target data; a self-healing module, configured to update the status of the found first target data in the database according to the found second target data.
13. The automatic proxy server according to claim 12, wherein, when the self-healing module updates the status of the first target data in the database according to the second target data, it is configured to: judge whether the corresponding work order to be processed has been successfully processed according to the found second target data; if the corresponding work order to be processed has been successfully processed, update the status of the found first target data in the database to the processed completion status; Or if the corresponding work order to be processed has not been successfully processed, perform a data rollback operation on the found first target data.
14. A work order processing terminal, wherein, comprising: a receiving module, configured to receive the work order to be processed sent by the message queue, where the work order to be processed is obtained by the automatic proxy server, changes the corresponding first target data in the database, and records the status of the first target data as the processing status and then adds it to the message queue; a processing module, configured to process the corresponding second target data in the service cluster according to the work order to be processed; a sending module, configured to send the processing result to the automatic proxy server through the message queue, so that the automatic proxy server updates the status of the first target data in the database according to the processing result, to ensure that the first target data in the database is consistent with the second target data in the service cluster; wherein when the sending module sends the processing result to the automatic proxy server through the message queue, it is configured to: Send the processing result to the automatic proxy server through the message queue, so that if the processing result is successful for the automatic proxy server, update the status of the first target data in the database to the processed completion status to ensure that the first target data in the database and the second target data in the service cluster are both the latest data after successful processing, or if the processing result is a failure for the automatic proxy server, perform a data rollback operation on the first target data so that the first target data in the database and the second target data in the service cluster are both in the initial state before processing the pending work order.
15. The work order processing terminal according to claim 14, wherein, when the processing module processes the second target data in the service cluster according to the pending work order, it is used for: if the second target data in the service cluster or the corresponding service device is not locked, lock the second target data or the corresponding service device, process the second target data in the service cluster according to the pending work order, and release the lock after the processing is completed; or if the second target data in the service cluster or the corresponding service device is locked, wait until the lock is released, then lock the second target data or the corresponding service device, process the second target data in the service cluster according to the pending work order, and release the lock after the processing is completed; or if the second target data in the service cluster or the corresponding service device is locked, do not perform the processing of the second target data in the service cluster.
16. The work order processing terminal according to claim 14 or 15, wherein, when the receiving module receives the pending work order sent by the message queue, it is used for: receiving multiple pending work orders of a preset topic sent by the message queue, and the multiple pending work orders are sorted by time; when the processing module processes the second target data in the service cluster according to the pending work order, it is used for: processing the second target data in the service cluster according to the multiple pending work orders in chronological order.
17. An automatic proxy server, wherein, it includes: a memory and a processor; the memory is used for storing program instructions; the processor is used for calling the program instructions in the memory to execute the method according to any one of claims 1-5.
18. A work order processing terminal, wherein, it includes: a memory and a processor; the memory is used for storing program instructions; the processor is used for calling the program instructions in the memory to execute the method according to any one of claims 6-8.
19. A work order processing system, wherein, it includes: the automatic proxy server according to claim 17, the work order processing terminal according to claim 18, a message queue server, and a service cluster.
20. A computer-readable storage medium, wherein, A computer program is stored on the computer-readable storage medium; when the computer program is executed, the method described in any one of claims 1-5 or 6-8 is implemented.
21. A computer program product, comprising computer-executable instructions, wherein, when the computer-executable instructions are executed by a processor, the method described in any one of claims 1-5 or 6-8 is implemented.
Citation Information
Patent Citations
Method and device for controlling data update in cache server
CN103324679A
Data processing apparatus and method, and terminal
CN106528272A
Distributed database system and transaction processing method
CN107977376A
Distributed transaction processing method and device, equipment and medium
CN111679892A