An adaptive delay message data processing method, device, medium and equipment
By adopting an adaptive delayed message data processing method, utilizing write-ahead logs and time wheel mechanisms to manage delayed messages, and constructing index files and multi-level time wheels, the problems of resource waste and task loss in existing technologies are solved. Customized delays and message retries are realized, improving the management and storage efficiency of delayed messages.
Patent Information
- Application Number
- CN202210415439.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-04-20
AI Technical Summary
Existing technologies suffer from problems such as resource waste, task loss due to server downtime, and inability to customize delay time in message delay processing, especially in the case of large amounts of data, where they cannot effectively manage and process delayed messages.
An adaptive delayed message data processing method is adopted, which manages message delay through write-ahead logging and time wheel mechanism, builds delayed log files and index files, supports multi-level time wheel loading, and uses scheduling logs for message retries and management, so as to realize dynamic expansion and sorting of delayed messages.
It effectively solves the problems of resource waste and task loss, supports custom delay time, realizes efficient management and dynamic expansion of delayed messages, supports message retries, and improves the sorting and storage efficiency of delayed messages.
Smart Images

Figure CN114968615B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart payment, and in particular to an adaptive delayed message data processing method, apparatus, medium, and device. Background Technology
[0002] Currently, most applications or software systems on the market have business requirements for message delay processing, such as e-commerce systems, where users place orders during flash sales and the system automatically closes if payment is not received within a specified time; and engineering task reminders, reminder time changes, and reminder cancellations. Common solutions include the following:
[0003] First, by using a timed database scan, task data is scanned at regular intervals. When the data volume is too large, the database overhead is high. If the scanning frequency is too high (short interval), too much invalid data will be scanned, wasting resources. If the scanning frequency is too low, the latency and accuracy cannot be guaranteed. If the execution time of a single task is too long, it will also cause task backlog and affect the execution of the next task.
[0004] Secondly, using Java's built-in DelayQueue requires adding a queue object that implements the Delayed interface and overriding the getDelay() and compareTo() methods. However, its drawbacks are also obvious, such as only supporting single-machine environments, lack of persistence, and task loss due to system crashes.
[0005] Third, Redis has a sorted set data structure where all elements are ordered according to their scores. The expected timestamp of message consumption is used as the score, and a scheduled task continuously reads elements with scores greater than the current time. However, its bottleneck is that a single sorted set cannot support very large data volumes.
[0006] Fourth, by establishing dead-letter queues in the message middleware, timeouts are configured at the queue level when business requirements change. Since the latency for the same business may not be the same, establishing a dead-letter queue for each latency duration results in a large number of redundant queues and makes dynamic expansion difficult. RocketMQ also only supports 18 specific latency levels and does not allow for custom latency settings.
[0007] The above solutions all have shortcomings in message delay processing. Therefore, the current solution is a message delay processing method for e-commerce and home decoration projects. Summary of the Invention
[0008] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide an adaptive delay message data processing method, apparatus, medium and device to solve the above problems in the prior art.
[0009] To achieve the above and other related objectives, the present invention provides an adaptive delayed message data processing method, the method comprising: S11, acquiring message data, adding the message data to a write-ahead log, and determining whether the delay time of the message data exceeds the maximum buffer time of the time wheel through a scheduling service; if yes, proceeding to S12; otherwise, proceeding to S13; S12, filtering delayed message data in the write-ahead log, constructing a delayed log file and an index file, and writing the delayed message data into the delayed log file; S13, lazy-loading the delayed message data into the time wheel according to the delay time; S14, forwarding the expired message data in the time wheel to the consumption queue and receiving the message data sending result; S15, performing data processing according to the message data sending result: if the sending is successful, writing the message data and the message data index into the scheduling log; if the sending fails, retrieving the failed message data from the scheduling log and reloading it into the time wheel.
[0010] In one embodiment of the present invention, the method further includes: constructing a set of delayed log files in the form of a linked list according to the message data delay time, and constructing an index file corresponding one-to-one with the delayed log files, wherein the delayed log files have the same time span, and the index file records the index including the offset, size and timestamp of the delayed message data in the delayed log files; copying the delayed message data in the write-ahead log through a scheduling service and writing it into the delayed log files.
[0011] In one embodiment of the present invention, the method further includes: the time span of the delay log file = the maximum delay time of the delayed message data / the delay time of a single file. Wherein, the maximum delay time of the delayed message data refers to the maximum delay time of the delayed message data within the interval, and the delay time of a single file refers to the delay time per unit scale.
[0012] In one embodiment of the present invention, the method further includes: calculating the deadline for sending the delayed message data, wherein the deadline for sending the delayed message data is equal to the current time plus the message delay time minus the time when the time wheel starts; calculating the position of the delayed message data in the time wheel, wherein the position of the delayed message data in the time wheel is determined by hashing the deadline for sending the delayed message data % the time wheel length (wheelLength) and taking the modulo; and storing the delayed message data in a linked list in the slot corresponding to the position of the time wheel, wherein the linked list structure is a closed-loop doubly linked list.
[0013] In one embodiment of the present invention, the method further includes: calculating whether the delay time difference between the first delayed message data and the second delayed message data is equal to the time wheel length * time wheel tickduration; determining whether the positions of the first delayed message data and the second delayed message data conflict in the time wheel based on the time difference; if they conflict, creating a second time wheel and lazily loading the second delayed message data into the second time wheel, wherein the time wheel tickduration of the second time wheel is one-sixtieth of the time wheel tickduration of the first time wheel.
[0014] In one embodiment of the present invention, the method further includes: when the time wheel pointer tick scans to the time wheel linked list node, if the node has no data, no processing is performed; if the node has delayed message data, the delayed message data is retrieved through the index and sent to a consumer queue visible to the consumer; after the delayed message data is successfully sent, the delayed message data and the index are recorded in the scheduling log.
[0015] In one embodiment of the present invention, the method further includes, after receiving the message that the delayed message data failed to be sent to the consumption queue: retrieving the delayed message data that failed to be sent from the scheduling log; and re-inserting it into the time wheel linked list according to the position of the slot index currentIndex + preset time preTime / time wheel tickDuration pointed to by the time wheel pointer.
[0016] To achieve the above and other related objectives, the present invention provides an adaptive delayed message data processing device. The system includes: a message receiving module, used to acquire message data, add the message data to a write-ahead log, and send an ACK response message to the terminal object that sent the delayed message data after successful writing; a message storage module, used to construct a delayed log file and an index file, and write the delayed message data to the delayed log file; a message scheduling module, used to determine whether the delay time of the message data exceeds the maximum buffer time of the time wheel, filter the delayed message data in the write-ahead log, and lazy-load the delayed message data into the time wheel according to the delay time; a message forwarding module, used to forward the message data that has expired in the time wheel to the consumption queue and receive the message data sending result; and a message exception handling module, used to perform data processing according to the message data sending result: if the sending is successful, write the message data and the index of the message data to the scheduling log; if the sending fails, retrieve the message data that failed to be sent from the scheduling log and reload it into the time wheel.
[0017] To achieve the above and other related objectives, the present invention provides a computer-readable storage medium storing a computer program that, when loaded and executed by a processor, implements the adaptive delay message data processing method.
[0018] To achieve the above and other related objectives, the present invention provides an electronic device, comprising: a processor, a memory, and a communication interface; wherein the memory is used to store a computer program; the processor is used to load and execute the computer program to enable the electronic device to execute the adaptive delay message data processing method; and the communication interface is used to enable communication between the access device and other devices.
[0019] As described above, the present invention provides an adaptive delayed message data processing method, apparatus, medium, and device that addresses the problems of resource waste, task loss due to server downtime, and inability to customize delay time in existing message delay processing schemes. It achieves this by separately managing and indexing delayed messages and using a multi-level time-rotation delayed loading device for delayed message processing. Furthermore, it analyzes and manages messages that failed to be sent due to system downtime or timeout through scheduling logs and supports message retries. This fulfills the business requirement of defining arbitrary delays and supports scenarios where delayed messages will retries due to downtime or timeout, and also solves the sorting and storage problems of delayed messages in existing solutions. Attached Figure Description
[0020] Figure 1 The diagram shown is a flowchart of an adaptive delay message data processing method according to an embodiment of the present invention.
[0021] Figure 2 The diagram shown is a task triggering schematic of an adaptive delay message data processing method according to an embodiment of the present invention.
[0022] Figure 3 The diagram shown is a schematic representation of an adaptive delay message data processing device according to an embodiment of the present invention.
[0023] Figure 4 The diagram shown is a structural schematic of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0024] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features can be combined with each other. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0025] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0026] To address the shortcomings of existing message delay processing techniques, such as only supporting single-machine operation, lack of persistence, and task loss due to system crashes, this invention provides an adaptive delayed message data processing method, apparatus, medium, and device. It modifies existing technologies to support customizable arbitrary delays and supports retrying after system crashes.
[0027] like Figure 1 As shown, this embodiment provides an adaptive delayed message data processing method, which includes the following steps:
[0028] S11: Obtain message data, add the message data to the write-ahead log, and determine whether the delay time of the message data exceeds the maximum cache time of the time wheel through the scheduling service. If yes, proceed to S12; otherwise, proceed to S13.
[0029] Specifically, after receiving message data, it is added to a WAL file in sequence, that is, written to a write-ahead log file, and a confirmation message of successful reception is sent to the terminal object that sent the delayed message data.
[0030] Furthermore, the scheduling service, which categorizes and filters message data, begins asynchronous processing of the message data. If the message data is delayed, it determines whether the delay time exceeds the maximum buffer time of the time wheel. If it does, it proceeds to step S12 to better locate the physical location of the message. If the delay time is within the maximum buffer time of the time wheel, it proceeds to step S13.
[0031] S12: Filter delayed message data in the write-ahead log, construct a delayed log file and an index file, and write the delayed message data into the delayed log file.
[0032] Specifically, delayed message data exceeding the maximum cache time of the time wheel is filtered out from the write-ahead log. A set of log files is then reconstructed in the form of a linked list based on the delay time of the delayed message data. This ensures that the extremely long delays of delayed messages are not affected by the expiration and deletion of the write-ahead log files. The scheduling service then copies the delayed messages from the write-ahead log and writes them back to these delayed log files. It should be noted that each file has the same time span, calculated as: Delayed log file time span = Maximum delay time of delayed message data / Delay time of a single file. The maximum delay time of delayed message data refers to a range, such as the maximum delay time of a delayed message within one hour. The delay time of a single file refers to the delay time per unit scale, such as one minute.
[0033] Furthermore, an index file is constructed that corresponds one-to-one with the message delay log file. The index file records the index, including the offset, size, and timestamp of the delayed message data in the delay log file, so as to better locate the physical location of the delayed message data.
[0034] S13: Lazy load the delayed message data into the time wheel according to the delay time.
[0035] Specifically, first, the data distribution of delayed message data on the memory time wheel is calculated, such as... Figure 2 As shown, the time wheel arrow moves at a fixed frequency in a certain direction, and one jump is one tick of the time wheel pointer. The time wheel scale tickDuration represents the time of one tick, and the time wheel length wheelLength represents the number of ticks on a time wheel. First, calculate the deadline for sending delayed message data: deadline = current time + message delay time - time when the time wheel started. Second, calculate the position of the delayed message data in the time wheel. The method for calculating the position of the delayed message data in the time wheel is: hash the deadline % time wheel length wheelLength and take the modulo. Third, store the delayed message data in the corresponding slot of the time wheel in a linked list. It should be noted that the time wheel linked list structure is a closed-loop doubly linked list. For example: Figure 2Taking the first time wheel as an example, if the current time is 1:00, the tick duration is 1 minute, the message delay time is 30 minutes, and the time wheel starts at 0:40, then the deadline for sending the delayed message data is 60min + 30min - 40min = 50min. The position of the delayed message data in the time wheel is 50%60 = 50, so the delayed message data should be located on the linked list of the 50th slot of this time wheel.
[0036] Furthermore, if the delay time interval between two delayed message data is exactly the time it takes for the time wheel pointer to complete one revolution, these two delayed message data will fall into the same slot of the same time wheel through the calculation of the deadline and position. Therefore, it is calculated whether the delay time difference between the two delayed message data is equal to the time wheel's wheel length multiplied by the time wheel's tick duration. This time difference is used to determine whether the positions of the two delayed message data conflict within the time wheel. If they conflict, a secondary time wheel is created, and the delayed message data with the longer delay time is lazy-loaded into the secondary time wheel, where the tick duration of the secondary time wheel is one-sixtieth of the tick duration of the primary time wheel. Figure 2 As shown, the tickDuration of the first-level time wheel is 1 minute, and the tickDuration of the second-level time wheel is 1 second. This method avoids messages with an interval difference of wheelLength * tickDuration falling into the same linked list, thus avoiding the impact of sorting operations on memory.
[0037] Furthermore, after each wheelLength*tickDuration time interval, the adjacent delayed message data is loaded. At the top of the hour, the message index, such as offset, size, timestamp, etc. of the delayed message data of the next time period can be loaded from the write-ahead log of the disk file and distributed into the corresponding linked list on the time wheel in memory using the above hash algorithm.
[0038] S14: Forward the message data that has expired in the time wheel to the consumption queue and receive the message data sending result.
[0039] Specifically, when the time wheel pointer ticks to a linked list node, if that node has no data, no further processing is performed.
[0040] If a delayed message exists, it is retrieved using the index and sent to a consumer queue visible to the consumer. If the node has delayed message data, it is retrieved using the index and sent to a consumer queue visible to the consumer, and a response message is received from the consumer queue.
[0041] S15: Perform data processing based on the message data sending result: If the sending is successful, write the message data and its index into the scheduling log; if the sending fails, retrieve the failed message data from the scheduling log and reload it into the time wheel.
[0042] Specifically, upon receiving a message indicating successful forwarding of delayed message data, the message and its index are recorded in the scheduling log so that the consumer can retrieve the information and complete its business processing. If a system crash or delayed message data response timeout occurs, the delayed message data that was not successfully sent is retrieved from the scheduling log and re-inserted into the time wheel list at the position indicated by the time wheel pointer (currentIndex + preset time preTime / time wheel tickDuration). Then, when the time wheel tick sequentially scans the delayed message data, it is sent again. For example, if the preset time is 10 seconds and the tick points to the fifth slot (currentIndex = 4), the slot index for insertion into the time wheel is 4 + 10 / 1 = 14. Therefore, the delayed message data should be inserted into the list at the 15th slot. When the tick scans the delayed message data after 10 seconds, it will be resent to the corresponding consumer queue.
[0043] All or part of the steps in the above-described method embodiments can be implemented using computer program-related hardware. Based on this understanding, the present invention also provides a computer program product comprising one or more computer instructions. The computer instructions can be stored in a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computer, or a data storage device such as a server or data center that integrates one or more available media.
[0044] See Figure 3 This embodiment provides an adaptive delay message data processing device 30, which is installed as software in an electronic device to execute the adaptive delay message data processing method described in the aforementioned method embodiment during runtime. Since the technical principles of this system embodiment are similar to those of the aforementioned method embodiments, the same technical details will not be repeated.
[0045] The adaptive delayed message data processing device 30 in this embodiment specifically includes: a message receiving module 31, a message storage module 32, a message scheduling module 33, a message forwarding module 34, and a message exception handling module 35. The message receiving module 31 is used to acquire message data, add the message data to a write-ahead log, and send an ACK response message to the terminal object that sent the delayed message data after successful writing. The message storage module 32 is used to construct a delayed log file and an index file, and write the delayed message data to the delayed log file. The message scheduling module 33 is used to determine whether the delay time of the message data exceeds the maximum buffer time of the time wheel, filter the delayed message data in the write-ahead log, and lazy-load the delayed message data into the time wheel according to the delay time. The message forwarding module 34 is used to forward the message data that has expired in the time wheel to the consumption queue and receive the message data sending result. The message exception handling module 35 is used to perform data processing according to the message data sending result: if the sending is successful, the message data and its index are written to the scheduling log; if the sending fails, the failed message data is retrieved from the scheduling log and reloaded into the time wheel.
[0046] Those skilled in the art should understand that Figure 3 The division of modules in this embodiment is merely a logical functional division; in actual implementation, they can be fully or partially integrated into one or more physical entities. These modules can be implemented entirely in software via processing element calls, entirely in hardware, or partially in software calls via processing elements and partially in hardware. For example, the message exception handling module 35 can be a separate processing element, integrated into a chip, or stored as program code in memory, invoked and executed by a processing element. The implementation of other modules is similar. The processing element described here can be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0047] See Figure 4 This embodiment provides an electronic device, which may be a portable computer, smartphone, tablet computer, or other similar device. Specifically, the electronic device includes at least the following components connected via a bus 41: a memory 42, a processor 43, and a communication interface 44. The communication interface 44 is used to enable communication between the data access device and other devices. The memory 42 stores a computer program, and the processor 43 executes the computer program stored in the memory 42 to perform all or part of the steps in the aforementioned method embodiment.
[0048] The system bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include Random Access Memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.
[0049] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0050] In summary, the adaptive delayed message data processing method, apparatus, medium, and device provided by this invention addresses the technical deficiencies of existing technologies that employ timed scanning of databases, Java's built-in delayed queues, or other processing methods. It modifies existing technologies by using separate management and indexing of delayed messages, along with a multi-level time-rotation delayed loading device. Furthermore, it analyzes and manages messages that failed to be sent due to system crashes or timeouts using scheduling logs. This supports message retrying and meets business requirements for defining arbitrary delays, eliminating numerous redundant queues, resolving the sorting and data storage issues of delayed data messages, and enabling dynamic expansion. Therefore, this invention effectively overcomes the various shortcomings of existing technologies and possesses high industrial applicability.
[0051] To address the issues of resource waste, task loss due to server crashes, and inability to customize delay times in existing message delay processing solutions, this paper proposes a new approach. This approach involves separate management and indexing of delayed messages, the use of a multi-level time-rotation delay loading mechanism for delayed message processing, and the analysis and management of messages that failed to be sent due to system crashes or timeouts through scheduling logs. It also supports message retries, thus fulfilling business requirements that allow for the definition of arbitrary delays and supporting scenarios where delayed messages will be retried due to crashes or timeouts. Furthermore, it resolves the sorting and storage issues of delayed messages found in existing solutions.
[0052] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. An adaptive delay message data processing method, characterized in that, include: S11. Obtain message data, add the message data to the write-ahead log, and determine whether the delay time of the message data exceeds the maximum cache time of the time wheel through the scheduling service. If yes, proceed to S12; otherwise, proceed to S13. S12. Filter delayed message data in the write-ahead log, construct a delayed log file and an index file, and write the delayed message data into the delayed log file; S13. Lazy load the delayed message data into the time wheel according to the delay time; Calculate the deadline for sending the delayed message data, where the deadline for sending the delayed message data = current time + message delay time - time when the time wheel starts; The position of the delayed message data in the time wheel is calculated by hashing and moduloing the time wheel length (deadline%wheelLength). The delayed message data is stored in the slot corresponding to the time wheel in the form of a linked list, wherein the linked list structure is a closed-loop doubly linked list; Calculate whether the delay time difference between the first delayed message data and the second delayed message data is equal to the time wheel length multiplied by the time wheel tickduration. Determine whether the positions of the first delayed message data and the second delayed message data conflict in the time wheel based on the time difference. If they conflict, create a second time wheel and lazily load the second delayed message data into the second time wheel. The time wheel tickduration of the second time wheel is one-sixtieth of the time wheel tickduration of the first time wheel. S14. Forward the expired message data in the time wheel to the consumption queue and receive the message data sending result; S15. Perform data processing based on the message data sending result: If the sending is successful, write the message data and its index into the scheduling log; if the sending fails, retrieve the failed message data from the scheduling log and reload it into the time wheel.
2. The method according to claim 1, characterized in that, Also includes: Based on the message data delay time, a set of delay log files are constructed in the form of a linked list, and an index file corresponding one-to-one with the delay log files is constructed. The delay log files have the same time span, and the index file records the index including the offset, size, and timestamp of the delayed message data in the delay log file. The delayed message data in the write-ahead log is copied by the scheduling service and written to the delayed log file.
3. The method according to claim 2, characterized in that, Also includes: The time span of the delay log file = the maximum delay time of the delayed message data / the delay time of a single file, where the maximum delay time of the delayed message data refers to the maximum delay time of the delayed message data within the interval, and the delay time of a single file refers to the delay time per unit scale.
4. The method according to claim 1, characterized in that, Also includes: When the time wheel pointer tick scans to the time wheel linked list node, if the node has no data, no processing is performed; if the node has delayed message data, the delayed message data is retrieved through the index and sent to the consumer queue visible to the consumer. After the delayed message data is successfully sent, the delayed message data and the index are recorded in the scheduling log.
5. The method according to claim 1 or 4, characterized in that, This also includes the following after receiving a failure message indicating that the delayed message data failed to be sent to the consumption queue: Retrieve delayed message data that failed to be sent from the scheduling log; Reinsert it into the time wheel linked list according to the position of the slot index currentIndex + preset time preTime / time wheel tickDuration pointed to by the time wheel pointer.
6. An adaptive delay message data processing device, characterized in that, The device includes: The message receiving module is used to acquire message data, add the message data to a write-ahead log, and send an ack response message to the terminal object that sent the delayed message data after successful writing. The message storage module is used to construct a delay log file and an index file, and to write the delayed message data into the delay log file; The message scheduling module is used to determine whether the delay time of the message data exceeds the maximum cache time of the time wheel, and to filter delayed message data in the write-ahead log and lazy-load the delayed message data into the time wheel according to the delay time; Calculate the deadline for sending the delayed message data, where the deadline for sending the delayed message data = current time + message delay time - time when the time wheel starts; The position of the delayed message data in the time wheel is calculated by hashing and moduloing the time wheel length (deadline%wheelLength). The delayed message data is stored in the slot corresponding to the time wheel in the form of a linked list, wherein the linked list structure is a closed-loop doubly linked list; Calculate whether the delay time difference between the first delayed message data and the second delayed message data is equal to the time wheel length multiplied by the time wheel tickduration. Determine whether the positions of the first delayed message data and the second delayed message data conflict in the time wheel based on the time difference. If they conflict, create a second time wheel and lazily load the second delayed message data into the second time wheel. The time wheel tickduration of the second time wheel is one-sixtieth of the time wheel tickduration of the first time wheel. The message forwarding module is used to forward expired message data in the time wheel to the consumption queue and receive the message data sending result; The message exception handling module is used to process data based on the message data sending result: if the sending is successful, the message data and its index are written to the scheduling log; if the sending fails, the failed message data is retrieved from the scheduling log and reloaded into the time wheel.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is loaded and executed by the processor, it implements the adaptive delay message data processing method as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, include: Processor, memory, and communication interface; among which, The memory is used to store computer programs; The processor is configured to load and execute the computer program to cause the electronic device to perform the adaptive delay message data processing method as described in any one of claims 1 to 5; The communication interface is used to enable communication between the access device and other devices.
Citation Information
Patent Citations
Delay message processing system, method and equipment and storage medium
CN113568976A
Message processing method and device, electronic equipment and storage medium
CN113709214A