A message transmission method and device, electronic equipment and storage medium
By modifying the MID of the Easymesh protocol message according to the message type priority and setting threshold of the retransmission queue in the FTTR network, the problem of affecting user experience after retransmission of ordinary services is solved, and the priority transmission of high-priority services is achieved, thereby improving user experience.
Patent Information
- Application Number
- CN202411423859.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In a fiber-to-the-room (FTTR) network, in the prior art, a transmitter may first retransmit Easymesh protocol messages for common services and then retransmit Easymesh protocol messages for important services, thereby affecting user service experience.
After the retransmission cycle, the sender selects and modifies the message identifier (MID) of the Easymesh protocol message based on the message type priority and set threshold of the retransmission queue to give priority to transmitting messages of high-priority services and ensure the processing timeliness of high-priority services.
By giving priority to the transmission of high-priority Easymesh protocol messages, the user's service experience is improved and the processing efficiency of high-priority services is guaranteed.
Smart Images

Figure CN119211155B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message transmission method, device, electronic device and storage medium. Background Art
[0002] In a fiber-to-the-room (FTTR) network, a master device and multiple slave devices are connected and interact with each other using the Easymesh protocol. When either the master or the slave acts as the sender, after sending an Easymesh protocol message of a specified message type to the other, the receiver, the receiver must send a corresponding reply message to the sender (the message identifier (MID) carried by the message is the same as the MID carried in the Easymesh protocol message). If the sender does not receive the corresponding reply message sent by the receiver, it must resend the Easymesh protocol message.
[0003] Currently, when the sender sends the Easymesh protocol message, it will copy a copy of the Easymesh protocol message and cache it at the end of the retransmission queue; if the sender receives a corresponding reply message within the retransmission period, it will delete the Easymesh protocol message whose MID is the same as the MID carried in the corresponding reply message from the retransmission queue; if the sender has not received the corresponding reply message after the retransmission period, when it needs to resend the Easymesh protocol message in the retransmission queue, it will copy a copy of the Easymesh protocol message and send it to the receiving end.
[0004] However, the above-mentioned message transmission method may cause the problem of retransmitting the Easymesh protocol message of the common service first and then retransmitting the Easymesh protocol message of the important service, thereby affecting the service experience of the user. Summary of the Invention
[0005] In order to overcome the problems existing in the related art, the present application provides a message transmission method, device, electronic device and storage medium.
[0006] According to a first aspect of an embodiment of the present application, a message transmission method is provided, the method being applied to a sending end, the method comprising:
[0007] After the retransmission period is reached, for each of the plurality of retransmission queues arranged in descending order of priority according to the corresponding message types, if there is a first Easymesh protocol message cached in the retransmission queue that is not marked as sent, determining whether a first total number value of the first Easymesh protocol message is not greater than a set threshold set for the message type corresponding to the retransmission queue;
[0008] If the judgment result is no, an Easymesh protocol message that meets the preset conditions is selected from the first Easymesh protocol message, and when it is determined that the message identifier (MID) carried in the selected Easymesh protocol message needs to be modified, the MID carried in the selected Easymesh protocol message is modified, the modified Easymesh protocol message is copied and sent to the corresponding receiving end, and the modified Easymesh protocol message in the retransmission queue is marked as sent;
[0009] Wherein, when the transmitting end is a master device in a fiber-to-the-room FTTR network, the corresponding receiving end is a slave device in the FTTR network that needs to receive the first Easymesh protocol message; or,
[0010] When the transmitting end is any slave device in the FTTR network, the corresponding receiving end is the master device in the FTTR network;
[0011] Any Easymesh protocol message in the retransmission queue is cached in the retransmission queue corresponding to the target message type when the sending end needs to send the Easymesh protocol message of the target message type to the corresponding receiving end;
[0012] The higher the priority corresponding to the message type corresponding to the retransmission queue, the higher the set threshold corresponding to the corresponding message type, and the larger the second total number value of the corresponding selected Easymesh protocol messages.
[0013] According to a second aspect of an embodiment of the present application, a message transmission device is provided, the device being applied to a sending end, the device comprising:
[0014] a judging module configured to, after a retransmission period is reached, for each of a plurality of retransmission queues arranged in descending order of priority according to corresponding message types, determine whether a first total number of first Easymesh protocol messages not marked as sent is not greater than a set threshold set for the message type corresponding to the retransmission queue if the retransmission queue caches a first Easymesh protocol message that has not been marked as sent;
[0015] a transmission module configured to, if the judgment result of the judgment module is no, select an Easymesh protocol message that meets a preset condition from the first Easymesh protocol message, and when it is determined that the MID carried in the selected Easymesh protocol message needs to be modified, modify the MID carried in the selected Easymesh protocol message, copy the modified Easymesh protocol message and send it to the corresponding receiving end, and mark the modified Easymesh protocol message in the retransmission queue as sent;
[0016] Wherein, when the transmitting end is a master device in a fiber-to-the-room FTTR network, the corresponding receiving end is a slave device in the FTTR network that needs to receive the first Easymesh protocol message; or,
[0017] When the transmitting end is any slave device in the FTTR network, the corresponding receiving end is the master device in the FTTR network;
[0018] Any Easymesh protocol message in the retransmission queue is cached in the retransmission queue corresponding to the target message type when the sending end needs to send the Easymesh protocol message of the target message type to the corresponding receiving end;
[0019] The higher the priority corresponding to the message type corresponding to the retransmission queue, the higher the set threshold corresponding to the corresponding message type, and the larger the second total number value of the corresponding selected Easymesh protocol messages.
[0020] According to the third aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method steps of the above-mentioned message transmission method.
[0021] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of the above-mentioned message transmission method are implemented.
[0022] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0023] In an embodiment of the present application, the sending end can give priority to transmitting the relevant Easymesh protocol messages in the corresponding retransmission queue based on the priority corresponding to the relevant message type to ensure the processing timeliness of high-priority services, thereby improving the user's service experience.
[0024] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] 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.
[0026] Figure 1 A flowchart of a message transmission method provided in an embodiment of the present application;
[0027] Figure 2 A schematic diagram of the FTTR network architecture provided in an embodiment of the present application;
[0028] Figure 3 A schematic structural diagram of a message transmission device provided in an embodiment of the present application;
[0029] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0031] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0032] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" or "if" as used herein may be interpreted as "when" or "when".
[0033] Next, the embodiments of the present application are described in detail.
[0034] The embodiment of the present application provides a message transmission method, characterized in that the method is applied to the sending end, such as Figure 1 As shown, the method may include the following steps:
[0035] S11. After the retransmission cycle is reached, for each of the multiple retransmission queues arranged in descending order of priority according to the corresponding message types, if the retransmission queue contains a first Easymesh protocol message that has not been marked as sent, determine whether the first total number value of the first Easymesh protocol message is not greater than the set threshold set for the message type corresponding to the retransmission queue; if the judgment result is yes, execute step S12; if the judgment result is no, execute step S13.
[0036] S12. When it is determined that the MID carried in the first Easymesh protocol message needs to be modified, the MID carried in the first Easymesh protocol message is modified, and the modified Easymesh protocol message is copied and sent to the corresponding receiving end, and the modified Easymesh protocol message in the retransmission queue is marked as sent; or, when it is determined that the MID carried in the first Easymesh protocol message does not need to be modified, the first Easymesh protocol message is copied and sent to the corresponding receiving end, and the first Easymesh protocol message in the retransmission queue is marked as sent.
[0037] S13. Select an Easymesh protocol message that meets a preset condition from the first Easymesh protocol message, and when it is determined that the message identifier MID carried in the selected Easymesh protocol message needs to be modified, modify the MID carried in the selected Easymesh protocol message, copy the modified Easymesh protocol message and send it to the corresponding receiving end, and mark the modified Easymesh protocol message in the retransmission queue as sent.
[0038] It should be noted that in the embodiment of the present application, when the sending end is the master device in the FTTR network, the corresponding receiving end is the slave device in the FTTR network that needs to receive the first Easymesh protocol message (it may be the same slave device or different slave devices).
[0039] Alternatively, when the transmitting end is any slave device in the FTTR network, the corresponding receiving end is the master device in the FTTR network.
[0040] Any Easymesh protocol message in the retransmission queue is cached in the retransmission queue corresponding to the target message type when the sending end needs to send the Easymesh protocol message of the target message type to the corresponding receiving end.
[0041] The higher the priority corresponding to the message type corresponding to the retransmission queue, the higher the set threshold corresponding to the corresponding message type, and the larger the second total number value of the corresponding selected Easymesh protocol messages.
[0042] That is, different retransmission queues correspond to different message types and have different priorities, and different thresholds are set for the message types corresponding to different retransmission queues.
[0043] Here, the administrator of the FTTR network can set the thresholds corresponding to the message types corresponding to different retransmission queues in advance based on network experience, and configure them on the sending end.
[0044] In addition, the administrator can also set the retransmission period in advance based on network experience and configure it on the sending end.
[0045] It should be further explained that, in an embodiment of the present application, for the sending end, it can be determined based on the existing message processing mechanism whether it is necessary to modify the MID carried in the first Easymesh protocol message or the selected Easymesh protocol message. When it is determined that the MID carried in the first Easymesh protocol message or the selected Easymesh protocol message needs to be modified, the MID carried in the first Easymesh protocol message or the selected Easymesh protocol message is modified to a new MID.
[0046] In addition, in the embodiment of the present application, for each retransmission queue, if there is no first Easymesh protocol message that has not been marked as sent cached in the retransmission queue, then no operation is performed.
[0047] Specifically, in the above step S13, when the sending end performs the step of selecting the Easymesh protocol message that meets the preset condition from the first Easymesh protocol message, it can be implemented in the following manner:
[0048] The first way: according to the order of the first Easymesh protocol messages in the cache, a set threshold number of Easymesh protocol messages set for the message type corresponding to the retransmission queue are selected from the first Easymesh protocol messages.
[0049] The second method: selecting a set threshold number of Easymesh protocol messages from the first Easymesh protocol messages according to the order of the first Easymesh protocol messages in the cache.
[0050] If there is no target Easymesh protocol message with a cache duration greater than the set duration set for the message type corresponding to the retransmission queue among the remaining first Easymesh protocol messages, the selected first Easymesh protocol message is determined as the Easymesh protocol message that meets the preset condition;
[0051] If there is a target Easymesh protocol message having a cache duration longer than a set duration in the remaining first Easymesh protocol messages, the selected Easymesh protocol message and the target Easymesh protocol message are determined as Easymesh protocol messages meeting a preset condition.
[0052] It should be noted that, in the embodiment of the present application, different retransmission queues correspond to different message types and corresponding cache durations.
[0053] Here, the administrator of the FTTR network can set the cache duration corresponding to the message type corresponding to different retransmission queues in advance based on network experience, and configure it on the sending end.
[0054] It should be further explained that, in an embodiment of the present application, the message types corresponding to the multiple retransmission queues may include a configuration message type, a query message type, a notification message type, a report message type, and a measurement message type.
[0055] Of course, the message types corresponding to the multiple retransmission queues may also include other message types, which are not listed here one by one.
[0056] Furthermore, in the embodiment of the present application, the sending end may also perform the following operations:
[0057] If a reply message to the second Easymesh protocol message is received, the Easymesh protocol message carrying the same MID as the MID carried in the reply message is deleted from the retransmission queue corresponding to the message type of the second Easymesh protocol message.
[0058] The above message transmission method is described in detail below with reference to specific embodiments.
[0059] like Figure 2As shown, the master device and the slave devices 1-5 can all provide wireless access services for wireless terminals, and the master device also communicates with the outdoor network and the slave devices 1-5. It is assumed that a retransmission queue corresponding to the configuration message type (denoted as retransmission queue 1), a retransmission queue corresponding to the query message type (denoted as retransmission queue 2), a retransmission queue corresponding to the notification message type (denoted as retransmission queue 3), a retransmission queue corresponding to the report message type (denoted as retransmission queue 4), and a retransmission queue corresponding to the measurement message type (denoted as retransmission queue 5) are configured on the master device side as the sending end.
[0060] And it is assumed that the priority corresponding to the configuration message type is higher than the priority corresponding to the query message type, the priority corresponding to the query message type is higher than the priority corresponding to the notification message type, the priority corresponding to the notification message type is higher than the priority corresponding to the report message type, and the priority corresponding to the report message type is higher than the priority corresponding to the measurement message type.
[0061] It is assumed that the set threshold value configured on the master device for the configuration message type is N1, the set threshold value configured for the query message type is N2, the set threshold value configured for the notification message type is N3, the set threshold value configured for the report message type is N4, and the set threshold value configured for the measurement message type is N5. Among them, N1>N2>N3>N4>N5.
[0062] It is assumed that the set time length configured on the master device for the configuration message type is time1, the set time length configured for the query message type is time2, the set time length configured for the notification message type is time3, the set time length configured for the report message type is time4, and the set threshold value configured for the measurement message type is time5. Among them, time5>time4>time3>time2>time1.
[0063] It is assumed that at time 1, the master device needs to send an Easymesh protocol packet 1 of the configuration message type to the slave device 1 (located in room 1) as the receiving end in the FTTR networking, the master device copies one copy of the Easymesh protocol packet 1, sends one copy of the Easymesh protocol packet 1 to the slave device 1, and buffers another copy of the Easymesh protocol packet 1 in the retransmission queue 1.
[0064] It is assumed that at time 2, the master device needs to send an Easymesh protocol packet 2 of the query message type to the slave device 1, the master device copies one copy of the Easymesh protocol packet 2, sends one copy of the Easymesh protocol packet 2 to the slave device 1, and buffers another copy of the Easymesh protocol packet 2 in the retransmission queue 2.
[0065] Assume that at time 3, the master device needs to send Easymesh protocol message 3 of notification message type to slave device 1. The master device copies a copy of Easymesh protocol message 3, sends a copy of Easymesh protocol message 3 to slave device 1, and stores another copy of Easymesh protocol message 3 in retransmission queue 3.
[0066] Assume that at time 4, the master device needs to send Easymesh protocol message 4 of report message type to slave device 1. The master device copies Easymesh protocol message 4, sends one Easymesh protocol message 4 to slave device 1, and caches another Easymesh protocol message 4 in retransmission queue 4.
[0067] Assume that at time 5, the master device needs to send Easymesh protocol message 5 of measurement message type to slave device 1. The master device copies a copy of Easymesh protocol message 5, sends a copy of Easymesh protocol message 5 to slave device 1, and caches another copy of Easymesh protocol message 5 in retransmission queue 5.
[0068] Next, assuming that a certain retransmission cycle is reached, for retransmission queue 1, assuming that there are first Easymesh protocol messages that are not marked as sent cached in retransmission queue 1, at this time, the master device determines whether the total number of first Easymesh protocol messages is not greater than N1.
[0069] Assuming that the judgment result is no, then the master device selects an Easymesh protocol message that meets the preset conditions from these first Easymesh protocol messages, and when it is determined that the MID carried in the selected Easymesh protocol message needs to be modified, the master device modifies the MID carried in the selected Easymesh protocol message, copies the modified Easymesh protocol message and sends it to the corresponding receiving end (for example, slave device 1), and marks the modified Easymesh protocol message in the retransmission queue 1 as sent.
[0070] Here, it is assumed that the second method mentioned above is used to select Easymesh protocol messages that meet the preset conditions. For example, the selected Easymesh protocol messages include N1 Easymesh protocol messages and M1 Easymesh protocol messages whose cache duration is greater than time1. These Easymesh protocol messages are arranged in the order of cache.
[0071] For the retransmission queue 2, assuming that there is no second Easymesh protocol message that has not been marked as sent buffered in the retransmission queue 2, the master device does not perform any operation.
[0072] For the retransmission queue 3, assuming that the retransmission queue 3 contains third Easymesh protocol messages that are not marked as sent, the master device determines whether the total number of third Easymesh protocol messages is not greater than N3.
[0073] Assume that the judgment result is yes and the third Easymesh protocol message does not need to be modified. In this case, the master device copies the third Easymesh protocol message and sends it to the corresponding receiving end (for example, slave device 1), and marks the third Easymesh protocol message in the retransmission queue 3 as sent.
[0074] For the retransmission queue 4, assuming that the retransmission queue 4 contains fourth Easymesh protocol messages that are not marked as sent, the master device determines whether the total number of the fourth Easymesh protocol messages is not greater than N4.
[0075] Assuming that the judgment result is no, then the master device selects an Easymesh protocol message that meets the preset conditions from these fourth Easymesh protocol messages, and when it is determined that there is no need to modify the MID carried in the selected Easymesh protocol message, it copies the selected Easymesh protocol message and sends it to the corresponding receiving end (for example, from device 1), and marks the selected Easymesh protocol message in the retransmission queue 4 as sent.
[0076] For the retransmission queue 5, assuming that the retransmission queue 5 contains fifth Easymesh protocol messages that are not marked as sent, the master device determines whether the total number of fifth Easymesh protocol messages is not greater than N5.
[0077] Assuming that the judgment result is no, then the master device selects an Easymesh protocol message that meets the preset conditions from these fifth Easymesh protocol messages, and when it is determined that the MID carried in the selected Easymesh protocol message needs to be modified, the master device modifies the MID carried in the selected Easymesh protocol message, copies the modified Easymesh protocol message and sends it to the corresponding receiving end (for example, from device 1), and marks the modified Easymesh protocol message in the retransmission queue 5 as sent.
[0078] Here, it is assumed that the second method mentioned above is used to select Easymesh protocol messages that meet the preset conditions. For example, the selected Easymesh protocol messages include N5 fifth Easymesh protocol messages and M5 fifth Easymesh protocol messages with a cache duration greater than time5. These fifth Easymesh protocol messages are arranged in the order of cache.
[0079] Subsequently, assuming that at time 6, the master device receives reply message 1 to Easymesh protocol message 1, the master device deletes the Easymesh protocol message carrying the same MID as the MID carried in reply message 1 from retransmission queue 1.
[0080] It can be seen from the above technical solution that in the embodiment of the present application, the sending end can give priority to transmitting the relevant Easymesh protocol messages in the corresponding retransmission queue based on the priority corresponding to the relevant message type, so as to ensure the processing timeliness of high-priority services, thereby improving the user's service experience.
[0081] Based on the same inventive concept, the present application also provides a message transmission device, which is applied to the sending end, and its structural diagram is as follows: Figure 3 As shown, specifically including:
[0082] The judging module 31 is configured to, after a retransmission period is reached, for each of a plurality of retransmission queues arranged in descending order of priority according to corresponding message types, determine whether a first total number of first Easymesh protocol messages that are not marked as sent is not greater than a set threshold set for the message type corresponding to the retransmission queue if the retransmission queue contains first Easymesh protocol messages that are not marked as sent;
[0083] The transmission module 32 is configured to, if the judgment result of the judgment module 31 is no, select an Easymesh protocol message that meets the preset conditions from the first Easymesh protocol message, and when it is determined that the message identifier MID carried in the selected Easymesh protocol message needs to be modified, modify the MID carried in the selected Easymesh protocol message, copy the modified Easymesh protocol message and send it to the corresponding receiving end, and mark the modified Easymesh protocol message in the retransmission queue as sent;
[0084] Wherein, when the transmitting end is a master device in a fiber-to-the-room FTTR network, the corresponding receiving end is a slave device in the FTTR network that needs to receive the first Easymesh protocol message; or,
[0085] When the transmitting end is any slave device in the FTTR network, the corresponding receiving end is the master device in the FTTR network;
[0086] Any Easymesh protocol message in the retransmission queue is cached in the retransmission queue corresponding to the target message type when the sending end needs to send the Easymesh protocol message of the target message type to the corresponding receiving end;
[0087] The higher the priority corresponding to the message type corresponding to the retransmission queue, the higher the set threshold corresponding to the corresponding message type, and the larger the second total number value of the corresponding selected Easymesh protocol messages.
[0088] Preferably, the transmission module 32 is further configured to:
[0089] If the judgment result of the judgment module 31 is yes, when it is determined that the MID carried in the first Easymesh protocol message needs to be modified, the MID carried in the first Easymesh protocol message is modified, and the modified Easymesh protocol message is copied and sent to the corresponding receiving end, and the modified Easymesh protocol message in the retransmission queue is marked as sent; or,
[0090] When it is determined that the MID carried in the first Easymesh protocol message does not need to be modified, the first Easymesh protocol message is copied and sent to the corresponding receiving end, and the first Easymesh protocol message in the retransmission queue is marked as sent.
[0091] Preferably, the transmission module 32 is further configured to:
[0092] After selecting an Easymesh protocol message that meets the preset conditions from the first Easymesh protocol message, if it is determined that the MID carried in the selected Easymesh protocol message does not need to be modified, the selected Easymesh protocol message is copied and sent to the corresponding receiving end, and the selected Easymesh protocol message in the retransmission queue is marked as sent.
[0093] Preferably, the device further comprises:
[0094] Delete module ( Figure 3 Not shown), for if a reply message is received for a second Easymesh protocol message, then deleting the Easymesh protocol message carrying the same MID as the MID carried in the reply message from the retransmission queue corresponding to the message type of the second Easymesh protocol message.
[0095] Preferably, the transmission module 32 is specifically used to:
[0096] selecting the set threshold number of Easymesh protocol messages from the first Easymesh protocol messages according to the order of the first Easymesh protocol messages cached; or,
[0097] selecting the set threshold number of first Easymesh protocol messages from the first Easymesh protocol messages according to the order of the cached first Easymesh protocol messages;
[0098] If there is no target Easymesh protocol message with a cache duration greater than the set duration set for the message type corresponding to the retransmission queue among the remaining first Easymesh protocol messages, the selected Easymesh protocol message is determined as the Easymesh protocol message that meets the preset condition;
[0099] If there is a target Easymesh protocol message with a cache duration greater than the set duration among the remaining first Easymesh protocol messages, the selected Easymesh protocol message and the target Easymesh protocol message are determined as Easymesh protocol messages that meet the preset conditions. As can be seen from the above technical solution, in the embodiment of the present application, the sending end can give priority to transmitting the relevant Easymesh protocol messages in the corresponding retransmission queue based on the priority corresponding to the relevant message type, so as to ensure the processing timeliness of high-priority services, thereby improving the user's service experience.
[0100] The present application also provides an electronic device, such as Figure 4 As shown, it includes a processor 41 and a machine-readable storage medium 42, the machine-readable storage medium 42 stores machine-executable instructions that can be executed by the processor 41, and the processor 41 is prompted by the machine-executable instructions to implement the steps of the above-mentioned message transmission method.
[0101] The machine-readable storage medium may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the machine-readable storage medium may be at least one storage device located remote from the processor.
[0102] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0103] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned message transmission method are implemented.
[0104] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A message transmission method, characterized in that: The method is applied to a transmitting end, and the method includes: After the retransmission period is reached, for each of the plurality of retransmission queues arranged in descending order of priority according to the corresponding message types, if there is a first Easymesh protocol message cached in the retransmission queue that is not marked as sent, determining whether a first total number value of the first Easymesh protocol message is not greater than a set threshold set for the message type corresponding to the retransmission queue; If the judgment result is no, an Easymesh protocol message that meets the preset conditions is selected from the first Easymesh protocol message, and when it is determined that the message identifier MID carried in the selected Easymesh protocol message needs to be modified, the MID carried in the selected Easymesh protocol message is modified, and the modified Easymesh protocol message is copied and sent to the corresponding receiving end, and the modified Easymesh protocol message in the retransmission queue is marked as sent; Wherein, when the transmitting end is a master device in a fiber-to-the-room FTTR network, the corresponding receiving end is a slave device in the FTTR network that needs to receive the first Easymesh protocol message; or, When the transmitting end is any slave device in the FTTR network, the corresponding receiving end is the master device in the FTTR network; Any Easymesh protocol message in the retransmission queue is cached in the retransmission queue corresponding to the target message type when the sending end needs to send the Easymesh protocol message of the target message type to the corresponding receiving end; The higher the priority of the message type corresponding to the retransmission queue, the higher the set threshold of the corresponding message type, and the larger the second total number value of the selected Easymesh protocol message; Selecting an Easymesh protocol message that meets a preset condition from the first Easymesh protocol message specifically includes: selecting the set threshold number of Easymesh protocol messages from the first Easymesh protocol messages according to the order of the first Easymesh protocol messages cached; or, selecting the set threshold number of first Easymesh protocol messages from the first Easymesh protocol messages according to the order of the cached first Easymesh protocol messages; If there is no target Easymesh protocol message with a cache duration greater than the set duration set for the message type corresponding to the retransmission queue among the remaining first Easymesh protocol messages, the selected Easymesh protocol message is determined as the Easymesh protocol message that meets the preset condition; If there is a target Easymesh protocol message with a cache duration longer than the set duration in the remaining first Easymesh protocol messages, the selected Easymesh protocol message and the target Easymesh protocol message are determined as Easymesh protocol messages that meet the preset condition.
2. The method according to claim 1, characterized in that The method further comprises: If the judgment result is yes, when it is determined that the MID carried in the first Easymesh protocol message needs to be modified, the MID carried in the first Easymesh protocol message is modified, and the modified Easymesh protocol message is copied and sent to the corresponding receiving end, and the modified Easymesh protocol message in the retransmission queue is marked as sent; or, When it is determined that the MID carried in the first Easymesh protocol message does not need to be modified, the first Easymesh protocol message is copied and sent to the corresponding receiving end, and the first Easymesh protocol message in the retransmission queue is marked as sent.
3. The method according to claim 1, characterized in that The method further comprises: After selecting an Easymesh protocol message that meets the preset conditions from the first Easymesh protocol message, if it is determined that the MID carried in the selected Easymesh protocol message does not need to be modified, the selected Easymesh protocol message is copied and sent to the corresponding receiving end, and the selected Easymesh protocol message in the retransmission queue is marked as sent.
4. The method according to claim 1, wherein The method further comprises: If a reply message to the second Easymesh protocol message is received, the Easymesh protocol message carrying the same MID as the MID carried in the reply message is deleted from the retransmission queue corresponding to the message type of the second Easymesh protocol message.
5. A message transmission device, characterized in that: The device is applied to a transmitting end, and includes: a judging module configured to, after a retransmission period is reached, for each of a plurality of retransmission queues arranged in descending order of priority according to corresponding message types, determine whether a first total number of first Easymesh protocol messages not marked as sent is not greater than a set threshold set for the message type corresponding to the retransmission queue if the retransmission queue caches a first Easymesh protocol message that has not been marked as sent; a transmission module configured to, if the judgment result of the judgment module is no, select an Easymesh protocol message that meets a preset condition from the first Easymesh protocol message, and when it is determined that the message identifier MID carried in the selected Easymesh protocol message needs to be modified, modify the MID carried in the selected Easymesh protocol message, copy the modified Easymesh protocol message and send it to the corresponding receiving end, and mark the modified Easymesh protocol message in the retransmission queue as sent; Wherein, when the transmitting end is a master device in a fiber-to-the-room FTTR network, the corresponding receiving end is a slave device in the FTTR network that needs to receive the first Easymesh protocol message; or, When the transmitting end is any slave device in the FTTR network, the corresponding receiving end is the master device in the FTTR network; Any Easymesh protocol message in the retransmission queue is cached in the retransmission queue corresponding to the target message type when the sending end needs to send the Easymesh protocol message of the target message type to the corresponding receiving end; The higher the priority of the message type corresponding to the retransmission queue, the higher the set threshold of the corresponding message type, and the larger the second total number value of the selected Easymesh protocol message; The transmission module is specifically used to: selecting the set threshold number of Easymesh protocol messages from the first Easymesh protocol messages according to the order of the first Easymesh protocol messages cached; or, selecting the set threshold number of first Easymesh protocol messages from the first Easymesh protocol messages according to the order of the cached first Easymesh protocol messages; If there is no target Easymesh protocol message with a cache duration greater than the set duration set for the message type corresponding to the retransmission queue among the remaining first Easymesh protocol messages, the selected Easymesh protocol message is determined as the Easymesh protocol message that meets the preset condition; If there is a target Easymesh protocol message with a cache duration longer than the set duration in the remaining first Easymesh protocol messages, the selected Easymesh protocol message and the target Easymesh protocol message are determined as Easymesh protocol messages that meet the preset condition.
6. The device according to claim 5, characterized in that The transmission module is further configured to: If the judgment result of the judgment module is yes, when it is determined that the MID carried in the first Easymesh protocol message needs to be modified, the MID carried in the first Easymesh protocol message is modified, and the modified Easymesh protocol message is copied and sent to the corresponding receiving end, and the modified Easymesh protocol message in the retransmission queue is marked as sent; or, When it is determined that the MID carried in the first Easymesh protocol message does not need to be modified, the first Easymesh protocol message is copied and sent to the corresponding receiving end, and the first Easymesh protocol message in the retransmission queue is marked as sent.
7. The device according to claim 5, characterized in that The transmission module is further configured to: After selecting an Easymesh protocol message that meets the preset conditions from the first Easymesh protocol message, if it is determined that the MID carried in the selected Easymesh protocol message does not need to be modified, the selected Easymesh protocol message is copied and sent to the corresponding receiving end, and the selected Easymesh protocol message in the retransmission queue is marked as sent.
8. The device according to claim 5, characterized in that The device further comprises: The deleting module is configured to delete, if a reply message to the second Easymesh protocol message is received, the Easymesh protocol message carrying the same MID as the MID carried in the reply message from the retransmission queue corresponding to the message type of the second Easymesh protocol message.
9. An electronic device, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method steps according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Adaptive end-to-end network coding transmission method
CN107508655A
Message order-preserving transmission method, chip and electronic equipment
CN118316888A