Data order preservation method, device, computer equipment and storage medium

By using a bidirectional linked list to store message markings and order-saving information in SoC system, the problem of difficult to guarantee the data order in multi-path data transmission is solved, and the effective order-saving and accurate transmission of data information is achieved.

CN119201835BActive Publication Date: 2025-05-06WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411231839.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2025-05-06
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

In SoC systems, there may be multiple data paths between the data producer and the data executor, which makes it difficult to guarantee the order when the destination acquires multiple data.

Method used

By storing message marks corresponding to messages in the first linked list and storing order information in the second linked list, it is ensured that the order of messages is sent corresponds to the order of address in the linked list. After receiving the response information of the execution device, the corresponding message mark is extracted from the first linked list, and the target message mark is determined based on the order-saving information, and sent to the target device.

Benefits of technology

It ensures the order preservation of data information in multi-path data transmission scenarios, and improves the accuracy of the target device to read data information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201835B_ABST
    Figure CN119201835B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data transmission, and discloses a data order preservation method, device, computer equipment and storage medium, including: when a data production device sends a message to an execution device, a message tag corresponding to the message is stored in a first linked list, and order preservation information is stored in a second linked list, wherein the message includes data information and order preservation information; response information after the execution device executes the data information is received, and the message tag corresponding to the response information is extracted from the first linked list based on the response information; the target message tag is determined according to the position of the message tag corresponding to the order preservation information of each group of data information in the first linked list, and then the target order preservation information corresponding to the target message tag in the second linked list is sent to the target device. Multi-path order preservation is realized, and the accuracy of the target device reading data information is improved. It is suitable for various scenarios such as data transmission requiring response and order preservation processing of abnormal interruption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a data order preservation method, device, computer equipment and storage medium. Background Art

[0002] System on Chip (SoC) is a complex chip that integrates multiple electronic circuits and system functions. In the SoC system, there is a large amount of business data and message transmission. There is often a specific order-preserving relationship between business data and business data, and between business data and messages, depending on the business. In the SoC system, there may be multiple data paths between the data producer and the data execution end. In addition, the destination end also needs to obtain data from the data execution end. Since there may be multiple data on the data execution end, the order in which the destination end obtains data is difficult to guarantee. Summary of the invention

[0003] In view of this, the present invention provides a data order preservation method, apparatus, computer equipment and storage medium to solve the problem that the order may be wrong when the destination obtains multiple data.

[0004] In a first aspect, the present invention provides a data order preservation method, the method comprising:

[0005] When sending a message to an execution device, a message tag corresponding to the message is stored in a first linked list, and sequence preservation information is stored in a second linked list, wherein the message includes data information and sequence preservation information, the address sequence of the message tag in the first linked list corresponds to the sending sequence of the message, and the sequence preservation information corresponds to each group of data information;

[0006] receiving response information after the execution device executes the data information, the response information corresponding to the data information one by one;

[0007] Extracting a message tag corresponding to the response information from the first linked list based on the response information;

[0008] Based on the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list, a target message mark is determined, and the target order preservation information corresponding to the target message mark in the second linked list is sent to the target device.

[0009] In an optional implementation, the determining the target message mark based on the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list includes:

[0010] When the message mark corresponding to the sequence preservation information of each group of data information reaches the head of the first linked list, the message mark corresponding to the sequence preservation information is determined as the target message mark.

[0011] In an optional implementation, the step of marking the target message in the second linked list and sending the target order preservation information corresponding to the target message to the target device includes:

[0012] Extract the target sequence preservation information corresponding to the target message mark in the second linked list from the second linked list;

[0013] The target sequence preservation information is sent to the target device.

[0014] In an optional implementation, the first linked list and the second linked list are bidirectional linked lists, the bidirectional linked list structure includes a storage area for pre-fetch information, and storing the message tags corresponding to the messages in the first linked list includes:

[0015] Writing the pre-fetch information of the first node into the extended part of the head pointer, writing the message mark of the first node into the data storage area pointed to by the first address, and writing the first address into the head pointer, wherein the pre-fetch information of the first node corresponds to the message mark of the first node;

[0016] The prefetch information of the second node is written into the storage area of ​​the prefetch information pointed to by the first address, the message mark of the second node is written into the data storage area pointed to by the second address, and the second address is written into the subsequent logical address pointed to by the first address, the first address is written into the previous logical address pointed to by the second address, and the second node address is written into the tail pointer, and the prefetch information of the second node corresponds to the message mark of the second node.

[0017] In an optional implementation, extracting a message tag corresponding to the response information from the first linked list based on the response information includes:

[0018] Determining a message tag corresponding to the response information;

[0019] The first address corresponding to the message tag is deleted from the first linked list, and the second address and the prefetch information pointed to by the first address are indexed based on the subsequent logical address pointed to by the first address, so as to write the prefetch information corresponding to the second address and the second node into the head pointer, and the second node becomes the head node of the team.

[0020] In an optional implementation, when sending a message to the execution device, storing a message tag corresponding to the message in the first linked list and storing the order preservation information in the second linked list includes:

[0021] When sending messages to the execution device, obtaining the sending order of the messages;

[0022] Allocate hanging chain addresses in the first chain list and the second chain list based on the sending order, wherein the hanging chain addresses in the first chain list correspond to the message tags one-to-one, and the hanging chain addresses in the second chain list correspond to the order preservation information one-to-one;

[0023] A message tag corresponding to the message is stored in the first linked list based on the linked link address, and sequence preservation information is stored in the second linked list.

[0024] In an optional implementation, extracting the message tag corresponding to the response information from the first linked list based on the response information further includes:

[0025] Based on the order of the response information, the message tag corresponding to the response information is extracted from the first linked list, and the linked link address corresponding to the message tag is retrieved.

[0026] In a second aspect, the present invention provides a data sequence preservation device, the device comprising:

[0027] a tag storage module, used for storing a message tag corresponding to the message in a first linked list and storing order preservation information in a second linked list when sending a message to an execution device, wherein the message includes data information and order preservation information, the address sequence of the message tag in the first linked list corresponds to the order in which the message is sent, and the order preservation information corresponds to each group of data information;

[0028] A response receiving module, used for receiving response information after the execution device executes the data information, wherein the response information corresponds to the data information one by one;

[0029] A tag extraction module, used for extracting a message tag corresponding to the response information from the first linked list based on the response information;

[0030] The order-preserving sending module is used to determine the target message mark based on the position of the message mark corresponding to the order-preserving information of each group of data information in the first linked list, and send the target order-preserving information corresponding to the target message mark in the second linked list to the target device.

[0031] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the method of the first aspect or any corresponding embodiment thereof.

[0033] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method of the first aspect or any corresponding embodiment thereof.

[0034] The data order preservation method provided by the embodiment of the present invention, when the data production device sends a message to the execution device, the message mark corresponding to the message is stored in the first linked list, and the order preservation information is stored in the second linked list, and the message includes data information and order preservation information; the response information after the execution device executes the data information is received, and the message mark corresponding to the response information is extracted from the first linked list based on the response information; the target message mark is determined according to the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list, and then the target message mark in the second linked list is sent to the target device. This method is to link the message marks of the data information and the order preservation information in the order of issuance, and after the data information is executed, the message mark corresponding to the data information is delinked according to the response information, and the corresponding group of data information is judged according to the position of the message mark of the order preservation information in the first linked list. If the execution is completed, the order preservation information can be delinked from the second linked list and sent to the target device, so as to realize multi-path order preservation and improve the accuracy of the target device reading data information. It is suitable for various scenarios such as data transmission that requires response and order preservation processing of abnormal interruption. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 is a schematic diagram of a SoC system sequence preservation according to an embodiment of the present invention;

[0037] Figure 2 is a flow chart of a data sequence preservation method according to an embodiment of the present invention;

[0038] Figure 3 is a schematic diagram of a downlink path according to an embodiment of the present invention;

[0039] Figure 4 is a schematic diagram of an uplink path according to an embodiment of the present invention;

[0040] Figure 5 is a schematic diagram of a bidirectional linked list according to an embodiment of the present invention;

[0041] Figure 6is a schematic diagram of a tag management unit according to an embodiment of the present invention;

[0042] Figure 7 is a structural block diagram of a data sequence preservation device according to an embodiment of the present invention;

[0043] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0045] In the SoC system, there is a large amount of business data and message transmission. There is often a specific order-preserving relationship between business data and business data, and between business data and messages, depending on the business. Order preservation refers to ensuring that data and events maintain their original time or logical order during processing to avoid data competition and consistency problems in a multi-threaded or multi-processing unit environment. For example: in the NVMe (Non-Volatile Memory Host Controller Interface Specification) protocol, before pushing CQ (Completion Queue), it is necessary to ensure that the business data corresponding to the CQ is completed, that is, "write-through"; in RDMA (Remote Direct Memory Access), the premise for pushing CQE (Completion Queue Entry) or interruption is that the business data transmission is completed; in the storage system, the system can perform exception handling by issuing a drain command. Before the drain command is responded, it must be ensured that the commands of the specified channel are drained. In a complex SoC system, the data production device will send the message to the execution device, and the target device will obtain the message from the execution device. With Figure 1For example, in the figure, the producer of data and order preservation messages is a data production device (for example, an interface control layer in a storage system), DDR (a high-speed synchronous dynamic random access memory) is an execution device, and the target device is the system software. The data production device outputs the data (D0, D1, D2) in order to the execution device DDR, and sends the doorbell DB to the system software. The system software obtains the data (D0, D1, D2) from the execution device DDR according to the doorbell DB. In this process, due to the different paths and delays for sending data and sending doorbells, the doorbell may reach the system software before the data (D0, D1, D2), resulting in the system software obtaining data errors. Based on this, an embodiment of the present invention provides a data order preservation method, which is applied to data production equipment.

[0046] According to an embodiment of the present invention, a data order preservation method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0047] In this embodiment, a data sequence preservation method is provided, which can be used for the above-mentioned application to data production equipment. Figure 2 is a flow chart of a data order preservation method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0048] Step S101, when a message is sent to an execution device, a message tag corresponding to the message is stored in a first linked list, and sequence preservation information is stored in a second linked list.

[0049] The message includes data information and sequence preservation information. The address sequence of the message tags in the first linked list corresponds to the sequence in which the messages are sent, and the sequence preservation information corresponds to each group of data information.

[0050] The message sent by the data production device to the execution device includes data information and sequence preservation information. The specific content of the corresponding sequence preservation information may be different according to different data production devices and execution devices. Generally speaking, the sequence preservation information may include the address, content, size, etc. of the data. The path for the data production device to send messages to the execution device is the downlink path, and the path for the execution device to send signals to the data production device is the uplink path.

[0051] The first linked list and the second linked list are both deployed on the data production device. The first linked list can be a request tag chain, and the second linked list can be a message record chain. The message tag corresponds to the message one by one. When the data production device sends a message to the execution device, the message tag corresponding to the message is added to the first linked list accordingly. In addition, different types are filled in the message tag in the first linked list corresponding to the two types of data information and sequence preservation information.

[0052] Taking the type flag = 0 corresponding to the data information and the type flag = 1 corresponding to the order preservation information as an example, when the sent message is data information, the message tag corresponding to the data information is added to the first linked list, and flag = 0 is filled in; when the sent message is order preservation information, the message tag corresponding to the order preservation information is added to the first linked list, and the type flag = 1 is filled in, and the specific content of the order preservation information is linked to the second linked list.

[0053] by Figure 3 Taking the downlink path schematic diagram shown in the figure as an example, in the figure, "D*-*" represents the data information sent down, "DB*" represents the sequence preservation information, "d*-*" represents the message mark corresponding to the data information, and "db*" represents the message mark corresponding to the sequence preservation information.

[0054] When the sent messages are D0-0 (the first data message of the first group), D0-1 (the second data message of the first group), and DB0 (the first group of sequence preservation information), the corresponding message tags are filled in the first linked list in the order of d0-0, d0-1, and db0, and the first group of sequence preservation information DB0 is linked in the second linked list.

[0055] Step S102, receiving response information after the execution device executes the data information.

[0056] Among them, the response information corresponds to the data information one by one.

[0057] After receiving the message sent by the data production device, the execution device executes the data information in the message and returns the response information after executing the data information. The data production device receives the response information. The order of the received response information is not necessarily the same as the order of the sent data information.

[0058] Step S103: extracting the message tag corresponding to the response information from the first linked list based on the response information.

[0059] The response information may be returned out of order. The corresponding message tags are removed from the first linked list in the order in which the response information is received.

[0060] Step S104, determining a target message mark based on the position of the message mark corresponding to the sequence preservation information of each group of data information in the first linked list, and sending the target sequence preservation information corresponding to the target message mark in the second linked list to the target device.

[0061] According to the position of the message mark corresponding to the sequence preservation information in the first linked list, it can be determined whether all the response information corresponding to a group of data information has been received, and the corresponding message marks have all been removed from the first linked list. Similarly, if all the response information corresponding to a group of data information has been received, and the corresponding message marks have all been removed from the first linked list, it can be determined that the sequence preservation information corresponding to the group of data information can be sent to the target device. First, the position of the message mark corresponding to the sequence preservation information in the first linked list is obtained, and the message mark corresponding to the sequence preservation information that can be sent is determined as the target message mark, and then the corresponding sequence preservation information in the second linked list is sent to the target device. The target device can obtain the data information corresponding to the group of sequence preservation information from the target execution device based on the received sequence preservation information. Exemplarily, the data production device can be the interface control layer in the storage system, the execution device is DDR, and the target device is the system software.

[0062] The data order preservation method provided by the embodiment of the present invention, when the data production device sends a message to the execution device, the message mark corresponding to the message is stored in the first linked list, and the order preservation information is stored in the second linked list, and the message includes data information and order preservation information; the response information after the execution device executes the data information is received, and the message mark corresponding to the response information is extracted from the first linked list based on the response information; the target message mark is determined according to the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list, and then the target message mark in the second linked list is sent to the target device. This method is to link the message marks of the data information and the order preservation information in the order of issuance, and after the data information is executed, the message mark corresponding to the data information is delinked according to the response information, and the corresponding group of data information is judged according to the position of the message mark of the order preservation information in the first linked list. If the execution is completed, the order preservation information can be delinked from the second linked list and sent to the target device, so as to realize multi-path order preservation and improve the accuracy of the target device reading data information. It is suitable for various scenarios such as data transmission that requires response and order preservation processing of abnormal interruption.

[0063] In some optional embodiments, in the above step S104, determining the target message mark based on the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list includes: when the message mark corresponding to the order preservation information of each group of data information reaches the head of the first linked list, determining the message mark corresponding to the order preservation information as the target message mark.

[0064] After extracting the message tag corresponding to the response information, when the message tag corresponding to the order preservation information corresponding to the first group of data information reaches the head of the first linked list, it indicates that all the message tags corresponding to the first group of data information have been removed from the first linked list. It can be determined that the message tag corresponding to the target order preservation information that can be sent down at this time is the target message tag.

[0065] In this embodiment, when the message mark corresponding to the order-preserving message reaches the head of the linked list, it indicates that all data information before the order-preserving message has been executed, and then the order-preserving message can be sent.

[0066] Furthermore, in the above step S104, the target message is marked with the target sequence preservation information corresponding to the target in the second linked list and sent to the target device, including the following steps:

[0067] Step S1041, extracting the target sequence preservation information corresponding to the target message mark in the second linked list from the second linked list;

[0068] Step S1042: Send the target sequence preservation information to the target device.

[0069] After determining the target message tag, the target sequence preservation information corresponding to the target message tag can be determined, the target message tag is delinked from the first linked list, the target sequence preservation information is delinked from the second linked list, and the target sequence preservation information is sent to the target device.

[0070] When the sent data is returned, the message tag corresponding to the corresponding data information in the first linked list (request tag chain) is delinked. The return order of the response information may be disordered. When the message tag is delinked, the original logical order of the message tag is not changed. Figure 4 Taking the upstream path diagram shown as an example, the order of data information corresponding to the received response information is "D1-0, D1-1, D0-1, D0-0, D1-2", and the corresponding message tags extracted from the first linked list are "d1-0, d1-1, d0-1, d0-0, d1-2". When d0-1 and d0-0 are unlinked, the message tag "db0" corresponding to the first sequence preservation information reaches the head of the chain, it is unlinked from the first linked list (request tag chain), and the corresponding sequence preservation information "DB0" is unlinked from the second linked list (message record chain) and sent to the target device. The order preservation execution of DB0 and (D0-0, D0-1) and DB1 and (D1-0, D1-1, D1-2) is realized.

[0071] In some optional implementations, the first linked list and the second linked list are bidirectional linked lists, and the bidirectional linked list structure includes a storage area for pre-fetched information. The above step S101 includes:

[0072] Step S201, write the pre-fetch information of the first node into the extended part of the head pointer, write the message mark of the first node into the data storage area pointed to by the first address, and write the first address into the head pointer.

[0073] The first linked list and the second linked list are bidirectional linked lists. The bidirectional linked list structure includes a pre-fetch information field. The pre-fetch information of the first node corresponds to the message tag of the first node.

[0074] Step S202, write the pre-fetch information of the second node into the storage area of ​​the pre-fetch information pointed to by the first address, write the message tag of the second node into the data storage area pointed to by the second address, write the second address into the subsequent logical address pointed to by the first address, write the first address into the previous logical address pointed to by the second address, and write the second node address into the tail pointer. The pre-fetch information of the second node corresponds to the message tag of the second node.

[0075] See also Figure 5 The schematic diagram of the bidirectional linked list shown in the figure, Head_ptr represents the head pointer of the linked list, Tail_ptr represents the tail pointer of the linked list, Addr0~Addr3 represent discrete address spaces, PRE represents the previous logical address of the record, NEXT represents the next logical address of the record, DATA is the data information stored in the node, and N-INFO represents the pre-fetch information of the previous node. When hanging the chain, the pre-fetch information N_INFO_0 of the first node DATA0 is written to the extended part of head_ptr, DATA0 itself (that is, the message mark of the first node) is written to the DATA area pointed to by Addr0 (that is, the data storage area pointed to by the first address), and Addr0 is written to head_ptr (that is, the first address is written to the head pointer). The prefetch information N_INFO_1 of the second node DATA1 is written into the N_INFO area pointed to by Addr0 (first address), DATA1 itself (i.e., the message mark of the second node) is written into the DATA area pointed to by Addr1 (second address), and Addr1 is written into the NEXT area (next-level logical address) pointed to by Addr0, and Addr0 is written into the PRE area (previous-level logical address) pointed to by Addr1, and so on to realize the logical series connection of the previous and next levels of the linked list (for example, after the third node is stored, the third address is written into the tail pointer). Only when the first node is stored, it is necessary to write both the head pointer and the tail pointer, and only the tail pointer is written to the second and subsequent nodes.

[0076] Furthermore, the above step S103 includes:

[0077] Step S203: determine the message tag corresponding to the response information.

[0078] The response information is returned to the data production device after the execution device executes the data information. The data information corresponds to the message tag one by one, and the response information corresponds to the data information one by one. Then, the correspondence between the response information and the message tag can be determined, that is, the message tag corresponding to the response information can be determined.

[0079] Step S204, delete the first address corresponding to the message tag from the first linked list, and index the second address and the storage area of ​​the pre-fetch information pointed to by the first address based on the subsequent logical address pointed to by the first address, so as to write the pre-fetch information corresponding to the second address and the second node into the head pointer, and the second node becomes the head node of the team.

[0080] When unlinking, Addr0 (the first address corresponding to the message tag) is removed from the serial logic, and the information in the NEXT area of ​​Addr0 is used to index to Addr1 (the second address) and N_INFO_1 (the pre-fetch information pointed to by the first address, that is, the pre-fetch information corresponding to the second node), and Addr1 and N_INFO_1 are written into head_ptr (head pointer), thereby completing the unlinking operation in the linked list. That is, after the first node (the head node) is unlinked, the original second node becomes the head node; after the second node is unlinked, the third node becomes the head node, and so on.

[0081] The head pointer in the bidirectional linked list is implemented by a register and is open to the outside of the module, so the outside can monitor the value of N_INFO in the head pointer in real time to realize the pre-fetching function of the head node information. In other words, for the message mark corresponding to the order preservation information, the head node information can be monitored in real time without disconnecting the link, so as to obtain the position of the message mark corresponding to the order preservation information in the linked list.

[0082] It should be noted that the first node, the second node, the first address and the second address in the above steps S201-S204 are only examples in a bidirectional linked list, used to represent the logical association between the previous and next levels in the linked list, the process of chaining and unchaining. In actual applications, there is no limit on the number of nodes and addresses.

[0083] This embodiment provides a bidirectional linked list with a pre-fetch function, which realizes real-time monitoring of the head node in the linked list without disconnecting the link by extending the bit width of the head pointer and the subsequent logical address, thereby determining the position of the message mark corresponding to the order preservation information in the linked list. By adopting the bidirectional linked list method, all concurrently executed messages share a bidirectional linked list resource, which can reduce the hardware resource overhead of the system and improve the processing capability of high-concurrency instructions.

[0084] In some optional implementations, step S101 in the above method further includes the following steps:

[0085] Step S301, when sending a message to an execution device, obtain the sending order of the message.

[0086] The messages sent to the execution device have a sending order, starting from Figure 3 For example, the message sending order is "D0-0, D0-1, DB0, D0-0, D1-0, D1-1, D1-2, DB1".

[0087] Step S302, allocating the linked addresses in the first linked list and the second linked list based on the sending order.

[0088] Among them, in the first linked list, the link address corresponds to the message mark one by one, and in the second linked list, the link address corresponds to the sequence preservation information one by one.

[0089] The data production device is equipped with a tag management unit, which is a resource number management unit for providing a chaining address. In the first chain list and the second chain list, each message tag and sequence preservation information has a unique and different chaining address. The chaining address is related to the order in which the message is sent.

[0090] Step S303: Store the message tag corresponding to the message in the first linked list based on the linked address, and store the sequence preservation information in the second linked list.

[0091] like Figure 6 As shown, tag represents the hanging chain address. According to the order in which the messages are sent, the corresponding hanging chain address is issued in the first linked list for the message tag of each message. For example: message D0-0 (data information), the corresponding message tag is d0-0, and the hanging chain address in the first linked list (request tag chain) is tag0; message DB0 (sequence preservation information), the corresponding message tag is db0, and the hanging chain address in the first linked list (request tag chain) is tag2, and the hanging chain address of the sequence preservation information DB in the second linked list (message record chain) is tag3.

[0092] Furthermore, step S103 in the above method further includes: extracting a message tag corresponding to the response information from the first linked list based on the order of the response information, and collecting the linked link address corresponding to the message tag.

[0093] The order of the received response information is not necessarily consistent with the order in which the messages are sent. The links are removed from the first linked list and the second linked list according to the order in which the response information is received, and the corresponding chain addresses are recovered by the tag management unit. The order in which the chain addresses are recovered corresponds one to one to the order in which the response information is received.

[0094] In this embodiment, a data sequence preservation device is also provided, which is used to implement the above-mentioned embodiments and implementation methods, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0095] This embodiment provides a data sequence preservation device, such as Figure 7 As shown, including:

[0096] The tag storage module 401 is used to store the message tag corresponding to the message in the first linked list and store the sequence preservation information in the second linked list when sending a message to the execution device, wherein the message includes data information and the sequence preservation information, the address sequence of the message tag in the first linked list corresponds to the sending sequence of the message, and the sequence preservation information corresponds to each group of data information;

[0097] A response receiving module 402, configured to receive response information after the execution device executes the data information, wherein the response information corresponds to the data information one by one;

[0098] A tag extraction module 403, configured to extract a message tag corresponding to the response information from the first linked list based on the response information;

[0099] The order preservation sending module 404 is used to determine the target message mark based on the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list, and send the target order preservation information corresponding to the target message mark in the second linked list to the target device.

[0100] In some optional implementations, the order-preserving sending module 404 includes:

[0101] The order-preserving sending unit is used to determine the message mark corresponding to the order-preserving information of each group of data information as the target message mark when the message mark corresponding to the order-preserving information reaches the head of the first linked list.

[0102] In some optional implementations, the order-preserving sending module 404 includes:

[0103] A target message tag extraction unit, used for extracting the target sequence preservation information corresponding to the target message tag in the second linked list from the second linked list;

[0104] The target order preservation sending unit is used to send the target order preservation information to the target device.

[0105] In some optional implementations, the first linked list and the second linked list are bidirectional linked lists, the bidirectional linked list structure includes a storage area for pre-fetched information, and the tag storage module 401 includes:

[0106] A first hanging chain unit is used to write the pre-fetch information of the first node into the extension part of the head pointer, write the message mark of the first node into the data storage area pointed to by the first address, and write the first address into the head pointer, the pre-fetch information of the first node corresponds to the message mark of the first node;

[0107] The second hanging chain unit is used to write the pre-fetch information of the second node into the storage area of ​​the pre-fetch information pointed to by the first address, write the message mark of the second node into the data storage area pointed to by the second address, write the second address into the subsequent logical address pointed to by the first address, write the first address into the previous logical address pointed to by the second address, and write the second node address into the tail pointer, and the pre-fetch information of the second node corresponds to the message mark of the second node.

[0108] In some optional implementations, the marker extraction module 403 includes:

[0109] A tag determining unit, used to determine a message tag corresponding to the response information;

[0110] The first delinking unit is used to delete the first address corresponding to the message tag from the first linked list, and index the second address and the pre-fetch information pointed to by the first address based on the subsequent logical address pointed to by the first address, so as to write the pre-fetch information corresponding to the second address and the second node into the head pointer, and the second node becomes the head node of the queue.

[0111] In some optional implementations, the tag storage module 401 includes:

[0112] A sequence acquisition unit, used for acquiring the sending sequence of the message when sending the message to the execution device;

[0113] a fob allocation unit, configured to allocate fob addresses in the first linked list and the second linked list based on the sending order, wherein the fob addresses in the first linked list correspond to the message tags one-to-one, and the fob addresses in the second linked list correspond to the order preservation information one-to-one;

[0114] The chain unit is used to store the message mark corresponding to the message in the first chain list based on the chain address, and store the sequence preservation information in the second chain list.

[0115] In some optional implementations, the marker extraction module 403 includes:

[0116] The address recovery unit is used to extract the message mark corresponding to the response information from the first linked list based on the order of the response information, and recover the linked address corresponding to the message mark.

[0117] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0118] The data sequence preservation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0119] The embodiment of the present invention also provides a computer device having the above Figure 7 The data sequence preservation device shown.

[0120] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0121] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0122] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0123] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0124] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0125] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0126] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0127] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0128] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data order preservation method, characterized in that: The method comprises: When sending a message to an execution device, a message tag corresponding to the message is stored in a first linked list, and sequence preservation information is stored in a second linked list, wherein the message includes data information and sequence preservation information, the address sequence of the message tag in the first linked list corresponds to the sending sequence of the message, and the sequence preservation information corresponds to each group of data information; Receiving response information after the execution device executes the data information, the response information corresponding to the data information one by one; Extracting a message tag corresponding to the response information from the first linked list based on the response information; Determine a target message mark based on the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list, and send the target order preservation information corresponding to the target message mark in the second linked list to the target device; The first linked list and the second linked list are bidirectional linked lists, and the bidirectional linked list structure includes a storage area for prefetch information. The message mark corresponding to the message is stored in the first linked list, including: writing the prefetch information of the first node into the extended part of the head pointer, writing the message mark of the first node into the data storage area pointed to by the first address, and writing the first address into the head pointer, and the prefetch information of the first node corresponds to the message mark of the first node; writing the prefetch information of the second node into the storage area for the prefetch information pointed to by the first address, writing the message mark of the second node into the data storage area pointed to by the second address, and writing the second address into the subsequent logical address pointed to by the first address, writing the first address into the previous logical address pointed to by the second address, and writing the second address into the tail pointer, and the prefetch information of the second node corresponds to the message mark of the second node.

2. The method according to claim 1, characterized in that The determining the target message mark based on the position of the message mark corresponding to the order preservation information of each group of data information in the first linked list includes: When the message mark corresponding to the sequence preservation information of each group of data information reaches the head of the first linked list, the message mark corresponding to the sequence preservation information is determined as the target message mark.

3. The method according to claim 2, characterized in that The step of marking the target message in the second linked list and sending the target order preservation information corresponding to the target message to the target device includes: Extracting the target sequence preservation information corresponding to the target message mark in the second linked list from the second linked list; The target sequence preservation information is sent to the target device.

4. The method according to claim 1, characterized in that The extracting the message tag corresponding to the response information from the first linked list based on the response information includes: Determining a message tag corresponding to the response information; The first address corresponding to the message tag is deleted from the first linked list, and the second address and the prefetch information pointed to by the first address are indexed based on the subsequent logical address pointed to by the first address, so as to write the prefetch information corresponding to the second address and the second node into the head pointer, and the second node becomes the head node of the team.

5. The method according to claim 1, characterized in that When sending a message to the execution device, storing a message tag corresponding to the message in the first linked list and storing order preservation information in the second linked list includes: When sending messages to the execution device, obtaining the sending order of the messages; Allocate hanging chain addresses in the first chain list and the second chain list based on the sending order, wherein the hanging chain addresses in the first chain list correspond to the message tags one-to-one, and the hanging chain addresses in the second chain list correspond to the order preservation information one-to-one; A message tag corresponding to the message is stored in the first linked list based on the linked link address, and sequence preservation information is stored in the second linked list.

6. The method according to claim 5, characterized in that The extracting the message tag corresponding to the response information from the first linked list based on the response information further includes: Based on the order of the response information, the message tag corresponding to the response information is extracted from the first linked list, and the linked chain address corresponding to the message tag is retrieved.

7. A data sequence preservation device, characterized in that: The device comprises: a tag storage module, used for storing a message tag corresponding to the message in a first linked list and storing order preservation information in a second linked list when sending a message to an execution device, wherein the message includes data information and order preservation information, the address sequence of the message tag in the first linked list corresponds to the order in which the message is sent, and the order preservation information corresponds to each group of data information; A response receiving module, used for receiving response information after the execution device executes the data information, wherein the response information corresponds to the data information one by one; A tag extraction module, used for extracting a message tag corresponding to the response information from the first linked list based on the response information; An order-preserving sending module, used to determine a target message mark based on the position of the message mark corresponding to the order-preserving information of each group of data information in the first linked list, and send the target order-preserving information corresponding to the target message mark in the second linked list to the target device; The first linked list and the second linked list are bidirectional linked lists, and the bidirectional linked list structure includes a storage area for prefetch information. The tag storage module includes: a first hanging chain unit, used to write the prefetch information of the first node into the extended part of the head pointer, write the message tag of the first node into the data storage area pointed to by the first address, and write the first address into the head pointer, and the prefetch information of the first node corresponds to the message tag of the first node; a second hanging chain unit, used to write the prefetch information of the second node into the storage area for the prefetch information pointed to by the first address, write the message tag of the second node into the data storage area pointed to by the second address, and write the second address into the subsequent logical address pointed to by the first address, write the first address into the previous logical address pointed to by the second address, and write the second node address into the tail pointer, and the prefetch information of the second node corresponds to the message tag of the second node.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data order preservation method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data order preservation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method, network card and server

    CN114090495A

  • Message processing method and device

    CN115580584A