Message sending control method and device, computing equipment and storage medium

Through real-time monitoring and dynamic adjustment of network status, and using machine learning models to predict network status, the problem of inability to adapt to network changes in the existing technology is solved, the stability and efficiency optimization of message transmission is achieved, and the system maintenance cost is reduced.

CN119211149AActive Publication Date: 2024-12-27LINKAGE CLOUD COMM TECH (BEIJING) CO LTD

Patent Information

Application Number
CN202411494577.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2024-12-27
Estimated Expiration
2044-10-24

Smart Images

  • Figure CN119211149A_ABST
    Figure CN119211149A_ABST
Patent Text Reader

Abstract

The invention discloses a message sending control method and device, computing equipment and a storage medium, and belongs to the technical field of network communication, and the method comprises the steps: carrying out the initialization setting of a time window, a sending frequency and a network state of a communication gateway; monitoring network state parameters in real time, and updating the network state based on the network state parameters; and adjusting the size of the time window according to the network state, and redistributing the message sending frequency. According to the scheme, the message sending efficiency can be optimized, the risk of message loss is reduced, and delay and network burden are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a message sending control method, device, computing equipment and storage medium. Background Art

[0002] In a network communication system, the message transmission rate between the client and the server directly affects the communication efficiency and system stability, and appropriate flow control is required to ensure the service quality. Common flow control algorithms include fixed window algorithm, sliding window algorithm, leaky bucket algorithm, etc. Among them, the fixed window algorithm is that the client sends messages according to a fixed time window or frequency, and the flow control strategy is triggered when the number of accesses reaches the preset threshold. The sliding window algorithm is an improvement on the fixed window algorithm. It divides the time window into multiple small cycles. As time slides, expired small cycle data is deleted, which can control the traffic more accurately. However, due to the instability of network conditions, such as increased latency, bandwidth fluctuations, and increased packet loss rate, when the client continues to send data at a fixed frequency, if the network conditions suddenly deteriorate, the sent data may accumulate in the network, exceeding the processing capacity of the server or exceeding the carrying capacity of the network. In this case, the server may misjudge that the client is sending too fast (i.e., overspeeding). This misjudgment and the mismatch between network conditions may cause network congestion or message loss.

[0003] Therefore, this static time window setting cannot adapt to changes in network conditions in real time, resulting in a large number of messages being sent at a fixed frequency when network conditions deteriorate, increasing the network burden; when network conditions improve, the client cannot adjust the sending frequency in time, resulting in inadequate utilization of available bandwidth.

[0004] In the prior art, a Chinese patent document with publication number CN117715097A discloses a network communication connection method, including ACK retransmission based on time window, time-sharing transmission, information-based adaptive bit rate method (transmission power adaptation, rate adaptation, flow control adaptation), etc. Although this solution can enhance the adaptive capability of communication, it is not flexible enough for sudden changes in network status, and its focus is on one-way parameter adjustment rather than comprehensive network status feedback. Summary of the invention

[0005] In order to solve the problems existing in the prior art, this solution proposes a message sending control method, device, computing equipment and storage medium, which can ensure the stability and efficiency of message sending under different network conditions by real-time monitoring and adapting to changes in network conditions, dynamically adjusting the time window and the amount of messages sent within the time window.

[0006] According to a first aspect of the present invention, a message sending control method is provided, comprising: initializing the time window, sending frequency and network status of a communication gateway; monitoring network status parameters in real time, and updating the network status based on the network status parameters; adjusting the time window size according to the network status, and reallocating the message sending frequency.

[0007] The above technical solution can dynamically adapt to changes in network status, optimize message sending efficiency, reduce the risk of message loss, and reduce delays and network burden.

[0008] Optionally, in the message sending control method provided by the present invention, the communication time period of the gateway is divided into multiple time windows, and the number of messages in each time window is counted; based on the expected network bandwidth and service load, the number of messages sent in each time window is set; the network monitoring parameters including Ping time, bandwidth and packet loss rate are set, and the network status is initialized to good.

[0009] Optionally, in the message sending control method provided by the present invention, the client periodically sends a ping request to the target server to calculate the round-trip time and network delay time; measures the upload speed and download speed, and calculates the bandwidth utilization rate; counts the number of data packets sent and received, and calculates the packet loss rate; evaluates the jitter of the network based on the statistical value of the round-trip time, and compares the packet loss rate, bandwidth utilization rate, and network delay time with preset standard thresholds to determine the network status.

[0010] Optionally, in the message sending control method provided by the present invention, heterogeneity analysis is performed on client devices and communication protocols, and different standard thresholds are set for different categories of devices and protocols; the monitored network parameters are compared with the corresponding standard thresholds to determine the network status.

[0011] The above technical solution sets standard thresholds for different devices and protocols through heterogeneity analysis, making network status judgment more accurate and improving the adaptability to various devices and communication protocols.

[0012] Optionally, in the message sending control method provided by the present invention, historical monitoring data is collected and input into a trained machine learning model to predict network status.

[0013] The above technical solution uses historical monitoring data and machine learning models to improve the accuracy of network status prediction and identify potential problems in advance.

[0014] Optionally, in the message sending control method provided by the present invention, the network status is divided into three levels: good, general, and poor according to the packet loss rate, bandwidth utilization rate, and network delay time; when the network status is good, the time window size is set to the first time threshold according to the first segmentation granularity; when the network status is general, the time window size is set to the second time threshold according to the second segmentation granularity; when the network status is poor, the time window size is set to the third time threshold according to the third segmentation granularity, and the first time threshold is less than the second time threshold, and the second time threshold is less than the third time threshold; according to the adjusted time window size, the number of messages sent by each gateway in the time window is calculated; the time window of each gateway and the number of messages sent in the time window are updated, and the client obtains the message with the corresponding number of messages sent from the message queue and sends it to the server.

[0015] In the above technical solution, when the network condition is good, a larger time window allows a higher message sending frequency, and when the network condition is poor, the network load is reduced by narrowing the time window, thereby optimizing the overall performance.

[0016] Optionally, in the message sending control method provided by the present invention, feedback data on the network status from each communication gateway is collected; and the time window and message sending frequency are adjusted according to the feedback data.

[0017] The above technical solution can be adjusted according to actual feedback data, timely discover and solve network fluctuation problems, thereby improving the stability and reliability of the system.

[0018] According to a second aspect of the present invention, a message sending control device is provided, comprising: an initialization module, a monitoring module and an adaptive adjustment module. The initialization module is used to initialize the time window, sending frequency and network status of the communication gateway; the monitoring module is used to monitor the network status parameters in real time and update the network status based on the network status parameters; the adaptive adjustment module is used to adjust the time window size according to the network status and reallocate the message sending frequency.

[0019] According to a third aspect of the present invention, a computing device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the message sending control method in the first aspect.

[0020] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium, comprising a computer program stored therein which can be loaded by a processor and execute the message sending control method according to the first aspect.

[0021] The message sending control method and device provided by the present invention can at least produce the following beneficial effects: 1. By dynamically adjusting the time window size according to the network conditions, network congestion and server misjudgment caused by the instantaneous sending of a large number of messages can be effectively avoided, thereby ensuring the stability of message transmission; 2. When network conditions are good, it can make full use of bandwidth and increase the frequency of message sending, thereby optimizing the use of network resources, reducing the need for manual intervention, and reducing the maintenance cost of the system.

[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 A block diagram of a computing device 100 according to an embodiment of the present invention is shown; Figure 2 A schematic diagram of a flow chart of a message sending control method 200 according to an embodiment of the present invention is shown; Figure 3 A schematic structural diagram of a message sending control device 300 according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0024] This solution automatically adjusts the time window size through a sliding time window mechanism and a network status dynamic adjustment algorithm to adapt to changes in network status and optimize message transmission efficiency.

[0025] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0026] Figure 1 FIG. 1 shows a block diagram of a computing device 100 according to an embodiment of the present invention. Figure 1 As shown, computing device 100 may include memory 106 and processor 104. Memory bus 108 may be used for communication between processor 104 and system memory 106.

[0027] Memory 106 may include operating system 120, applications 122, and program data 124. Applications 122 may be arranged to be executed on the operating system by one or more processors 104 using program data 124. Applications 122 include program instructions for implementing various user desired functions.

[0028] When the computing device 100 starts running, the processor 104 reads and executes the program instructions of the operating system 120 from the memory 106. The application 122 runs on the operating system 120 and uses the interfaces provided by the operating system 120 and the underlying hardware to implement various functions desired by the user. When the user starts the application 122, the application 122 is loaded into the memory 106, and the processor 104 reads and executes the program instructions of the application 122 from the memory 106.

[0029] The computing device 100 also includes a storage device 132 and an output device 142 connected to a storage interface bus 134. An interface bus 140 facilitates communication from various interface devices (eg, output device 142, peripheral interface 144, and communication device 146) via the bus / interface controller 130.

[0030] The peripheral interface 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. The communication device 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via a network communication link via one or more communication ports 164. In the computing device 100 according to the present invention, the application 122 includes instructions for executing the message sending control method 200 of the present invention.

[0031] Figure 2 FIG. 2 is a flow chart of a message sending control method 200 according to an embodiment of the present invention. Figure 2 As shown, the method 200 begins at step S210, where the time window, transmission frequency and network status of the communication gateway are initialized.

[0032] For example, in the gateway configuration interface, locate the time window setting option. The default initialization time window size is T gwi= 1s, obtain the number of messages allowed to be sent per second. The communication time period of the gateway (such as 1 second or several seconds) can be divided into multiple smaller time windows, and the number of messages within each time window is counted. For example, with a 100ms window, limit the number of message sends within each small window. By evenly distributing the message send volume through these windows, avoid the server misjudging overspeed due to a large number of instantaneous messages. Therefore, the time window size can be 1s, 500ms, 100ms, etc. Based on the expected network bandwidth and service load, set the send frequency TPS within each time window gwi 。

[0033] Initialize the configuration of network monitoring parameters, such as Ping time, bandwidth, packet loss rate, etc., and initialize the network status S of each gateway gwi = 1, indicating that the network status is good.

[0034] In step S220, monitor the network status parameters in real time and update the network status based on the network status parameters.

[0035] According to an embodiment of the present invention, the client periodically sends ping requests (small data packets) to the target server and calculates the round-trip time and network latency time. The round-trip time (RTT) is the total time it takes for a data packet to be sent and a reply to be received. Network latency is closely related to the round-trip time.

[0036] Measure the upload speed and download speed, and calculate the bandwidth utilization rate. The network load situation can be evaluated by calculating the ratio of the actually used bandwidth to the total available bandwidth. Count the number of sent and received data packets and calculate the packet loss rate. The packet loss rate is equal to the number of lost data packets / the total number of sent data packets.

[0037] Evaluate the network jitter situation based on the statistical value of the round-trip time, compare the packet loss rate, bandwidth utilization rate, and network latency time with preset thresholds respectively, and judge the network status. For example, when RTT <= 1000ms, update the network status to good, S gwi = 1. When 1000ms < RTT <= 3000ms, update the network status to average, S gwi = 2. When RTT > 3000ms, update the network status to poor, S gwi = 3. Record the network status of each gateway in the cache S gw1 、S gw2 …… S gwi ……S gwn 。

[0038] In order to better understand and optimize network performance, this solution also conducts heterogeneity analysis on different client devices and communication protocols, sets different standard thresholds for different types of devices and protocols, and compares the monitored network parameters with the corresponding standard thresholds to determine the network status.

[0039] Furthermore, historical monitoring data can be collected and input into a trained machine learning model to predict network status. Using historical monitoring data and machine learning models can improve the accuracy of network status prediction and identify potential problems in advance.

[0040] Finally, step S230 is executed to adjust the time window size according to the network status and reallocate the message sending frequency.

[0041] The dynamic adjustment algorithm is to reduce the time window size when the network conditions are good, allowing more frequent message sending. When the network conditions are poor, the time window size is increased and the message sending frequency is reduced to reduce the network load. Different segmentation granularities are used according to different network conditions.

[0042] In one embodiment of the present invention, the network status can be divided into three levels: good, average, and poor according to the real-time monitored packet loss rate, bandwidth usage, and network delay time.

[0043] When the network status is good, the time window size is set to the first time threshold according to the first segmentation granularity; when the network status is general, the time window size is set to the second time threshold according to the second segmentation granularity; when the network status is poor, the time window size is set to the third time threshold according to the third segmentation granularity, the first time threshold is smaller than the second time threshold, and the second time threshold is smaller than the third time threshold.

[0044] For example, when the network condition is good, S gwi = 1, every second is divided into 10 100-ms periods, the time window is 100 ms, T gwi = 100ms. When the network condition is normal, S gwi = 2, every 3 seconds is divided into 10 300 milliseconds, the time window is 300 milliseconds, T gwi = 300ms. When the network condition is poor, S gwi = 3, every 6 seconds is divided into 10 600 milliseconds, the time window is 600 milliseconds, T gwi = 600ms.

[0045] According to the adjusted time window size, calculate the number of messages sent by each gateway within the time window. This depends on the time window size and the number of messages processed per second (TPS). gwi, if each message takes 10 milliseconds to process on average, then at most 10 messages can be sent in a 100 millisecond window.

[0046] For example, when the network condition Sgwi = 1, the number of messages sent is F gwi =1*TPS gwi / T gwi ; When the network condition Sgwi = 2, the number of messages sent is F gwi =3∗TPS gwi / T gwi ; When the network condition Sgwi = 3, the number of messages sent is F gwi =6*TPS gwi / T gwi .

[0047] Update the time window of each gateway and the number of messages sent within the time window. The client obtains the corresponding number of messages sent from the message queue and sends them to the server.

[0048] Different communication gateways may face different network environments. Feedback data on the network status of each communication gateway can be collected, and the time window and message sending frequency can be adjusted according to the feedback data. This can achieve personalized optimization and ensure the best performance of each gateway in its specific environment.

[0049] Figure 3 FIG. 4 is a schematic diagram showing the structure of a message sending control device 300 according to an embodiment of the present invention. Figure 3 As shown, the device 300 may include an initialization module 310 , a monitoring module 320 and an adaptive adjustment module 330 .

[0050] Among them, the initialization module 310 can initialize the time window, sending frequency and network status of the communication gateway. Specifically, the initialization module can divide the communication time period of the gateway into multiple time windows and count the number of messages in each time window. Based on the expected network bandwidth and service load, the number of messages sent in each time window is set. By dividing the time period into multiple time windows, the message sending tasks are evenly distributed to different time windows, and the number of messages sent in each time window is set according to the expected bandwidth and load, the network bandwidth can be fully utilized and bandwidth waste can be reduced. Set network monitoring parameters including Ping time, bandwidth and packet loss rate, and initialize the network status to good. This helps to establish a stable benchmark for subsequent monitoring and adjustment strategies.

[0051] The monitoring module 320 can monitor the network status parameters in real time and update the network status based on the network status parameters. For example, the client periodically sends ping requests to the target server to calculate the round-trip time and network delay time; measures the upload speed and download speed to calculate the bandwidth usage; counts the number of data packets sent and received to calculate the packet loss rate; evaluates the jitter of the network based on the statistical value of the round-trip time, and compares the packet loss rate, bandwidth usage rate, and network delay time with the preset standard thresholds to determine the network status.

[0052] The adaptive adjustment module 330 can adjust the time window size and reallocate the message sending frequency according to the network status. According to an embodiment of the present invention, the adaptive adjustment module can classify the network status into three levels: good, general, and poor according to the packet loss rate, bandwidth usage, and network delay time.

[0053] When the network status is good, the time window size is set to the first time threshold according to the first segmentation granularity; when the network status is general, the time window size is set to the second time threshold according to the second segmentation granularity; when the network status is poor, the time window size is set to the third time threshold according to the third segmentation granularity, the first time threshold is smaller than the second time threshold, and the second time threshold is smaller than the third time threshold.

[0054] According to the adjusted time window size, the number of messages sent by each gateway within the time window is calculated; the time window of each gateway and the number of messages sent within the time window are updated, and the client obtains the corresponding number of messages sent from the message queue and sends them to the server.

[0055] The message sending control method and device provided by the present invention can at least produce the following beneficial effects: 1. By dynamically adjusting the time window size according to the network conditions, network congestion and server misjudgment caused by the instantaneous sending of a large number of messages can be effectively avoided, thereby ensuring the stability of message transmission; 2. When network conditions are good, it can make full use of bandwidth and increase the frequency of message sending, thereby optimizing the use of network resources, reducing the need for manual intervention, and reducing the maintenance cost of the system.

[0056] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0057] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

Claims

1. A message sending control method, characterized in that: include: Initialize the time window, sending frequency and network status of the communication gateway; Monitoring network status parameters in real time, and updating the network status based on the network status parameters; Adjust the time window size according to the network status and reallocate the message sending frequency.

2. The message sending control method according to claim 1, characterized in that: The step of initializing the time window, transmission frequency and network status of the communication gateway comprises: Divide the gateway's communication time period into multiple time windows and count the number of messages in each time window; Set the number of messages to be sent in each time window based on expected network bandwidth and service load; Set network monitoring parameters including Ping time, bandwidth, and packet loss rate, and initialize the network status to Good.

3. The message sending control method according to claim 1, characterized in that: The step of monitoring the network status parameters in real time and updating the network status based on the network status parameters comprises: The client periodically sends ping requests to the target server to calculate the round-trip time and network delay; Measure upload and download speeds and calculate bandwidth usage; Count the number of packets sent and received, and calculate the packet loss rate; The jitter of the network is evaluated based on the statistical value of the round-trip time, and the packet loss rate, bandwidth utilization rate, and network delay time are compared with preset standard thresholds to determine the network status.

4. The message sending control method according to claim 3, characterized in that: The step of monitoring the network status parameters in real time and updating the network status based on the network status parameters comprises: Perform heterogeneity analysis on client devices and communication protocols, and set different standard thresholds for different categories of devices and protocols; Compare the monitored network parameters with the corresponding standard thresholds to determine the network status.

5. The message sending control method according to claim 3, characterized in that: The step of monitoring the network status parameters in real time and updating the network status based on the network status parameters also includes: Collect historical monitoring data and input the historical monitoring data into a trained machine learning model to predict network status.

6. The message sending control method according to claim 1, characterized in that: The step of adjusting the time window size according to the network status and reallocating the message sending frequency comprises: The network status is divided into three levels: good, average, and poor according to the packet loss rate, bandwidth usage, and network delay time; When the network status is good, the time window size is set to a first time threshold according to the first segmentation granularity; When the network status is normal, the time window size is set to a second time threshold according to the second segmentation granularity; When the network state is poor, the time window size is set to a third time threshold according to the third segmentation granularity, the first time threshold is less than the second time threshold, and the second time threshold is less than the third time threshold; According to the adjusted time window size, calculate the number of messages sent by each gateway within the time window; Update the time window of each gateway and the number of messages sent within the time window. The client obtains the corresponding number of messages sent from the message queue and sends them to the server.

7. The message sending control method according to claim 6, characterized in that: The method further comprises: Collect feedback data on network status from each communication gateway; The time window and message sending frequency are adjusted according to the feedback data.

8. A message sending control device, characterized in that: include: An initialization module is used to initialize the time window, transmission frequency and network status of the communication gateway; A monitoring module, used for monitoring network status parameters in real time and updating the network status based on the network status parameters; The adaptive adjustment module is used to adjust the time window size according to the network status and reallocate the message sending frequency.

9. A computing device, characterized in that include: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be suitable for being executed by the at least one processor, and the program instructions include instructions for executing the message sending control method according to any one of claims 1-7.

10. A readable storage medium storing program instructions, characterized in that: When the program instructions are read and executed by a computing device, the computing device executes the message sending control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intelligent terminal sensor scheduling method based on reinforcement learning

    CN111459627A

  • Congestion control method and device and training method and device of congestion control model

    CN114866489A

  • Distributed low-delay delay task for bidding

    CN117893294A

  • Method for TCP congestion control using constant congestion state sensing

    KR1020080079410A

  • Rate adaptation

    US20120311102A1

Cited By

  • Data traffic adjusting method and device, storage medium and electronic equipment

    CN119728578A

  • Long link message distribution method and system

    CN120342989A

  • Dynamic adjustment method and device for transmission command splitting granularity

    CN120602428A