Message sending and receiving method and device based on QBV scheduling

By splitting the messages to be sent into incomplete messages and remaining messages in the network switching device, and sending them within the appropriate time slice, the bandwidth waste caused by insufficient remaining door opening time is solved, and more efficient resource utilization is achieved.

CN119766747APending Publication Date: 2025-04-04WXILICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411971452.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In a network switching device, when the remaining door opening time is less than the message sending time, the message cannot be sent, resulting in wasted bandwidth.

Method used

By determining the preset relationship between the target message length and the remaining transmitted data amount, the message to be sent is divided into incomplete messages and remaining messages, and the incomplete messages are sent within the remaining gate opening time of the gate control, and the remaining messages are sent within the next time.

Benefits of technology

The remaining door opening time is fully utilized, bandwidth waste is avoided, and resource utilization of network switching equipment is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766747A_ABST
    Figure CN119766747A_ABST
Patent Text Reader

Abstract

The invention provides a message sending and receiving method and device based on QBV scheduling, and the method comprises the steps: determining a to-be-sent message and the current gating remaining door opening time of a target priority queue where the to-be-sent message is located; and determining that the residual transmission data volume is smaller than the target message length of the message to be sent according to the gating residual door opening time and the target message length and the residual transmission data volume meet a preset relationship. Splitting the message to be sent into an incomplete message and a residual message according to the residual transmission data volume; and sending the incomplete message through the gating remaining door opening time, and sending the remaining message in the next gating time slice of the target priority queue. Through the method and the device, the problem of bandwidth waste in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network switching equipment communication, and in particular to a method and device for sending and receiving messages based on QBV scheduling. Background Art

[0002] At present, when network switching equipment performs QBV scheduling (a technology in TSN (Time-Sensitive Networking) used to ensure determinism and low latency of data transmission in time-sensitive networks) at the egress, if the remaining door opening time is less than the message sending time, it cannot be sent. TSN is a set of IEEE standards designed to provide high reliability and low latency network communications, especially suitable for industrial automation, automotive, aviation and multimedia applications. Therefore, when the above situation occurs, the remaining door opening time cannot be used to send messages, resulting in a problem of wasted bandwidth.

[0003] Therefore, there is a technical problem of wasting bandwidth in the related art. Summary of the invention

[0004] The present application provides a method and device for sending and receiving messages based on QBV scheduling, so as to at least solve the problem of bandwidth waste existing in the related art.

[0005] According to one aspect of an embodiment of the present application, a QBV-scheduled message sending method is provided, including:

[0006] Determine the remaining gate opening time of the message to be sent and the target priority queue where the message to be sent is located;

[0007] When it is determined according to the remaining gate opening time that the remaining transmission data amount is less than the target message length of the message to be sent, and the target message length and the remaining transmission data amount satisfy a preset relationship, splitting the message to be sent into incomplete messages and remaining messages according to the remaining transmission data amount;

[0008] The incomplete message is sent through the remaining gate opening time of the gate, and the remaining message is sent in the next gate time slice of the target priority queue.

[0009] Optionally, as in the aforementioned method, the preset relationship includes:

[0010] The remaining transmission data amount is greater than or equal to the preset data amount;

[0011] The difference between the message to be sent and the remaining transmission data amount is greater than or equal to the preset data amount.

[0012] Optionally, as in the foregoing method, sending the incomplete message includes:

[0013] Inverting the frame check sequence of the incomplete message to obtain an inverted frame check sequence, wherein the inverted frame check sequence is used to indicate that the incomplete message is not a complete message;

[0014] The inverted frame check sequence is added to the incomplete message for message sending.

[0015] Optionally, as in the foregoing method, sending the remaining messages includes:

[0016] Determining a frame check sequence of the message to be sent;

[0017] The frame check sequence is added to the remaining message for message sending.

[0018] According to another aspect of an embodiment of the present application, a method for receiving a message based on QBV scheduling is also provided, including:

[0019] When receiving a message, parse the message;

[0020] When it is determined that the message is an incomplete message, caching the message;

[0021] When it is determined that the message is a remaining message, the remaining message is merged with a corresponding incomplete message that is pre-cached, and the merged message is processed.

[0022] Optionally, as in the foregoing method, the parsing of the message includes:

[0023] Determine whether the frame check sequence FCS carried by the received message is the same as the FCS of the message itself. If they are not the same, determine whether the carried FCS is the inversion of the FCS of the message itself. If it is the inversion, determine that the received message is the incomplete message; if it is not the inversion, determine that the received message is the remaining message.

[0024] Optionally, as in the aforementioned method, merging the remaining message with the corresponding incomplete message pre-cached, and processing the merged message includes:

[0025] Calculate the FCS of the combined message, and determine whether the combined FCS is the same as the FCS carried by the remaining messages. If they are the same, send the combined message to the next level for processing; if they are not the same, discard the combined message.

[0026] According to another aspect of an embodiment of the present application, a message sending device based on QBV scheduling is also provided, including:

[0027] A determination module, used to determine the message to be sent and the current remaining gate opening time of the target priority queue where the message to be sent is located;

[0028] A splitting module, for splitting the message to be sent into incomplete messages and remaining messages according to the remaining transmission data volume, when it is determined according to the remaining door opening time of the gate control that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume satisfy a preset relationship;

[0029] The sending module is used to send the incomplete message through the remaining gate opening time of the gate, and send the remaining message in the next gated time slice of the target priority queue.

[0030] According to another aspect of an embodiment of the present application, a message receiving device based on QBV scheduling is also provided, including:

[0031] The acquisition module is used to parse the message when it is received;

[0032] A determination module, configured to cache the message when determining that the message is an incomplete message;

[0033] The merging module is used to merge the remaining message with the corresponding incomplete message cached in advance when it is determined that the message is a remaining message, and process the merged message.

[0034] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps in any of the above embodiments by running the computer program stored in the memory.

[0035] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method steps in any of the above embodiments when executed.

[0036] In the embodiment of the present application, when the remaining door opening time is insufficient to send the message to be sent, the message to be sent is truncated and sent in batches, by determining the current gated remaining door opening time of the message to be sent and the target priority queue where the message to be sent is located; when it is determined according to the gated remaining door opening time that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume meet a preset relationship, the message to be sent is divided into an incomplete message and a remaining message according to the remaining transmission data volume; the incomplete message is sent through the gated remaining door opening time, and the remaining message is sent in the next gated time slice of the target priority queue. Since the message to be sent can be truncated into an incomplete message and a remaining message, and can be sent separately in two time slices, the purpose of fully utilizing the remaining door opening time can be achieved, and the technical effect of fully utilizing bandwidth resources is achieved, thereby solving the problem of bandwidth waste existing in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 It is a flowchart of an optional QBV scheduled message sending method according to an embodiment of the present application;

[0040] Figure 2 It is a flowchart of an optional QBV-scheduled message receiving method according to an embodiment of the present application;

[0041] Figure 3 It is a structural block diagram of an optional QBV-scheduled message sending device according to an embodiment of the present application;

[0042] Figure 4 It is a structural block diagram of an optional QBV-scheduled message receiving device according to an embodiment of the present application;

[0043] Figure 5 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:

[0047] 1. FCS, short for "Frame Check Sequence", is a mechanism for detecting data transmission errors. FCS usually appears at the end of a data frame in a network communication protocol to ensure that the received data is consistent with the sent data.

[0048] 2. Opening time refers to the specific time period during which the port of a network switching device (such as a network switching device, switch or router) is open to certain priority data flows, allowing these data packets to pass through.

[0049] According to one aspect of an embodiment of the present application, a QBV-scheduled message sending method is provided.

[0050] The QBV-scheduled message sending method of the embodiment of the present application can be executed by a switching chip or by a switch.

[0051] Figure 1 A QBV-scheduled message sending method provided in an embodiment of the present application includes the following steps:

[0052] Step S102, determining the remaining gate opening time of the message to be sent and the target priority queue where the message to be sent is located.

[0053] The QBV-scheduled message sending method in this embodiment can be applied to scenarios where network switching devices send messages, such as: scenarios where switches send messages, scenarios where automotive chips send messages, etc., and can also be scenarios where other types of switching devices send messages. In the embodiment of the present application, the QBV-scheduled message sending method is illustrated by taking automotive chips as an example. For other types of network switching devices, the QBV-scheduled message sending method is also applicable if there is no contradiction.

[0054] When determining the message that needs to be sent for the target priority corresponding to the current time slice, the pending message that needs to be sent in the target priority queue corresponding to the target priority can be determined, and after the previous message is sent, the remaining gate opening time in the time slice that allows the message of the current priority to be sent can be allowed.

[0055] Step S104, when it is determined according to the remaining gate opening time that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume satisfy a preset relationship, the message to be sent is split into incomplete messages and remaining messages according to the remaining transmission data volume.

[0056] Specifically, the remaining transmission data volume is the amount of data that can be transmitted by the remaining door opening time of the gating control, and the sum of the incomplete message and the remaining message is the message to be sent. In addition, after determining the remaining door opening time of the gating control, the remaining transmission data volume can be determined based on the transmission rate of the network switching device by multiplying the transmission rate by the remaining door opening time of the gating control. After determining the remaining transmission data volume, it can be compared with the target message length of the message to be sent to determine whether the remaining door opening time of the gating control is sufficient to transmit the target message length. In general, the data volume of the incomplete message is less than or equal to the remaining transmission data volume. In order to improve the utilization rate of the remaining door opening time of the gating control, the data volume of the incomplete message is the remaining transmission data volume.

[0057] As an optional implementation, as in the aforementioned method, the preset relationship includes: the remaining transmission data amount is greater than or equal to the preset data amount; and the difference between the message to be sent and the remaining transmission data amount is greater than or equal to the preset data amount. The preset data amount can be a data amount that can ensure that the message has a minimum payload, that is, sufficient to carry most of the protocol header information and a portion of the payload, so that the receiving end can process and understand the received data fragment, for example, 60 bytes. When it is determined that the target message length and the remaining transmission data amount meet the preset relationship, the message to be sent can be truncated according to the remaining transmission data amount to obtain an incomplete message consistent with the remaining transmission data amount, and the remaining message in the message to be sent except the incomplete message.

[0058] Step S106, sending the incomplete message by gating the remaining gate opening time, and sending the remaining message in the next gating time slice of the target priority queue.

[0059] Specifically, after determining the incomplete message and the remaining message, the incomplete message can be sent through the remaining gate opening time of the gating, and the remaining message can be sent in the next gating time slice of the target priority queue. The next gating time slice is the next time slice for sending the message in the target priority queue, and further, the next gating time slice is the next time slice determined by the gating control list for sending the message in the target priority queue.

[0060] In addition, if the message is too small (such as less than 60 bytes), it may cause too much header overhead and reduce transmission efficiency. In addition, too small messages may not carry enough context information, making it difficult for the receiving end to process correctly. Therefore, when it is determined that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume do not meet the preset relationship, the message to be sent is not sent. The message to be sent is sent only when the next complete time slice or the remaining gate opening time of the gate is greater than the message to be sent.

[0061] As an optional implementation, as in the aforementioned method, the method further includes: when it is determined that the remaining transmission data amount is greater than or equal to the target message length of the message to be sent, directly sending the message to be sent. In other words, when it is determined that the remaining transmission data amount is sufficient to send the message to be sent at one time, it is directly sent without truncation.

[0062] For example, when the preset data volume is 60 bytes, if the length of the message to be sent minus the remaining transmission volume corresponding to the remaining gate opening time of the gating is greater than or equal to 60 bytes (for a gigabit rate port, 8 nanoseconds is equal to one byte), and the remaining transmission volume is greater than or equal to 60 bytes, the message is allowed to be sent according to the remaining gate opening time. If the remaining transmission volume is greater than or equal to the target message length of the message to be sent, the message to be sent is sent normally, that is, no truncation processing is required. If it is determined that the remaining transmission data volume is less than the target message length of the message to be sent, and the remaining transmission data volume is less than 60 bytes, and / or the target message length minus the remaining transmission data volume is less than 60 bytes, the message to be sent is not sent.

[0063] As an optional implementation, as in the aforementioned method, an incomplete message can be sent through the following steps: the frame check sequence of the incomplete message is inverted to obtain an inverted frame check sequence, wherein the inverted frame check sequence is used to indicate that the incomplete message is not a complete message; the inverted frame check sequence is added to the incomplete message for message sending. That is to say, the FCS of the incomplete message sent for the first time after the message to be sent is split needs to be inverted, and the inverted frame check sequence is used to allow the receiver to distinguish it from a normal message when receiving it, and the inverted frame check sequence is added to the incomplete message, so that the receiver responds to the obtained inverted frame check sequence and continues to wait for the remaining incomplete messages.

[0064] As an optional implementation, as in the aforementioned method, the remaining messages can be sent through the following steps: determining the frame check sequence of the message to be sent; adding the frame check sequence to the remaining message for message sending. That is to say, the frame check sequence of the remaining message to be sent needs to be the frame check sequence of the complete message to be sent, so as to verify whether the CRC (Cyclic Redundancy Check, a technology for detecting errors in data transmission or storage, to ensure the integrity and accuracy of data) of the combined message obtained by combining the incomplete message with the remaining message is correct. That is, when the frame check sequence of the combined message is consistent with the frame check sequence obtained when the remaining message is received, it means that the combined message is consistent with the message to be sent, otherwise it is inconsistent.

[0065] In an embodiment of the present application, when the remaining gate opening time is insufficient to send the message to be sent, the message to be sent is truncated and then sent in batches. The remaining gate opening time of the message to be sent and the network switching device outlet is determined; when it is determined that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume satisfy a preset relationship, the message to be sent is truncated into an incomplete message and a remaining message according to the remaining transmission data volume, wherein the remaining transmission data volume is the amount of data that can be transmitted by the network switching device outlet within the remaining gate opening time, the data volume of the incomplete message is the remaining transmission data volume, and the sum of the incomplete message and the remaining message is the message to be sent; the incomplete message is processed by the remaining gate opening time, and the remaining message is sent in the next time slice. Since the message to be sent can be truncated into incomplete messages and remaining messages, and can be sent in sequence, the purpose of fully utilizing the remaining door opening time of the gate control can be achieved, achieving the technical effect of fully utilizing bandwidth resources, and thus solving the problem of bandwidth waste existing in related technologies.

[0066] Figure 2A QBV-scheduled message receiving method is provided in an embodiment of the present application, such as Figure 2 As shown, according to another aspect of the embodiment of the present application, a method for receiving a message based on QBV scheduling is also provided, comprising the following steps:

[0067] Step S202: When a message is received, the message is parsed.

[0068] Specifically, when a message is obtained, the message is parsed. In this embodiment, parsing the message may include but is not limited to: obtaining the message content, and determining whether the message is a complete message.

[0069] Step S204: When it is determined that the message is an incomplete message, the message is cached.

[0070] That is, when it is determined that the received message is not a complete message, the message is cached, and it is necessary to wait to obtain the next incomplete message, and the next incomplete message is also a message sent by the same priority queue as the first received message.

[0071] Step S206: when it is determined that the message is a remaining message, the remaining message is merged with the corresponding incomplete message cached in advance, and the merged message is processed.

[0072] That is to say, when the acquired message is a remaining message, the previously received incomplete message will be queried from the cache.

[0073] Furthermore, after obtaining the remaining message and the incomplete message, it can be determined whether the two belong to the same message. If they belong to the same message, the first received message and the second received message can be merged to obtain a merged message.

[0074] As an optional implementation, the message can be parsed as follows: determine whether the frame check sequence FCS carried by the received message is the same as the FCS of the message itself. If they are not the same, determine whether the carried FCS is the inversion of the FCS of the message itself. If it is the inversion, the received message is determined to be an incomplete message; if it is not the inversion, the received message is determined to be a remaining message. Specifically, after receiving the message, the FCS carried by the message can be obtained at the same time, and then the FCS of the received message itself is calculated, and the frame check sequence FCS carried by the message is compared with the FCS of the message itself to determine whether the two are the same. It is known from the above embodiments that for an incomplete message, its frame check sequence needs to be inverted. Therefore, when it is determined that the carried FCS is not the FCS of the message itself, and is the inversion of the FCS of the message itself, it is determined that the received message is an incomplete message obtained by splitting the message to be sent, and continues to wait for the message sent in the next time slice. If it is determined that the carried FCS is not the FCS of the message itself, and the carried FCS is not inverted, then it is determined that the received message is a remaining message.

[0075] Because in some cases, there may be anomalies in the data transmission process, which may result in failure to receive the data sent by the sender, therefore, as an optional implementation, the remaining message can be merged with the corresponding incomplete message pre-cached through the following steps, and the merged message can be processed: calculate the FCS of the merged message, determine whether the merged FCS is the same as the FCS carried by the remaining message, if the same, send the merged message to the next level for processing; if not, discard the merged message. That is to say, in the case of determining that the incomplete message and the remaining message are two partial messages sent after splitting a message, it is necessary to verify the message to be verified that is finally merged to determine whether the data sent by the sender has been obtained, and in the case of determining that the FCS of the message to be verified is consistent with the FCS carried by the remaining message, the merged message to be verified is determined as a correct message and sent to the next level for processing; if not, discard the merged message to be verified.

[0076] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0078] According to another aspect of an embodiment of the present application, a message sending device based on QBV scheduling is also provided for implementing the above-mentioned message sending method based on QBV scheduling. Figure 3 is a structural block diagram of an optional QBV-scheduling-based message sending device according to an embodiment of the present application, such as Figure 3 As shown, the device may include:

[0079] A determination module 31, used to determine the message to be sent and the current remaining gate opening time of the target priority queue where the message to be sent is located;

[0080] A splitting module 32 is used to split the message to be sent into incomplete messages and remaining messages according to the remaining transmission data volume when it is determined according to the remaining door opening time of the gate control that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume satisfy a preset relationship;

[0081] The sending module 33 is used to send the incomplete message through the remaining gate opening time of the gating, and send the remaining message in the next gating time slice of the target priority queue.

[0082] It should be noted that the determination module 31 in this embodiment can be used to execute the above step S102, the splitting module 32 in this embodiment can be used to execute the above step S104, and the sending module 33 in this embodiment can be used to execute the above step S106.

[0083] Through the above module, the message to be sent can be truncated into incomplete messages and remaining messages, and can be sent in sequence, so as to achieve the purpose of making full use of the remaining door opening time of the door control, achieve the technical effect of making full use of bandwidth resources, and thus solve the problem of bandwidth waste existing in related technologies.

[0084] The device in this embodiment, in addition to the above-mentioned modules, may also include a module for executing any method in any of the embodiments of the aforementioned message sending method based on QBV scheduling.

[0085] According to another aspect of an embodiment of the present application, a message receiving device based on QBV scheduling is also provided for implementing the above-mentioned message receiving method based on QBV scheduling. Figure 4 is a structural block diagram of an optional QBV-based message receiving device according to an embodiment of the present application, such as Figure 4 As shown, the device may include:

[0086] The acquisition module 41 is used to parse the message when receiving the message;

[0087] A determination module 42, configured to cache the message when determining that the message is an incomplete message;

[0088] The merging module 43 is used to merge the remaining message with the corresponding incomplete message cached in advance when it is determined that the message is a remaining message, and process the merged message.

[0089] It should be noted that the acquisition module 41 in this embodiment can be used to execute the above step S202, the determination module 42 in this embodiment can be used to execute the above step S204, and the merging module 43 in this embodiment can be used to execute the above step S206.

[0090] The device in this embodiment, in addition to the above-mentioned modules, may also include a module for executing any method in any of the embodiments of the message receiving method based on QBV scheduling.

[0091] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can be run in a hardware environment that implements the method described in the above method embodiment, and can be implemented by software or hardware, wherein the hardware environment includes a network environment.

[0092] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned QBV scheduling-based message sending and receiving method is also provided. The electronic device may be a server, a terminal, or a combination thereof.

[0093] According to another embodiment of the present application, there is also provided an electronic device, including: Figure 5As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0094] Memory 1503, used for storing computer programs;

[0095] The processor 1501 is used to implement the following steps when executing the program stored in the memory 1503:

[0096] Step S102, determining the remaining gate opening time of the message to be sent and the target priority queue where the message to be sent is located.

[0097] Step S104, when it is determined according to the remaining gate opening time that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume satisfy a preset relationship, the message to be sent is split into incomplete messages and remaining messages according to the remaining transmission data volume.

[0098] Step S106, sending the incomplete message by gating the remaining gate opening time, and sending the remaining message in the next gating time slice of the target priority queue.

[0099] Step S202: When a message is received, the message is parsed.

[0100] Step S204: When it is determined that the message is an incomplete message, the message is cached.

[0101] Step S206: when it is determined that the message is a remaining message, the remaining message is merged with the corresponding incomplete message cached in advance, and the merged message is processed.

[0102] Optionally, in this embodiment, the above-mentioned communication bus can be a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above-mentioned electronic device and other devices.

[0103] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0104] As an example, the memory 1503 may include, but is not limited to, the determination module 31, the splitting module 32, and the sending module 33 in the message sending device based on QBV scheduling, and the acquisition module 41, the determination module 42, and the merging module 43 in the message receiving device based on QBV scheduling. In addition, other module units in the message sending device based on QBV scheduling and the message receiving device based on QBV scheduling may also be included but are not limited to, which will not be repeated in this example.

[0105] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0106] An embodiment of the present application further provides a computer-readable storage medium, the storage medium including a stored program, wherein the method steps of the above method embodiment are executed when the program is run.

[0107] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.

[0108] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0109] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0110] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0111] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.

[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0114] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A message sending method based on QBV scheduling, characterized in that: include: Determine the remaining gate opening time of the message to be sent and the target priority queue where the message to be sent is located; When it is determined according to the remaining gate opening time that the remaining transmission data amount is less than the target message length of the message to be sent, and the target message length and the remaining transmission data amount satisfy a preset relationship, splitting the message to be sent into incomplete messages and remaining messages according to the remaining transmission data amount; The incomplete message is sent through the remaining gate opening time of the gate, and the remaining message is sent in the next gate time slice of the target priority queue.

2. The method according to claim 1, characterized in that The preset relationship includes: The remaining transmission data amount is greater than or equal to the preset data amount; The difference between the message to be sent and the remaining transmission data amount is greater than or equal to the preset data amount.

3. The method according to claim 1, characterized in that Sending the incomplete message includes: Inverting the frame check sequence of the incomplete message to obtain an inverted frame check sequence, wherein the inverted frame check sequence is used to indicate that the incomplete message is not a complete message; The inverted frame check sequence is added to the incomplete message for message sending.

4. The method according to claim 1, characterized in that Sending the remaining messages includes: Determining a frame check sequence of the message to be sent; The frame check sequence is added to the remaining message for message sending.

5. A message receiving method based on QBV scheduling, characterized in that: include: When receiving a message, parse the message; When it is determined that the message is an incomplete message, caching the message; When it is determined that the message is a remaining message, the remaining message is merged with a corresponding incomplete message that is pre-cached, and the merged message is processed.

6. The method according to claim 5, characterized in that The parsing of the message includes: Determine whether the frame check sequence FCS carried by the received message is the same as the FCS of the message itself. If they are not the same, determine whether the carried FCS is the inversion of the FCS of the message itself. If it is the inversion, determine that the received message is the incomplete message; if it is not the inversion, determine that the received message is the remaining message.

7. The method according to claim 6, characterized in that The step of merging the remaining message with the corresponding incomplete message cached in advance and processing the merged message includes: Calculate the FCS of the combined message, and determine whether the combined FCS is the same as the FCS carried by the remaining messages. If they are the same, send the combined message to the next level for processing; if they are not the same, discard the combined message.

8. A message sending device based on QBV scheduling, characterized in that: include: A determination module, used to determine the message to be sent and the current remaining gate opening time of the target priority queue where the message to be sent is located; A splitting module, for splitting the message to be sent into incomplete messages and remaining messages according to the remaining transmission data volume, when it is determined according to the remaining door opening time of the gate control that the remaining transmission data volume is less than the target message length of the message to be sent, and the target message length and the remaining transmission data volume satisfy a preset relationship; The sending module is used to send the incomplete message through the remaining gate opening time of the gate, and send the remaining message in the next gated time slice of the target priority queue.

9. A message receiving device based on QBV scheduling, characterized in that: include: The acquisition module is used to parse the message when it is received; A determination module, configured to cache the message when determining that the message is an incomplete message; The merging module is used to merge the remaining message with the corresponding incomplete message cached in advance when it is determined that the message is a remaining message, and process the merged message.

10. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 7 by running the computer program stored in the memory.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.