A time guarantee method, device and system
By updating the timeliness information of data frames in an industrial Ethernet environment, the high cost problem of deploying high-precision clock servers is solved, and the efficiency and accuracy of data frame timeliness judgment is achieved.
Patent Information
- Application Number
- CN202210592686.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-05-28
AI Technical Summary
In industrial Ethernet environments, the prior art requires the deployment of high-precision clock servers to ensure time synchronization, resulting in high deployment costs.
By updating the time information of the data frame in the network device and the receiving end, the receiving end can determine the validity of the data frame based on the updated time information, without maintaining the time synchronization between the sending end, the receiving end and the network device.
This method reduces the cost of deploying time synchronization servers, improves the timeliness judgment efficiency of data frames, and avoids data frame failure and network resource waste.
Smart Images

Figure CN117200921B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a timeliness guarantee method, device and system. Background Art
[0002] In the industrial Ethernet environment, in order to ensure the stable operation of industrial production, there are certain requirements for the timeliness of the query and control instructions.
[0003] The existing technical solution requires the deployment of a high-precision clock server in the industrial Ethernet. The requester and the responder use a clock synchronization algorithm to ensure that the system time of both parties is consistent with the time of the high-precision clock server. The requester adds timestamp information in the query and control instructions, and the responder can determine whether the instruction needs to be executed based on the timestamp and system time in the instruction. The requester can be a controller and the responder can be an actuator. In this method, a high-precision time synchronization server needs to be deployed in the network, which has deployment costs. Summary of the invention
[0004] The embodiment of the present application discloses a timeliness guarantee method, device and system. Through the present application, the network device and / or the receiving end can update the timeliness information of the data frame, so that the receiving end can determine whether the data frame is valid based on the updated timeliness information. The method does not need to maintain the time synchronization of the sending end, the receiving end and the network device, and can reduce the deployment cost of deploying the time synchronization server.
[0005] In a first aspect, an embodiment of the present application discloses a timeliness guarantee method, which is applied to a network device, and the method includes:
[0006] receiving a data frame, the data frame including timeliness information, the timeliness information being used to indicate a remaining timeliness of the data frame;
[0007] Based on the start time of receiving the data frame by the link layer of the network device and the end time of receiving the data frame by the link layer, the transmission delay is obtained;
[0008] The overall forwarding delay is obtained based on the time required for the protocol stack or application layer of the network device to process the data frame;
[0009] Update the timeliness information based on the transmission delay and the overall forwarding delay;
[0010] Send the updated data frame.
[0011] Through the present application, the sending end can send a data frame carrying timeliness information, and the network device and the receiving end can update the timeliness information of the data frame, so that the receiving end can determine whether the data frame is valid based on the updated timeliness information. This method does not need to maintain time synchronization between the sending end, the receiving end and the network device, and can determine whether the data frame is within the timeliness range. This method can reduce the deployment cost of deploying a time synchronization server.
[0012] In combination with the first aspect, in a possible implementation manner, the transmission delay is a time difference between a start time and an end time; the start time is a time when a start bit of a data frame is received, and the end time is a time when a stop bit of the data frame is received;
[0013] The remaining time in the updated data frame is the remaining time in the data frame minus the difference between the transmission delay and the overall forwarding delay.
[0014] In combination with the first aspect, in a possible implementation manner, the overall forwarding delay includes a receiving processing delay and a sending processing delay; and updating the timeliness information based on the transmission delay and the overall forwarding delay includes:
[0015] The remaining time limit of the data frame is updated to the first time limit to obtain the first data frame; the first time limit is the difference between the remaining time limit of the data frame minus the transmission delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or the application layer to receive and process the data frame after the link layer receives the data frame; the remaining time limit of the first data frame is the first time limit;
[0016] The remaining time limit of the first data frame is updated to the second time limit to obtain an updated data frame; the second time limit is the difference between the first time limit and the sending processing delay, and the sending processing delay is the time required for the protocol stack or application layer to send and process the first data frame before the link layer sends the updated data frame; the remaining time limit of the updated data frame is the second time limit.
[0017] In combination with the first aspect, in a possible implementation manner, before sending the updated data frame, the method further includes:
[0018] Based on the first timeliness, determine a processing method for the first data frame; the processing methods include priority forwarding, normal forwarding or discarding.
[0019] In the embodiment of the present application, the network device can also make a forwarding decision based on the first timeliness, thereby determining whether to forward the data frame with priority, forward it normally, or discard it. In this method, the failure of data frames can be avoided, and the forwarding efficiency can be improved; the transmission of failed data frames can also be avoided, resulting in a waste of network resources.
[0020] In combination with the first aspect, in a possible implementation manner, determining a processing method for the first data frame based on the first timeliness includes:
[0021] Based on at least one of a reliability level corresponding to the data frame and a real-time level corresponding to the data frame and a first timeliness, a processing method for the first data frame is determined.
[0022] In the embodiment of the present application, the network device can determine whether to give priority to forwarding the data frame in combination with the reliability level corresponding to the data frame and the real-time level corresponding to the data frame. Through this method, important messages can be forwarded preferentially.
[0023] In combination with the first aspect, in a possible implementation, the data frame carries any one of a request message, a response message and an active notification message, the request message includes a query instruction or a control instruction, and the response message is a reply message generated in response to the query instruction or the control instruction.
[0024] In combination with the first aspect, in a possible implementation manner, the data frame carries a response message generated by the responder in response to the query instruction of the first requester, and the method further includes:
[0025] Store the response message.
[0026] In a possible implementation manner, the network device stores the message content after the data frame is parsed.
[0027] In the embodiment of the present application, the network device can also store the received response message, so as to send the response message to other requesting parties when other requesting parties request the response message. This method can achieve the nearest response and improve the response efficiency.
[0028] In combination with the first aspect, in a possible implementation manner, after the remaining time limit of the data frame is updated to the first time limit and the first data frame is obtained, the response message is stored, including:
[0029] When the first timeliness and the real-time level corresponding to the response message satisfy the cache decision, the response message is stored.
[0030] In the embodiment of the present application, the network device may store only data frames that have not expired, thereby avoiding waste of storage space.
[0031] In combination with the first aspect, in a possible implementation manner, the method further includes:
[0032] receiving a query instruction from a second requesting party, wherein the query instruction from the second requesting party is used to request a response message;
[0033] A response message is sent to the second requester.
[0034] In combination with the first aspect, in a possible implementation manner, sending a response message to the second requesting party includes:
[0035] Obtain the first time validity period corresponding to the response message and the time when the response message is stored;
[0036] When the time difference between the current time and the time when the response message is stored is not greater than the first time validity period, sending the response message to the second requesting party;
[0037] When the time difference between the current time and the time when the response message is stored is greater than the first time validity period, a request message is sent to the responder.
[0038] In the embodiment of the present application, the network device can send the data frame to other requesting parties when it is determined that the data frame is not invalid. This method can avoid sending invalid data frames to other requesting parties.
[0039] In a second aspect, an embodiment of the present application discloses a timeliness guarantee method, which is applied to a sending end, and the method includes:
[0040] The transmitting end sends a data frame to the receiving end; the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame;
[0041] The receiving end is used to update the remaining validity period of the data frame based on the link delay and the receiving processing delay; the link delay is obtained based on the start time and the end time of the link layer receiving the data frame at the receiving end; the receiving processing delay is the time required for the protocol stack or application layer to receive and process the data frame after the link layer receives the data frame.
[0042] In a third aspect, an embodiment of the present application discloses a timeliness guarantee method, which is applied to a receiving end, and the method includes:
[0043] The receiving end receives the data frame from the sending end; the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame;
[0044] The receiving end obtains the link delay based on the start time of receiving the data frame by the link layer of the receiving end and the end time of receiving the data frame by the link layer of the receiving end;
[0045] The remaining time is updated based on the link delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or application layer to receive and process the data frame after the link layer receives the data frame.
[0046] Through the present application, the sending end can send a data frame carrying timeliness information, and the data end can update the timeliness information of the data frame, so that the receiving end can determine whether the data frame is valid based on the updated timeliness information. This method does not need to maintain time synchronization between the sending end and the receiving end, and can reduce the deployment cost of deploying a time synchronization server.
[0047] In combination with the third aspect, in a possible implementation manner, the data frame carries a request message, and the request message includes a query instruction or a control instruction; and the method further includes:
[0048] When the receiving end determines that the request message is valid based on the remaining time and the preset threshold, it executes the query instruction or the control instruction.
[0049] In conjunction with the third aspect, in a possible implementation manner, the receiving end receives a data frame from the sending end, including:
[0050] The receiving end receives the data frame from the requesting party via at least one network device;
[0051] At least one network device is used to update the remaining validity period of the data frame based on the transmission delay and the overall forwarding delay; the transmission delay is obtained based on the start time when the link layer of the network device receives the data frame and the end time when the link layer of the network device receives the data frame; the overall forwarding delay is obtained based on the time required for the protocol stack or application layer of the network device to process the data frame.
[0052] In a fourth aspect, the present application provides a time guarantee device, the device comprising:
[0053] A receiving unit, used to receive a data frame, the data frame includes timeliness information, and the timeliness information is used to indicate the remaining timeliness of the data frame;
[0054] A first processing unit, configured to obtain a transmission delay based on a start time of receiving a data frame at a link layer of a network device and an end time of receiving the data frame at the link layer;
[0055] A second processing unit is used to obtain an overall forwarding delay based on the time required for a protocol stack or an application layer of the network device to process the data frame;
[0056] An updating unit, used for updating timeliness information based on a transmission delay and an overall forwarding delay;
[0057] The sending unit is used to send the updated data frame.
[0058] In conjunction with the fourth aspect, in a possible implementation manner, the transmission delay is a time difference between a start time and an end time; the start time is a time when a start bit of a data frame is received, and the end time is a time when a stop bit of the data frame is received;
[0059] The remaining time in the updated data frame is the remaining time in the data frame minus the difference between the transmission delay and the overall forwarding delay.
[0060] In conjunction with the fourth aspect, in a possible implementation manner, the overall forwarding delay includes a receiving processing delay and a sending processing delay; and the updating unit is used to:
[0061] The remaining time limit of the data frame is updated to the first time limit to obtain the first data frame; the first time limit is the difference between the remaining time limit of the data frame minus the transmission delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or the application layer to receive and process the data frame after the link layer receives the data frame; the remaining time limit of the first data frame is the first time limit;
[0062] The remaining time limit of the first data frame is updated to the second time limit to obtain an updated data frame; the second time limit is the difference between the first time limit and the sending processing delay, and the sending processing delay is the time required for the protocol stack or application layer to send and process the first data frame before the link layer sends the updated data frame; the remaining time limit of the updated data frame is the second time limit.
[0063] In conjunction with the fourth aspect, in a possible implementation manner, before the sending unit sends the updated data frame, the device further includes a processing unit, where the processing unit is configured to:
[0064] Based on the first timeliness, determine a processing method for the first data frame; the processing methods include priority forwarding, normal forwarding or discarding.
[0065] In conjunction with the fourth aspect, in a possible implementation manner, the processing unit is configured to:
[0066] Based on at least one of a reliability level corresponding to the data frame and a real-time level corresponding to the data frame and a first timeliness, a processing method for the first data frame is determined.
[0067] In combination with the fourth aspect, in a possible implementation, the data frame carries any one of a request message, a response message and an active notification message, the request message includes a query instruction or a control instruction, and the response message is a reply message generated in response to the query instruction or the control instruction.
[0068] In conjunction with the fourth aspect, in a possible implementation manner, the data frame carries a response message generated by the responder in response to the query instruction of the first requester, and the device further includes a storage unit, the storage unit being used to:
[0069] Store the response message.
[0070] In conjunction with the fourth aspect, in a possible implementation manner, the storage unit is used to:
[0071] When the first timeliness and the real-time level corresponding to the response message satisfy the cache decision, the response message is stored.
[0072] In conjunction with the fourth aspect, in a possible implementation manner, the receiving unit is configured to receive a query instruction from the second requesting party, where the query instruction from the second requesting party is used to request a response message;
[0073] A sending unit is used to send a response message to the second requesting party.
[0074] In conjunction with the fourth aspect, in a possible implementation manner, the sending unit is configured to:
[0075] Obtain the first time validity period corresponding to the response message and the time when the response message is stored;
[0076] When the time difference between the current time and the time when the response message is stored is not greater than the first time validity period, sending the response message to the second requesting party;
[0077] When the time difference between the current time and the time when the response message is stored is greater than the first time validity period, a request message is sent to the responder.
[0078] In a fifth aspect, an embodiment of the present application provides a time-limit guarantee device, the device comprising:
[0079] A receiving unit, used for receiving a data frame from a transmitting end; the data frame includes timeliness information, and the timeliness information of the data frame is used for indicating the remaining timeliness of the data frame;
[0080] A processing unit, configured to obtain a link delay based on a start time of receiving a data frame by a link layer of a receiving end and an end time of receiving a data frame by a link layer of a receiving end;
[0081] The updating unit is used to update the remaining time based on the link delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or application layer to receive and process the data frame after the link layer receives the data frame.
[0082] In conjunction with the fifth aspect, in a possible implementation manner, the data frame carries a request message, the request message includes a query instruction or a control instruction; the device further includes an execution unit, the execution unit being configured to:
[0083] When it is determined that the request message is valid based on the remaining time and the preset threshold, the query instruction or the control instruction is executed.
[0084] In conjunction with the fifth aspect, in a possible implementation manner, the receiving unit is used to:
[0085] receiving a data frame from a requester via at least one network device;
[0086] At least one network device is used to update the remaining validity period of the data frame based on the transmission delay and the overall forwarding delay; the transmission delay is obtained based on the start time when the link layer of the network device receives the data frame and the end time when the link layer of the network device receives the data frame; the overall forwarding delay is obtained based on the time required for the protocol stack or application layer of the network device to process the data frame.
[0087] In a sixth aspect, an embodiment of the present application discloses a timeliness guarantee device, including a processor and a communication interface, wherein the processor is used to call a computer program stored in a memory to implement the method described in the first aspect or any possible implementation manner of the first aspect.
[0088] In the seventh aspect, an embodiment of the present application discloses a time guarantee device, including a processor and a communication interface, wherein the processor is used to call a computer program stored in a memory to implement the second aspect or any possible implementation method of the second aspect.
[0089] In an eighth aspect, an embodiment of the present application discloses a time guarantee device, including a processor and a communication interface, wherein the processor is used to call a computer program stored in a memory to implement the third aspect or any possible implementation method of the third aspect.
[0090] In the ninth aspect, an embodiment of the present application also provides a chip system, comprising at least one processor and a communication interface, wherein the communication interface is used to send and / or receive data, and the at least one processor is used to call a computer program stored in at least one memory so that the device where the chip system is located implements the method described in the first aspect or any possible implementation of the first aspect; or implements the method described in the second aspect or any possible implementation of the second aspect; or implements the method described in the third aspect or any possible implementation of the third aspect.
[0091] In the tenth aspect, the embodiment of the present application further provides a communication system, including a receiving end, a network device and a transmitting end. The network device is used to implement the method described in the first aspect or any possible implementation of the first aspect; the transmitting end implements the method described in the first aspect or any possible implementation of the first aspect; the receiving end is used to implement the method described in the first aspect or any possible implementation of the first aspect.
[0092] In the eleventh aspect, an embodiment of the present application discloses a computer-readable storage medium, in which a computer program is stored. When the computer program runs on one or more processors, the method described in the first aspect or any possible implementation of the first aspect is executed, or the method described in the second aspect or any possible implementation of the second aspect is executed; or the method described in the third aspect or any possible implementation of the third aspect is implemented.
[0093] In the twelfth aspect, an embodiment of the present application discloses a computer program product. When the computer program product runs on one or more processors, it executes the method described in the first aspect or any possible implementation of the first aspect, or executes the method described in the second aspect or any possible implementation of the second aspect; or implements the method described in the third aspect or any possible implementation of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] The following is an introduction to the drawings used in the embodiments of the present application.
[0095] Figure 1 This is a schematic diagram of a method for ensuring message timeliness in the prior art provided by an embodiment of the present application;
[0096] Figure 2A is a schematic diagram of a possible communication system provided by an embodiment of the present application;
[0097] Figure 2B is a schematic diagram of another possible communication system provided by an embodiment of the present application;
[0098] Figure 2C is a schematic diagram of another possible communication system provided in an embodiment of the present application;
[0099] Figure 3 is a schematic diagram of another possible communication system provided in an embodiment of the present application;
[0100] Figure 4 It is a flow chart of a time guarantee method provided in an embodiment of the present application;
[0101] Figure 5 It is a schematic diagram of a process for updating timeliness information of a network device provided in an embodiment of the present application;
[0102] Fig. 6A It is a flowchart of another time guarantee method provided in an embodiment of the present application;
[0103] Figure 6B It is a flow chart of a method for a network device to update the timeliness of a request message provided by an embodiment of the present application;
[0104] Figure 7 It is a schematic diagram of a specific implementation of a time guarantee method provided in an embodiment of the present application;
[0105] Figure 8 This is a flow chart of another timeliness guarantee method provided in an embodiment of the present application;
[0106] Fig. 9 It is a flowchart of a response message transmission process provided by an embodiment of the present application;
[0107] Fig.10 It is a flowchart of a query method provided in an embodiment of the present application;
[0108] Fig.11 It is a scene diagram of a nearby response provided by an embodiment of the present application;
[0109] Fig.12 is a structural diagram of a time-limit guarantee device 120 provided in an embodiment of the present application;
[0110] Fig.13 is a structural diagram of a time-limit guarantee device 130 provided in an embodiment of the present application;
[0111] Fig.14 It is a structural diagram of a time guarantee device 140 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0112] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. It should be noted that in the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0113] The "at least one" mentioned in the embodiments of the present application refers to one or more, and "plurality" refers to two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, c can be single or multiple. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can be represented by: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0114] Furthermore, unless otherwise specified, the ordinal numbers such as "first" and "second" used in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects. For example, the first information and the second information are only used to distinguish different information, and do not indicate the difference in content, priority, sending order or importance of the two types of information.
[0115] Before introducing the embodiments of the present application, the technical terms appearing in the embodiments of the present application are first introduced.
[0116] 1. Industrial Protocol (IP) / Industrial Ethernet, Ethernet technology used in the field of industrial control.
[0117] 2. Programmable Logic Controller (PLC) is an electronic device for digital computing operations designed specifically for use in industrial environments.
[0118] 3. Actuator: It can receive instructions from the controller and execute corresponding production actions.
[0119] The following combination Figure 1 , introduces the method of industrial Ethernet in the existing technology for ensuring the timeliness of messages.
[0120] See also Figure 1 , Figure 1 This is a schematic diagram of an existing industrial Ethernet deployment provided by way of example in an embodiment of the present application. Figure 1 As shown, the industrial Ethernet includes a requester, N industrial gateways, a responder and a clock server, wherein N is a positive integer; the clock server may be a high-precision time synchronization server, the requester may be a PLC controller, and the responder may be an Actuator.
[0121] In one implementation, the requester and responder can use a clock synchronization algorithm to ensure that the system time of both parties is consistent with the high-precision clock server time. Figure 1 The requester may send a query instruction or a control instruction to the responder, wherein the query instruction or the control instruction includes timestamp information; the responder may determine whether the instruction meets the timeliness requirement based on the timestamp and system time in the above instruction, thereby determining whether the instruction needs to be executed; the responder may send a response message to the requester after receiving the query instruction.
[0122] The inventor of the present application discovered that in this method, a high-precision time synchronization server needs to be deployed in the network, which incurs deployment costs.
[0123] Therefore, the embodiment of the present application proposes a time guarantee method, device and system, which updates the time information in the instruction through the network device, and the responder can determine whether to execute the instruction based on the remaining time in the instruction when receiving the instruction. The method does not require the deployment of a high-precision time synchronization server.
[0124] The system architecture and business scenarios of the embodiments of the present application are described below. It should be noted that the system architecture and business scenarios described in this application are intended to more clearly illustrate the technical solutions of the present application and do not constitute a limitation on the technical solutions provided by the present application. It is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.
[0125] See also Figure 2A , Figure 2A 1 is a schematic diagram of a possible communication system provided in an embodiment of the present application, wherein the communication system 10 includes a requester 101, a network device 102, and a responder 103. Among them:
[0126] like Figure 2A As shown, the requester 101 is connected to the responder 103 via the network device 102. For example, the requester 101 sends a request message to the network device 102, and the request message may include a query instruction or a control instruction; the network device 102 sends the request message to the responder 103. For another example, the responder 103 may send an active notification message or a response message to the network device 102, and the network device 102 then sends the active notification message or the response message to the requester 101. It can be understood that the requester 101 may be the sending end and the responder 103 may be the receiving end; or the responder 103 may be the sending end and the requester 101 may be the receiving end, which can be determined according to the specific scenario.
[0127] The requester 101 may include at least one requester; the network device 102 may include at least one network device, and the network device may be a gateway, a switch, or a bridge, etc. The requester 101 may be a controller, and the responder 103 may be an actuator. This is only an example and should not limit the requester 101 and the responder 103. In different application scenarios, the sender 301 and the receiver 302 may be different devices, which is not limited here.
[0128] It should be noted that, in the case of multiple requesters and multiple network devices, the requester can establish a communication connection with the responder through some of the multiple network devices; different requesters can establish a communication connection with the responder through the same network device, or through different network devices, which is not limited here.
[0129] See also Figure 2B , Figure 2B It is a schematic diagram of another possible communication system provided in an embodiment of the present application. Figure 2BThe communication system 20 is exemplarily shown to include a requester, n network devices and a responder, wherein the requester includes a requester 1 and a requester 2; the n network devices are network device 1, network device 2, to network device n, respectively, and n is a positive integer greater than 2. Among them, the requester 1 establishes a communication connection with the network device 1, and the requester 1 is connected to the responder via n network devices such as network device 1, network device 2, to network device n; the requester 2 establishes a communication connection with the network device 2, and the requester 2 is connected to the responder via n-1 network devices such as network device 2, to network device n, respectively.
[0130] The communication link between the requester 101, the network device 102 and the responder 103 may include various types of connection media, including wired links (such as optical fibers), wireless links, or a combination of wired links and wireless links, etc. For example, short-distance connection technologies may include 802.11b / g, Bluetooth, Zigbee, radio frequency identification (RFID), ultra wideband (UWB), wireless short-distance communication systems (such as vehicle-mounted wireless short-distance communication systems), etc. For another example, long-distance connection technologies may include communication technologies based on Long Term Evolution (Long Term Evolution), fifth-generation mobile communication technologies (5th generation mobile networks or 5th generation wireless systems, 5th-Generation, referred to as 5G or 5G technology), global system for mobile communications (global System for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), universal mobile telecommunications system (universal mobile telecommunications system, UMTS) and other wireless access type technologies.
[0131] Of course, there are other wireless communication technologies that can be used to support communication among network elements or devices in the communication system provided by this application.
[0132] It should be noted that the above communication system may also include other network elements or devices, which are not limited here.
[0133] See also Figure 2C , Figure 2C It is a schematic diagram of another possible communication system provided in an embodiment of the present application.
[0134] like Figure 2C As shown, the communication system 30 only includes a transmitting end 301 and a receiving end 302, and the transmitting end 301 may include one or more transmitting ends.
[0135] The transmitting end 301 is used to send a data frame to the receiving end 302, and the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame; the receiving end 302 is used to obtain the link delay based on the start time of the link layer receiving the data frame of the receiving end 302 and the end time of the link layer receiving the data frame, and then update the remaining timeliness of the data frame based on the link delay and the receiving processing delay.
[0136] Furthermore, the receiving end 302 can also determine whether the data frame is valid based on the updated remaining time limit. For example, the data frame includes a query instruction or a control instruction. When the receiving end determines that the data frame is valid, the receiving end can execute the query instruction or control instruction; when it is determined that the data frame is invalid, the receiving end can discard the data frame or reply with an error code to the sending end.
[0137] In some embodiments, the data frame carries a request message, and the request message includes a query instruction or a control instruction. The receiving end 302 can determine whether the request message is valid based on the updated remaining time and a preset threshold, and execute the query instruction or the control instruction when it is determined that the request message is valid.
[0138] The sending end 301 may be the requester, and the receiving end 302 may be the responder; or the sending end 301 may be the responder, and the receiving end 302 may be the requester. The requester may be a controller, and the responder may be an actuator. This is only an example and should not limit the sending end 301 and the receiving end 302. In different application scenarios, the sending end 301 and the receiving end 302 may be different devices, which is not limited here.
[0139] The following takes the industrial Ethernet environment as an example to further introduce the above communication system.
[0140] See also Figure 3 , Figure 3 : is a schematic diagram of another possible communication system provided by an embodiment of the present application, the communication system includes N requesters, N network devices and responders, where N is a positive integer. It should be noted that in other embodiments, the number of requesters and the number of network devices may be the same or different, depending on the actual situation. Here, N is only an example and should not limit the number of requesters and the number of network devices. Where:
[0141] like Figure 3 As shown, Figure 3The query and control scenarios between a requester and a responder in an industrial Ethernet are exemplarily shown, wherein a plurality of requesters in the industrial Ethernet are connected to a responder via one or more network devices. Figure 3 Requester-1, requester-2 and requester-N, as well as network device 1 and network device N are shown as examples, wherein requester-1 and requester-2 both establish communication connections with network device 1, and requester-N establishes communication connection with network device N. The network device can be used to cache received information, such as caching response messages; and perform time management on received information, i.e., update time information in the message; and can also perform message forwarding scheduling, such as preferentially forwarding a message based on timeliness.
[0142] Taking requester-1 as an example, requester-1 can send query instructions and / or control instructions to network device 1, and then the instruction reaches the responder after passing through other network devices, wherein N network devices can update the timeliness information in the received instructions; after receiving the instruction, the responder can determine whether to execute the instruction based on the timeliness information dynamically updated by N network devices; the responder can also send the response message corresponding to the instruction to network device 1 through other network devices, and then network device 1 will send the response message to requester-1, wherein N network devices can update the timeliness information in the received response message; N network devices can cache the received response message.
[0143] After the network device has cached the received response message, when other requesters request the response message from the responder via the network device, the network device near the other requesters can send the cached response message to the requester. For example, requester-2 can send a query instruction and / or a control instruction to network device 2. When network device 2 finds that there is a response message corresponding to the instruction in the storage and determines that the response message has not exceeded the validity period, it can send the response message to requester-2.
[0144] For details about the communication relationship between N requesters, N network devices and responders, as well as the implementation of time update, please refer to the relevant description below, which will not be expanded here.
[0145] like Figure 3 As shown, Figure 3 The functional units in the network device are shown as examples, such as the information cache unit, the time management unit and the forwarding unit. Among them, the information cache unit is used to cache the information results obtained by the requester from the responder; the time management unit is used to update the time information of the request and response messages in real time; the forwarding unit can decide whether to forward the request and response messages preferentially, forward them normally or discard them according to the real-time and reliability requirements of the information or instructions.
[0146] For a detailed description of the functional units in the network device, please refer to the relevant description below, which will not be expanded here.
[0147] It should be noted that the network equipment may also include Figure 3 There may be more or less functional units in the system, which is not limited here.
[0148] See also Figure 4 , Figure 4 is a flow chart of a time guarantee method provided in an embodiment of the present application. Further, the method can be based on Figure 1 , Figure 2A or Figure 2B The method may include some or all of the following steps:
[0149] Step S401: the transmitting end sends a data frame to the receiving end, the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame.
[0150] Among them, the data frame can carry any one of a request message, a response message and an active notification message; the request message may include a query instruction or a control instruction, the response message may be a reply message generated in response to the query instruction or the control instruction, and the active notification message is a message automatically sent from the sending end to the receiving end, such as a notification message sent periodically according to preset rules.
[0151] Step S402: The receiving end obtains the link delay based on the start time and the end time of the link layer receiving the data frame at the receiving end.
[0152] In some embodiments, the receiving end may determine the time difference between the start time and the end time as the link delay, wherein the start time may be the time when the start bit of the data frame is received, and the end time may be the time when the end bit of the data frame is received. The start bit and the end bit comply with the start bit coding (preamble or frame start delimiter) and the end coding (frame check sequence FCS) defined by the link layer frame format of the data frame.
[0153] Step S403: The receiving end updates the remaining time based on the link delay and the receiving processing delay. The receiving processing delay is the time required for the protocol stack or application layer to receive and process the data frame after the link layer receives the data frame.
[0154] In one implementation, the receiving end may subtract the link delay and the receiving processing delay from the remaining time limit in the data frame to obtain an updated remaining time limit. Furthermore, the receiving end may also determine whether the data frame is within the time limit based on the updated remaining time limit. For example, the data frame includes a query instruction or a control instruction. When the receiving end determines that the data frame is valid, the query instruction or the control instruction may be executed; when the receiving end determines that the data frame is invalid, the receiving end may discard the data frame or reply an error code to the sending end.
[0155] In some embodiments, the data frame carries a request message, and the request message includes a query instruction or a control instruction. The receiving end can determine whether the request message is valid based on the updated remaining time and a preset threshold; then, when it is determined that the request message is valid, the query instruction or the control instruction is executed.
[0156] In some other embodiments, the sending end sends a data frame to the receiving end via at least one network device, and the network device can dynamically update the remaining validity period of the received data frame. Figure 5 , Figure 5 This is a flow chart of a network device updating timeliness information provided by an embodiment of the present application. The method includes some or all of the following steps:
[0157] Step S501: A network device receives a data frame, where the data frame includes timeliness information, where the timeliness information is used to indicate the remaining timeliness of the data frame.
[0158] Among them, the data frame can carry any one of a request message, a response message and an active notification message; the request message can include a query instruction or a control instruction, and the response message can be a reply message generated in response to the query instruction or the control instruction.
[0159] Step S502: The network device obtains a transmission delay based on the start time and the end time of the link layer receiving the data frame of the network device.
[0160] In some embodiments, the transmission delay can be the time difference between the start time and the end time, wherein the start time is the time when the start bit of the data frame is received, and the end time is the time when the end bit of the data frame is received; the remaining time in the updated data frame is the remaining time in the data frame minus the difference between the transmission delay and the overall forwarding delay.
[0161] Step S503: The network device obtains the overall forwarding delay based on the time required for the protocol stack or application layer of the network device to process the data frame.
[0162] In some embodiments, the overall forwarding delay includes a receiving processing delay and a sending processing delay; the receiving processing delay is the time required for the protocol stack or application layer to receive and process the data frame after the link layer receives the data frame; the sending processing delay is the time required for the protocol stack or application layer to send and process the first data frame before the link layer sends the updated data frame.
[0163] Among them, the receiving and processing delay can specifically be the time difference between the moment when the link layer receives the data frame and the moment when the protocol stack or application layer completes parsing the data frame; the protocol stack or application layer receiving and processing the data frame can specifically include parsing the data frame and other processing; the protocol stack or application layer sending and processing the first data frame can specifically include packetizing the data frame and other processing.
[0164] Step S504: The network device updates the timeliness information based on the transmission delay and the overall forwarding delay.
[0165] In one implementation, the network device can update the remaining time of the data frame to a first time to obtain a first data frame, where the first time is the remaining time of the data frame minus the difference between the transmission delay and the receiving processing delay, and the remaining time of the first data frame is the first time; then update the remaining time of the first data frame to a second time to obtain an updated data frame, where the second time is the difference between the first time and the sending processing delay, and the remaining time of the updated data frame is the second time.
[0166] In some embodiments, the network device may determine a processing method for the first data frame based on the first timeliness; the processing method includes priority forwarding, normal forwarding, or discarding. For example, when determining to prioritize forwarding the first data frame, the first data frame is preferentially sent from the protocol stack or application layer to the link layer, so that the network device can send the first data frame to the next network device or responder as soon as possible.
[0167] Optionally, the processing method for the first data frame may be determined based on at least one of a reliability level corresponding to the data frame and a real-time level corresponding to the data frame and the first timeliness.
[0168] In other embodiments, the network device may also store the first data frame. For example, if the data frame is a data frame that carries a response message generated by the responder in response to the query instruction of the first requester, the network device may store the response message. For example, after the network device updates the remaining time limit of the data frame to the first time limit and obtains the first data frame, the network device may store the first data frame when the real-time level corresponding to the first time limit and the response message meets the cache decision. Then, if the network device receives a query instruction from other requesters, and the network device stores a response message requested by the query instruction, the network device may send a response message to the second requester. Among them, the network device may store the first data frame or the response message carried by the first data frame, and specifically may store the message content of the first data frame, such as the query content corresponding to the query instruction in the request message.
[0169] Optionally, the network device may send the response message to the second requester after determining that the stored response message is valid; and forward the request message to the responder when determining that the response message has expired. For example, the network device may obtain the first time limit corresponding to the response message and the time when the response message is stored; when the time difference between the current time and the time when the response message is stored is not greater than the first time limit, send the response message to the second requester; when the time difference between the current time and the time when the response message is stored is greater than the first time limit, send the request message to the responder.
[0170] Step S505: The network device sends the updated data frame.
[0171] In some embodiments, after updating the timeliness information of the data frame, the network device forwards the updated data frame to the next network device or responder.
[0172] above Figure 4 and Figure 5 The method embodiment shown includes many possible implementation schemes. FIG. 6A to FIG. 11 Some of the implementation schemes are illustrated with examples. It should be noted that: FIG. 6A to FIG. 11 For related concepts, operations or logical relationships that are not explained, please refer to Figure 4 and Figure 5 The corresponding description in the illustrated embodiment.
[0173] See also Fig. 6A , Fig. 6A is a flow chart of another time guarantee method provided in an embodiment of the present application. The method can be based on Figure 2A The timeliness guarantee method may include the following steps:
[0174] Step S601: The requesting party sends a request message to at least one network device, where the request message is used to request the responding party to respond to the control instruction or query instruction in the request message, and the request message includes time limit information, where the time limit information is used to indicate the remaining time limit of the request message.
[0175] The request message may include a query instruction or a control instruction. For example, the request message includes a query instruction or a control instruction, and timeliness information of the instruction. The timeliness information may be indication information or a value for indicating the remaining timeliness, for example, the timeliness information may be 1 second or indication information for indicating 1 second.
[0176] Among them, at least one network device can be one or more network devices. For example, when at least one network device is one network device, the requesting party sends a request message to at least one network device, that is, the requesting party sends a request message to the network device, and the network device sends the request message to the responding party; when at least one network device is multiple network devices, the requesting party sends a request message to at least one network device, that is, the requesting party sends a request message to one of the multiple network devices, and the network devices in the multiple network devices will forward the request message in sequence based on the communication link through which the requesting party sends data to the responding party until it is forwarded to the responding party.
[0177] Step S602: Each of the at least one network device updates the timeliness information in the received request message.
[0178] Assuming that the at least one network device includes a network device N, the following exemplarily takes the network device N as an example to introduce a specific implementation of updating the timeliness of the request message by the network device.
[0179] See also Figure 6B , Figure 6B This is a flow chart of a method for a network device to update the timeliness of a request message provided by an embodiment of the present application. The method includes some or all of the following steps:
[0180] Step S6021: The network device N calculates the transmission delay and the overall forwarding delay based on the received request message, where the overall forwarding delay includes the receiving processing delay and the sending processing delay.
[0181] The network device N may be a first network device that directly communicates with the requester, or a second network device that indirectly communicates with the requester. Figure 3As shown, assuming that the requester is requester-N, network device N is a network device that directly communicates with the requester (i.e., the first network device mentioned above), that is, the requester directly sends the request message to the first network device; assuming that the requester is requester-1, network device N is a network device that indirectly communicates with the requester (i.e., the second network device mentioned above).
[0182] In some embodiments, considering the industrial Ethernet scenario, the requester and the responder are deployed at similar locations, and the transmission delay of the instruction data frame between network devices can be equivalent to the time difference ΔTt=Te–Ts between the start bit moment Ts and the end bit moment Te of the network element receiving port receiving the data frame; the forwarding delay of the data frame in the network device can be divided into two parts, the receiving processing delay ΔTp=T–Te and the sending processing delay ΔTp'=Ts'–T, where Ts' is the moment when the sending port sends the start bit of the instruction data frame, and the overall forwarding delay can be expressed as ΔTf=ΔTp+ΔTp'. Among them, the processing time T is the moment when the data frame is processed in the protocol stack or application layer, and the specific processing can be operations such as parsing the data frame.
[0183] It should be noted that the above transmission delay can also be called link delay. For the convenience of expression, it is referred to as transmission delay below.
[0184] Step S6022: The network device N calculates the first time effectiveness Pn based on the transmission delay and the receiving processing delay.
[0185] In some embodiments, the network device N may subtract the transmission delay and the receiving processing delay from the remaining time limit in the received request message to obtain a first time limit.
[0186] Step S6023: The network device N updates the remaining time in the request message to the first time Pn, and obtains a cached message.
[0187] In some embodiments, the network device N may update the remaining time in the request message to the first time Pn to obtain a cached message.
[0188] Step S6024: The network device N accelerates forwarding, normally forwards, or discards the cached message based on the first timeliness Pn, real-time requirements, and reliability requirements.
[0189] Specifically, the network device N accelerating forwarding or normally forwarding the cache message may refer to the network device N accelerating forwarding or normally forwarding the cache message in the process of sending the cache message from the protocol stack or application layer to the link layer.
[0190] For example, normal forwarding is to send the messages in the sending queue from the protocol stack or application layer to the link layer in the order from front to back; assuming that there are several messages in the sending queue that are ahead of the cached message, normal forwarding is that the network device sends several messages from the protocol stack or application layer to the link layer in sequence, and then sends the cached message from the protocol stack or application layer to the link layer; and priority forwarding is to first send the cached message from the protocol stack or application layer to the link layer, and then send several messages from the protocol stack or application layer to the link layer in sequence.
[0191] In one implementation, the network device N can calculate the priority level Q=f(Pn|R|R') of the message based on Pn combined with the real-time requirement R and the reliability requirement R' of the instruction, and when Q>Qhigh, high priority forwarding is performed, when Qhigh≥Q≥Qdrop, ordinary forwarding is performed, or when Q<Qdrop, the message is discarded. Among them, Qhigh and Qdrop can be preset thresholds, and Q=f(Pn|R|R') is a preset function.
[0192] Step S6025: the network device N updates the remaining time in the cached message to a second time P'n, and obtains an updated request message. The second time is a time period obtained by subtracting a sending processing delay from the first time.
[0193] In one implementation, the network device receives the cache message at the link layer, and updates the remaining time in the cache message to the second time P'n in the link layer summary, wherein the second time is a time period obtained by subtracting the sending processing delay from the first time.
[0194] Step S6026: Network device N forwards the updated request message to the next network device or responder.
[0195] The next network device refers to the next network device of network device N on the communication link from the requester to the responder. For example, when the requester sends a message to the responder, it needs to be sent from the requester to network device N, which is forwarded to network device N+1, and then sent from network device N+1 to the responder. In this case, the next network device of the network device refers to network device N+1.
[0196] Step S603: at least one network device sends the updated request message to the responder.
[0197] In some embodiments, each of the at least one network device updates the remaining time limit in the received request message, and sends the request message after the time limit has been updated by all network devices to the responder.
[0198] Assume that the request message of the requester is sent to the responder after passing through two network devices, and the initial remaining validity period in the request message is T1; after the first network device receives the request message sent by the requester, it updates the remaining validity period of the request message to T2, where T2 is T1 minus the transmission delay and overall forwarding delay calculated by the first network device; after the second network device receives the request message sent by the first network device, it updates the remaining validity period of the request message to T3, where T3 is T2 minus the transmission delay and overall forwarding delay calculated by the second network device; finally, the second network device sends the updated request message to the responder, and the remaining validity period of the request message received by the responder is T3. The responder can determine whether the request message meets the validity period based on T3. Among them, T1, T2, and T3 are all positive numbers. It can be understood that T1>T2>T3.
[0199] Step S604: the responder sends a response message to at least one network device in response to the received request message, where the response message includes time validity information, where the time validity information is used to indicate the remaining time validity of the response message.
[0200] Among them, the request message includes a query instruction or a control instruction, and the timeliness information of the instruction; after receiving the request, the responder can first determine whether the instruction is valid based on the timeliness information, execute the instruction when the instruction is valid, and generate a response message corresponding to the instruction.
[0201] For example, when the query instruction is valid, the responder can perform a query in response to the query instruction to obtain the query information, and then generate a response message, which includes the query information. For another example, when the control instruction is valid, the responder can perform a control operation in response to the instruction, and can also generate a response message, which includes messages such as control results or control parameters.
[0202] Among them, the responder can determine whether the request message is valid based on the timeliness information, and the determination method is not limited here. For example, the responder can determine that the message has expired when the remaining time of the message is less than 0; or determine that the message has expired when the remaining time of the message is less than a preset threshold. It can be understood that in the embodiment of the present application, the responder does not need to establish time synchronization with the requester, and the responder can determine whether the message is valid only based on the remaining time and the preset threshold.
[0203] In some embodiments, when receiving a request message, the responder calculates the link delay and receiving processing delay of the request message; further, based on the link delay and receiving processing delay, the remaining message of the request message is updated, and whether the request message is valid is determined based on the updated remaining validity. Among them, the link delay can be obtained based on the start time and end time of the responder receiving the data frame carrying the request message, and the receiving processing delay is the time required for the protocol stack or application layer to receive and process the data frame after the link layer of the responder receives the data frame. For the specific method for the responder to calculate the link delay and receiving processing delay, please refer to the relevant content of the network device calculating the transmission delay and receiving processing delay, which will not be repeated here.
[0204] Step S605: Each of the at least one network device updates the timeliness information of the received response message.
[0205] In some embodiments, the process of updating the timeliness information of the received response message by each network device in at least one network device can be consistent with the process of updating the timeliness information of the request message. For details, please refer to the relevant content of the above-mentioned network device updating the timeliness information of the request message, which will not be repeated here.
[0206] Step S606: at least one network device sends an updated response message to the first requester.
[0207] In some embodiments, each of the at least one network device updates the remaining time limit in the received response message, and sends the response message after the time limit has been updated by all network devices to the responder.
[0208] The following combination Figure 7 , a possible specific implementation of the above steps S601 to S606 is exemplarily described in detail.
[0209] like Figure 7 As shown, Figure 7 exemplarily shows a requester, a responder, and a network device N and a network device N+1 among a plurality of network devices. The requester may send a request message to the responder via a plurality of network devices, and the responder may send a response message to the requester via a plurality of network devices.
[0210] It can be understood that when the requester sends a request message to the responder via multiple network devices, the requester is the sender and the responder is the receiver; when the responder sends a response message to the requester via multiple network devices, the responder is the sender and the requester is the receiver.
[0211] When the requester sends a query or control command, the request message carries the timeliness information P of the command; the response message of the query command also carries the query information ID and information value V as well as the information timeliness information P. Figure 7 As shown, Figure 7 The information included in the request message and the response message, such as the information ID, the information value V and the timeliness information, is exemplarily shown.
[0212] Considering the industrial Ethernet scenario, the requester and the responder are deployed at similar locations. The transmission delay of the instruction data frame between network devices can be equivalent to the time difference ΔTt=Te–Ts when the network element receiving port receives the start bit time Ts and the end bit time Te of the data frame; the forwarding delay of the data frame in the network device can be divided into two parts: the receiving processing delay ΔTp=T–Te and the sending processing delay ΔTp'=Ts'–T, where T is the moment when the protocol stack or application completes the receiving processing, and Ts' is the moment when the sending port sends the start bit of the instruction data frame. The overall forwarding delay can be expressed as ΔTf=ΔTp+ΔTp'.
[0213] Take network device N as an example. Figure 7 As shown, the time difference ΔTtn=Ten-Tsn between the start bit moment Tsn and the end bit moment Ten of the data frame received by the receiving port of the network device N; the forwarding delay of the data frame in the network device can be divided into two parts, the receiving processing delay ΔTpn=Tn-Ten and the sending processing delay ΔTp'n=Ts'n-Tn, wherein Tn is the moment when the protocol stack or application receives and processes, and Ts'n is the moment when the start bit of the data frame of the sending port sends the instruction. The overall forwarding delay can be expressed as ΔTfn=ΔTp n+ΔTp'n.
[0214] Furthermore, the network device N can calculate Pn and P'n based on the transmission delay and the overall forwarding delay. The specific formula for calculating Pn and P'n by the network device N can be as follows: Figure 7 As shown, the time limit for network device N to receive the request message is P' n-1 , Pn=P' n-1 –ΔTtn–ΔTpn, where ΔTtn is the transmission delay calculated by the network device N, and ΔTpn is the receiving processing delay calculated by the network device N; P'n=Pn–ΔTp'n, where ΔTp'n is the sending processing delay calculated by the network device N.
[0215] Among them, each network device on the link updates the remaining timeliness information Pn in the request message and response message, and calculates the message priority Q=f(Pn|R|R') based on Pn combined with the real-time requirement R and reliability requirement R' of the instruction. When Q>Qhigh, high priority forwarding is performed, Qhigh≥Q≥Qdrop is performed, and Q<Qdrop is discarded. Among them, Qhigh and Qdrop can be preset values.
[0216] Before forwarding the message, each network device on the link can update the remaining time information in the message. Taking network device N as an example, before forwarding the request message, network device N can further update the time based on ΔTp'n, such as Figure 7 As shown, the time limit in the message forwarded by the network device N is P'n.
[0217] It can be understood that each network device does not need to rely on an external clock server, but only needs to calculate the transmission delay based on the data frame structure of the instruction; the network device can update the remaining time of the message in real time according to the transmission path of the request message and the response message; the network device can combine the remaining time of the request message and the response message with the real-time requirements and reliability requirements of the message to improve the response speed of the instruction.
[0218] In other embodiments, the network device may process the response message differently from the request message.
[0219] The following is an exemplary introduction to another timeliness guarantee method provided in an embodiment of the present application.
[0220] In this method, the network device on the communication link between the requester (first requester) and the responder can store the updated response message, so that when other requesters (i.e., the second requester) request the same response message, the network device on the communication link can send the stored response message to the other requesters. It can be understood that steps S604 to S606 above can be replaced by step S802 in the embodiment of the present application.
[0221] See also Figure 8 , Figure 8 : is a flowchart of another time guarantee method provided in an embodiment of the present application, the method comprising the following steps:
[0222] Step S801: a first requester sends a query instruction to a responder via at least one network device, where the at least one network device includes network device N.
[0223] The query instruction may include time validity information corresponding to the instruction, and the time validity information is used to indicate the remaining time validity of the query instruction.
[0224] In some embodiments, the process of the first requester sending a query instruction to the responder via at least one network device also includes sending the expiration information corresponding to the instruction; each of the at least one network device can update the expiration information corresponding to the received query instruction; further, the responder can receive the expiration information updated by each network device, and determine whether the query instruction is valid based on the remaining expiration time of the query instruction.
[0225] It should be noted that the specific implementation of the first requesting party sending the query instruction to the responding party via at least one network device can also refer to the relevant contents of steps S601 to S603 above, which will not be repeated here.
[0226] Step S802: The responder sends a response message to the first requester via at least one network device in response to the received query instruction. The response message includes time validity information indicating the remaining time validity.
[0227] In some embodiments, after receiving the query instruction, the responder performs a query to obtain the target information; then, generates a response message, the response message includes the target information; and then, sends the response message to the first requester via at least one network device.
[0228] After receiving the response message, each of the at least one network device may update the remaining time limit in the response message; and may also store the response message.
[0229] The following takes the network device N as an example to describe in detail a specific operation of the network device N after receiving the response message.
[0230] Step S8021: After receiving the response message, the network device N updates the remaining time limit indicated by the time limit information to a first time limit, and obtains a cached message. The first time limit is a time period obtained by subtracting a transmission delay and a receiving processing delay from the remaining time limit.
[0231] The specific process of calculating the transmission delay and the receiving processing delay by the network device N can be found in the relevant description above, which will not be repeated here.
[0232] Step S8022: When the first delay meets a preset condition, the network device N stores the cache message.
[0233] In one implementation, the network device N can make a cache decision based on the first delay to determine whether to store the cached message. For example, each network device can calculate the storage level S = f'(Pn|R) based on the remaining timeliness information Pn of the information in the response message combined with the real-time requirements of the information, and store the information when S>Sstore for rapid processing when subsequent network devices receive query instructions for the same information. Among them, Sstore can be a preset threshold, and S = f'(Pn|R) is a preset function.
[0234] Storing the cached message may specifically mean storing the cached message, or storing the message content corresponding to the cached message, for example, storing the content required to be queried by the query instruction corresponding to the response message.
[0235] In some embodiments, each of at least one network device stores the cache message. Then, when a requester that directly communicates with the network device requests a response message corresponding to the query instruction, the network device can send the cache message to the requester. It can be understood that this method can achieve a nearby response and improve the response speed. For the content of the network device querying the cache message, please refer to the following steps S8026 to S8028.
[0236] It should be noted that, in other embodiments, some network devices in at least one network device may store the cache message, which may be determined according to actual conditions and is not limited here.
[0237] Step S8023: The network device N determines whether to preferentially forward or normally forward the cache message based on the first delay.
[0238] The process of the network device N determining whether to preferentially forward or normally forward the cache message based on the first delay can be referred to the relevant content in step S6024, which will not be repeated here.
[0239] Step S8024: Network device N updates the remaining time limit of the cached message to a second time limit, and obtains an updated response message. The second time limit is a time period obtained by subtracting a sending processing delay from the first time limit.
[0240] Among them, the process of the network device N updating the remaining time limit of the cached message to the second time limit can be referred to the relevant content in step S6025, which will not be repeated here.
[0241] Step S8025: The network device N sends the updated response message to the next network device or the first requester.
[0242] The next network device refers to the next network device of network device N on the communication link from the responder to the requester. For example, when the requester sends a message to the responder, the message needs to be sent from the requester to network device N, which is forwarded to network device N-1, and then sent from network device N-1 to the responder. In this case, the next network device of the network device refers to network device N-1.
[0243] The following combination Fig. 9 ,introduce Figure 8 A possible specific implementation of the timeliness guarantee method shown.
[0244] Fig. 9 Taking the scenario where the responder sends a response message to the requester-1 in response to the query instruction sent by the requester-1 as an example, the transmission process of the response message is introduced. It should be noted that the process of the requester-1 sending the query instruction to the responder can refer to the relevant description above, which will not be repeated here.
[0245] See also Fig. 9 , Fig. 9 It is a flow chart of a response message transmission process provided in an embodiment of the present application.
[0246] like Fig. 9 As shown, the communication link for message transmission between the requester-1 and the responder includes multiple network devices. Fig. 9 , network device 1 and network device N are exemplarily shown, wherein network device 1 establishes a communication connection with requester-1. Specifically, requester-1 can send a query instruction to network device 1, and then network device 1 sends the query instruction to the next network device on the communication link, and so on, until the last network device sends the query instruction to the responder; the responder can generate a response message in response to the query instruction, and the response message can carry information ID, information value V and time information; the response message is sent to network device 1 via multiple network devices on the communication link, and network device 1 sends the response message to requester-1. The response message includes a remaining time limit that is continuously and dynamically updated with the network devices on the communication link, and the remaining time limit can be used by requester-1 to determine whether the response message is valid based on the remaining time limit.
[0247] Each network device can calculate the storage level S=f'(Pn|R) based on the remaining timeliness information Pn of the information in the response message and the real-time requirement of the information, and store the information when S>Sstore for rapid processing when subsequent network devices receive query instructions for the same information. Sstore can be a preset value.
[0248] Taking network device N as an example, the time limit in the response message received by network device N is P' n+1, the network device N can first be based on the timeliness P' n+1 Calculate the aging time Pn, where aging time Pn is P' n+1 The time after subtracting the transmission delay and the receiving processing delay; further, the network device N can make a cache decision for the response message based on the time limit Pn. Specifically, the network device N can calculate the storage level S=f'(Pn|R) based on the remaining time limit information Pn of the information in the response message combined with the real-time requirement of the information, and store the information when S>Sstore for rapid processing when subsequent network devices receive query instructions for the same information; further, the network device N can make a forwarding decision for the response message based on the time limit Pn, and determine whether to forward the response message with high priority or normally; finally, the network device N updates the time limit information in the response message and updates the time limit to P' n , where the aging time P' n It is the time after deducting the sending processing delay from Pn.
[0249] The specific process of the network device N calculating the transmission delay, the receiving processing delay and the sending processing delay may refer to the relevant content above.
[0250] based on Figure 8 and Fig. 9 The timeliness guarantee method shown, the embodiment of the present application provides a query method. In this method, since the network device stores the response message transmitted by it, the network device can directly send the stored response message to the requester when receiving the query instruction to query the response message.
[0251] The following takes network device N as an example, combined with Fig.10 , which introduces this query method. Fig.10 , Fig.10 is a flowchart of a query method provided by an embodiment of the present application, such as Fig.10 As shown, the query method may include all or part of the following steps:
[0252] Step S8026: The network device N receives the query instruction from the second requester.
[0253] The network device N may be a network device that directly communicates with the second requesting party; or may be a network device that indirectly communicates with the second requesting party.
[0254] Step S8027: Network device N searches the storage for a response message corresponding to the query instruction.
[0255] In some embodiments, after receiving the query instruction, the network device N may first query whether there is a response message corresponding to the query instruction in the stored cache message.
[0256] Step S8028: When the queried response message meets the preset condition, the network device N sends a response message to the second requesting party.
[0257] In one implementation, when the queried response message is not expired, the network device N sends a response message to the second requesting party. The network device N can determine whether the response message is expired based on the remaining validity period of the response message. For example, the network device N queries the storage time and current time of the response message, calculates the time difference between the storage time and the current time, and then subtracts the time difference from the remaining validity period. If the remaining validity period is less than a preset threshold, the response message is determined to be expired. If the remaining validity period is greater than the preset threshold, the response message is determined to be valid. The preset threshold can be 0 or other values, which are not limited here.
[0258] In some embodiments, when other requesters in the network query the responder for information via the network device, the network devices at all levels will first check the local information cache. If the information cache exists and has not expired, the local cached information will be responded to. Otherwise, the query instruction will be forwarded to the responder.
[0259] In a possible implementation, network device N is a network device that communicates indirectly with the second requester. For example, the second requester communicates with the responder via two network devices, and the second requester sends a query instruction to network device N-1, and then network device N-1 updates the timeliness information of the query instruction and forwards it to network device N, and finally network device N sends it to the responder. Then network device N is a network device that communicates indirectly with the second requester. When network device N-1 does not store the response message corresponding to the query instruction, network device N-1 updates the timeliness information of the query instruction and forwards the updated query instruction to network device N. When network device N queries the response message corresponding to the query instruction, network device N can send the response message to network device N-1, and then network device N-1 sends the response message to the second requester. Among them, when network device N sends the response message to the second requester via network device N-1, both network device N and network device N-1 can update the remaining timeliness in the response message.
[0260] It can be understood that the network device is a network device that establishes a direct communication connection with the requesting party, then the network device executes the above Fig.10 The query method shown can achieve a nearby response; when the network device is a network device that establishes an indirect communication connection with the requester, it can also reduce the time originally required to send to the responder.
[0261] See also Fig.11 , Fig.11 It is a scene diagram of nearby response provided in an embodiment of the present application.
[0262] like Fig.11 As shown, Fig.11 Requester-1, requester-2 and requester-N, as well as network device 1 and network device N are shown as examples, wherein requester-1 and requester-2 both establish communication connections with network device 1, and requester-N establishes communication connection with network device N.
[0263] Exemplarily, requester-1 is the first requester, and requester-2 and requester-N are the second requesters. Specifically, the communication between requester-1 and the responder includes: Fig.11 The network device 1 and the network device N are shown as multiple network devices. Assume that the requester-1 sends a query instruction to the network device 1, and then, in the process that the responder sends the response message corresponding to the query instruction to the requester-1 through the above multiple network devices, the multiple network devices all update the time limit in the response message, and the multiple network devices all store the updated response message.
[0264] Then, when requester-2 sends the above-mentioned query instruction to network device 2, network device 2 can first query the response message corresponding to the query instruction in the storage, and after querying the corresponding response message, send the response message to requester-2; when requester-N sends a query instruction to network device N, network device 2 can first query whether there is a response message corresponding to the query instruction in the storage, and after querying the corresponding response message, send the response message to requester-N.
[0265] The response message stored in the network device may be the response message received by the network device and updated to a response message after the first time limit (such as the cache message described above). For the time limit update of the response message by the network device, please refer to the relevant description above, which will not be repeated here.
[0266] Fig.11 The information carried in the response message is shown as an example, such as the information ID, information value and timeliness information. It can be understood that the initial timeliness of the response message generated by the responder is P, and multiple network devices can update the timeliness information in the response message. For example, network device N updates the timeliness of the response message to P. n , network device 1 updates the response message to P1.
[0267] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0268] See also Fig.12 , Fig.121 is a schematic diagram of the structure of a time-limit guarantee device 120 provided in an embodiment of the present application. The device 120 may be a network device. Of course, the device 120 may also be a device in the network device, such as a chip or an integrated circuit, etc. The device 120 may include a receiving unit 1201, a first processing unit 1202, a second processing unit 1203, an updating unit 1204 and a sending unit 1205. The time-limit guarantee device 120 is used to implement the aforementioned time-limit guarantee method, for example Figure 5 or Figure 6B A time guarantee method according to any one of the embodiments shown.
[0269] In a possible implementation, the receiving unit 1201 is configured to receive a data frame, where the data frame includes timeliness information, where the timeliness information is used to indicate a remaining timeliness of the data frame;
[0270] The first processing unit 1202 is used to obtain a transmission delay based on a start time of receiving a data frame by a link layer of the network device and an end time of receiving the data frame by the link layer;
[0271] The second processing unit 1203 is used to obtain the overall forwarding delay based on the time required for the protocol stack or application layer of the network device to process the data frame;
[0272] An updating unit 1204, configured to update timeliness information based on the transmission delay and the overall forwarding delay;
[0273] The sending unit 1205 is used to send the updated data frame.
[0274] In a possible implementation manner, the transmission delay is the time difference between the start time and the end time; the start time is the time when the start bit of the data frame is received, and the end time is the time when the end bit of the data frame is received;
[0275] The remaining time in the updated data frame is the remaining time in the data frame minus the difference between the transmission delay and the overall forwarding delay.
[0276] In a possible implementation manner, the overall forwarding delay includes a receiving processing delay and a sending processing delay; the updating unit 1204 is used to:
[0277] The remaining time limit of the data frame is updated to the first time limit to obtain the first data frame; the first time limit is the difference between the remaining time limit of the data frame minus the transmission delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or the application layer to receive and process the data frame after the link layer receives the data frame; the remaining time limit of the first data frame is the first time limit;
[0278] The remaining time limit of the first data frame is updated to the second time limit to obtain an updated data frame; the second time limit is the difference between the first time limit and the sending processing delay, and the sending processing delay is the time required for the protocol stack or application layer to send and process the first data frame before the link layer sends the updated data frame; the remaining time limit of the updated data frame is the second time limit.
[0279] In a possible implementation, before the sending unit 1205 sends the updated data frame, the device further includes a processing unit, and the processing unit is used to:
[0280] Based on the first timeliness, determine a processing method for the first data frame; the processing methods include priority forwarding, normal forwarding or discarding.
[0281] In a possible implementation, the processing unit is configured to:
[0282] Based on at least one of a reliability level corresponding to the data frame and a real-time level corresponding to the data frame and a first timeliness, a processing method for the first data frame is determined.
[0283] In a possible implementation, the data frame carries any one of a request message, a response message and an active notification message, the request message includes a query instruction or a control instruction, and the response message is a reply message generated in response to the query instruction or the control instruction.
[0284] In a possible implementation manner, the data frame carries a response message generated by the responder in response to the query instruction of the first requester, and the device further includes a storage unit, which is used to:
[0285] Store the response message.
[0286] In a possible implementation, the storage unit is used to:
[0287] When the first timeliness and the real-time level corresponding to the response message satisfy the cache decision, the response message is stored.
[0288] In a possible implementation, the receiving unit 1201 is configured to receive a query instruction from a second requesting party, where the query instruction from the second requesting party is used to request a response message;
[0289] The sending unit 1205 is configured to send a response message to the second requesting party.
[0290] In a possible implementation, the sending unit 1205 is configured to:
[0291] Obtain the first time validity period corresponding to the response message and the time when the response message is stored;
[0292] When the time difference between the current time and the time when the response message is stored is not greater than the first time validity period, sending the response message to the second requesting party;
[0293] When the time difference between the current time and the time when the response message is stored is greater than the first time validity period, a request message is sent to the responder.
[0294] It should be noted that the implementation of each unit can also refer to Fig. 6A or Figure 8 The time-limit guarantee device 120 can be Fig. 6A or Figure 8 The network device in the illustrated embodiment.
[0295] It can be understood that in the various device embodiments of the present application, the division of multiple units or modules is only a logical division based on function, and is not intended to limit the specific structure of the device. In a specific implementation, some functional modules may be subdivided into more small functional modules, and some functional modules may be combined into one functional module, but regardless of whether these functional modules are subdivided or combined, the general process performed by the device 120 during the pairing process is the same. For example, the receiving unit 1201 and the sending unit 1205 in the above-mentioned device 120 can also be integrated into a communication unit, which can implement the functions implemented by the receiving unit 1201 and the sending unit 1205. Usually, each unit corresponds to its own program code (or program instruction), and when the program code corresponding to each of these units runs on the processor, the unit is controlled by the processing unit to execute the corresponding process to implement the corresponding function.
[0296] See also Fig.13 , Fig.13 1 is a schematic diagram of the structure of a time-limit guarantee device 130 provided in an embodiment of the present application. The device 130 can be a receiving end. Of course, the device 130 can also be a device in the receiving end, such as a chip or an integrated circuit, etc. The device 130 can include a receiving unit 1301, a processing unit 1302 and an updating unit 1303. The time-limit guarantee device 130 can be a responder or a requester in the above embodiment, and is used to implement the above-mentioned time-limit guarantee method, for example Fig. 6A or Figure 8 A time guarantee method according to any one of the embodiments shown.
[0297] In a possible implementation, the device includes:
[0298] The receiving unit 1301 is used to receive a data frame from a transmitting end; the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame;
[0299] The processing unit 1302 is configured to obtain a link delay based on a start time of receiving a data frame by a link layer of a receiving end and an end time of receiving a data frame by a link layer of a receiving end;
[0300] The updating unit 1303 is used to update the remaining time based on the link delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or application layer to receive and process the data frame after the link layer receives the data frame.
[0301] In a possible implementation manner, the data frame carries a request message, where the request message includes a query instruction or a control instruction; the apparatus further includes an execution unit 1304, where the execution unit 1304 is configured to:
[0302] When it is determined that the request message is valid based on the remaining time and the preset threshold, the query instruction or the control instruction is executed.
[0303] In a possible implementation manner, the receiving unit 1301 is configured to:
[0304] receiving a data frame from a requester via at least one network device;
[0305] At least one network device is used to update the remaining validity period of the data frame based on the transmission delay and the overall forwarding delay; the transmission delay is obtained based on the start time when the link layer of the network device receives the data frame and the end time when the link layer of the network device receives the data frame; the overall forwarding delay is obtained based on the time required for the protocol stack or application layer of the network device to process the data frame.
[0306] It should be noted that the implementation of each unit can also refer to Fig. 6A or Figure 8 The time-limiting device 130 can be Fig. 6A or Figure 8 A responder or requester in the illustrated embodiment.
[0307] See also Fig.14 , Fig.14 1 is a schematic diagram of the structure of a time-limit guarantee device 140 provided in an embodiment of the present application. The time-limit guarantee device 140 may be a node or a device in a node, such as a chip or an integrated circuit. The device 140 may include at least one processor 1402 and a communication interface 1404. Further optionally, the time-limit guarantee device may also include at least one memory 1401. Further optionally, a bus 1403 may also be included, wherein the memory 1401, the processor 1402 and the communication interface 1404 are connected via the bus 1403.
[0308] The memory 1401 is used to provide a storage space, and the storage space can store data such as an operating system and a computer program. The memory 1401 can be a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM), or a portable read-only memory (CD-ROM), etc., or a combination of multiple thereof.
[0309] The processor 1402 is a module that performs arithmetic operations and / or logical operations, and may specifically be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor unit (MPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a coprocessor (assisting the central processing unit to complete corresponding processing and applications), a microcontroller unit (MCU), and other processing modules, or a combination of multiple of them.
[0310] The communication interface 1404 may be used to provide information input or output for the at least one processor. And / or the communication interface may be used to receive data sent externally and / or send data externally, and may be a wired link interface including an Ethernet cable, etc., or a wireless link (Wi-Fi, Bluetooth, general wireless transmission, vehicle-mounted short-range communication technology, etc.) interface. Optionally, the communication interface 1404 may also include a transmitter (such as a radio frequency transmitter, an antenna, etc.) coupled to the interface, or a receiver, etc.
[0311] The processor 1402 in the device 140 is used to read the computer program stored in the memory 1401 to execute the aforementioned time guarantee method, for example Fig. 6A or Figure 8 The time guarantee method described in the illustrated embodiment.
[0312] In one design, the time-limiting device 140 can be Fig. 6A or Figure 8 The processor 1402 in the device 140 is used to read the computer program stored in the memory 1401 to execute the above Fig. 6A or Figure 8 The method embodiment shown.
[0313] In another design, the time-limiting device 140 can be Fig. 6A or Figure 8 The processor 1402 in the device 140 is used to read the computer program stored in the memory 1401, and to execute the above Fig. 6A or Figure 8 The method embodiment shown.
[0314] For specific implementation, please refer to Fig. 6A , Figure 6B , Figure 8 or Fig.10 The detailed description in the illustrated embodiment will not be repeated here.
[0315] The present application also provides a computer-readable storage medium in which a computer program is stored. When the computer program is executed on one or more processors, Fig. 6A , Figure 6B , Figure 8 or Fig.10 The method described in the embodiment shown.
[0316] The embodiment of the present application also provides a chip system, the chip system includes at least one processor and a communication interface, the communication interface is used to send and / or receive data, the at least one processor is used to call a computer program stored in at least one memory to implement Fig. 6A , Figure 6B , Figure 8 or Fig.10 The method described in the embodiment shown.
[0317] Furthermore, the at least one processor may include at least one of a CPU, an MPU, an MCU or a coprocessor.
[0318] The present application also provides a computer program product. When the computer program product is run on one or more processors, the following can be achieved: Fig. 6A , Figure 6B , Figure 8 or Fig.10 The illustrated embodiments describe the method.
[0319] In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof.
[0320] When implemented using software, all or part of the implementation may be in the form of a computer instruction product.
[0321] When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application can be realized in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted by a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrations. Available media can be magnetic media, (for example, floppy disks, hard disks, tapes), optical media (for example, DVDs), or semiconductor media (for example, solid-state drives (solid statedisk, SSD)), etc.
[0322] The steps in the method embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.
[0323] The modules in the device embodiment of the present application can be merged, divided and deleted according to actual needs.
Claims
1. A time guarantee method, characterized in that: Applied to a network device, the method comprises: receiving a data frame, wherein the data frame includes timeliness information, and the timeliness information is used to indicate a remaining timeliness of the data frame; Obtaining a transmission delay based on a start time when the link layer of the network device receives the data frame and an end time when the link layer receives the data frame; Obtaining an overall forwarding delay based on the time required for the protocol stack or application layer of the network device to process the data frame; Based on the transmission delay and the overall forwarding delay, updating the timeliness information; The updated data frame is sent.
2. The method according to claim 1, characterized in that The transmission delay is the time difference between the start time and the end time; the start time is the time when the start bit of the data frame is received, and the end time is the time when the end bit of the data frame is received; The remaining time in the updated data frame is the remaining time in the data frame minus the difference between the transmission delay and the overall forwarding delay.
3. The method according to claim 1 or 2, characterized in that The overall forwarding delay includes a receiving processing delay and a sending processing delay; and updating the timeliness information based on the transmission delay and the overall forwarding delay includes: The remaining time limit of the data frame is updated to a first time limit, to obtain a first data frame; the first time limit is the remaining time limit of the data frame minus the difference between the transmission delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or the application layer to receive and process the data frame after the link layer receives the data frame; the remaining time limit of the first data frame is the first time limit; Update the remaining time limit of the first data frame to a second time limit to obtain the updated data frame; the second time limit is the difference between the first time limit and the sending processing delay, and the sending processing delay is the time required for the protocol stack or the application layer to send and process the first data frame before the link layer sends the updated data frame; the remaining time limit of the updated data frame is the second time limit.
4. The method according to claim 3, characterized in that Before sending the updated data frame, the method further includes: Based on the first time validity, determine a processing method for the first data frame; the processing method includes priority forwarding, normal forwarding or discarding.
5. The method according to claim 4, characterized in that The determining, based on the first timeliness, a processing method for the first data frame includes: Based on at least one of a reliability level corresponding to the data frame and a real-time level corresponding to the data frame and the first timeliness, a processing method for the first data frame is determined.
6. The method according to claim 1 or 2, characterized in that The data frame carries any one of a request message, a response message and an active notification message, the request message includes a query instruction or a control instruction, and the response message is a reply message generated in response to the query instruction or the control instruction.
7. The method according to claim 1, characterized in that The data frame carries a response message generated by the responder in response to the query instruction of the first requester, and the method further includes: The response message is stored.
8. The method according to claim 7, characterized in that After the remaining time limit of the data frame is updated to the first time limit to obtain the first data frame, the storing of the response message includes: When the first timeliness and the real-time level corresponding to the response message satisfy a cache decision, the response message is stored.
9. The method according to claim 7 or 8, characterized in that: The method further comprises: receiving a query instruction from a second requesting party, wherein the query instruction from the second requesting party is used to request the response message; The response message is sent to the second requester.
10. The method according to claim 9, characterized in that Sending the response message to the second requesting party includes: Obtaining a first time validity period corresponding to the response message and a time for storing the response message; When the time difference between the current moment and the moment when the response message is stored is not greater than the first time validity period, sending the response message to the second requesting party; When the time difference between the current time and the time when the response message is stored is greater than the first time validity period, the request message is sent to the responder.
11. A time guarantee method, characterized in that: Applied to the sending end, the method includes: The transmitting end sends a data frame to the receiving end; the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame; The receiving end is used to update the remaining validity period of the data frame based on the link delay and the receiving processing delay; the link delay is obtained based on the starting time when the link layer of the receiving end receives the data frame and the ending time when the link layer receives the data frame; the receiving processing delay is the time required for the protocol stack or application layer of the receiving end to receive and process the data frame after the link layer receives the data frame.
12. A time guarantee method, characterized in that: Applied to the receiving end, the method includes: The receiving end receives a data frame from the sending end; the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame; The receiving end obtains a link delay based on a start time when the link layer of the receiving end receives the data frame and an end time when the link layer of the receiving end receives the data frame; The remaining time limit is updated based on the link delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or application layer of the receiving end to receive and process the data frame after the link layer receives the data frame.
13. The method according to claim 12, characterized in that The data frame carries a request message, and the request message includes a query instruction or a control instruction; the method further includes: When the receiving end determines that the request message is valid based on the remaining time validity and a preset threshold, the receiving end executes the query instruction or the control instruction.
14. The method according to claim 12 or 13, characterized in that The receiving end receives a data frame from a sending end, including: The receiving end receives a data frame from a requesting party via at least one network device; The at least one network device is used to update the remaining validity period of the data frame based on the transmission delay and the overall forwarding delay; the transmission delay is obtained based on the start time when the link layer of the network device receives the data frame and the end time when the link layer of the network device receives the data frame; the overall forwarding delay is obtained based on the time required for the protocol stack or application layer of the network device to process the data frame.
15. A time guarantee device, characterized in that: The device comprises: A receiving unit, configured to receive a data frame, wherein the data frame includes timeliness information, and the timeliness information is used to indicate a remaining timeliness of the data frame; A first processing unit, configured to obtain a transmission delay based on a start time when a link layer of the device receives the data frame and an end time when the link layer receives the data frame; A second processing unit, configured to obtain an overall forwarding delay based on a time required for a protocol stack or an application layer of the device to process the data frame; An updating unit, configured to update the timeliness information based on the transmission delay and the overall forwarding delay; A sending unit is used to send the updated data frame.
16. The device according to claim 15, characterized in that The transmission delay is the time difference between the start time and the end time; the start time is the time when the start bit of the data frame is received, and the end time is the time when the end bit of the data frame is received; The remaining time in the updated data frame is the remaining time in the data frame minus the difference between the transmission delay and the overall forwarding delay.
17. The device according to claim 15 or 16, characterized in that The overall forwarding delay includes a receiving processing delay and a sending processing delay; the updating unit is used to: The remaining time limit of the data frame is updated to a first time limit, to obtain a first data frame; the first time limit is the remaining time limit of the data frame minus the difference between the transmission delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or the application layer to receive and process the data frame after the link layer receives the data frame; The remaining time limit of the first data frame is the first time limit; Update the remaining time limit of the first data frame to a second time limit to obtain the updated data frame; the second time limit is the difference between the first time limit and the sending processing delay, and the sending processing delay is the time required for the protocol stack or the application layer to send and process the first data frame before the link layer sends the updated data frame; the remaining time limit of the updated data frame is the second time limit.
18. The device according to claim 17, characterized in that Before the sending unit sends the updated data frame, the device further includes a processing unit, wherein the processing unit is configured to: Based on the first time validity, determine a processing method for the first data frame; the processing method includes priority forwarding, normal forwarding or discarding.
19. The device according to claim 18, characterized in that The processing unit is used for: Based on at least one of a reliability level corresponding to the data frame and a real-time level corresponding to the data frame and the first timeliness, a processing method for the first data frame is determined.
20. The device according to claim 15 or 16, characterized in that The data frame carries any one of a request message, a response message and an active notification message, the request message includes a query instruction or a control instruction, and the response message is a reply message generated in response to the query instruction or the control instruction.
21. The device according to claim 15, characterized in that The data frame carries a response message generated by the responder in response to the query instruction of the first requester, and the device further includes a storage unit, which is used to: The response message is stored.
22. The device according to claim 21, characterized in that The storage unit is used for: When the first timeliness and the real-time level corresponding to the response message satisfy a cache decision, the response message is stored.
23. The device according to claim 21 or 22, characterized in that The receiving unit is used to receive a query instruction from the second requesting party, where the query instruction from the second requesting party is used to request the response message; The sending unit is used to send the response message to the second requesting party.
24. The device according to claim 23, characterized in that The sending unit is used for: Obtaining a first time validity period corresponding to the response message and a time for storing the response message; When the time difference between the current moment and the moment when the response message is stored is not greater than the first time validity period, sending the response message to the second requesting party; When the time difference between the current time and the time when the response message is stored is greater than the first time validity period, the request message is sent to the responder.
25. A time guarantee device, characterized in that: The device comprises: A receiving unit, configured to receive a data frame from a transmitting end; the data frame includes timeliness information, and the timeliness information of the data frame is used to indicate the remaining timeliness of the data frame; A processing unit, configured to obtain a link delay based on a start time of receiving the data frame by the link layer of the device and an end time of receiving the data frame by the link layer of the receiving end; An updating unit is used to update the remaining time based on the link delay and the receiving processing delay; the receiving processing delay is the time required for the protocol stack or application layer of the device to receive and process the data frame after the link layer receives the data frame.
26. The device according to claim 25, characterized in that The data frame carries a request message, and the request message includes a query instruction or a control instruction; the device also includes an execution unit, and the execution unit is used to: When it is determined that the request message is valid based on the remaining time and a preset threshold, the query instruction or the control instruction is executed.
27. The device according to claim 25 or 26, characterized in that The receiving unit is used for: receiving a data frame from a requester via at least one network device; The at least one network device is used to update the remaining validity period of the data frame based on the transmission delay and the overall forwarding delay; The transmission delay is obtained based on the start time when the link layer of the network device receives the data frame and the end time when the link layer of the network device receives the data frame; the overall forwarding delay is obtained based on the time required for the protocol stack or application layer of the network device to process the data frame.
28. A chip system, characterized in that: The chip system includes at least one processor and a communication interface, the communication interface is used to send and / or receive data, and the at least one processor is used to call a computer program stored in at least one memory so that the device where the chip system is located implements the method as described in any one of claims 1-14.
29. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is run on one or more processors, the method according to any one of claims 1 to 14 is executed.
30. A communication system, characterized in that: The system includes a transmitting end, a receiving end and a network device, wherein the network device is used to execute the method according to any one of claims 1 to 10, the transmitting end is used to execute the method according to any one of claims 11, and the receiving end is used to execute the method according to any one of claims 12 to 14.
Citation Information
Patent Citations
Data transmission method, terminal equipment and network equipment
CN113709804A
Data transmission method, terminal device and network device
WO2021233400A1