Method and device for adjusting transmission rate of proxy service channel, and server

By dynamically adjusting the transmission rate of the MQTT proxy service channel, the problem of server load pressure fluctuations is solved, and more stable and efficient message transmission is achieved.

CN119766727APending Publication Date: 2025-04-04GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When using the MQTT protocol to transmit information, as the number of devices increases and the network transmission rate fluctuates, the load pressure of the MQTT server fluctuates, affecting operational stability and reducing message processing efficiency.

Method used

By obtaining the historical transmission rate average, maximum and minimum values ​​of multiple transmission channels, as well as the current actual transmission rate, the transmission pressure level of the agent service is determined, and the transmission rate of each transmission channel is dynamically adjusted based on the level matching adjustment algorithm.

Benefits of technology

Effectively balancing the load, improve the reliability and efficiency of message transmission, reduce transmission delay, and improve the operation stability of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766727A_ABST
    Figure CN119766727A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of message transmission, and discloses a proxy service channel transmission rate adjusting method and device and a server, and the method comprises the steps: obtaining at least one of a historical transmission rate average value, a maximum value and a minimum value corresponding to a plurality of transmission channels; acquiring actual transmission rates currently corresponding to the plurality of transmission channels; determining the overall transmission pressure level of the current proxy service according to the actual transmission rates of the plurality of transmission channels and at least one of the average value, the maximum value and the minimum value of the corresponding historical transmission rates; and matching a corresponding adjustment algorithm based on the overall transmission pressure level of the current proxy service, and adjusting the transmission rate of each transmission channel through the adjustment algorithm. According to the adjustment method disclosed by the invention, the problem that the operation stability is influenced by large load pressure fluctuation of the proxy service is solved, the transmission rate of the proxy channel can be dynamically adjusted, the load is effectively balanced, the reliability and efficiency of message transmission are improved, and the transmission delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of message transmission, and in particular to a method, device and server for adjusting the transmission rate of a proxy service channel. Background Art

[0002] With the rapid development of Internet of Things (IoT) technology, MQTT (Message Queuing Telemetry Transport) protocol, as a lightweight publish / subscribe message transmission protocol, has been widely used in scenarios with limited bandwidth and device resources. However, when using the MQTT protocol to transmit information, the server usually transmits to multiple devices. As the number of devices increases and the network transmission rate fluctuates, the load pressure on the MQTT server will fluctuate. The existing technology usually relies on fixed routing algorithms and preset network configurations to adjust the load, but the real-time network environment fluctuates greatly. The existing technology cannot dynamically adapt to the real-time changing network transmission environment, resulting in large fluctuations in server load pressure, affecting operational stability, and may reduce message processing efficiency and affect message transmission speed. Summary of the invention

[0003] The purpose of the present invention is to at least provide a method, device and server for adjusting the transmission rate of a proxy service channel, which can at least solve the problem that the large fluctuation of the proxy service load pressure affects the operation stability, at least achieve dynamic adjustment of the proxy channel transmission rate, effectively balance the load, and improve the reliability and efficiency of message transmission, and reduce transmission delay.

[0004] To solve the above technical problem, at least one embodiment of the present application provides a method for adjusting the transmission rate of a proxy service channel, comprising:

[0005] Obtain at least one of an average value, a maximum value, and a minimum value of historical transmission rates corresponding to a plurality of transmission channels, respectively; the plurality of transmission channels are transmission channels corresponding to the proxy service and each device;

[0006] Obtaining actual transmission rates currently corresponding to the multiple transmission channels;

[0007] Determine the overall transmission pressure level of the current proxy service according to the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values, and minimum values;

[0008] A corresponding adjustment algorithm is matched based on the overall transmission pressure level of the current proxy service, and the transmission rate of each transmission channel is adjusted through the adjustment algorithm.

[0009] At least one embodiment of the present application further provides a proxy channel transmission rate adjustment device, comprising:

[0010] A data collection and analysis module, used to obtain at least one of an average value, a maximum value and a minimum value of historical transmission rates corresponding to a plurality of transmission channels, and obtain actual transmission rates currently corresponding to the plurality of transmission channels; the plurality of transmission channels are transmission channels corresponding to the proxy service and each device, respectively;

[0011] A determination module, configured to determine the overall transmission pressure level of the current proxy service according to the actual transmission rates of the plurality of transmission channels and the corresponding historical transmission rate average values, maximum values ​​and minimum values;

[0012] The adjustment module is used to match the corresponding adjustment algorithm based on the overall transmission pressure level of the current proxy service, and adjust the transmission rate of each transmission channel through the adjustment algorithm.

[0013] At least one embodiment of the present application further provides a server, which is connected to each device through a proxy service, and is characterized in that the server includes the aforementioned proxy channel transmission rate adjustment device.

[0014] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for adjusting the transmission rate of the proxy service channel.

[0015] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned method for adjusting the transmission rate of the proxy service channel when executed by a processor.

[0016] The proxy service channel transmission rate adjustment method, device and server provided in the embodiments of the present application can determine the transmission pressure level corresponding to the actual transmission rate of each transmission channel between the current proxy service and multiple devices based on the historical transmission rate average, maximum and minimum values, and then dynamically adjust the transmission rate of each transmission channel through an adjustment algorithm that matches the corresponding transmission pressure level, effectively balance the load, improve the reliability and efficiency of message transmission, and reduce transmission delay.

[0017] In some optional embodiments, obtaining at least one of an average value, a maximum value, and a minimum value of historical transmission rates respectively corresponding to the plurality of transmission channels includes:

[0018] Acquire historical transmission data corresponding to each of the plurality of transmission channels within a period;

[0019] At least one of an average value, a maximum value, and a minimum value of historical transmission rates corresponding to a plurality of transmission channels is calculated using the historical transmission data.

[0020] Through the historical transmission data within the period, the historical transmission rate average, maximum and minimum values ​​of the transmission channel in the corresponding period can be evaluated, and calculated by period. After the expiration, the historical transmission data can be statistically analyzed again to obtain the latest standard to improve the accuracy of dynamically adjusting the transmission rate.

[0021] In some optional embodiments, determining the overall transmission pressure level of the current proxy service according to the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values, and minimum values ​​includes:

[0022] Performing transmission pressure analysis in sequence using the actual transmission rate of each transmission channel and at least one of the corresponding historical transmission rate average value, maximum value and minimum value to determine the current channel pressure of each transmission channel;

[0023] The current transmission pressure level of the entire proxy service is determined according to the current channel pressure of each transmission channel.

[0024] In some optional embodiments, the transmission pressure levels include, in descending order, a high pressure transmission pressure level, a medium pressure transmission pressure level, and a low pressure transmission pressure level; the high pressure transmission pressure level, the medium pressure transmission pressure level, and the low pressure transmission pressure level are respectively provided with a high pressure condition, a medium pressure condition, and a low pressure condition for determining the pressure level;

[0025] The determining the transmission pressure level of the current proxy service according to the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values, and minimum values ​​includes:

[0026] The actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values ​​and minimum values ​​are analyzed and matched with the high pressure condition, medium pressure condition and low pressure condition in order of transmission pressure level from high to low until the corresponding conditions are matched, thereby determining the overall transmission pressure level of the proxy service.

[0027] In some optional embodiments, the high-pressure condition includes a transmission channel among the multiple transmission channels having an actual transmission rate less than the minimum historical transmission rate; the medium-pressure condition includes a total number of transmission channels among the multiple transmission channels having an actual transmission rate less than an average historical transmission rate being greater than a first preset ratio threshold; the low-pressure condition includes a total number of transmission channels among the multiple transmission channels having an actual transmission rate less than an average historical transmission rate being less than a second preset ratio threshold.

[0028] In some optional embodiments, the high-voltage condition includes a transmission channel among the plurality of transmission channels having the actual transmission rate being less than the minimum value of the historical transmission rate;

[0029] The adjustment algorithm corresponding to the high-pressure transmission pressure level includes: limiting the transmission rate of the transmission channel in the proxy service whose actual transmission rate is greater than the maximum historical transmission rate to the historical transmission rate average value through traffic shaping.

[0030] In some optional embodiments, the medium voltage condition includes that the total number of transmission channels whose actual transmission rates are less than the average value of historical transmission rates among the plurality of transmission channels is greater than a first preset ratio threshold;

[0031] The adjustment algorithm corresponding to the medium voltage transmission pressure level includes: selecting a preset number of transmission channels in the proxy service from a number of transmission channels whose actual transmission rates are greater than the historical transmission rate average, and limiting the transmission rates of the selected transmission channels to the historical transmission rate average through traffic shaping, until the proportion of the number of transmission channels whose actual transmission rates are less than the historical transmission rate average to the total number of transmission channels is less than or equal to a third preset proportion threshold.

[0032] In some optional embodiments, the low-voltage condition includes that the total number of transmission channels among the plurality of transmission channels whose actual transmission rates are less than an average of historical transmission rates is less than a second preset ratio threshold.

[0033] The adjustment algorithm corresponding to the low-voltage transmission pressure level includes: releasing the preset transmission rate of the transmission channels in the proxy service whose actual transmission rate is lower than the historical transmission rate average in sequence, until the proportion of the number of transmission channels in the proxy service whose actual transmission rate is lower than the historical transmission rate average to the total number of transmission channels in the proxy service is less than or equal to a fourth preset proportion threshold.

[0034] In some optional embodiments, the adjustment method further includes: obtaining user input adjustment data; and adjusting at least one of the adjustment algorithms corresponding to the high pressure condition, medium pressure condition, low pressure condition, and each transmission pressure level according to the adjustment data.

[0035] Through user feedback data, the high pressure conditions, medium pressure conditions, low pressure conditions and the relevant preset values ​​in the adjustment algorithm corresponding to each transmission pressure level can be adjusted, so that the dynamic adjustment of the transmission rate is in line with user usage, ensuring that the system is always in the optimal operating state. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.

[0037] Figure 1 This is a flow chart of a method for adjusting the transmission rate of a proxy service channel provided by an embodiment of the present application. Figure 1 ;

[0038] Figure 2 An embodiment of the present application provides Figure 1 The process of step S101 Figure 1 ;

[0039] Figure 3 An embodiment of the present application provides Figure 1 The process of step S103 Figure 1 ;

[0040] Figure 4 An embodiment of the present application provides Figure 1 The process of step S103 Figure 2 ;

[0041] Figure 5 This is a specific example diagram of the overall process of a method for adjusting the transmission rate of a proxy service channel provided by an embodiment of the present application;

[0042] Figure 6 This is a flow chart of a method for adjusting the transmission rate of a proxy service channel provided by an embodiment of the present application. Figure 2 ;

[0043] Figure 7 is a schematic diagram of an adjustment device provided by another embodiment of the present application;

[0044] Figure 8 is a structural schematic diagram of an electronic device provided by another embodiment of the present application;

[0045] Fig. 9 It is a schematic diagram of the structure of a computer storage medium provided by another embodiment of the present application. DETAILED DESCRIPTION

[0046] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.

[0047] In order to facilitate understanding of the embodiments of the present application, relevant content about message agent transmission is first introduced here.

[0048] With the rapid development of Internet of Things (IoT) technology, the MQTT (Message Queuing Telemetry Transport) protocol, as a lightweight publish / subscribe message transmission protocol, has been widely used in scenarios with limited bandwidth and limited device resources. However, in practical applications, the load pressure of the MQTT server often changes with the increase in the number of devices and the fluctuation of the network transmission rate, which poses a severe challenge to the stability of the server and the efficiency of message processing. When using the MQTT protocol to transmit information, the server usually transmits to multiple devices. As the number of devices increases and the network transmission rate fluctuates, the load pressure of the MQTT server will fluctuate. The existing technology usually relies on fixed routing algorithms and preset network configurations to adjust the load, but the real-time network environment fluctuates greatly. The existing technology cannot dynamically adapt to the real-time changing network transmission environment, resulting in large fluctuations in server load pressure, affecting operational stability, and may reduce message processing efficiency and affect message transmission speed.

[0049] In order to solve the above-mentioned technical problem that the large fluctuation of proxy service load pressure affects the operation stability, the present invention proposes a method for adjusting the transmission rate of a proxy service channel. The implementation details of the method for adjusting the transmission rate of the proxy service channel of this embodiment are specifically described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.

[0050] Embodiment 1:

[0051] The method for adjusting the transmission rate of the proxy service channel of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. In this embodiment, the proxy service channel is described as a transmission channel between the MQTT proxy service and the smart device. The method for adjusting the transmission rate of the proxy service channel can be as follows: Figure 1 and Figure 5As shown, steps 101-104 are included, specifically including:

[0052] Step 101, obtaining at least one of an average value, a maximum value and a minimum value of historical transmission rates respectively corresponding to a plurality of transmission channels; the plurality of transmission channels are transmission channels respectively corresponding to the proxy service and each device.

[0053] Specifically, the execution subject of the method can be a server that provides a rate adjustment service for the transmission channel between the proxy service and the device, or a server of the proxy service; wherein the proxy service can actively report and send data. In this embodiment, the proxy service is described by taking the MQTT proxy service as an example. The MQTT proxy service actively reports and sends data, and the data elements included are: MAC, device type, send / report type, data packet size (bytes), time of sending and reporting data, etc.

[0054] Among them, the proxy service can establish transmission channels with multiple devices respectively. In this solution, multiple transmission channels are transmission channels corresponding to the proxy service and each device, which is convenient for comprehensive evaluation of the overall data transmission pressure of the proxy service, and then provides adaptive adjustment to reduce server load pressure.

[0055] In some examples, step 101, such as Figure 2 As shown, specifically including:

[0056] Step 1011, obtaining historical transmission data corresponding to the plurality of transmission channels in a period;

[0057] Step 1012: Calculate at least one of an average value, a maximum value, and a minimum value of historical transmission rates corresponding to a plurality of transmission channels respectively using the historical transmission data.

[0058] Specifically, the historical transmission data includes the size of the sent data packet, the size of the reported data packet, the sending time and the reporting time in the transmission channel. The corresponding time corresponding to the transmission channel is obtained by subtracting the reporting time from the sending time, so that the transmission rate can be calculated by the following calculation formula:

[0059] Rate (bytes / second) = (download data packet size + reported data packet size) / (download time - reporting time) (seconds).

[0060] By statistically analyzing the historical transmission data in the period, the historical transmission rate average value, maximum value and minimum value are obtained, which are used as the threshold standards in the future preset time in turn. After the preset time expires, the historical transmission rate average value, maximum value and minimum value are updated based on the historical transmission data in the period to obtain the latest standard, so as to improve the accuracy of the subsequent dynamic adjustment of the transmission rate. In this embodiment, the period can be set to seven days as a period, and the future preset time is one month, so as to regularly update the historical transmission rate average value, maximum value and minimum value.

[0061] In this embodiment, the multiple transmission channels formed between the proxy service and each device are analyzed separately to form the corresponding historical transmission rate average, maximum and minimum values ​​for each transmission channel, so that each transmission channel can be monitored and dynamically adjusted to ensure the load balance of the entire proxy service.

[0062] Step 102: Obtain actual transmission rates currently corresponding to the multiple transmission channels.

[0063] Specifically, the actual transmission rate is calculated based on statistical analysis of the real-time transmission data collected during the preset time period of the transmission channel corresponding to the connection between the current proxy service and each device, and combined with the rate calculation formula in the aforementioned step 1012. In this embodiment, the preset time period can be set to one hour or half an hour, and the user can set the data collection time period for calculating the actual transmission rate according to actual usage needs.

[0064] Step 103: determining a transmission pressure level of the current proxy service according to the actual transmission rates of the plurality of transmission channels and at least one of an average value, a maximum value and a minimum value of corresponding historical transmission rates.

[0065] Specifically, by comparing the actual transmission rate with the historical average, maximum, and minimum transmission rates, we can analyze the pressure that the current actual transmission rate brings to the transmission channel, and then determine the transmission pressure level of the current proxy service.

[0066] In some examples, the transmission pressure level is configured with at least two different levels, and the transmission pressure levels of different levels are respectively preset with corresponding adjustment algorithms. The transmission pressure levels of different levels have at least a certain span, so that corresponding adjustment algorithms can be provided for high pressure and low pressure to regulate the transmission rate.

[0067] Based on the setting of multiple transmission pressure levels, step 103 specifically includes: analyzing and matching the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate averages, maximum values ​​and minimum values ​​in order of transmission pressure levels from high to low until the corresponding pressure level conditions are matched, thereby determining the overall transmission pressure level of the proxy service.

[0068] Specifically, when analyzing and determining the transmission pressure level, the transmission pressure level is identified and analyzed in sequence from high to low, and the high-pressure transmission pressure level can be checked first, and then the corresponding transmission rate can be dynamically adjusted to balance the load pressure, thereby improving the effect of real-time dynamic adjustment of the transmission rate and promptly alleviating the load pressure of the server.

[0069] In some embodiments, step 103, such as Figure 4 As shown, specifically including:

[0070] Step 1032: Perform transmission pressure analysis by using the actual transmission rate of each transmission channel and at least one of the corresponding historical transmission rate average value, maximum value and minimum value in turn to determine the current channel pressure of each transmission channel;

[0071] Step 1033: Determine the current transmission pressure level of the entire proxy service according to the current channel pressure of each transmission channel.

[0072] Specifically, by analyzing the current channel pressure of each transmission channel, it is possible to conveniently monitor the overall data transmission pressure between the proxy service and each device, and then accurately evaluate the current overall transmission pressure level of the proxy service, which is conducive to accurately providing adaptive adjustments, effectively balancing the load, and improving the reliability and efficiency of message transmission, and reducing transmission delays.

[0073] Step 104 : Matching a corresponding adjustment algorithm based on the transmission pressure level of the current proxy service, and adjusting the transmission rate of each transmission channel through the adjustment algorithm.

[0074] Specifically, different transmission pressure levels are matched with different adjustment algorithms, so that the transmission rate of each transmission channel is adjusted using the corresponding adjustment algorithm, thereby realizing dynamic adjustment of the transmission rate of the proxy transmission channel.

[0075] By providing corresponding rate adjustment algorithms for each level of transmission pressure, the proxy service can achieve a balance within the preset value range, and based on the real-time monitoring of the number of network transmissions, it can dynamically adjust the pressure level used, and then adapt the corresponding adjustment algorithm to achieve dynamic adjustment of the channel transmission rate of the MQTT proxy, thereby ensuring the reliability of message transmission while effectively alleviating the load pressure of the MQTT server and improving message processing efficiency.

[0076] This embodiment can determine the transmission pressure level corresponding to the actual transmission rate of each transmission channel of the current proxy service based on the historical transmission rate average, maximum and minimum values, and then dynamically adjust the transmission rate of each transmission channel through an adjustment algorithm that matches the corresponding transmission pressure level, effectively balance the load, improve the reliability and efficiency of message transmission, and reduce transmission delay.

[0077] In some embodiments, the overall transmission pressure level of the proxy service is configured as three levels, that is, the transmission pressure levels include a high-pressure transmission pressure level, a medium-pressure transmission pressure level, and a low-pressure transmission pressure level in order from high to low. For different transmission pressure levels, corresponding determination conditions are preset. Specifically, the high-pressure transmission pressure level, the medium-pressure transmission pressure level, and the low-pressure transmission pressure level are respectively provided with a high-pressure condition, a medium-pressure condition, and a low-pressure condition for determining the pressure level.

[0078] Based on the three configured transmission pressure levels, when analyzing the transmission pressure level of the current proxy service, such as Figure 3 As shown, it specifically includes: 1031, analyzing and matching the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average, maximum and minimum values ​​with the high pressure condition, medium pressure condition and low pressure condition in order of transmission pressure level from high to low, until the corresponding conditions are matched, to determine the overall transmission pressure level of the proxy service.

[0079] Through high pressure conditions, medium pressure conditions and low pressure conditions, the actual transmission rate can be directly compared with the average, maximum and minimum values ​​of the historical transmission rate, so as to quickly analyze the pressure conditions matching the actual transmission rate, and then quickly determine the corresponding transmission pressure level, thereby improving the efficiency and accuracy of determining the transmission pressure level of the proxy service.

[0080] In some examples, the high-pressure condition includes a transmission channel among the multiple transmission channels having an actual transmission rate less than the minimum historical transmission rate; the adjustment algorithm corresponding to the high-pressure transmission pressure level includes: limiting the transmission rate of the transmission channel in the proxy service whose actual transmission rate is greater than the maximum historical transmission rate to the average historical transmission rate through traffic shaping.

[0081] In some examples, the medium pressure condition includes that the total number of transmission channels whose actual transmission rate is less than the average value of the historical transmission rate in the plurality of transmission channels is greater than a first preset ratio threshold; the adjustment algorithm corresponding to the medium pressure transmission pressure level includes: selecting a preset number of transmission channels from the plurality of transmission channels whose actual transmission rate is greater than the average value of the historical transmission rate in the proxy service in sequence, and limiting the transmission rate of the selected transmission channels to the average value of the historical transmission rate through traffic shaping, until the proportion of the number of transmission channels whose actual transmission rate is less than the average value of the historical transmission rate to the total number of transmission channels is less than or equal to a third preset ratio threshold;

[0082] In some examples, the low-pressure condition includes that the total number of transmission channels in the multiple transmission channels whose actual transmission rate is less than the historical transmission rate average is less than a second preset ratio threshold; the adjustment algorithm corresponding to the low-pressure transmission pressure level includes: releasing the preset transmission rate of the transmission channels in the proxy service whose actual transmission rate is lower than the historical transmission rate average in sequence, until the number of transmission channels in the proxy service whose actual transmission rate is lower than the historical transmission rate average accounts for a proportion of the total number of transmission channels in the proxy service that is less than or equal to a fourth preset ratio threshold.

[0083] In some specific embodiments, Figure 5 As shown, the actual transmission rate of the transmission channel that is less than the corresponding minimum historical transmission rate is recorded as a high-pressure condition, and the current server is further determined to have channel pressure. The number of channels with "channel rate greater than the maximum value" is counted, and these channels use the "traffic shaping processor" method to limit the transmission rate (maximum read and write rate) to the average value, thereby reducing the rate and lowering the speed of some traffic.

[0084] "The proportion of transmission channels with actual transmission rate lower than the average value of historical transmission rate to the total number of channels is greater than 50%" is taken as the medium pressure condition, and the number of channels with "channel transmission rate greater than the average value" is counted. For these channels, the transmission rate (maximum read and write rate) is limited to the average value using the "traffic shaping processor" method for 25% of the channels each time, until the proportion of channels with channel transmission rate lower than the average value to the total number of channels is less than or equal to 20%. In this case, speed limit will no longer be performed, the rate will be reduced, and the speed of some traffic will be reduced.

[0085] "The proportion of channels with channel transmission rates lower than the average to the total number of channels is less than 10%" is set as the low-pressure condition. The number of channels for which the server has set rate limits is counted, and 10% of the channel read and write rate limits are released each time until the proportion of channels with channel transmission rates lower than the average to the total number of channels is less than or equal to 2%. No more releases are made, and a balance is achieved within the preset value range.

[0086] Among them, traffic shaping is a more fine-grained flow control method that allows developers to limit the reading and sending rates of data according to business needs. ChannelTrafficShapingHandler: Netty provides this processor to limit the traffic of a single channel. It can control the data transmission speed according to the configured maximum read rate and maximum write rate. The traffic shaping processor implements flow control by calculating waiting time and using timed tasks to ensure that the average rate meets the settings.

[0087] In some embodiments, the proxy service channel transmission rate adjustment method, such as Figure 6 As shown, it also includes:

[0088] Step 201, obtaining user input adjustment data;

[0089] Step 202: adjusting at least one of the adjustment algorithms corresponding to the high pressure condition, the medium pressure condition, the low pressure condition and each transmission pressure level according to the adjustment data.

[0090] Specifically, the adjustment data input by the user is the feedback from the user after a period of use experience. In this embodiment, the execution subject of step 201 may be a server.

[0091] Among them, at least one of the adjustment algorithms corresponding to the high pressure conditions, medium pressure conditions, low pressure conditions and each transmission pressure level is adjusted according to the adjustment data, and the relevant preset proportional thresholds in the adjustment algorithms corresponding to the high pressure conditions, medium pressure conditions, low pressure conditions and each transmission pressure level are adjusted, so that the server load balancing value can be adjusted in combination with the actual needs of the user, providing a transmission rate that meets the user's usage needs and improving the user experience.

[0092] Embodiment 2:

[0093] Another embodiment of the present application relates to a proxy channel transmission rate adjustment device. The implementation details of the proxy channel transmission rate adjustment device of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The schematic diagram of the proxy channel transmission rate adjustment device of this embodiment can be as follows: Figure 7 As shown, it includes a data collection and analysis module 801, a determination module 802 and an adjustment module 803.

[0094] The data collection and analysis module 801 is used to obtain at least one of the average value, maximum value and minimum value of historical transmission rates corresponding to multiple transmission channels respectively, and obtain the actual transmission rates currently corresponding to the multiple transmission channels; the multiple transmission channels are transmission channels corresponding to the proxy service and each device respectively;

[0095] A determination module 802, configured to determine the overall transmission pressure level of the current proxy service according to the actual transmission rates of the plurality of transmission channels and the corresponding historical transmission rate average values, maximum values ​​and minimum values;

[0096] The adjustment module 803 is used to match the corresponding adjustment algorithm based on the transmission pressure level of the current proxy service, and adjust the transmission rate of each transmission channel through the adjustment algorithm.

[0097] The adjustment device provided in this embodiment acts on the server connected between the MQTT proxy service and the smart device to balance the server load through the channel rate adjustment service, thereby ensuring the reliability of message transmission, effectively alleviating the load pressure of the MQTT server and improving message processing efficiency.

[0098] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.

[0099] Embodiment three:

[0100] Another embodiment of the present application relates to a server, which is connected to various devices through a proxy service, and the server includes the aforementioned proxy channel transmission rate adjustment device.

[0101] Embodiment 4:

[0102] Another embodiment of the present application relates to an electronic device, such as Figure 8 As shown, it includes: at least one processor 901; and a memory 902 that is communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions that can be executed by the at least one processor 901, and the instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the method for adjusting the proxy channel transmission rate in the above-mentioned embodiments.

[0103] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0104] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0105] Embodiment five:

[0106] Another embodiment of the present application relates to a computer-readable storage medium, such as Fig. 9 As shown, a computer program 31 is stored. When the computer program 31 is executed by a processor, the above method embodiment is implemented.

[0107] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.

[0108] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A method for adjusting the transmission rate of a proxy service channel, characterized in that: include: Obtain at least one of an average value, a maximum value, and a minimum value of historical transmission rates respectively corresponding to the plurality of transmission channels; The multiple transmission channels are transmission channels corresponding to the proxy service and each device respectively; Obtaining actual transmission rates currently corresponding to the multiple transmission channels; Determine the overall transmission pressure level of the current proxy service according to the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values, and minimum values; A corresponding adjustment algorithm is matched based on the overall transmission pressure level of the current proxy service, and the transmission rate of each transmission channel is adjusted through the adjustment algorithm.

2. The method for adjusting the transmission rate of a proxy service channel according to claim 1, characterized in that: The obtaining at least one of an average value, a maximum value, and a minimum value of historical transmission rates respectively corresponding to the plurality of transmission channels comprises: Acquire historical transmission data corresponding to each of the plurality of transmission channels within a period; At least one of an average value, a maximum value, and a minimum value of historical transmission rates corresponding to a plurality of transmission channels is calculated using the historical transmission data.

3. The method for adjusting the transmission rate of a proxy service channel according to claim 1, characterized in that: The determining the overall transmission pressure level of the current proxy service according to the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values, and minimum values ​​includes: Performing transmission pressure analysis in sequence using the actual transmission rate of each transmission channel and at least one of the corresponding historical transmission rate average value, maximum value and minimum value to determine the current channel pressure of each transmission channel; The current transmission pressure level of the entire proxy service is determined according to the current channel pressure of each transmission channel.

4. The method for adjusting the transmission rate of a proxy service channel according to claim 3, characterized in that: The transmission pressure levels include, in descending order, a high-pressure transmission pressure level, a medium-pressure transmission pressure level and a low-pressure transmission pressure level; the high-pressure transmission pressure level, the medium-pressure transmission pressure level and the low-pressure transmission pressure level are respectively provided with a high-pressure condition, a medium-pressure condition and a low-pressure condition for determining the pressure level; The determining the transmission pressure level of the current proxy service according to the actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values, and minimum values ​​includes: The actual transmission rates of the multiple transmission channels and at least one of the corresponding historical transmission rate average values, maximum values ​​and minimum values ​​are analyzed and matched with the high pressure condition, medium pressure condition and low pressure condition in order of transmission pressure level from high to low until the corresponding conditions are matched, thereby determining the overall transmission pressure level of the proxy service.

5. The method for adjusting the transmission rate of a proxy service channel according to claim 4, characterized in that: The high-voltage condition includes a transmission channel among the plurality of transmission channels having an actual transmission rate that is less than a minimum value of the historical transmission rate; The adjustment algorithm corresponding to the high-pressure transmission pressure level includes: limiting the transmission rate of the transmission channel in the proxy service whose actual transmission rate is greater than the maximum historical transmission rate to the historical transmission rate average value through traffic shaping.

6. The method for adjusting the transmission rate of a proxy service channel according to claim 4, characterized in that: The medium voltage condition includes that the total number of transmission channels whose actual transmission rates are less than the average value of historical transmission rates among the plurality of transmission channels is greater than a first preset ratio threshold; The adjustment algorithm corresponding to the medium voltage transmission pressure level includes: selecting a preset number of transmission channels in the proxy service from a number of transmission channels whose actual transmission rates are greater than the historical transmission rate average, and limiting the transmission rates of the selected transmission channels to the historical transmission rate average through traffic shaping, until the proportion of the number of transmission channels whose actual transmission rates are less than the historical transmission rate average to the total number of transmission channels is less than or equal to a third preset proportion threshold.

7. The method for adjusting the transmission rate of a proxy service channel according to claim 4, characterized in that: The low-voltage condition includes that the total number of transmission channels whose actual transmission rates are less than the average value of historical transmission rates among the plurality of transmission channels is less than a second preset ratio threshold. The adjustment algorithm corresponding to the low-voltage transmission pressure level includes: releasing the preset transmission rate of the transmission channels in the proxy service whose actual transmission rate is lower than the historical transmission rate average in sequence, until the proportion of the number of transmission channels in the proxy service whose actual transmission rate is lower than the historical transmission rate average to the total number of transmission channels in the proxy service is less than or equal to a fourth preset proportion threshold.

8. The method for adjusting the transmission rate of a proxy service channel according to claim 4, characterized in that: Also includes: Get user input adjustment data; At least one of the adjustment algorithms corresponding to the high pressure condition, the medium pressure condition, the low pressure condition and each transmission pressure level is adjusted according to the adjustment data.

9. A device for adjusting the transmission rate of a proxy channel, characterized in that: include: A data collection and analysis module, used to obtain at least one of an average value, a maximum value and a minimum value of historical transmission rates corresponding to a plurality of transmission channels, and obtain actual transmission rates currently corresponding to the plurality of transmission channels; the plurality of transmission channels are transmission channels corresponding to the proxy service and each device, respectively; A determination module, configured to determine the overall transmission pressure level of the current proxy service according to the actual transmission rates of the plurality of transmission channels and the corresponding historical transmission rate average values, maximum values ​​and minimum values; The adjustment module is used to match the corresponding adjustment algorithm based on the overall transmission pressure level of the current proxy service, and adjust the transmission rate of each transmission channel through the adjustment algorithm.

10. A server, the server being connected to various devices via a proxy service, characterized in that: The server comprises the proxy channel transmission rate adjustment device according to claim 9.

11. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for adjusting the transmission rate of the proxy service channel as claimed in any one of claims 1 to 8.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for adjusting the transmission rate of the proxy service channel according to any one of claims 1 to 8 is implemented.