Network optimization method and device based on multi-time scale event, and storage medium
By introducing the concept of multi-time scale events in network optimization, using multi-level time windows and event type analysis, the problem of inaccurate packet loss rate measurement in the prior art is solved, and more efficient and targeted network optimization is achieved.
Patent Information
- Application Number
- CN202411917763.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art cannot distinguish short-term centralized packet loss from randomly distributed packet loss when measuring packet loss rate, resulting in inaccurate network optimization and low efficiency.
A network optimization method based on multi-time scale events is adopted. Through layer- nested multi-level time windows, an effective time window is determined based on the number and type of packet loss events, and an optimization strategy for network communication parameters is generated.
It realizes accurate distribution analysis of packet loss rate over different time periods, flexibly adjusts optimization strategies, improves network optimization efficiency and targetedness, and is suitable for IoT terminal devices with resource-constrained.
Smart Images

Figure CN119892630A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a network optimization method, device and storage medium based on multi-time scale events. Background Art
[0002] In the 5G era, with the continuous growth of network traffic, the optimization needs such as traffic-driven network availability are becoming more and more obvious. At present, the packet loss rate is used to measure network availability, but the existing logic of measuring the packet loss rate is simple, resulting in inaccurate measurement. Generally, the time length for measuring the packet loss rate is set, and then the count starts from the starting time. Every time a data packet is sent, the counter of the total number of packets sent is added by 1. Every time a data packet is successfully sent, the counter of the number of packets sent is added by 1. In this way, when the end time of the time length is reached, the packet loss rate is obtained. Then the measurement of the next time period is carried out, and the packet loss rate of multiple time periods is obtained by repeating this process. However, the above method only calculates the packet loss rate based on the total number of packets sent and the number of packets sent successfully according to the two counters. It cannot distinguish whether it is a short-term concentrated packet loss or a randomly distributed packet loss in the entire time period. The network optimization is incorrect because it cannot distinguish between the different situations of short-term concentrated packet loss and random packet loss. For example, the packet loss rate within 10 minutes is 3%, but it is impossible to determine whether this 3% packet loss rate is short-term continuous packet loss within a few seconds or a minute, or long-term continuous or intermittent packet loss that is evenly or randomly distributed throughout the 10 minutes. If it should be judged as short-term continuous packet loss but it is actually randomly distributed packet loss in the entire time period, the network parameters will be adjusted too late, resulting in insufficient correction. Or if it should be judged as randomly distributed packet loss in the entire time period but it is actually short-term continuous packet loss, the network parameters will be adjusted too early, resulting in overcorrection. Although there are already methods for measuring packet loss rate using artificial intelligence algorithms, this method consumes a lot of resources, and the existing algorithms cannot be directly deployed on resource-constrained IoT terminal devices, and cannot directly meet network optimization needs, resulting in low efficiency of current network optimization methods.
[0003] Therefore, in the related technology, there is a technical problem of low network optimization efficiency.
[0004] With regard to the technical problem of low network optimization efficiency in related technologies, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a network optimization method, device and storage medium based on multi-time scale events, so as to at least solve the technical problem of low network optimization efficiency in related technologies.
[0006] According to an embodiment of the embodiments of the present application, a network optimization method based on multi-time scale events is provided, wherein the multi-time scale events correspond to multi-level time windows with nested layers, and for adjacent upper time windows and lower time windows in the multi-level time windows, the length of a single time slice of the upper time window is the same as the full time slice length of the lower time window, including: determining the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication; determining the effective time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the effective time window is greater than a preset threshold; generating a parameter optimization strategy for network communication parameters according to the nesting level of the effective time window in the multi-level time window, and using the parameter optimization strategy to optimize the network communication parameters in the effective time window.
[0007] In an exemplary embodiment, the event distribution breadth of the packet loss event within the multi-level time windows is determined based on the number of occurrences of the packet loss event during communication, including: for each level of time windows within the multi-level time windows, determining a storage unit for recording an event flag corresponding to a time slice of the each level of time windows, wherein the storage unit represents a bit in a binary integer, a first flag value of the event flag is used to indicate that no packet loss event has occurred in the time slice, and a second flag value of the event flag is used to indicate that a packet loss event has occurred in the time slice; determining a time slice with an event flag having a second flag value from all time slices within the each level of time windows, and determining the time slice with the event flag having the second flag value as a target time slice; determining a ratio of the number of the target time slices to the number of all time slices, and determining the event distribution breadth of the packet loss event within the each level of time windows based on the ratio.
[0008] In an exemplary embodiment, the time slices of each level of time windows have a first-in-first-out structure, and the time slice numbers of the time slices are generated according to the first-in-first-out structure; before determining the event distribution breadth of the packet loss events within the multi-level time windows according to the number of occurrences of the packet loss events during communication, the method further includes: generating a time rolling order corresponding to each level of time windows according to the size of the time slice numbers; writing the flag values of the event flags into the time slices of each level of time windows in sequence according to the time rolling order, wherein the flag value written from the lowest bit is moved out from the highest bit after a bitwise shift operation.
[0009] In an exemplary embodiment, the effective time window of the multi-time scale event is determined from the multi-level time window according to the event type of the multi-time scale event, including: the event type of the multi-time scale event includes at least a first time scale event for a short period of time, and a first-level time window at the bottom layer is determined from the multi-level time window; when it is determined that the event distribution breadth corresponding to the first-level time window is greater than a preset threshold, the first-level time window is determined as the effective time window of the first time scale event.
[0010] In an exemplary embodiment, a valid time window of the multi-time scale event is determined from the multi-level time window according to the event type of the multi-time scale event, including: the event type of the multi-time scale event includes at least a second time scale event for a long period of time, and a second-level time window at the top level is determined from the multi-level time window; when it is determined that the event distribution breadth corresponding to the first-level time window is greater than a preset threshold, the second-level time window is determined as the valid time window of the second time scale event.
[0011] In an exemplary embodiment, the effective time window of the multi-time scale event is determined from the multi-level time window according to the event type of the multi-time scale event, including: the event type of the multi-time scale event includes at least a third time scale event for delay and jitter, and a third-level time window located in the middle layer is determined from the multi-level time window; when it is determined that the event distribution breadth corresponding to the third-level time window is greater than a preset threshold, the third-level time window is determined as the effective time window of the third time scale event.
[0012] In an exemplary embodiment, a valid time window of the multi-time scale event is determined from the multi-level time window according to the event type of the multi-time scale event, including: the event type of the multi-time scale event includes at least a fourth time scale event for different time periods, and a time window whose event distribution breadth is greater than a preset threshold is determined from the multi-level time window; and multiple time windows are determined as valid time windows of the fourth time scale event.
[0013] According to another aspect of an embodiment of the present application, a network optimization device based on multi-time scale events is also provided, including: a first determination module, used to determine the event distribution breadth of the packet loss event in a multi-level time window according to the number of occurrences of the packet loss event during communication; a second determination module, used to determine the effective time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the effective time window is greater than a preset threshold; an optimization module, used to generate a parameter optimization strategy for network communication parameters according to the nested level of the effective time window in the multi-level time window, and use the parameter optimization strategy to optimize the network communication parameters in the effective time window.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned network optimization method based on multi-time-scale events when running.
[0015] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the network optimization method based on multi-time scale events through the computer program.
[0016] In an embodiment of the present application, the event distribution breadth of the packet loss event in the multi-level time window is determined according to the number of occurrences of the packet loss event during communication; the effective time window of the multi-time scale event is determined from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the effective time window is greater than a preset threshold; the parameter optimization strategy of the network communication parameters is generated according to the nested level of the effective time window in the multi-level time window, and the network communication parameters in the effective time window are optimized using the parameter optimization strategy; adopting the above technical solution, by introducing the concept of multi-time scale events, the distribution of the packet loss rate in the time period can be accurately represented, and multiple time scales can be flexibly set for packet loss measurement, which can more finely solve the communication problems in different time periods, and intelligently select the optimization strategy according to the distribution of different event types in different time windows, and consume very little memory and computing resources, and do not rely on any operating system and operating environment, and can be easily deployed on resource-constrained IoT terminal devices. Not only solves the technical problem of low network optimization efficiency, but also improves the efficiency and pertinence of network optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a hardware environment diagram of a network optimization method based on multi-time scale events according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a network optimization method based on multi-time scale events according to an embodiment of the present application;
[0021] Figure 3 is a structural schematic diagram of a time window according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a structure of a multi-level time window according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of a rolling principle of a time window according to an embodiment of the present application;
[0024] Figure 6 It is a structural block diagram of a network optimization device based on multi-time scale events according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] According to one aspect of an embodiment of the present application, a network optimization method based on multi-time scale events is provided. The network optimization method based on multi-time scale events is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned network optimization method based on multi-time scale events can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0028] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0029] In this embodiment, a network optimization method based on multi-time scale events is provided, which is applied to the above terminal device. Figure 2 : is a flowchart of a network optimization method based on multi-time scale events according to an embodiment of the present application, and the process includes the following steps:
[0030] Step S202, determining the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication;
[0031] Step S204, determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the valid time window is greater than a preset threshold;
[0032] Step S206: generating a parameter optimization strategy for network communication parameters according to the nesting level of the valid time window in the multi-level time window, and optimizing the network communication parameters in the valid time window using the parameter optimization strategy.
[0033] Optionally, network communication parameters include network availability and network stability. In the Internet of Things and network communication industries, communication network availability is a very important indicator, because the network's adaptive parameter adjustment and self-healing function usually work in conjunction with network availability measurement. When the measurement finds that the network availability is lower than the threshold, the communication parameters are dynamically adjusted for self-healing. For example: dynamically adjust the transmission power, dynamically adjust the number of retransmissions, dynamically switch to other networks, etc. Therefore, accurately judging network availability is very important for network stability and self-healing capabilities.
[0034] Network availability is usually measured in terms of the percentage of network availability time, that is, the percentage of network availability time in a period of time to the total time. The specific length of this period of time has different definitions based on specific applications, such as network availability time in a day / network effective time in a day. By optimizing network communication parameters such as network availability, we can meet network development needs, improve network service quality, reduce network failure rates, increase network resource utilization, and improve user experience.
[0035] Through the above steps, the event distribution breadth of the packet loss event in the multi-level time window is determined according to the number of occurrences of the packet loss event during communication; the effective time window of the multi-time scale event is determined from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the effective time window is greater than the preset threshold; the parameter optimization strategy of the network communication parameters is generated according to the nested level of the effective time window in the multi-level time window, and the network communication parameters in the effective time window are optimized using the parameter optimization strategy; the above technical solution is adopted, by introducing the concept of multi-time scale events, the distribution of the packet loss rate in the time period can be accurately represented, and multiple time scales can be flexibly set for packet loss measurement, which can more finely solve the communication problems in different time periods, and intelligently select the optimization strategy according to the distribution of different event types in different time windows, and consume very little memory and computing resources, and do not rely on any operating system and operating environment, and can be easily deployed on resource-constrained IoT terminal devices. It not only solves the technical problem of low network optimization efficiency, but also improves the efficiency and pertinence of network optimization.
[0036] By applying the above-mentioned method of the present application in actual scenarios, the quality of network communication can be significantly improved, communication failures can be reduced, and user experience can be enhanced. It is suitable for application scenarios with high real-time requirements and large data volumes, such as online education, video conferencing, and telemedicine, and has broad application benefits and market potential.
[0037] In an exemplary embodiment, the implementation process of determining the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication specifically includes: for each level of time window in the multi-level time window, determining a storage unit for recording the event flag corresponding to the time slice of each level of time window, wherein the storage unit represents a bit in a binary integer, the first flag value of the event flag is used to indicate that no packet loss event occurs in the time slice, and the second flag value of the event flag is used to indicate that a packet loss event occurs in the time slice; determining the time slice with the event flag of the second flag value from all time slices in each level of time window, and determining the time slice with the event flag of the second flag value as the target time slice; determining the ratio of the number of the target time slices to the number of all time slices, and determining the event distribution breadth of the packet loss event in each level of time window according to the ratio. In this way, the distribution of packet loss events can be analyzed more carefully, providing more accurate data support for network optimization, and is suitable for scenarios such as financial transactions and distance education that require high-precision network monitoring.
[0038] Each storage unit corresponds to a time slice.
[0039] It can be understood that, in this embodiment, the number of target time slices corresponds to the number of occurrences of the event, that is, for example, 1 target time slice indicates that the packet loss event has occurred once.
[0040] In one embodiment, for time windows at different nested levels, the number of binary integers with BIT of 1 is counted respectively, and the ratio of the number of BITs of 1 to the total bit width of the binary integer is calculated, so as to obtain the event distribution breadth. If the event distribution breadth is greater than the threshold, it is identified as a valid time window. In this embodiment, it is further possible to judge whether windows of different levels are valid according to the event type, so as to select the bottom layer, middle layer or upper layer time window structure in the multi-level window structure for event pattern analysis, or to comprehensively judge the event pattern by multiple time window structures in the multi-level window structure. For example, for event types that need to be judged in a shorter period of time (corresponding to the first time scale event), it is judged whether the bottom layer window (i.e., the first level time window) is valid by judging whether the event distribution breadth of the bottom layer window (i.e., the first level time window) is greater than the threshold. If valid, the bottom layer window is used as the time scale for observation, and the distribution of packet loss events on the time scale is analyzed. For event types (corresponding to the second time scale event) in which events frequently occur during long-term operation, it is judged whether the upper layer window (i.e., the second level time window) is valid. For event types that allow a certain processing delay and require enhanced jitter elimination (corresponding to the third time scale event), determine whether the intermediate window (i.e., the third level time window) is effective. For event types that require a short time to make a judgment and pay attention to long-term operation stability (corresponding to the fourth time scale event), a multi-window comprehensive judgment is performed.
[0041] In an exemplary embodiment, the time slices of each level of time window have a first-in-first-out structure, and the time slice numbers of the time slices are generated according to the first-in-first-out structure; before determining the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication, further, the time rolling order corresponding to each level of time window can be generated according to the size of the time slice number; the flag value of the event flag is written to the time slice of each level of time window in sequence according to the time rolling order, wherein the flag value written from the lowest bit is moved out from the highest bit after a bitwise shift operation. This first-in-first-out time slice structure can ensure the real-time and continuity of data, and is suitable for scenarios such as online video and real-time voice communication that require real-time monitoring of network status.
[0042] Optionally, when it is determined that a packet loss event occurs within the time slice of each level of time window, the second flag value of the event flag can be written into the time slice of each level of time window; when it is determined that no packet loss event occurs within the time slice of each level of time window, the first flag value of the event flag can be written into the time slice of each level of time window.
[0043] Optionally, the structure of the above time window is as follows Figure 3 As shown in the figure, the window structure of the binary FIFO includes multiple time slices, and the rolling time window structure realizes rolling measurement along the continuous time axis. Each time slice corresponds to a bit in the binary integer, which is used to record whether an event has occurred in the time slice. For example, when a packet loss event occurs, the flag value used to indicate the occurrence of the packet loss event is written to the lowest bit of the time window, and as new time slices are added, the time slices in the time window structure are shifted left bit by bit.
[0044] In an optional embodiment, a storage unit is used to store a flag value indicating whether an event has occurred in a fixed time slice. For example, the time slice numbers can be arranged from small to large, with the rightmost time slice number being the smallest and the leftmost time slice number being the largest, and the time scrolling order being from right to left. Then the flag value of the event flag can be moved in from the rightmost end and moved out from the leftmost end. In the time slice corresponding to the current time, if a new packet loss event occurs, the event flag is written to the rightmost end, and a storage unit is moved to the left each time a time slice window passes. As the window moves, the old event flag that occurred before is moved out from the leftmost end of the window, so that it is ensured that the window range always stores whether an event has occurred in each time slice of the most recent period of time. Since the leftmost side of the window is equal to the current latest time, and the time slices in the window are evenly divided, the moment when the event occurs in each time slice in the window can be deduced from the current time forward: that is, the current time-(time slice length × time slice sequence number), so that the method of recording the moment when the event occurs is indirectly realized.
[0045] Then, a binary integer (e.g., 8 BITS, 16 BITS, or 32 BITS) is specifically defined to correspond to the entire window storage entity. Whether each BIT in the binary integer is 1 represents whether an event occurs in the corresponding time slice in the window. The left shift operator can be used to achieve the left shift of the binary integer, which represents the movement of the window with the time slice. When an event occurs at the current moment, 1 is written to the lowest bit of the binary integer, which can be achieved using the bitwise OR operator.
[0046] Furthermore, for situations where there is short-term concentrated packet loss or randomly distributed packet loss throughout the entire time period, two levels of time scale events can be defined to measure packet loss. Among them, in order to facilitate the identification of frequent events on an observation scale of several minutes, taking the length of the time window as 8 time slices and the time slice unit as 1 minute as an example, the window time width is 8 1 minutes = 8 minutes. In order to facilitate the observation of frequent events on a one-hour scale, this 8-minute time window is viewed as a large time slice, and then a long window consisting of 8 large time slices is formed, that is, 8 8-minute windows. By analogy, the following can be formed: Figure 4The nested multi-level time windows shown in the figure. The time slice of the lower time window is used as the time slice input of the upper (i.e., top) time window structure. Specifically, the time length of the entire lower window is used as the length of a single time slice of the upper window, and the event moved out of the leftmost lower window is written from the rightmost of the upper window. Every time a full width of the lower window is moved, the upper window can move a time slice. Therefore, the upper window moves slower, thereby realizing the discrimination of event density at different observation scales.
[0047] The time window including 8 time slices is expressed as follows in C language:
[0048] uint8_t event_win_bits; / / corresponds to the entire window storage entity;
[0049] event_win_bits<<=1; / / Window scrolls over time;
[0050] event_win_bits|=1; / / Write 1 to the lowest bit when an event occurs.
[0051] In an exemplary embodiment, further, the implementation process of determining the effective time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event can also include: the event type of the multi-time scale event includes at least a first time scale event for a short period of time, and the first-level time window at the bottom is determined from the multi-level time window; when it is determined that the event distribution breadth corresponding to the first-level time window is greater than a preset threshold, the first-level time window is determined as the effective time window of the first time scale event. This method can quickly respond to network problems in a short period of time, can quickly adjust network parameters, and reduce delays and packet loss.
[0052] In an exemplary embodiment, the technical solution for determining the effective time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event may include: the event type of the multi-time scale event includes at least a second time scale event for a long period of time, and the second level time window at the top level is determined from the multi-level time window; when it is determined that the event distribution breadth corresponding to the first level time window is greater than a preset threshold, the second level time window is determined as the effective time window of the second time scale event. This method improves the quality of network communication over a long period of time and optimizes network communication performance.
[0053] In an exemplary embodiment, the process of determining the effective time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event may include: the event type of the multi-time scale event includes at least a third time scale event for delay and jitter, and the third-level time window located in the middle layer is determined from the multi-level time window; when it is determined that the event distribution breadth corresponding to the third-level time window is greater than a preset threshold, the third-level time window is determined as the effective time window of the third time scale event. This method can effectively monitor and optimize the delay and jitter of the network, is suitable for application scenarios that are sensitive to delay, and can provide a smoother and more stable network experience.
[0054] In an exemplary embodiment, the process of determining the effective time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event is further implemented by the following steps: the event type of the multi-time scale event includes at least a fourth time scale event for different time periods, and a time window whose event distribution breadth is greater than a preset threshold is determined from the multi-level time window; multiple time windows are determined as the effective time windows of the fourth time scale event. This method can comprehensively analyze network problems of different time scales and improve network performance in all aspects.
[0055] In order to better understand the process of the above-mentioned network optimization method based on multi-time-scale events, the implementation method flow of the above-mentioned network optimization based on multi-time-scale events is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
[0056] In one embodiment, in combination Figure 5 Provides an explanation of the network optimization process based on multi-time scale events, such as Figure 5As shown, taking one minute as a time slice as an example, two layers of nested time windows are established, each time window includes 8 time slices, and the process of event input and window movement is sequentially displayed along the time axis. Among them, the bottom window moves to the left once every 1 minute, so the corresponding binary integer is shifted to the left by one BIT, and if an event occurs within this minute, it is sent to the rightmost side of the window, that is, the lowest bit of the binary integer is written. This embodiment uses binary integers to implement multi-level time windows, which can quickly determine the corresponding effective time window according to the event type, and adjust the network performance parameters in time according to the packet loss rate within the effective time window, greatly improving the adaptive ability of network adjustment, simple logic, low memory consumption, and can be easily deployed on resource-constrained terminal devices. Through continuous iteration and optimization, the solution of this application can adapt to the ever-changing network environment, provide users with continuous and stable network services, and also provide network operators with effective network management and optimization tools, which helps to improve network operation efficiency and reduce maintenance costs. Driven by emerging technologies such as big data, the Internet of Things, and 5G, the solution of this application will show greater application value and lay the foundation for building a smart and efficient network environment.
[0057] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0058] Figure 6 is a structural block diagram of a network optimization device based on multi-time scale events according to an embodiment of the present application; Figure 6 As shown, including:
[0059] A first determination module 62, configured to determine the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication;
[0060] A second determination module 64 is used to determine a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the valid time window is greater than a preset threshold;
[0061] The optimization module 66 is used to generate a parameter optimization strategy for network communication parameters according to the nesting level of the effective time window in the multi-level time window, and use the parameter optimization strategy to optimize the network communication parameters in the effective time window.
[0062] Through the above device, the event distribution breadth of the packet loss event in the multi-level time window is determined according to the number of occurrences of the packet loss event during communication; the effective time window of the multi-time scale event is determined from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the effective time window is greater than the preset threshold; the parameter optimization strategy of the network communication parameters is generated according to the nested level of the effective time window in the multi-level time window, and the network communication parameters in the effective time window are optimized using the parameter optimization strategy; the above technical solution is adopted, by introducing the concept of multi-time scale events, the distribution of the packet loss rate in the time period can be accurately represented, and multiple time scales can be flexibly set for packet loss measurement, which can more finely solve the communication problems in different time periods, and intelligently select the optimization strategy according to the distribution of different event types in different time windows, and consume very little memory and computing resources, and do not rely on any operating system and operating environment, and can be easily deployed on resource-constrained IoT terminal devices. It not only solves the technical problem of low network optimization efficiency, but also improves the efficiency and pertinence of network optimization.
[0063] In an exemplary embodiment, the first determination module is also used to: determine, for each level of time windows in the multi-level time windows, a storage unit for recording an event flag corresponding to a time slice of each level of time windows, wherein the storage unit represents a bit in a binary integer, a first flag value of the event flag is used to indicate that no packet loss event occurred in the time slice, and a second flag value of the event flag is used to indicate that a packet loss event occurred in the time slice; determine a time slice with an event flag having a second flag value from all time slices in each level of time windows, and determine the time slice with the event flag having the second flag value as a target time slice; determine the ratio of the number of the target time slices to the number of all time slices, and determine the event distribution breadth of the packet loss event in each level of time windows according to the ratio.
[0064] In an exemplary embodiment, the time slices of each level of time windows have a first-in-first-out structure, and the time slice numbers of the time slices are generated according to the first-in-first-out structure; the first determination module is also used to: before determining the event distribution breadth of the packet loss event within the multi-level time windows according to the number of occurrences of the packet loss event during communication, further, generate a time rolling order corresponding to each level of time windows according to the size of the time slice numbers; write the flag value of the event flag to the time slices of each level of time windows in sequence according to the time rolling order, wherein the flag value written from the lowest bit is moved out from the highest bit after a bitwise shift operation.
[0065] In an exemplary embodiment, further, the event type of the multi-time scale event includes at least a first time scale event for a short period of time, and the second determination module is also used to: determine the first-level time window at the bottom layer from the multi-level time windows; when it is determined that the event distribution breadth corresponding to the first-level time window is greater than a preset threshold, determine the first-level time window as a valid time window of the first time scale event.
[0066] In an exemplary embodiment, the event types of the multi-time scale events include at least second time scale events for long periods of time, and the second determination module is further used to: determine the second-level time window at the top level from the multi-level time windows; and when it is determined that the event distribution breadth corresponding to the first-level time window is greater than a preset threshold, determine the second-level time window as a valid time window for the second time scale event.
[0067] In an exemplary embodiment, the event types of the multi-time scale events include at least a third time scale event for delay and jitter, and the second determination module is further used to: determine a third-level time window located in the middle layer from the multi-level time windows; when it is determined that the event distribution breadth corresponding to the third-level time window is greater than a preset threshold, determine the third-level time window as a valid time window for the third time scale event.
[0068] In an exemplary embodiment, the event type of the multi-time scale event includes at least a fourth time scale event for different time periods, and the second determination module is further used to: further implement the process of determining the effective time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event through the following steps: determining a time window in which the event distribution breadth is greater than a preset threshold from the multi-level time window; and determining multiple time windows as effective time windows of the fourth time scale event.
[0069] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0070] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0071] S1, determining the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication;
[0072] S2, determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the valid time window is greater than a preset threshold;
[0073] S3, generating a parameter optimization strategy for network communication parameters according to the nesting level of the valid time window in the multi-level time window, and optimizing the network communication parameters in the valid time window using the parameter optimization strategy.
[0074] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0075] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0076] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0077] S1, determining the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication;
[0078] S2, determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the valid time window is greater than a preset threshold;
[0079] S3, generating a parameter optimization strategy for network communication parameters according to the nesting level of the valid time window in the multi-level time window, and optimizing the network communication parameters in the valid time window using the parameter optimization strategy.
[0080] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0081] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0082] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0083] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A network optimization method based on multi-time scale events, characterized in that: The multi-time scale event corresponds to a multi-level time window with nested layers, and for an adjacent upper time window and a lower time window in the multi-level time window, the length of a single time slice of the upper time window is the same as the length of a complete time slice of the lower time window, including: Determining the event distribution breadth of the packet loss event within the multi-level time window according to the number of occurrences of the packet loss event during communication; Determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the valid time window is greater than a preset threshold; A parameter optimization strategy for network communication parameters is generated according to the nesting level of the effective time window in the multi-level time window, and the network communication parameters in the effective time window are optimized using the parameter optimization strategy.
2. The network optimization method based on multi-time scale events according to claim 1, characterized in that: Determining the event distribution breadth of the packet loss event within the multi-level time window according to the number of occurrences of the packet loss event during communication includes: For each level of time windows in the multi-level time windows, determine a storage unit for recording an event flag corresponding to a time slice of each level of time windows, wherein the storage unit represents a bit in a binary integer, a first flag value of the event flag is used to indicate that no packet loss event occurs in the time slice, and a second flag value of the event flag is used to indicate that a packet loss event occurs in the time slice; Determine a time slice with an event mark having a second mark value from all time slices in each level of the time window, and determine the time slice with the event mark having the second mark value as a target time slice; The ratio of the number of the target time slices to the number of all the time slices is determined, and the event distribution breadth of the packet loss event in each level of time window is determined according to the ratio.
3. The network optimization method based on multi-time scale events according to claim 2 is characterized in that: The time slices of each level of time window have a first-in-first-out structure, and the time slice numbers of the time slices are generated according to the first-in-first-out structure; before determining the event distribution breadth of the packet loss event in the multi-level time window according to the number of occurrences of the packet loss event during communication, the method further includes: Generate a time scrolling order corresponding to each level of time window according to the size of the time slice number; The flag value of the event flag is written into the time slice of each level of the time window in sequence according to the time rolling order, wherein the flag value written from the lowest bit is shifted out from the highest bit after a bitwise shift operation.
4. The network optimization method based on multi-time scale events according to claim 1, characterized in that: Determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event includes: The event type of the multi-time scale event includes at least a first time scale event for a short period of time, and a first level time window located at the bottom layer is determined from the multi-level time windows; When it is determined that the event distribution breadth corresponding to the first-level time window is greater than a preset threshold, the first-level time window is determined as a valid time window for the first time scale event.
5. The network optimization method based on multi-time scale events according to claim 1, characterized in that: Determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event includes: The event type of the multi-time scale event at least includes a second time scale event for a long period of time, and a second level time window located at the top level is determined from the multi-level time windows; When it is determined that the event distribution breadth corresponding to the second-level time window is greater than a preset threshold, the second-level time window is determined as a valid time window for the second time scale event.
6. The network optimization method based on multi-time scale events according to claim 1, characterized in that: Determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event includes: The event types of the multi-time scale events include at least a third time scale event for delay and jitter, and a third level time window located in the middle layer is determined from the multi-level time windows; When it is determined that the event distribution breadth corresponding to the third-level time window is greater than a preset threshold, the third-level time window is determined as a valid time window for the third time scale event.
7. The network optimization method based on multi-time scale events according to claim 1, characterized in that: Determining a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event includes: The event types of the multi-time scale events include at least fourth time scale events for different time periods, and a time window whose event distribution breadth is greater than a preset threshold is determined from the multi-level time windows; A plurality of time windows are all determined as valid time windows for the fourth time scale event.
8. A network optimization device based on multi-time scale events, characterized in that: include: A first determination module, configured to determine the event distribution breadth of the packet loss event in a multi-level time window according to the number of occurrences of the packet loss event during communication; A second determination module is used to determine a valid time window of the multi-time scale event from the multi-level time window according to the event type of the multi-time scale event, wherein the event distribution breadth of the valid time window is greater than a preset threshold; The optimization module is used to generate a parameter optimization strategy for network communication parameters according to the nesting level of the effective time window in the multi-level time window, and use the parameter optimization strategy to optimize the network communication parameters in the effective time window.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.