Traffic control method, device, server and storage medium for OTA download
By monitoring traffic and prioritizing interfaces for OTA download services, and utilizing MQTT communication protocol conversion, the problems of traffic channel congestion and high costs in OTA downloads were solved, resulting in a more efficient and secure OTA download process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN HAIXING ZHIJIA TECH CO LTD
- Filing Date
- 2022-10-20
- Publication Date
- 2026-08-04
AI Technical Summary
OTA downloads suffer from traffic channel congestion and high costs, especially when bandwidth is limited, which affects the user upgrade experience and poses security risks.
By monitoring the traffic of each service, the bandwidth usage of the OTA service is determined. Based on the difference, a traffic control strategy is determined. The PageRank algorithm is used to rank the importance of interfaces, and the HTTP communication protocol is converted to the low-bandwidth MQTT protocol to achieve adaptive traffic control.
It effectively solved the problem of traffic channel blockage, reduced costs, and improved the security and stability of the system, ensuring smooth OTA downloads.
Smart Images

Figure CN115843071B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network services, and more particularly to a method, apparatus, server, and storage medium for controlling traffic during OTA downloads. Background Technology
[0002] OTA (Over-The-Air) is an over-the-air upgrade technology based on SMS mechanisms, using mobile communication technology to upgrade systems wirelessly. With the rapid development of the Internet of Things (IoT), the security, stability, and functionality of IoT devices and products have received widespread attention. Wireless upgrade technology can securely and conveniently upgrade device firmware or software. At the same time, remote upgrades can significantly reduce costs and save resources, making it one of the key technologies for IoT device and product manufacturers.
[0003] However, during remote upgrades, OTA technology suffers from reduced transmission rates and higher network latency due to the large size of OTA packets and the large amount of data transmitted. Furthermore, during OTA downloads, with a fixed bandwidth channel, services compete for bandwidth, leading to channel congestion and impacting the user upgrade experience. Common industry solutions include: 1. Creating differential packets for OTA, such as... Figure 1 As shown, (1) a dictionary is formed for all substrings in the old file; (2) the old file and the new file are compared to generate file difference data and file update data; (3) the file difference data, file update data and corresponding control words are compressed into a patch package using zip. This scheme still has the problem of traffic channel blockage when creating differential packages for OTA. 2. Use a CDN distribution network, such as Figure 2 As shown, OTA packages are published to the network "edge" closest to the user. This approach is costly and poses security risks. Summary of the Invention
[0004] In view of this, in order to solve the above-mentioned technical problems or some of the technical problems, embodiments of the present invention provide a traffic control method, device, server and storage medium for OTA downloads.
[0005] In a first aspect, embodiments of the present invention provide a traffic control method for OTA downloads, comprising:
[0006] Traffic monitoring is performed on each service to obtain the service traffic corresponding to each service;
[0007] When the available bandwidth consumed by the OTA service is detected to be greater than a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth consumed by the OTA service and the preset threshold.
[0008] The OTA service traffic control is completed based on the traffic control strategy.
[0009] In one possible implementation, the method further includes:
[0010] Assign importance weights to the service interfaces of each service;
[0011] The service interfaces of each service are sorted from largest to smallest based on their importance weight values to obtain a sequence of importance weight values.
[0012] In one possible implementation, the method further includes:
[0013] The target number of services to be converted to communication protocols is determined based on the difference between the available bandwidth occupied by the OTA service and the preset threshold.
[0014] Based on the target number, services with an importance weight value less than the importance weight value of the OTA service and whose service traffic occupies a greater amount of available bandwidth than the OTA service are selected from the importance weight value sequence for communication protocol conversion.
[0015] In one possible implementation, the method further includes:
[0016] Convert the HTTP communication protocol of the target number of services into the MQTT communication protocol.
[0017] In one possible implementation, the method further includes:
[0018] Real-time monitoring of the service traffic of the OTA service;
[0019] When the service traffic of the OTA service returns to the preset target, the MQTT communication protocol service will be converted back to the HTTP communication protocol.
[0020] In one possible implementation, the method further includes:
[0021] Receive a service request, wherein the service request carries target service identifier information;
[0022] The target service is determined based on the target service identifier information, and the current communication protocol of the target service is queried.
[0023] Service data is transmitted based on the current communication protocol.
[0024] In one possible implementation, the method further includes:
[0025] The service data is compressed, and the compressed service data is transmitted through the current communication protocol.
[0026] Secondly, embodiments of the present invention provide a traffic control device for OTA downloads, comprising:
[0027] The monitoring module is used to monitor the traffic of each service and obtain the service traffic corresponding to each service.
[0028] The determination module is used to determine a traffic control strategy based on the difference between the available bandwidth occupied by the OTA service and the preset threshold when the monitored service traffic usage of the OTA service is greater than a preset threshold.
[0029] The control module is used to perform service traffic control for the OTA service based on the traffic control strategy.
[0030] Thirdly, embodiments of the present invention provide a server, including a processor and a memory, wherein the processor is configured to execute an OTA download traffic control program stored in the memory to implement the OTA download traffic control method described in the first aspect above.
[0031] Fourthly, embodiments of the present invention provide a storage medium, comprising: the storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the OTA download traffic control method described in the first aspect above.
[0032] The OTA download traffic control scheme provided in this invention monitors the traffic of each service to obtain the service traffic corresponding to each service. When the available bandwidth occupied by the service traffic of an OTA service exceeds a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth occupied by the OTA service's service traffic and the preset threshold. The service traffic control for the OTA service is then completed based on the traffic control strategy. Compared to existing OTA download technologies that still suffer from problems such as traffic channel congestion, high costs, and security risks, this scheme prioritizes interfaces based on their importance and performs adaptive traffic control for OTA downloads. For interfaces with low importance weights, asynchronous MQTT communication is used, trading time for space. This approach provides more channel traffic for OTA downloads, reduces costs, and ensures system security and stability. Attached Figure Description
[0033] Figure 1 A schematic diagram illustrating the creation of differential packets for existing OTA (Over-The-Air) communication.
[0034] Figure 2 This is a schematic diagram of an existing CDN distribution network.
[0035] Figure 3 A flowchart illustrating a traffic control method for OTA downloads provided in an embodiment of the present invention;
[0036] Figure 4 An interactive schematic diagram of an OTA download traffic control method provided in an embodiment of the present invention;
[0037] Figure 5 A flowchart illustrating another OTA download traffic control method provided in an embodiment of the present invention;
[0038] Figure 6 A flowchart illustrating a service access method provided in an embodiment of the present invention;
[0039] Figure 7 A schematic diagram of the structure of an OTA download traffic control device provided in an embodiment of the present invention;
[0040] Figure 8 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0043] Figure 3 This is a flowchart illustrating a traffic control method for OTA downloads provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the method specifically includes:
[0044] S31. Perform traffic monitoring on each service to obtain the service traffic corresponding to each service.
[0045] In this embodiment of the invention, a service mesh organization can be used to monitor the service traffic of all services provided by the system to obtain the service traffic corresponding to each service. The service traffic can measure the amount of bandwidth used by the service, and all services include OTA services.
[0046] S32. When it is detected that the service traffic of the OTA service occupies more than the preset threshold of available bandwidth, a traffic control strategy is determined based on the difference between the service traffic of the OTA service occupies more than the preset threshold.
[0047] S33. Based on the traffic control strategy, complete the service traffic control of the OTA service.
[0048] In this embodiment of the invention, a threshold for the amount of available bandwidth occupied by the OTA service under traffic control can be preset. When the preset threshold is reached or exceeded, the traffic control procedure is triggered. Traffic control may involve converting the communication protocol of other services to reduce bandwidth consumption, thereby providing more bandwidth and service traffic for the OTA service.
[0049] Optionally, a traffic control strategy can be determined based on the difference between the available bandwidth consumed by the OTA service's traffic and a preset threshold. This traffic control strategy can involve communication protocol conversion for one or more services. The target service for communication protocol conversion can be selected according to preset rules, the specific rules of which are detailed in [the relevant section]. Figure 5 The corresponding embodiments are described in detail.
[0050] Furthermore, based on the determined traffic control strategy, the communication protocol is converted for the target number of services to provide more bandwidth and service traffic for OTA services.
[0051] The OTA download traffic control method provided in this invention monitors the traffic of each service to obtain the service traffic corresponding to each service. When the available bandwidth occupied by the service traffic of an OTA service exceeds a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth occupied by the service traffic of the OTA service and the preset threshold. The service traffic control of the OTA service is then completed based on the traffic control strategy. Compared with existing OTA download technologies, which still suffer from problems such as traffic channel congestion, high costs, and security risks, this method prioritizes interfaces by prioritizing their importance and performs adaptive traffic control for OTA downloads. For interfaces with low importance weights, asynchronous MQTT communication is used, trading time for space. This approach can provide more channel traffic for OTA downloads, reduce costs, and ensure system security and stability.
[0052] Figure 5 This is a flowchart illustrating another OTA download traffic control method provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the method specifically includes:
[0053] S51. Assign importance weight scores to the service interfaces of each service.
[0054] S52. Sort the service interfaces of each service from largest to smallest based on their importance weight values to obtain a sequence of importance weight values.
[0055] The embodiments of the present invention are combined with Figure 4 The interactive diagram illustrating the OTA download traffic control method is provided below. In this embodiment of the invention, the PageRank algorithm can be used to assign importance weight values to the service interfaces of each service provided by the system. Then, based on the importance weight value scores, the service interfaces of each service are sorted from smallest to largest to obtain an importance weight value sequence.
[0056] like Figure 4 The PageRank interface uses a directed graph, where nodes A, B, C, and D represent web pages, directed edges between nodes represent hyperlinks between pages, and the weight of each edge represents the probability of a random jump between pages. Assume a browser is randomly walking across the internet. If the browser is on page A, the next step has a 1 / 3 probability of moving to pages B, C, or D. If the browser is on page B, the next step has a 1 / 2 probability of moving to pages A and D. If the browser is on page C, the next step has a 1 probability of moving to page A. If the browser is on page D, the next step has a 1 / 2 probability of moving to pages B and C. The more hyperlinks a page has pointing to it, the higher the probability of a random jump to that page, the higher the page's PageRank value, and the more important the page. PageRank calculation can be performed on the directed graph of the internet, typically as an iterative process. An initial distribution is assumed, and the PageRank value of all pages is calculated iteratively until convergence.
[0057] S53. Perform traffic monitoring on each service to obtain the service traffic corresponding to each service.
[0058] S54. Based on the difference between the available bandwidth occupied by the service traffic of the OTA service and the preset threshold, determine the target number of services to be converted to the communication protocol.
[0059] In this embodiment of the invention, a service mesh organization can be used to monitor the service traffic of all services provided by the system to obtain the service traffic corresponding to each service. The service traffic can measure the amount of bandwidth used by the service, and all services include OTA services.
[0060] When OTA service traffic growth is detected, and the OTA service traffic consuming more than a preset threshold (e.g., 90%) of available bandwidth, it is determined that traffic control is necessary. Furthermore, based on the difference between the OTA service traffic consuming available bandwidth and the preset threshold, the target number of services requiring communication protocol conversion is determined.
[0061] For example, if the OTA service's service traffic occupies 98% of the available bandwidth, the difference between the OTA service's service traffic occupies the available bandwidth and a preset threshold is 8%, and five services are detected whose combined bandwidth occupies 8% or more, then the target number of services requiring communication protocol conversion can be determined to be 5. Alternatively, if one service is detected with a bandwidth occupying 10%, then the target number of services requiring communication protocol conversion can be determined to be 1, and this service can also be identified as the target service for communication protocol conversion.
[0062] S55. Based on the target quantity, select from the importance weight value sequence services whose importance weight value is less than the importance weight value of the OTA service and whose service traffic occupies more available bandwidth than the target quantity of the OTA service for communication protocol conversion.
[0063] S56. Convert the HTTP communication protocol of the target number of services into the MQTT communication protocol.
[0064] Based on a defined target number of services to be converted to the communication protocol, target services with higher traffic than OTA services and lower importance weights are selected from the sequence of importance weight values for communication protocol conversion. Services with lower importance weights than OTA services are considered less important, allowing for increased transmission time and reduced bandwidth consumption through protocol conversion. The HTTP communication protocol of the target number of target services is converted to the MQTT communication protocol. Table 1 compares the differences between HTTP and MQTT; the MQTT communication protocol uses binary data for transmission, resulting in a smaller file size.
[0065] Table 1
[0066] model Request / Response Publish / Subscribe Features Standard HTTP Low bandwidth, low power consumption transport layer TCP TCP coding plain text binary
[0067] S57. Real-time monitoring of the service traffic of the OTA service.
[0068] S58. When the service traffic of the OTA service returns to the preset target, the MQTT communication protocol service is converted back to the HTTP communication protocol.
[0069] After converting the communication protocol of the target number of target services, the service traffic of the OTA service is monitored in real time. When the service traffic of the OTA service returns to the preset target (e.g., 40% of the bandwidth), the service of the MQTT communication protocol can be converted back to the HTTP communication protocol.
[0070] Figure 6This is a flowchart illustrating a service access method provided in an embodiment of the present invention, as shown below. Figure 6 As shown, the method specifically includes:
[0071] S61. Receive a service request, wherein the service request carries target service identifier information.
[0072] In this embodiment of the invention, after the communication protocol conversion for the service has been performed, the system receives a service request sent by the service caller, and the service request carries the identification information of the target service to be provided.
[0073] S62. Determine the target service based on the target service identifier information, and query the current communication protocol of the target service.
[0074] Identify the target service to be provided based on the identification information of the target service, and query the current communication protocol of the target service. At this time, the current communication protocol of the target service may be the MQTT communication protocol.
[0075] S63. Compress the service data and transmit the compressed service data through the current communication protocol.
[0076] The requested service data is compressed and transmitted using the current communication protocol (MQTT communication protocol). The service data includes, but is not limited to, files, videos, and audio data.
[0077] The OTA download traffic control method provided in this invention monitors the traffic of each service to obtain the service traffic corresponding to each service. When the available bandwidth occupied by the service traffic of an OTA service exceeds a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth occupied by the service traffic of the OTA service and the preset threshold. The service traffic control of the OTA service is then completed based on the traffic control strategy. This method, based on the PageRank algorithm to rank the importance of interfaces, performs adaptive traffic control for OTA downloads. For interfaces with low importance weights, asynchronous MQTT communication is used, trading time for space, which can provide more channel traffic for OTA downloads, reduce costs, and ensure system security and stability.
[0078] Figure 7 This is a schematic diagram of the structure of an OTA download traffic control device provided in an embodiment of the present invention, as shown below. Figure 7 As shown, it specifically includes:
[0079] The monitoring module 701 is used to monitor the traffic of each service and obtain the service traffic corresponding to each service. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0080] The determination module 702 is used to determine a traffic control strategy based on the difference between the available bandwidth occupied by the OTA service and the preset threshold when the monitored service traffic usage of the OTA service exceeds a preset threshold. For detailed explanation, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0081] The control module 703 is used to perform service traffic control for the OTA service based on the traffic control strategy. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0082] The OTA download traffic control device provided in this embodiment can be as follows: Figure 7 The OTA download traffic control device shown can perform actions such as Figure 3-6 All steps of the traffic control method for OTA downloads, thereby achieving Figure 3-6 For details on the technical effectiveness of the OTA download traffic control method shown, please refer to [link / reference needed]. Figure 3-6 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0083] Figure 8 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention. Figure 8 The server 800 shown includes at least one processor 801, memory 802, at least one network interface 804, and other user interfaces 803. The various components in the server 800 are coupled together via a bus system 805. It is understood that the bus system 805 is used to implement communication between these components. In addition to a data bus, the bus system 805 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 8 The general labeled all buses as Bus System 805.
[0084] The user interface 803 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).
[0085] It is understood that the memory 802 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 802 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0086] In some implementations, memory 802 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 8021 and application programs 8022.
[0087] The operating system 8021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 8022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this embodiment can be included in the application program 8022.
[0088] In this embodiment of the invention, by calling the program or instructions stored in the memory 802, specifically the program or instructions stored in the application program 8022, the processor 801 executes the method steps provided in each method embodiment, including, for example:
[0089] Traffic monitoring is performed on each service to obtain the service traffic corresponding to each service; when the available bandwidth occupied by the service traffic of the OTA service is found to be greater than a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth occupied by the service traffic of the OTA service and the preset threshold; and the service traffic control of the OTA service is completed based on the traffic control strategy.
[0090] In one possible implementation, the service interfaces of each service are scored with importance weight values; the service interfaces of each service are sorted from largest to smallest based on the importance weight values to obtain an importance weight value sequence.
[0091] In one possible implementation, a target number of services to be converted to communication protocols is determined based on the difference between the available bandwidth occupied by the OTA service's service traffic and the preset threshold. Based on the target number, services with an importance weight value less than the importance weight value of the OTA service and a service traffic occupied by available bandwidth greater than the target number of services are selected from the importance weight value sequence for communication protocol conversion.
[0092] In one possible implementation, the HTTP communication protocol of the target number of services is converted to the MQTT communication protocol.
[0093] In one possible implementation, the service traffic of the OTA service is monitored in real time; when the service traffic of the OTA service returns to a preset target, the MQTT communication protocol service is converted back to the HTTP communication protocol.
[0094] In one possible implementation, a service request is received, the service request carrying target service identification information; a target service is determined based on the target service identification information, and the current communication protocol of the target service is queried; service data is transmitted based on the current communication protocol.
[0095] In one possible implementation, the service data is compressed, and the compressed service data is transmitted via the current communication protocol.
[0096] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 801. Processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 801 or by instructions in the form of software. The processor 801 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 802. Processor 801 reads the information in memory 802 and, in conjunction with its hardware, completes the steps of the above method.
[0097] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0098] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0099] The server provided in this embodiment can be as follows: Figure 8 The server shown can perform, for example Figure 3-6 All steps of the traffic control method for OTA downloads, thereby achieving Figure 3-6 For details on the technical effectiveness of the OTA download traffic control method shown, please refer to [link / reference needed]. Figure 3-6 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0100] This invention also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; the memory may also include combinations of the above types of memory.
[0101] When one or more programs in the storage medium can be executed by one or more processors to implement the above-described OTA download traffic control method executed on the server side.
[0102] The processor is used to execute the OTA download traffic control program stored in the memory to implement the following steps of the OTA download traffic control method executed on the server side:
[0103] Traffic monitoring is performed on each service to obtain the service traffic corresponding to each service; when the available bandwidth occupied by the service traffic of the OTA service is found to be greater than a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth occupied by the service traffic of the OTA service and the preset threshold; and the service traffic control of the OTA service is completed based on the traffic control strategy.
[0104] In one possible implementation, the service interfaces of each service are scored with importance weight values; the service interfaces of each service are sorted from largest to smallest based on the importance weight values to obtain an importance weight value sequence.
[0105] In one possible implementation, a target number of services to be converted to communication protocols is determined based on the difference between the available bandwidth occupied by the OTA service's service traffic and the preset threshold. Based on the target number, services with an importance weight value less than the importance weight value of the OTA service and a service traffic occupied by available bandwidth greater than the target number of services are selected from the importance weight value sequence for communication protocol conversion.
[0106] In one possible implementation, the HTTP communication protocol of the target number of services is converted to the MQTT communication protocol.
[0107] In one possible implementation, the service traffic of the OTA service is monitored in real time; when the service traffic of the OTA service returns to a preset target, the MQTT communication protocol service is converted back to the HTTP communication protocol.
[0108] In one possible implementation, a service request is received, the service request carrying target service identification information; a target service is determined based on the target service identification information, and the current communication protocol of the target service is queried; service data is transmitted based on the current communication protocol.
[0109] In one possible implementation, the service data is compressed, and the compressed service data is transmitted via the current communication protocol.
[0110] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0111] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0112] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for controlling traffic during OTA downloads, characterized in that, include: Traffic monitoring is performed on each service to obtain the service traffic corresponding to each service; When the available bandwidth consumed by the OTA service is detected to be greater than a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth consumed by the OTA service and the preset threshold. The service traffic control for the OTA service is completed based on the aforementioned traffic control strategy. The method further includes: Assign importance weights to the service interfaces of each service; The service interfaces of each service are sorted from largest to smallest based on their importance weight values to obtain a sequence of importance weight values; When the available bandwidth usage of the OTA service is detected to be greater than a preset threshold, a traffic control strategy is determined based on the difference between the available bandwidth usage of the OTA service and the preset threshold, including: The target number of services to be converted to communication protocols is determined based on the difference between the available bandwidth occupied by the OTA service and the preset threshold. Based on the target number, services with an importance weight value less than the importance weight value of the OTA service and whose service traffic occupies more than the difference in available bandwidth are selected from the importance weight value sequence for communication protocol conversion.
2. The method according to claim 1, characterized in that, The process of controlling the service traffic of the OTA service based on the traffic control strategy includes: Convert the HTTP communication protocol of the target number of services into the MQTT communication protocol.
3. The method according to claim 2, characterized in that, The method further includes: Real-time monitoring of the service traffic of the OTA service; When the service traffic of the OTA service returns to the preset target, the MQTT communication protocol service will be converted back to the HTTP communication protocol.
4. The method according to claim 2, characterized in that, The method further includes: Receive a service request, wherein the service request carries target service identifier information; The target service is determined based on the target service identifier information, and the current communication protocol of the target service is queried. Service data is transmitted based on the current communication protocol.
5. The method according to claim 4, characterized in that, The transmission of service data based on the current communication protocol includes: The service data is compressed, and the compressed service data is transmitted through the current communication protocol.
6. A traffic control device for OTA downloads, applied to the traffic control method for OTA downloads as described in any one of claims 1-5, characterized in that, include: The monitoring module is used to monitor the traffic of each service and obtain the service traffic corresponding to each service. The determination module is used to determine a traffic control strategy based on the difference between the available bandwidth occupied by the OTA service and the preset threshold when the monitored service traffic usage of the OTA service is greater than a preset threshold. The control module is used to perform service traffic control for the OTA service based on the traffic control strategy.
7. A server, characterized in that, include: A processor and a memory, the processor being configured to execute an OTA download traffic control program stored in the memory to implement the OTA download traffic control method according to any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the OTA download traffic control method according to any one of claims 1 to 5.