Message transmission system, message transmission method, apparatus, and medium
By introducing a message processing protocol stack and broadcast components in the message sending system, the problems of low message transmission efficiency and high risk of message flooding in the prior art are solved, efficient and reliable message transmission is achieved, and the delay and synchronization rate of multi-device control are optimized.
Patent Information
- Application Number
- CN202311658414.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art is inefficient when sending messages, and the messages to be sent need to be queued, and the risk of being submerged is high.
A message sending system is proposed, including a message processing protocol stack and broadcast components. The message processing protocol stack continuously obtains the target broadcast channel set that meets the message transmission conditions by continuously obtaining the target broadcast channel set that meets the message transmission conditions, and obtains the target message set from the candidate message queue according to the number of channels, and transmits it to the target broadcast channel in sequence. The broadcast component is used to send the target message to the corresponding target terminal through the target channel that receives the target message.
The transmission efficiency of messages is improved, the mixing between messages to be sent and messages being sent is reduced, and the possibility that messages to be sent are submerged, thereby improving the hit rate and success rate of message transmission, and optimizing the delay and synchronization rate of multi-device control.
Smart Images

Figure CN120111447A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a message sending system, a message sending method, a device and a medium. Background Art
[0002] With the development of technology, the user side can control multiple devices by inputting control instructions. In related technologies, the instruction message in the control instruction can be sent to the corresponding device based on a single broadcast channel in the form of queue sending, thereby realizing the control of multiple devices. However, when sending messages based on this method, the messages to be sent need to wait in queue, and the sending efficiency is poor.
[0003] Optionally, the command message in the control command can also be sent in the form of intermittent transmission through the broadcast channel. However, when the message is sent by this method, each message transmission needs to occupy the host's resources, and when the message is sent based on this method, there is a certain degree of mixing between the messages to be sent and the messages being sent, which causes the risk that the messages to be sent may be submerged.
[0004] Therefore, how to improve the efficiency of message sending is very important. Summary of the invention
[0005] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0006] To this end, a first aspect of the present disclosure proposes a message sending system.
[0007] A second aspect of the present disclosure provides a message sending method.
[0008] A third aspect of the present disclosure provides an electronic device.
[0009] A fourth aspect of the present disclosure provides a computer-readable storage medium.
[0010] The first aspect of the present disclosure proposes a message sending system, which includes: a message processing protocol stack and a broadcast component, wherein the message processing protocol stack is used to continuously obtain a target channel set of the candidate broadcast channel set that meets the message sending conditions, and obtain a target message set from the candidate message queue to be sent according to the number of channels in the target channel set; and transmit each target message in the target message set to each target broadcast channel in the target broadcast channel set in sequence; for any target message, the broadcast component is used to send the target message to the corresponding target terminal by receiving the target channel of the target message.
[0011] In addition, the message sending system proposed in the first aspect of the present disclosure may also have the following additional technical features:
[0012] According to one embodiment of the present disclosure, the message processing protocol stack is also used to: read the first source address and the first destination address of each first candidate message in the candidate message queue, and determine the first priority scale of each first candidate message based on the first source address and the first destination address; obtain the number of channels of the target broadcast channel set; based on the order of scale values from high to low, obtain multiple second priority scales of the number of channels from each first priority scale, and obtain the target message set in the candidate message queue based on the multiple second priority scales.
[0013] According to one embodiment of the present disclosure, the message processing protocol stack is also used to: obtain a new second candidate message and read the second source address and the second target address of the second candidate message to determine the third priority scale of the second candidate message based on the second source address and the second target address; in response to the scale value of the third priority scale being greater than or equal to the scale value of any second priority scale among the multiple second priority scales, update the target message set according to the second candidate message.
[0014] According to one embodiment of the present disclosure, the message processing protocol stack is also used to: in response to the scale value of the third priority scale being greater than the scale value of each of the multiple second priority scales, update the second candidate message to the target message set to obtain a new target message set, and determine that the second candidate message is executed first in the new target message set.
[0015] According to one embodiment of the present disclosure, the message processing protocol stack is also used to: in response to the scale value of the third priority scale being equal to the scale value of any second priority scale among the multiple second priority scales, update the second candidate message to the target message set to obtain a new target message set, and determine that the execution order of the second candidate message in the new target message set is after the first candidate message corresponding to the second priority scale.
[0016] According to one embodiment of the present disclosure, the message processing protocol stack is also used to: monitor the sending status of each candidate broadcast channel in the candidate broadcast channel set, and identify whether there is at least one idle channel in the candidate broadcast channel set based on the sending status; in response to identifying that there is at least one idle channel in the candidate broadcast channel set, determine that the candidate broadcast channel set meets the message sending condition.
[0017] According to an embodiment of the present disclosure, the message processing protocol stack is further used to: for any target message, obtain a target broadcast channel for sending the target message from the at least one idle channel, and transmit the target message to the target broadcast channel.
[0018] The second aspect of the present disclosure proposes a message sending method, which includes: continuously obtaining a target broadcast channel set that meets a message sending condition and the number of channels of the target broadcast channel set from a candidate broadcast channel set through a message protocol processing stack; obtaining a priority scale of each candidate message in a candidate message queue to be sent through a message protocol processing stack, and determining a target message set to be sent from the candidate message queue according to the priority scale and the number of channels; for any target message, transmitting the target message to the target broadcast channel set through the message protocol processing stack, and sending the target message transmitted to the target broadcast channel set to the target terminal through the broadcast component.
[0019] The third aspect of the present disclosure proposes an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute instructions to implement the message sending method proposed in the second aspect above.
[0020] A fourth aspect of the present disclosure proposes a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the message sending method proposed in the second aspect above.
[0021] The message sending system and message sending method proposed in the present disclosure include a message processing protocol stack, which is used to continuously obtain a target broadcast channel set whose broadcast channel set meets the message sending conditions, and obtain the target message set from the candidate message queue to be sent according to the number of channels in the target broadcast channel set; and, transmit each target message in the target message set to each target broadcast channel in the target broadcast channel set in sequence; for any target message, the broadcast component is used to send the target message to the corresponding target terminal through the target channel receiving the target message. In the present disclosure, the target broadcast channel set in the candidate broadcast channel set is continuously obtained through the message processing protocol stack, and the synchronous sending of multiple target messages is realized through the target broadcast channel set, which reduces the waiting time between two adjacent target messages to be sent, improves the message sending efficiency, obtains the target message set in the candidate message queue through the message processing protocol stack, avoids the mixing between the candidate message to be sent and the message being sent, reduces the possibility of the candidate message to be sent being submerged, and thus reduces the possibility of message loss, improves the hit rate and success rate of message sending, and optimizes the delay of device control in the scenario of multi-device control through message sending, improves the synchronization rate between multiple devices, and optimizes the user's device control experience.
[0022] It should be understood that the contents described in the present disclosure are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0024] Figure 1 A schematic diagram of a message sending system according to an embodiment of the present disclosure;
[0025] Figure 2 A schematic diagram of a message sending system according to another embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram of a target message acquisition method according to an embodiment of the present disclosure;
[0027] Figure 4 A schematic diagram of a flow chart of a method for acquiring a target broadcast channel set according to an embodiment of the present disclosure;
[0028] Figure 5 A schematic diagram of a message sending method according to an embodiment of the present disclosure;
[0029] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0031] A message sending system, message sending method, device and medium proposed in the embodiments of the present disclosure are described below with reference to the accompanying drawings.
[0032] Figure 1 Schematic diagram of a message sending system according to an embodiment of the present disclosure. Figure 1 As shown, the message sending system 100 includes a message processing protocol stack 11 and a broadcast component 12, wherein:
[0033] The message processing protocol stack 11 is used to continuously obtain a target broadcast channel set that meets the message sending condition from the candidate broadcast channel set, and obtain the target message set from the candidate message queue to be sent according to the number of channels in the target broadcast channel set.
[0034] And, each target message in the target message set is transmitted to each target broadcast channel in the target broadcast channel set in sequence.
[0035] For any target message, the broadcast component 12 is used to send the target message to the corresponding target terminal through the target channel that receives the target message.
[0036] like Figure 1 As shown, the message sending system 100 may include Figure 1 A messaging protocol stack 11 and a broadcast component 12 are shown.
[0037] In the embodiment of the present disclosure, the message sending protocol stack 11 can continuously monitor the channel parameters of the candidate broadcast channel set preconfigured in the message sending system 100, and mark the channels in the monitored candidate broadcast channel set that can meet the message sending conditions in the candidate message queue as target broadcast channels in the candidate broadcast channel set, and mark the set composed of this part of the target broadcast channels as the target broadcast channel set in the candidate broadcast channel set.
[0038] It can be understood that when the target message is transmitted on the channel, the broadcast channel has corresponding message sending conditions. For any candidate broadcast channel, when the message sending protocol stack 11 determines that the candidate broadcast channel has the conditions for sending the target message to the target terminal based on the monitored parameters, it can be determined that the candidate broadcast channel is the target broadcast channel that meets the message sending conditions.
[0039] Optionally, there is a candidate message queue to be sent in the message sending system 100. The message processing protocol stack 11 can select the message currently needed to be sent from the candidate message queue as the target message, and transmit the target message to the corresponding target broadcast channel, thereby realizing the transmission of the target message to the target terminal through the target broadcast channel.
[0040] In this scenario, for any target message, the broadcast component 12 can transmit the target message to the corresponding target terminal through the target broadcast channel of the received target message.
[0041] As an example, Figure 2 As shown, set Figure 2 The message 1 shown is the target message in the candidate message queue, which can be Figure 2 The message processing protocol stack shown identifies Figure 2 It shows whether broadcast channel 21, broadcast channel 22 and broadcast channel 23 in the candidate broadcast channel set meet the message sending condition of the target message.
[0042] In this scenario, if broadcast channel 21 satisfies the message sending condition of the target message, the message processing protocol stack can determine broadcast channel 21 as the target broadcast channel of message 1 and send Figure 2 The message 1 shown is transmitted to the broadcast channel 21 as the target broadcast channel, and then the transmission of the message 1 is achieved through the broadcast channel 21 as the target broadcast channel in the broadcast channel set.
[0043] It should be noted that in the embodiments of the present disclosure, the message processing protocol stack in the message sending system can realize continuous monitoring of whether the set of candidate broadcast channels meets the message sending conditions, and when the target broadcast channel that meets the message sending conditions is monitored, the target message is immediately transmitted to the corresponding target broadcast channel. In this scenario, when the message processing protocol stack recognizes the existence of the target broadcast channel, there will be no waiting action. It can be understood that when the message processing protocol stack recognizes the existence of the target broadcast channel, the target message can be transmitted to the target broadcast channel, and the target broadcast channel will not be in an idle state for a set time interval.
[0044] The message sending system proposed in the present disclosure includes a message processing protocol stack, which is used to continuously obtain a target broadcast channel set of a candidate broadcast channel set that meets the message sending conditions, and obtain the target message set from the candidate message queue to be sent according to the number of channels in the target broadcast channel set; and, each target message in the target message set is transmitted to each target broadcast channel in the target broadcast channel set in sequence; for any target message, the broadcast component is used to send the target message to the corresponding target terminal through the target channel receiving the target message. In the present disclosure, the target broadcast channel set in the candidate broadcast channel set is continuously obtained through the message processing protocol stack, and the synchronous sending of multiple target messages is realized through the target broadcast channel set, which reduces the waiting time between two adjacent target messages to be sent, improves the message sending efficiency, obtains the target message set in the candidate message queue through the message processing protocol stack, avoids the mixing between the message to be sent and the message being sent, reduces the possibility of the candidate message to be sent being submerged, and thus reduces the possibility of the message being lost, improves the hit rate and success rate of message sending, and in the scenario of multi-device control through message sending, optimizes the device control delay, improves the synchronization rate between multiple devices, and optimizes the user's device control experience.
[0045] In the above embodiment, regarding the process of obtaining the target message set in the candidate message queue by the message processing protocol stack, see Figure 3 Further understanding, Figure 3 FIG. 1 is a flow chart of a method for acquiring a target message according to an embodiment of the present disclosure. Figure 3 As shown, the method includes:
[0046] S301, reading a first source address and a first target address of each first candidate message in a candidate message queue, and determining a first priority scale of each first candidate message according to the first source address and the first target address.
[0047] In an embodiment of the present disclosure, a message that has been placed in a candidate message queue can be marked as the first candidate message in the candidate message queue, wherein the first candidate message has a corresponding source address and target address, and it can be marked as the first source address and the first target address of the first candidate message.
[0048] In this scenario, the message processing protocol stack may determine the sending priority of the first candidate message according to the first source address and the first destination address of the first candidate message.
[0049] Optionally, the sending priority of the message may be represented by a priority scale, wherein the scale of the sending priority of the first candidate message may be marked as the first priority scale of the first candidate message.
[0050] As an example, the priority scale has a corresponding scale interval, which can be set to [0, 255]. The first source address and the first target address of the first candidate message can be algorithmically processed by the priority scale determination algorithm in the related technology, and then the first priority scale of the first candidate message can be determined according to the result of the algorithm processing.
[0051] S302: Obtain the number of channels in the target broadcast channel set.
[0052] In the embodiment of the present disclosure, there are multiple broadcast channels in the target broadcast channel set, and the number of channels included in the target broadcast channel set can be obtained through the message processing protocol stack and marked as the channel number.
[0053] As an example, Figure 2 As shown, set Figure 2 In the candidate broadcast channel set consisting of broadcast channel 21, broadcast channel 22 and broadcast channel 23 shown, broadcast channel 21 and broadcast channel 22 are target broadcast channels that meet the message sending conditions. It can be known from the message processing protocol stack that the number of channels in the target broadcast channel set is 2.
[0054] S303, based on the order of scale values from high to low, obtain multiple second priority scales of the number of channels from each first priority scale, and obtain a target message set in the candidate message queue according to the multiple second priority scales.
[0055] In the disclosed embodiment, the message processing protocol stack may evaluate the sending priority of the first candidate message by taking the value of the first priority scale.
[0056] Optionally, based on the order of scale values from high to low, multiple first priority scales of the same number as the number of channels can be obtained from each first priority scale and marked as multiple second priority scales. It can be understood that, for any first priority scale and second priority scale, the sending priority of the first candidate message corresponding to the second priority scale is higher than the first candidate message corresponding to the first priority scale.
[0057] In this scenario, for any second priority scale, the first candidate message corresponding to the second priority scale in the candidate message queue can be determined as the target message, thereby obtaining multiple target messages among multiple first candidate messages, and the set consisting of the multiple target messages can be marked as a target message set.
[0058] It should be noted that the message processing protocol stack may receive a new candidate message. In this scenario, the message processing protocol stack can obtain a new second candidate message and read the second source address and the second target address of the second candidate message to determine the third priority scale of the second candidate message based on the second source address and the second target address.
[0059] In the disclosed embodiment, a new candidate message received by the message processing protocol stack may be marked as a second candidate message, wherein the source address and the target address of the second candidate message may be marked as a second source address and a second target address.
[0060] In this scenario, the message processing protocol stack can evaluate the sending priority of the second candidate message based on the second source address and the second target address, wherein the second source address and the second target address can be algorithmically processed according to the priority scale algorithm in the relevant technology to obtain the third priority scale of the second candidate message.
[0061] Optionally, in response to a scale value of the third priority scale being greater than or equal to a scale value of any second priority scale among a plurality of second priority scales, the target message set is updated according to the second candidate message.
[0062] In an embodiment of the present disclosure, when any scale value of the second priority scale of each target message set is smaller than the scale value of the third priority scale, it can be determined that the sending priority of the new second candidate message obtained by the message protocol processing stack is higher than the remaining first candidate messages that are not marked as target messages.
[0063] In this scenario, the target message set can be updated according to the new second candidate message, wherein the new second candidate message can be added to the target message set as a new target message, and the sorting position of the new target message in the target message set can be determined according to the third priority scale, thereby obtaining a new target message set.
[0064] Optionally, in response to the scale value of the third priority scale being greater than the scale values of each of the multiple second priority scales, the second candidate message is updated to the target message set to obtain a new target message set, and the second candidate message is determined to be the first in the execution order in the new target message set.
[0065] When the scale value of the third priority scale is greater than the scale values of each of the multiple second priority scales, it can be understood that the scale value of the third priority scale is higher than all the messages in the target message set. In this scenario, it can be determined that the priority of the new second candidate message obtained by the message processing protocol stack is higher than all the messages in the target message set.
[0066] Furthermore, the new second candidate message may be updated to the target message set, and its execution order in the target message set is determined to be the first.
[0067] Optionally, in response to the scale value of the third priority scale being equal to the scale value of any second priority scale among multiple second priority scales, the second candidate message is updated to the target message set to obtain a new target message set, and the execution order of the second candidate message in the new target message set is determined to be after the first candidate message corresponding to the second priority scale.
[0068] In the embodiment of the present disclosure, the scale value of the third priority scale may be the same as the scale value of any second priority scale among multiple second priority scales. In this scenario, it can be determined that the sending priority of the new second candidate message obtained by the message protocol processing stack is higher than the remaining first candidate messages that are not marked as target messages.
[0069] Furthermore, the second candidate message can be updated to the target message set, and based on a first-in first-out (FIFO) sorting strategy, the position of the first candidate message corresponding to the second priority scale in the target message set is obtained, and the second candidate message is updated to the next execution order position after this position, thereby obtaining a new target message set.
[0070] The message sending system proposed in the present disclosure includes a message processing protocol stack, wherein the message processing protocol stack can read the first priority scale of each first candidate message in the candidate message queue, and the number of channels in the target broadcast channel set, and obtain multiple second priority scales of the number of channels from each first priority scale based on the order of the scale values from high to low, so as to obtain the target message set in the candidate message queue. In the present disclosure, the priority scale of the candidate message is identified by the message processing protocol stack to determine the sending order of each candidate message, thereby obtaining the target message set, and the separate processing of the message is realized through the setting of the message processing protocol stack, avoiding the mixing between the message to be sent and the message being sent, reducing the possibility of the message to be sent being submerged, and improving the success rate and hit rate of message sending.
[0071] In the above embodiment, the acquisition of the target broadcast channel set in the candidate broadcast channel set can be combined with Figure 4 Further understanding, Figure 4 FIG. 1 is a flow chart of a method for acquiring a target broadcast channel set according to an embodiment of the present disclosure. Figure 4 As shown, the method includes:
[0072] S401 : monitoring the transmission state of each candidate broadcast channel in the candidate broadcast channel set, and identifying whether there is at least one idle channel in the candidate broadcast channel set according to the transmission state.
[0073] In the disclosed embodiment, the sending status of each candidate broadcast channel can be monitored through the message protocol processing stack, and whether each candidate broadcast channel is in an idle state can be identified based on the monitored data.
[0074] In this scenario, the channels in the candidate broadcast channels identified by the message processing protocol stack that are in an idle state may be marked as idle channels, thereby obtaining at least one idle channel in the candidate broadcast channel set.
[0075] S402: In response to identifying that there is at least one idle channel in the candidate broadcast channel set, determining that the candidate broadcast channel set meets a message sending condition.
[0076] In the embodiment of the present disclosure, when the message processing protocol stack recognizes that there is at least one idle channel in the candidate broadcast channel set, it can be understood that there is a channel in the current candidate broadcast channel set that can send the target message.
[0077] In this scenario, it can be determined that the candidate broadcast channel set meets the message sending conditions of the candidate message queue.
[0078] S403: For any target message, obtain a target broadcast channel for sending the target message from at least one idle channel, and transmit the target message to the target broadcast channel.
[0079] In the disclosed embodiment, for any idle channel, one target message may be sent in each message sending round.
[0080] In this scenario, for any target message, a broadcast channel may be screened out from at least one idle channel as a broadcast channel for sending the target message, and the broadcast channel may be marked as a target broadcast channel for the target message.
[0081] Optionally, the message protocol processing stack may transmit the target message to its corresponding target broadcast channel, and send the target message to the corresponding target terminal through the target broadcast channel.
[0082] The message sending system proposed in the present disclosure includes a message processing protocol stack, wherein the message processing protocol stack can monitor the sending status of each candidate broadcast channel in the candidate broadcast channel set, thereby identifying whether there is at least one idle channel in the candidate broadcast channel set, and when it is identified that there is at least one idle channel, it is determined that the candidate broadcast channel set meets the message sending conditions. Optionally, for any target message, the target broadcast channel of the target message is determined from at least one idle channel, and the target message is transmitted to the target broadcast channel. In the present disclosure, the sending status of the candidate broadcast channel set is monitored by the message processing protocol stack, thereby identifying whether the candidate broadcast channel set meets the message sending conditions, and when it is identified that the candidate broadcast channel meets the message sending conditions, the target message is transmitted to the corresponding target broadcast channel. The monitoring of the broadcast channel status and the transmission of the target message to the broadcast channel are realized only through the message processing protocol stack, which reduces the resource occupancy rate of the host to which the message sending system belongs for the broadcast channel status monitoring and the target message transmission to the broadcast channel, and improves the message processing efficiency.
[0083] The present disclosure also proposes a message sending method, which can be combined with Figure 5 , Figure 5 FIG. 1 is a flow chart of a message sending method according to an embodiment of the present disclosure. Figure 5 As shown, the method includes:
[0084] S501, continuously acquiring, through a message protocol processing stack, a target broadcast channel set whose candidate broadcast channel set satisfies a message sending condition, and the number of channels in the target broadcast channel set.
[0085] In the embodiment of the present disclosure, the target broadcast channel set that meets the message sending condition in the candidate broadcast channel set and the number of the target broadcast channel sets can be continuously monitored through the message processing protocol stack.
[0086] As an example, Figure 2 As shown, it can be Figure 2 The message processing protocol stack is shown to monitor Figure 2 The target broadcast channel set that meets the message sending condition in the candidate broadcast channel set consisting of broadcast channel 21, broadcast channel 22 and broadcast channel 23 is shown, as well as the corresponding channel quantity.
[0087] S502, obtaining the priority scale of each candidate message in the candidate message queue to be sent through the message protocol processing stack, and determining a target message set to be sent from the candidate message queue according to the priority scale and the number of channels.
[0088] As an example, Figure 2 As shown, it can be Figure 2 The message processing protocol stack shown receives Figure 2 The network node shown transmits a candidate message and reads the source address and the target address of the candidate message to obtain the priority scale of the candidate message.
[0089] Further, according to the priority scale of the candidate message and the priority scales of the candidate messages already placed in the candidate message queue, determine Figure 2 The sorting position of the candidate messages shown in the candidate message queue is obtained, thereby obtaining the candidate message queue to be sent.
[0090] In the disclosed embodiment, the message processing protocol stack may obtain the source address and the target address of each candidate message in the candidate message queue, thereby obtaining the priority scale of each candidate message.
[0091] Optionally, based on the order of priority scale from high to low, multiple messages of the number of channels may be acquired from each candidate message as multiple target messages, thereby obtaining a target message set consisting of the multiple target messages.
[0092] It should be noted that when the priority scale of the new candidate message received by the message processing protocol stack meets the screening condition of the target message set in the current candidate message queue, the new candidate message can be updated to the target message set, thereby achieving timely sending of high-priority messages.
[0093] S503: For any target message, the target message is transmitted to the target broadcast channel set through the message protocol processing stack, and the target message transmitted to the target broadcast channel set is sent to the target terminal through the broadcast component.
[0094] As an example, Figure 2 As shown, set Figure 2 Message 1, Message 2, and Message 3 are shown as a target message set.
[0095] Optionally, by Figure 2 The message processing protocol stack shown sends message 1 in the target passive set to broadcast channel 21 in the target broadcast channel set, message 2 in the target passive set to broadcast channel 22 in the target broadcast channel set, and message 3 in the target passive set to broadcast channel 23 in the target broadcast channel set.
[0096] It should be noted that the message processing protocol stack can continuously monitor the sending status of the candidate broadcast channel set, such as Figure 2 As shown, when the message processing protocol stack recognizes that message 1 on the broadcast channel 21 is sent, message 4 in the new target message set in the candidate message queue can be transmitted to the broadcast channel 21 to send message 4 to the corresponding target terminal.
[0097] Accordingly, when the message protocol processing stack recognizes that the message 2 on the broadcast channel 22 has been sent, the message 5 in the new target message set in the candidate message queue can be transmitted to the broadcast channel 22 to send the message 5 to the corresponding target terminal.
[0098] Furthermore, when the message protocol processing stack recognizes that the message 3 on the broadcast channel 23 has been sent, the message 6 in the new target message set in the candidate message queue can be transmitted to the broadcast channel 23 to send the message 6 to the corresponding target terminal.
[0099] The message sending method proposed in the present disclosure continuously obtains the target broadcast channel set and the number of channels of the target broadcast channel set that meet the message sending conditions in the candidate broadcast channel set through the message processing protocol stack, and optionally obtains the priority scale of each candidate message in the candidate message queue, and obtains the target message set from each candidate message according to the priority scale and the number of channels, and transmits any target message to the corresponding target broadcast channel to transmit the target message to the target terminal through the target broadcast channel. In the present disclosure, the waiting time for sending multiple target messages is shortened and the message sending efficiency is improved by continuously obtaining the target broadcast channel set and sending information of multiple broadcast channels through the message processing protocol stack. The setting of the message processing protocol stack avoids the mixing of messages to be sent and messages being sent, reduces the possibility of messages to be sent being submerged, and thus reduces the possibility of message loss, improves the hit rate and success rate of message sending, and optimizes the delay of device control in the scenario of controlling multiple devices through message sending, improves the synchronization rate between multiple devices, and optimizes the user's device control experience.
[0100] To achieve the above embodiments, the present disclosure also provides an electronic device, a computer-readable storage medium, and a computer program product.
[0101] Figure 6 is a block diagram of an electronic device 600 according to an embodiment of the present disclosure, as shown in Figure 6 As shown, the electronic device 600 includes a memory 61, a processor 62, and a computer program stored in the memory 61 and executable on the processor 62. When the processor 62 executes the program instructions, the message sending system applicable to the server provided in the above embodiment is implemented.
[0102] The message sending system proposed in the present disclosure includes a message processing protocol stack, which is used to continuously obtain a target broadcast channel set that satisfies the message sending condition of the broadcast channel set, and obtain the target message set from the candidate message queue to be sent according to the number of channels of the target broadcast channel set; and, transmit each target message in the target message set to each target broadcast channel in the target broadcast channel set in sequence; for any target message, the broadcast component is used to send the target message to the corresponding target terminal through the target channel receiving the target message. In the present disclosure, the target broadcast channel set in the candidate broadcast channel set is continuously obtained through the message processing protocol stack, and the synchronous sending of multiple target messages is realized through the target broadcast channel set, which reduces the waiting time between two adjacent target messages to be sent, improves the message sending efficiency, obtains the target message set in the candidate message queue through the message processing protocol stack, avoids the mixing between the message to be sent and the message being sent, reduces the possibility of the candidate message to be sent being submerged, and thus reduces the possibility of the message being lost, improves the hit rate and success rate of message sending, and in the scenario of multi-device control through message sending, optimizes the device control delay, improves the synchronization rate between multiple devices, and optimizes the user's device control experience.
[0103] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0104] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0105] The program code for implementing the method itself can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0106] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0108] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a grid browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication grid). Examples of communication grids include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain grid.
[0109] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication grid. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server for a distributed system, or a server combined with a blockchain.
[0110] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0111] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0112] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.
[0113] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0114] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0115] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0116] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0117] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.
[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0119] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A message sending system, It is characterized in that The system includes a message processing protocol stack and a broadcast component, wherein: The message processing protocol stack is used to continuously obtain a target channel set that satisfies a message sending condition of the candidate broadcast channel set, and obtain a target message set from a candidate message queue to be sent according to the number of channels in the target channel set; and, transmitting each target message in the target message set to each target broadcast channel in the target broadcast channel set in sequence; For any target message, the broadcast component is used to send the target message to the corresponding target terminal through the target channel that receives the target message.
2. The system according to claim 1, It is characterized in that The message processing protocol stack is also used for: Reading a first source address and a first target address of each first candidate message in the candidate message queue, and determining a first priority scale of each first candidate message according to the first source address and the first target address; Obtaining the number of channels in the target broadcast channel set; Based on the order of scale values from high to low, multiple second priority scales of the number of channels are obtained from each first priority scale, and the target message set in the candidate message queue is obtained according to the multiple second priority scales.
3. The system according to claim 2, It is characterized in that The message processing protocol stack is also used for: Acquire a new second candidate message and read a second source address and a second destination address of the second candidate message to determine a third priority scale of the second candidate message according to the second source address and the second destination address; In response to a scale value of the third priority scale being greater than or equal to a scale value of any second priority scale of the plurality of second priority scales, updating the target message set according to the second candidate message.
4. The system according to claim 3, It is characterized in that The message processing protocol stack is also used for: In response to the scale value of the third priority scale being greater than the scale values of each of the multiple second priority scales, the second candidate message is updated to the target message set to obtain a new target message set, and the second candidate message is determined to be the first in the execution order of the new target message set.
5. The system according to claim 3, It is characterized in that The message processing protocol stack is also used for: In response to the scale value of the third priority scale being equal to the scale value of any second priority scale among the multiple second priority scales, the second candidate message is updated to the target message set to obtain a new target message set, and it is determined that the execution order of the second candidate message in the new target message set is after the first candidate message corresponding to the second priority scale.
6. The system according to claim 1, It is characterized in that The message processing protocol stack is also used for: monitoring a transmission state of each candidate broadcast channel in the candidate broadcast channel set, and identifying whether there is at least one idle channel in the candidate broadcast channel set according to the transmission state; In response to identifying that there is at least one idle channel in the candidate broadcast channel set, it is determined that the candidate broadcast channel set meets the message sending condition.
7. The system according to claim 6, It is characterized in that The message processing protocol stack is also used for: For any target message, a target broadcast channel for sending the target message is acquired from the at least one idle channel, and the target message is transmitted to the target broadcast channel.
8. A message sending method, It is characterized in that The method comprises: Continuously acquiring, through a message protocol processing stack, a target broadcast channel set whose candidate broadcast channel set satisfies a message sending condition, and the number of channels in the target broadcast channel set; Obtaining the priority scale of each candidate message in the candidate message queue to be sent through the message protocol processing stack, and determining a target message set to be sent from the candidate message queue according to the priority scale and the number of channels; For any target message, the target message is transmitted to a target broadcast channel set through a message protocol processing stack, and the target message transmitted to the target broadcast channel set is sent to a target terminal through a broadcast component.
9. An electronic device, It is characterized in that include: processor; a memory for storing executable instructions for the processor; The processor is configured to execute instructions to implement the method as claimed in claim 8. 10 . A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to claim 8 .