Message timing control method and device

By working collaboratively between the client and server, the status of preceding business messages can be queried using message identifiers, thus solving the problem of low efficiency in processing out-of-order business messages. This achieves efficient and stable message order control, reducing database queries and code redundancy.

CN118740920BActive Publication Date: 2025-10-31CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410771346.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-10-31
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Existing technologies, when processing out-of-order business messages, result in numerous database accesses, high logical complexity, increased transaction time and system overhead, and also present issues of redundant logic and code intrusion.

Method used

The client and server work together. The client simulates a message-driven process that is not sensitive to business logic and continuously sends business messages to the server. The server only checks whether the preceding business messages have been processed by querying the database through the message identifier, avoiding redundant judgments and logical corrections, and ensuring that the message processing order is correct.

Benefits of technology

It improves the processing efficiency of out-of-order business messages, reduces the number of database queries, reduces code intrusion, and enhances system performance and readability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740920B_ABST
    Figure CN118740920B_ABST
Patent Text Reader

Abstract

This application provides a message timing control method and apparatus, relating to the field of data processing technology, to improve the processing efficiency of out-of-order service messages. The message timing control method includes: a client acquiring a service message; sending the service message to a server; the server receiving the service message sent by the client; determining whether the preceding service message has been processed; if processed, returning a first identifier to the client indicating that the preceding service message has been processed; otherwise; returning a second identifier to the client indicating that the preceding service message has not been processed. The client receives a query result from the server based on the service message; the query result indicates whether the preceding service message has been processed; if the preceding service message has been processed, the status of the service message is modified to a first status; otherwise, the status of the service message is modified to a second status; and corresponding service processing is performed on the service message in the first status.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and apparatus for message timing control. Background Technology

[0002] As a medium with multiple business elements, invoices involve complex internal processing and external interaction logic. Multiple business messages may be generated from the same invoice, and these messages must be processed in the order of business logic. However, in actual production, the received business messages often arrive out of order. The system processes the earliest received message first, which deviates from the logical order and leads to abnormal invoice status. Currently, the solution is to incorporate out-of-order checks into the business message processing, based on known out-of-order scenarios. When a subsequent business message is processed prematurely and meets the out-of-order processing requirements, special handling is added to the logic of the preceding business message, such as rolling back the status or inserting elements.

[0003] The above approach is not a systematic solution, but a collection of experiences. Due to the addition of judgment and logical processing of out-of-order business messages, the number of database accesses is increased and the internal logic is more complex, which increases transaction time and system overhead.

[0004] Therefore, there is an urgent need for a solution to improve the processing efficiency of out-of-order service messages. Summary of the Invention

[0005] The message timing control method and apparatus provided in this application are used to improve the processing efficiency of out-of-order service messages.

[0006] In a first aspect, this application provides a message timing control method applied to a client. The method includes: acquiring a service message; sending the service message to a server; receiving a query result from the server based on the service message; the query result indicating whether the preceding service message of the service message has been processed; if the preceding service message of the service message has been processed, modifying the state of the service message to a first state; otherwise, modifying the state of the service message to a second state; and performing corresponding service processing on the service message in the first state.

[0007] In the above technical solution, the client simulates a business-insensitive message driver, continuously sending the received business messages to the server. The server only focuses on checking whether the preceding business messages of the business message have been processed, without the need for redundant scenario judgment and business logic correction. The interaction and cooperation between the two can avoid the problem of disordered processing order of business messages, and has high efficiency in processing out-of-order business messages.

[0008] In one possible design, the newly acquired service message is in the second state; sending the service message to the server includes: sending the service message in the second state to the server, and modifying the state of the service message to the third state; the third state indicates that the service message is processed at the server.

[0009] In the above technical solution, the status of the business message that has been sent to the server is modified to the third status to avoid the situation where a business message is sent to multiple servers for repeated processing under high concurrency.

[0010] In one possible design, after modifying the state of the service message to the second state, the method further includes: resending the service message to the server at set intervals until the state of the service message is modified to the first state or the retry limit is reached; the set interval is determined based on the number of retries; the state of the service message that has reached the retry limit is modified to the fourth state; the fourth state indicates that the service message is abnormal.

[0011] In the above technical solution, the interval between resending the second-state business message to the server is affected by the number of retries. Since the more retries there are, the less likely the state of the message will change (the less likely its preceding message will change from unprocessed to processed), the more retries there are, the longer the retransmission interval should be to avoid wasting computing resources.

[0012] In one possible design, before sending the service message to the server, the method further includes: determining whether there is a preceding service message based on the type of the service message and / or the business scenario, according to business processing logic; sending the service message to the server includes: sending the service message with a preceding service message to the server.

[0013] In the above technical solution, before sending a business message to the server, it is determined whether the business message has a preceding message. Only business messages with preceding messages are sent to the server, which saves the number of times the server queries the database and improves the database query efficiency.

[0014] Secondly, this application provides another message timing control method applied to a server. The method includes: receiving a service message sent by a client; determining whether the preceding service message of the service message has been processed; if processed, returning a first identifier to the client, the first identifier indicating that the preceding service message of the service message has been processed; otherwise; returning a second identifier to the client, the second identifier indicating that the preceding service message of the service message has not been processed.

[0015] In the above technical solution, the client simulates a business-insensitive message driver, continuously sending received business messages to the server. The server only focuses on checking whether the preceding business messages of the current business message have been processed in the query results, without redundant scenario judgments or business logic corrections. The server only queries the database once per query to make a correct judgment and feedback, resulting in minimal code intrusion, high database query efficiency, no redundant logic, and avoidance of business message processing order disorder issues. Furthermore, it demonstrates high efficiency in processing out-of-order business messages.

[0016] In one possible design, the preceding message of the service message has the same message identifier number as the service message. Determining whether the preceding service message of the service message has been processed includes: obtaining the message identifier number recorded in the service message; querying the database to see if there is a preceding message corresponding to the message identifier number; if it exists, it indicates that the preceding service message of the service message has been processed; if it does not exist, it indicates that the preceding message of the service message has not been processed.

[0017] In the above technical solution, the server can determine whether there is a problem of out-of-order message processing by querying the database only once using the message identifier, that is, to determine whether the preceding message of the business message has been processed. The code intrusion is minimal, the database query efficiency is high, there is no redundant logic, and the problem of disordered processing order of business messages can be avoided.

[0018] Thirdly, embodiments of this application provide a message timing control device, the device comprising:

[0019] The send / receive module is used to acquire business messages;

[0020] The transceiver module is used to send the service messages to the server.

[0021] The transceiver module is also used to receive the query result from the server based on the business message; the query result indicates whether the preceding business message of the business message has been processed.

[0022] The processing module is configured to modify the state of the service message to a first state if the preceding service message has been processed; otherwise, modify the state of the service message to a second state.

[0023] The processing module is also used to perform corresponding business processing on the business messages in the first state.

[0024] In one possible design, the newly acquired service message is in the second state; when the transceiver module sends the service message to the server, it is specifically used to send the service message in the second state to the server and modify the state of the service message to the third state; the third state indicates that the service message is processed at the server.

[0025] In one possible design, after the status of the service message is modified to the second status, the processing module is further configured to resend the service message to the server at set intervals until the status of the service message is modified to the first status or the retry limit is reached; the set interval is determined based on the number of retries; the status of the service message that has reached the retry limit is modified to the fourth status; the fourth status indicates that the service message is abnormal.

[0026] In one possible design, before sending the service message to the server, the processing module is further configured to determine whether the service message has a preceding service message based on the type of the service message and / or the business scenario, according to the business processing logic; when the transceiver module sends the service message to the server, it is specifically configured to send the service message with a preceding service message to the server.

[0027] Fourthly, embodiments of this application provide another message timing control device, which includes:

[0028] The transceiver module is used to receive business messages sent by the client;

[0029] The processing module is used to determine whether the preceding service message of the service message has been processed; if it has been processed, it returns a first identifier to the client, the first identifier indicating that the preceding service message of the service message has been processed; otherwise, it returns a second identifier to the client, the second identifier indicating that the preceding service message of the service message has not been processed.

[0030] In one possible design, the preceding message of the service message has the same message identifier number as the service message. When determining whether the preceding service message of the service message has been processed, the processing module specifically obtains the message identifier number recorded in the service message; queries the database to see if there is a preceding message corresponding to the message identifier number; if it exists, it indicates that the preceding service message of the service message has been processed; if it does not exist, it indicates that the preceding message of the service message has not been processed.

[0031] Fifthly, embodiments of this application also provide a computing device, including:

[0032] Memory, used to store program instructions;

[0033] A processor is configured to invoke program instructions stored in the memory and execute the method described in any possible design of the first aspect, according to the obtained program instructions.

[0034] In a sixth aspect, embodiments of this application also provide a computer-readable storage medium storing computer-readable instructions that, when read and executed by a computer, cause the method described in any possible design of the first aspect to be implemented.

[0035] In a seventh aspect, embodiments of this application also provide a computer program product including computer-readable instructions that, when executed by a processor, cause the method described in any possible design of the first aspect to be implemented. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A schematic diagram illustrating the message forwarding for endorsement in a bill transaction, provided as an embodiment of this application;

[0038] Figure 2 A flowchart illustrating a message timing control method provided in an embodiment of this application;

[0039] Figure 3 A flowchart illustrating another message timing control method provided in an embodiment of this application;

[0040] Figure 4 A schematic diagram of the interaction flow of a message timing control method provided in an embodiment of this application;

[0041] Figure 5 A schematic diagram of the structure of a message timing control device provided in an embodiment of this application;

[0042] Figure 6 A schematic diagram of another message timing control device provided in this application embodiment;

[0043] Figure 7 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] In the embodiments of this application, "multiple" refers to two or more. Terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0046] The acquisition, transmission, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0047] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.

[0048] As a medium with multiple business elements, invoices involve complex internal processing and external interaction logic. Multiple business messages may be generated from the same invoice, and these messages must be processed in the order of business logic. However, in actual production, the received business messages often arrive in a disordered order. The system may process the earliest received message first, which deviates from the logical order and leads to abnormal status of the current invoice.

[0049] Taking endorsement in bill transactions as an example, such as Figure 1 As shown, when the endorser and endorsee belong to the same bank, after the endorser submits an endorsement application to the Shanghai Commercial Paper Exchange (i.e., sends an endorsement transfer message to the exchange), the exchange first sends a general business confirmation message to the endorser, and then sends a general business forwarding message to the endorsee. Since the endorser and endorsee belong to the same bank, the bank's system will receive both the general business confirmation message and the general business forwarding message from the exchange. The normal receiving order is to receive the general business confirmation message first, and then the general business forwarding message. The business processing order is also to process the general business confirmation message first, and then the general business forwarding message. However, in actual production, if the system receives the general business forwarding message first, it will process the general business forwarding message first. When the general business confirmation message is received subsequently, the processing of the general business confirmation message will be abnormal, resulting in an abnormal status of the current bill.

[0050] The current approach to handling this situation is to add a check for out-of-order behavior during business message processing, based on known out-of-order scenarios from experience. When a subsequent business message is processed in advance and meets the out-of-order processing requirements, special processing is added to the logic of the preceding business message, such as rolling back the status or inserting elements.

[0051] For example, in the above example, if the business forwarding message has been processed in advance, when the general business confirmation message is received later, the general business confirmation message will be processed as follows: the ticket status will be modified according to the general confirmation message, the application business table status will be updated to preprocessing successful, and a new transaction table and a general confirmation record table will be added for confirmation association when the recipient signs for the document later.

[0052] The above approach is not a systematic solution, but a collection of experiences. Due to the addition of judgment and logical processing of out-of-order business messages, the number of database accesses is increased and the internal logic is more complex, which increases transaction time and system overhead.

[0053] In addition, the above methods add redundant fallback code to prevent out-of-order results, which leads to serious code intrusion and greatly reduces the readability, maintainability and execution efficiency of the program.

[0054] Similarly, the problem of disordered message processing can also occur in situations such as multiple transactions of the same bill within a short period of time or network fluctuations. For example, customer A endorses a bill to customer B, and the customer's operation process is: 1. Send application; 2. Cancel; 3. Send application again. In this case, an additional general cancellation message will be generated. The cancellation of the same bill must correspond to the first application, so the processing order of incoming messages is: business confirmation message -> business forwarding message -> business cancellation message -> second business confirmation message -> second business forwarding message. In this situation, the problem of disordered message processing is very likely to occur.

[0055] Therefore, the embodiments of this application provide a message timing control method and apparatus, which can improve the processing efficiency of out-of-order service messages.

[0056] Figure 2 An exemplary flowchart of a message timing control method provided in an embodiment of this application is shown. This method is applied to a client, such as... Figure 2 As shown, the method includes the following steps:

[0057] Step 201: Obtain the business message.

[0058] Step 202: Send the business message to the server.

[0059] In one possible implementation, before sending the business message to the server in step 202, it can be determined whether a preceding business message exists based on the business processing logic, according to the type and / or business scenario of the business message. For example, the current message type and / or business scenario can be identified in any of the following ways: 1. By specifying the transaction type code in the message header; 2. By using XML tags in the message body. After identifying the type and / or business scenario of the business message, transactions are chained together in the following way: the MsgId field of the business message marks the current business message identifier and the preceding message identifier; by combining the message type and / or business scenario and the sequence of the message identifiers, it can be determined whether a preceding business message exists. If a preceding business message exists, the business message with the preceding business message is sent to the server; if no preceding business message exists, the business message can be directly processed.

[0060] In another possible implementation, after the service message is sent to the server, the server can determine whether there is a preceding service message. If there is a preceding service message, the server queries the database to determine whether the preceding service message has been processed. If there is no preceding service message, the server returns a message to the client that there is no preceding service message. After receiving the message, the client can process the service message.

[0061] In one possible implementation, the newly acquired service message can be defaulted to a second state, indicating that the preceding service message has not yet been processed. Sending the service message to the server includes: sending the service message in the second state to the server, and modifying the state of the service message to a third state, indicating that the service message is being processed on the server.

[0062] In the above technical solution, the status of the business message that has been sent to the server is modified to the third status to avoid the situation where a business message is sent to multiple servers for repeated processing under high concurrency.

[0063] Step 203: Receive the query results from the server based on the business message.

[0064] The query results indicate whether the preceding business messages of the business message have been processed.

[0065] Step 204: If the preceding business message has been processed, change the status of the business message to the first status; otherwise, change the status of the business message to the second status.

[0066] Step 205: Perform corresponding business processing on the business messages in the first state.

[0067] In this context, the first state indicates that the preceding service messages of the current service message have been processed, and the current service message can be processed accordingly. The second state indicates that the preceding service messages of the current service message have not yet been processed. If the current service message is processed directly in this state, the processing order of service messages will be disordered. Therefore, service messages in the second state need to wait for their preceding messages to be processed before the corresponding service processing can be performed.

[0068] In the above technical solution, the client simulates a business-insensitive message driver, continuously sending the received business messages to the server. The server only focuses on checking whether the preceding business messages of the business message have been processed, without the need for redundant scenario judgment and business logic correction. The interaction and cooperation between the two can avoid the problem of disordered processing order of business messages, and has high efficiency in processing out-of-order business messages.

[0069] In one possible implementation, after step 204 modifies the status of the service message to the second status, it further includes: resending the service message to the server at set intervals until the status of the service message is modified to the first status or the retry limit is reached.

[0070] The set interval time is determined based on the number of retries. Specifically, the time interval can be equal to the number of retries multiplied by the set waiting time indicator. For example, if the set waiting time indicator is 60 seconds, then the time interval = number of retries × 60 seconds. That is, for a business message, after its status is changed to the second status, it is resent to the server after the first interval of 60 seconds. If the status of the business message is still not in the second status, it is resent to the server after the second interval of 120 seconds, and after the third interval of 180 seconds, and so on.

[0071] In the above technical solution, the interval between resending the second-state business message to the server is affected by the number of retries. Since the more retries there are, the less likely the state of the message will change (the less likely its preceding message will change from unprocessed to processed), the more retries there are, the longer the retransmission interval should be to avoid wasting computing resources.

[0072] In addition, a maximum number of retries can be set, and the status of business messages that reach the retry limit can be changed to the fourth status, which indicates that the business message is abnormal. Messages in the fourth status are then sent to relevant business personnel for anomaly investigation.

[0073] Figure 3 The following is an exemplary flowchart of another message timing control method provided in an embodiment of this application. This method is applied to the server side, such as... Figure 3 As shown, the method includes the following steps:

[0074] Step 301: Receive the business message sent by the client.

[0075] Step 302: Determine whether the preceding business message of the business message has been processed.

[0076] If the condition is met, proceed to step 303; otherwise, proceed to step 304.

[0077] In one possible implementation, the preceding message of the service message has the same message identifier number as the service message. The processing status of the preceding service message can be determined by the following method: obtaining the message identifier number recorded in the service message; querying the database to see if there is a preceding message corresponding to the message identifier number; if it exists, it indicates that the preceding service message of the service message has been processed; if it does not exist, it indicates that the preceding message of the service message has not been processed.

[0078] Step 303: Return the first identifier to the client.

[0079] Among them, the first identifier indicates that the preceding service message of the service message is processed.

[0080] Step 304: Return the second identifier to the client.

[0081] The second identifier indicates that the preceding service message of the service message has not been processed.

[0082] In the above technical solution, after receiving the service message sent by the client, the server obtains the message identifier of the service message, and queries the database to see if there is a preceding message corresponding to the message identifier. If it exists, it means that the preceding service message of the service message has been processed and the first identifier is returned to the client; if it does not exist, it means that the preceding message of the service message has not been processed and the second identifier is returned to the client. Figure 4 An exemplary diagram illustrates the interaction flow of the message timing control method provided in this application embodiment. This method is applied to both the client and server sides, such as... Figure 3 As shown, it includes the following steps:

[0083] Step 401: The client obtains the business message.

[0084] The newly acquired business message is in the second state.

[0085] Step 402: The client determines whether the service message has a preceding service message.

[0086] Specifically, the client determines whether a business message has a preceding business message based on the type of business message and / or business scenario, according to the business processing logic.

[0087] If yes, proceed to step 403; otherwise, proceed to step 409.

[0088] Step 403: The client sends the service message containing the preceding service message to the server.

[0089] Step 404: The server receives the business message sent by the client.

[0090] Step 405: The server determines whether the preceding business message of the business message has been processed.

[0091] Retrieve the message identifier recorded in the business message; query the database to see if the preceding message corresponding to the message identifier exists; if it exists, it indicates that the preceding business message of the business message has been processed; if it does not exist, it indicates that the preceding message of the business message has not been processed.

[0092] If the process is completed, proceed to step 406; otherwise, proceed to step 407.

[0093] Step 406: Return the first identifier to the client.

[0094] Among them, the first identifier indicates that the preceding service message of the service message is processed.

[0095] Step 407: Return the second identifier to the client.

[0096] The second identifier indicates that the preceding service message of the service message has not been processed.

[0097] Step 408: The client receives the query results from the server based on the business message.

[0098] The query results indicate whether the preceding business messages of the business message have been processed.

[0099] If the preceding business message has been processed, proceed to step 409; otherwise, proceed to step 410.

[0100] Step 409: Change the status of the business message to the first status.

[0101] Step 410: Change the status of the service message to the second status.

[0102] After changing the status of the business message to the second status, the business message is resent to the server at set intervals until the status of the business message is changed back to the first status or the retry limit is reached.

[0103] Step 411: Perform corresponding business processing on the business messages in the first state.

[0104] This application provides a message timing control method, which is a flexible, stable, and efficient solution to meet the needs of horizontal device expansion and vertical business expansion. The client simulates a business-insensitive message driver, continuously sending received business messages to the server. The server focuses only on checking whether the preceding business messages of the current business message have been processed, eliminating the need for redundant scenario judgments and business logic corrections. The server only queries the database once per query to make a correct judgment and feedback, resulting in minimal code intrusion, high database query efficiency, no redundant logic, and avoidance of disordered business message processing order. Furthermore, it offers high efficiency in processing out-of-order business messages.

[0105] Based on the same technological concept Figure 5 The following is a schematic diagram illustrating the structure of a message timing control device provided in an embodiment of this application. This device can be a client, such as... Figure 5 As shown, the device 500 includes:

[0106] The transceiver module 501 is used to acquire business messages;

[0107] The transceiver module 501 is used to send the service message to the server.

[0108] The transceiver module 501 is further configured to receive the query result from the server based on the service message; the query result indicates whether the preceding service message of the service message has been processed.

[0109] The processing module 502 is configured to modify the state of the service message to a first state if the preceding service message has been processed; otherwise, modify the state of the service message to a second state.

[0110] The processing module 502 is also used to perform corresponding business processing on the service messages in the first state.

[0111] In one possible design, the newly acquired service message is in the second state; when the transceiver module 501 sends the service message to the server, it is specifically used to send the service message in the second state to the server and modify the state of the service message to the third state; the third state indicates that the service message is processed at the server.

[0112] In one possible design, after the status of the service message is modified to the second status, the processing module 502 is further configured to resend the service message to the server at set intervals until the status of the service message is modified to the first status or the retry limit is reached; the set interval is determined according to the number of retries; the status of the service message that has reached the retry limit is modified to the fourth status; the fourth status indicates that the service message is abnormal.

[0113] In one possible design, before sending the service message to the server, the processing module 502 is further configured to determine whether the service message has a preceding service message based on the type of the service message and / or the business scenario, according to the business processing logic; when the transceiver module 501 sends the service message to the server, it is specifically configured to send the service message with a preceding service message to the server.

[0114] Based on the same technological concept Figure 6 An exemplary schematic diagram of another message timing control device provided in an embodiment of this application is shown. This device can enable the server, such as... Figure 6 As shown, the device 600 includes:

[0115] The transceiver module 601 is used to receive business messages sent by the client;

[0116] The processing module 602 is used to determine whether the preceding service message of the service message has been processed; if it has been processed, it returns a first identifier to the client, the first identifier indicating that the preceding service message of the service message has been processed; otherwise, it returns a second identifier to the client, the second identifier indicating that the preceding service message of the service message has not been processed.

[0117] In one possible design, the preceding message of the service message has the same message identifier number as the service message. When determining whether the preceding service message of the service message has been processed, the processing module 602 is specifically used to obtain the message identifier number recorded in the service message; query the database to see if there is a preceding message corresponding to the message identifier number; if it exists, it indicates that the preceding service message of the service message has been processed; if it does not exist, it indicates that the preceding message of the service message has not been processed.

[0118] Based on the same technical concept, embodiments of this application provide a computing device, such as... Figure 7 As shown, it includes at least one processor 701 and a memory 702 connected to at least one processor. In this embodiment, the specific connection medium between the processor 701 and the memory 702 is not limited. Figure 7Taking the connection between the processor 701 and the memory 702 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.

[0119] In this embodiment of the application, the memory 702 stores instructions that can be executed by at least one processor 701. By executing the instructions stored in the memory 702, at least one processor 701 can execute the above-mentioned message timing control method.

[0120] The processor 701 is the control center of the computing device. It can connect to various parts of the computer device through various interfaces and lines, and perform resource settings by running or executing instructions stored in the memory 702 and calling data stored in the memory 702.

[0121] Optionally, processor 701 may include one or more processing units. Processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into processor 701. In some embodiments, processor 701 and memory 702 may be implemented on the same chip; in some embodiments, they may be implemented separately on independent chips.

[0122] The processor 701 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0123] Memory 702, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 702 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 702 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 702 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0124] Based on the same technical concept, embodiments of this application also provide a computer-readable storage medium storing a computer-executable program, which is used to cause a computer to execute the message timing control method listed in any of the above methods.

[0125] Based on the same technical concept, embodiments of this application also provide a computer program product, including computer-readable instructions, which, when executed by a processor, cause any of the above-described message timing control methods to be implemented.

[0126] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0127] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0128] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0129] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0130] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0131] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A message timing control method, characterized in that, Applied to a client, the method includes: Obtain business messages; Send the service message to the server; The server receives the query result based on the service message; the query result indicates whether the preceding service message of the service message has been processed. If the preceding service message of the service message has been processed, the status of the service message is changed to the first status; otherwise, the status of the service message is changed to the second status. Perform corresponding business processing on the business messages in the first state.

2. The method according to claim 1, characterized in that, The newly acquired service message is in the second state; sending the service message to the server includes: The service message in the second state is sent to the server, and the state of the service message is modified to the third state; the third state indicates that the service message is processed on the server.

3. The method according to claim 1, characterized in that, After modifying the status of the service message to the second status, the method further includes: At set intervals, the service message is resent to the server until the status of the service message is changed to the first status or the retry limit is reached; the set interval is determined based on the number of retries. The status of the service message that has reached the retry limit is changed to the fourth status; the fourth status indicates that the service message is abnormal.

4. The method according to claim 1, characterized in that, Before sending the service message to the server, the process also includes: Based on the type of the service message and / or the service scenario, determine whether the service message has a preceding service message based on the service processing logic; Sending the service message to the server includes: Send the business message containing the preceding business message to the server.

5. A message timing control method, characterized in that, Applied to the server side, the method includes: Receive business messages sent by the client; Determine whether the preceding service message of the aforementioned service message has been processed; If processed, a first identifier is returned to the client, the first identifier indicating that the preceding service message of the service message has been processed; Otherwise, a second identifier is returned to the client, indicating that the preceding service message of the service message has not been processed.

6. The method according to claim 5, characterized in that, The preceding message of the service message has the same message identifier number as the service message. Determining whether the preceding service message of the service message has been processed includes: Obtain the message identifier number recorded in the service message; Check the database to see if a preceding message corresponding to the message identifier exists; If it exists, it indicates that the preceding service message of the service message has been processed; if it does not exist, it indicates that the preceding message of the service message has not been processed.

7. A message timing control device, characterized in that, include: The send / receive module is used to acquire business messages; The transceiver module is used to send the service messages to the server. The transceiver module is also used to receive the query results from the server based on the business message; The query result indicates whether the preceding business message of the business message has been processed. The processing module is configured to modify the state of the service message to a first state if the preceding service message has been processed; otherwise, modify the state of the service message to a second state. The processing module is also used to perform corresponding business processing on the business messages in the first state.

8. A message timing control device, characterized in that, include: The transceiver module is used to receive business messages sent by the client; The processing module is used to determine whether the preceding service message of the service message has been processed; If processed, a first identifier is returned to the client, the first identifier indicating that the preceding service message of the service message has been processed; Otherwise, a second identifier is returned to the client, indicating that the preceding service message of the service message has not been processed.

9. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1 to 6 according to the obtained program instructions.

10. A computer-readable storage medium, characterized in that, Includes computer-readable instructions that, when read and executed by a computer, cause the method as described in any one of claims 1 to 6 to be implemented.

11. A computer program product, characterized in that, Includes computer-readable instructions that, when executed by a processor, cause the method as described in any one of claims 1 to 6 to be implemented.

Citation Information

Patent Citations

  • Asynchronous message processing method and device

    CN110221927A

  • Contract message processing method and device, electronic equipment and storage medium

    CN110737537A