Bandwidth allocation method and device and electronic equipment

By detecting and analyzing the network traffic of the camera in the substation, and adjusting the bandwidth allocation weight using the traffic prediction model, the problem of abnormal camera reading screen in the substation is solved, and stability and efficiency are improved.

CN119544510APending Publication Date: 2025-02-28INFORMATION & COMM COMPANY OF QINGHAI ELECTRIC POWER
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411717754.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The camera reading screens deployed on a large scale in substations often experience problems such as lag, playback abnormalities, and inability to read. The existing technology mainly relies on manual adjustment of hardware equipment and hardware parameters, which are complex in operation and inefficient.

Method used

By detecting the network traffic corresponding to multiple interfaces in the network device, a traffic prediction model is used to analyze the traffic change trend, adjust the bandwidth allocation weight of the camera, and dynamically adjust the bandwidth allocation to ensure that the camera obtains sufficient bandwidth during high traffic periods.

Benefits of technology

It ensures the stability of the camera's reading screen, avoids lag and playback problems caused by insufficient bandwidth, and improves monitoring effect and operation and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544510A_ABST
    Figure CN119544510A_ABST
Patent Text Reader

Abstract

The invention discloses a bandwidth allocation method and device and electronic equipment. The method comprises the following steps: detecting a plurality of network flows respectively corresponding to a plurality of interfaces connected with a transformer substation in network equipment; analyzing the plurality of network flows and the time information of the first statistical period by using a flow prediction model to obtain flow prediction results corresponding to the plurality of network flows in a second statistical period; determining the change trend of the traffic indicated by the traffic prediction results corresponding to the plurality of cameras; for each camera of the plurality of cameras, adjusting a bandwidth allocation weight corresponding to the camera at least according to the change trend; and carrying out bandwidth allocation on the traffic of the camera according to the bandwidth allocation weight. According to the method and the device, the technical problems of complicated operation and low efficiency due to the fact that manual adjustment of hardware equipment and hardware parameters is mainly depended on when the problem of image retrieval abnormity of cameras deployed on a large scale in a transformer substation is solved in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power communication technology, and in particular to a method, device and electronic device for allocating bandwidth. Background Art

[0002] In order to achieve remote monitoring and management of substation equipment, substations usually deploy a large number of cameras to monitor the operating status of equipment and the surrounding environment in real time. However, in actual applications, the viewing images of substation cameras often experience freezes, abnormal playback, and inability to view. When solving the problem of abnormal viewing images of cameras deployed on a large scale in substations, related technologies mainly rely on manual adjustment of hardware devices and hardware parameters, which is complex and inefficient.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method, device and electronic device for bandwidth allocation, so as to at least solve the technical problem that the related technology mainly relies on manual adjustment of hardware equipment and hardware parameters when solving the problem of abnormal camera review images deployed on a large scale in substations, which results in complex operation and low efficiency.

[0005] According to one aspect of an embodiment of the present application, a method for bandwidth allocation is provided, comprising: detecting multiple network flows corresponding to multiple interfaces in a network device for connecting to a substation, wherein the multiple network flows are network flows within a first statistical period in the historical records of the substation, and the multiple network flows include at least flows of multiple cameras deployed in the substation; using a flow prediction model to analyze the multiple network flows and time information of the first statistical period to obtain flow prediction results corresponding to the multiple network flows within a second statistical period, wherein the second statistical period is a statistical period next to the first statistical period; determining a change trend of the flow indicated by the flow prediction results corresponding to the multiple cameras; for each of the multiple cameras, adjusting the bandwidth allocation weight corresponding to the camera at least according to the change trend; and allocating bandwidth to the flow of the camera according to the bandwidth allocation weight.

[0006] In some embodiments of the present application, the bandwidth allocation weight corresponding to the camera is adjusted at least based on the change trend, including: obtaining the first weight of the camera and the second weight corresponding to the camera in the first statistical period, wherein the first weight includes a weight determined according to the importance of the camera in the substation; determining the key traffic in the traffic prediction result, wherein the key traffic includes the network traffic whose change trend of the traffic prediction result is that the bandwidth demand growth is greater than the first preset threshold; comparing the camera's traffic with the key traffic to obtain a comparison result, wherein the comparison result is used to indicate whether the camera's traffic belongs to the key traffic; adjusting the second weight of the camera according to the first weight and the comparison result to obtain the bandwidth allocation weight.

[0007] In some embodiments of the present application, the second weight of the camera is adjusted according to the first weight and the comparison result to obtain the bandwidth allocation weight, including: when the comparison result indicates that the traffic of the camera belongs to the critical traffic and the first weight of the camera is greater than the second preset threshold, the second weight of the camera is increased according to the first preset ratio to obtain the bandwidth allocation weight; when the comparison result indicates that the traffic of the camera belongs to the critical traffic and the first weight of the camera is less than the second preset threshold, the second weight of the camera is determined to be the bandwidth allocation weight; when the comparison result indicates that the traffic of the camera does not belong to the critical traffic and the first weight of the camera is greater than the second preset threshold, the second weight of the camera is increased according to the second preset ratio to obtain the bandwidth allocation weight, wherein the second preset ratio is less than the first preset ratio; when the comparison result indicates that the traffic of the camera does not belong to the critical traffic and the first weight of the camera is less than the second preset threshold, the second weight of the camera is determined to be the bandwidth allocation weight.

[0008] In some embodiments of the present application, bandwidth is allocated to camera traffic based on bandwidth allocation weights, including: obtaining an objective function, wherein the objective function is used to represent the functional relationship between a network performance optimization objective and a bandwidth allocation scheme; obtaining constraints, wherein the constraints include a minimum bandwidth of the camera determined based on the bandwidth allocation weights; constructing at least one bandwidth allocation scheme that satisfies the constraints; determining an objective function value corresponding to at least one bandwidth allocation scheme on the objective function; determining a target bandwidth allocation scheme based on the objective function value, and allocating bandwidth to the camera traffic according to the target bandwidth allocation scheme.

[0009] In some embodiments of the present application, determining a target bandwidth allocation scheme according to an objective function value includes: traversing at least one bandwidth allocation scheme, comparing an objective function value of a first bandwidth allocation scheme with objective function values ​​of other bandwidth allocation schemes; judging whether all objective function values ​​of other bandwidth allocation schemes are greater than or equal to objective function values ​​respectively corresponding to the first bandwidth allocation scheme, obtaining a first judgment result, and judging whether at least one objective function value of other bandwidth allocation schemes is greater than the objective function value corresponding to the first bandwidth allocation scheme, obtaining a second judgment result; if both the first judgment result and the second judgment result are negative, determining the first bandwidth allocation scheme as a non-dominated bandwidth allocation scheme, and determining a target bandwidth allocation scheme from all non-dominated bandwidth allocation schemes, wherein a non-dominated bandwidth allocation scheme is a bandwidth allocation scheme for which no other bandwidth scheme is superior to the non-dominated bandwidth allocation scheme in all network performance optimization objectives.

[0010] In some embodiments of the present application, the method also includes: obtaining a network load of a network device; determining a change trend of the network load using traffic prediction results corresponding to multiple network flows, wherein the change trend includes an upward trend and a downward trend; when the network load is greater than a third preset threshold and the change trend is an upward trend, adjusting the queue priority of the camera using the bandwidth allocation weight, wherein the queue priority is used to indicate the transmission order of the network flow.

[0011] In some embodiments of the present application, the method also includes: determining the peak time point of the network traffic and the predicted traffic peak value corresponding to the peak time point using traffic prediction results corresponding to multiple network traffics; determining a congestion window value corresponding to the predicted traffic peak value, wherein the congestion window value is less than a slow start threshold; within a preset time length before the peak time point, gradually reducing the congestion window to the congestion window value according to a preset step size.

[0012] According to another aspect of the embodiment of the present application, a bandwidth allocation device is also provided, including: a detection module, used to detect multiple network flows corresponding to multiple interfaces in a network device for connecting to a substation, wherein the multiple network flows are network flows within a first statistical period in the historical records of the substation, and the multiple network flows include at least flows of multiple cameras deployed in the substation; a prediction module, used to analyze the multiple network flows and time information of the first statistical period using a flow prediction model to obtain flow prediction results corresponding to the multiple network flows within a second statistical period, wherein the second statistical period is a statistical period next to the first statistical period; a determination module, used to determine a change trend of the flow indicated by the flow prediction results corresponding to the multiple cameras; an adjustment module, used to adjust the bandwidth allocation weight corresponding to each camera of the multiple cameras at least according to the change trend; and an execution module, used to allocate bandwidth to the flow of the camera according to the bandwidth allocation weight.

[0013] According to another aspect of the embodiments of the present application, an electronic device is provided, including: a memory and a processor, the memory being used to store program instructions; the processor being connected to the memory and being used to execute the method for implementing the above-mentioned bandwidth allocation.

[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned bandwidth allocation method by running the computer program.

[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above-mentioned bandwidth allocation method when executed by a processor.

[0016] In the embodiment of the present application, a dynamic weight allocation method is adopted to detect the network traffic of business equipment such as cameras in the substation in real time, use the traffic prediction model to predict the traffic change trend, and use the traffic change trend to adjust the bandwidth allocation of the camera in real time, thereby achieving the purpose of dynamically adjusting the camera bandwidth according to the traffic change trend, thereby achieving the technical effect of ensuring that the camera obtains sufficient bandwidth resources during high-traffic periods and maintaining the stability of the camera viewing screen, thereby solving the technical problem that the related technology mainly relies on manual adjustment of hardware equipment and hardware parameters when solving the problem of abnormal camera viewing screens deployed on a large scale in substations, and the operation is complicated and inefficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 It is a hardware structure block diagram of a computer terminal according to a bandwidth allocation method of an embodiment of the present application;

[0019] Figure 2 is a flow chart of a bandwidth allocation method according to an embodiment of the present application;

[0020] Figure 3 It is a structural diagram of a bandwidth allocation device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] 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.

[0022] 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.

[0023] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0024] Traffic Prediction Model (TPM): A system or algorithm that predicts future network traffic by analyzing historical traffic data and patterns, which helps to plan network resources in advance and avoid congestion.

[0025] Linear Regression (LR): A statistical method used to model the linear relationship between variables and predict the change of one variable based on one or more other variables.

[0026] Adaptive Weighted Fair Queueing (AWFQ): A network queue management algorithm that dynamically adjusts the bandwidth allocation of queues based on real-time network load and data flow priority to ensure low-latency transmission of high-priority data flows.

[0027] Multi-Objective Optimization (MOO) is the process of considering multiple objective functions simultaneously in an optimization problem and finding the optimal solution that can balance different objectives.

[0028] Queue Management (QM): A technology in network communication used to manage the queuing and scheduling of data packets during transmission to ensure orderly transmission of data, reduce delays, and improve network efficiency.

[0029] Congestion Control (CC): A network management mechanism that monitors network traffic and latency and dynamically adjusts data transmission rates and policies to avoid network congestion and packet loss.

[0030] With the rapid development of the power system, substations, as an important part of the power grid, are of vital importance for their safe and stable operation. For this reason, a large number of cameras are usually deployed in substations. However, in actual applications, the viewing images of substation cameras often experience freezes, abnormal playback, and inability to view, which seriously affects the monitoring effect and operation and maintenance efficiency. The relevant technical solutions mainly solve the problem of abnormal viewing images of substation cameras by improving network bandwidth, optimizing camera configuration, upgrading server and storage device performance, updating software and firmware, and optimizing network paths. However, these solutions may involve a large number of equipment and parameter adjustments, and are often limited by cost and other conditions. The operation is complex and time-consuming, especially in substations where high-resolution cameras are deployed on a large scale, which may not fully meet the bandwidth requirements of high-resolution cameras.

[0031] In order to solve the above technical problems, the embodiments of the present application provide corresponding solutions, which are described in detail below.

[0032] The bandwidth allocation method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for bandwidth allocation. Figure 1As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0033] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0034] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the method of bandwidth allocation in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned method of bandwidth allocation. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0035] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0036] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0037] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.

[0038] In the above operating environment, an embodiment of the present application provides an embodiment of a method for bandwidth allocation. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0039] Figure 2 is a flow chart of a bandwidth allocation method according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0040] Step S202, detecting multiple network flows corresponding to multiple interfaces in the network device for connecting to the substation, wherein the multiple network flows are network flows within a first statistical period in the substation historical records, and the multiple network flows include at least flows of multiple cameras deployed in the substation.

[0041] In the above step S202, the interface refers to a physical or logical network port on a network device (such as a router or a switch) connected to the substation network, and each interface can carry different network traffic. Network traffic refers to the amount of data transmitted through the interface, which may include upload and download traffic. During the first statistical period, network traffic may be generated by different devices or services in the substation, including at least data traffic generated by multiple cameras deployed in the substation.

[0042] Substation history records refer to the traffic data records of the substation network in each statistical period, including network activity information in a certain period of time in the past. The first statistical period refers to the time period used to obtain historical network traffic data, such as 1 hour, 1 day or any set time period.

[0043] In some embodiments of the present application, when monitoring network traffic for a long time and collecting traffic data in the substation history records, the network device can be configured to receive SNMP (Simple Network Management Protocol) queries, and the number of inbound and outbound bytes of each interface can be regularly collected using SNMP tools (such as Nagios, Zabbix). For example, the traffic counter of each interface is queried through SNMP within a preset time, and the current counter value is subtracted from the value of the previous minute to calculate the traffic change per minute, which is used as the network traffic. For short-term traffic monitoring, for example, before predicting a high traffic period, the traffic change of the network device is monitored in real time to quickly adjust the bandwidth allocation strategy. The command line interface (CLI) of the network device can be used to execute a traffic detection command to regularly read the network traffic of each interface. For example, a read command is executed on the switch, and the data is read every 5 seconds for 10 consecutive times. The average value of the 10 data is calculated as the network traffic of the interface in the first statistical period (such as one minute).

[0044] Step S204, using a traffic prediction model to analyze multiple network flows and time information of the first statistical period to obtain traffic prediction results corresponding to the multiple network flows in a second statistical period, wherein the second statistical period is the next statistical period of the first statistical period.

[0045] In the above step S204, the traffic prediction model is trained based on historical traffic data, and can identify and predict traffic patterns and trends. The traffic prediction result refers to the predicted value of future network traffic for each camera or other substation service equipment in the second statistical period generated by the traffic prediction model. In some embodiments of the present application, the traffic prediction model can be trained in the following ways:

[0046] (1) Data preparation and preprocessing: Collect historical network traffic data of all business devices (especially cameras) in the substation, including key information such as timestamp, device identification, and traffic size. In some embodiments, outliers (such as extreme traffic peaks or zero traffic points) and missing data can also be removed to ensure data quality. The timestamp information is converted into features related to traffic prediction, such as day of the week, hour of the day, seasonality, etc., which helps the model capture the temporal pattern of traffic.

[0047] (2) Data segmentation: Divide the data set into a training set and a test set, such as the first 80% as the training set and the last 20% as the test set.

[0048] (3) Model selection and construction: Select an appropriate prediction model based on the characteristics of the traffic data, such as linear regression to build a traffic prediction model, LSTM (long short-term memory network) or other time series prediction models.

[0049] (4) Model training: Use the training set data to train the model, minimize the prediction error, and adjust the model's hyperparameters, such as the number of hidden layers, learning rate, regularization term, etc., to improve the accuracy of the model's prediction.

[0050] (5) Model evaluation: Evaluate the prediction performance of the model on the test set to check whether the model is overfitting or underfitting, and calculate the prediction error metrics such as mean square error (MSE) and mean absolute error (MAE).

[0051] In some embodiments of the present application, the last time window is selected as the prediction input from the data set of the first statistical period (such as the past 24 hours, depending on the periodicity of the network traffic and the accuracy requirements of the model prediction). For example, the traffic prediction model uses the data of the past 5 hours as the input window, and the traffic data of the last 5 hours of the first statistical period can be extracted as the model input. In some embodiments, the statistical period can be consistent with the input window. For the LSTM model, the data needs to be converted into a three-dimensional array with a shape of [samples, time steps, features]. For example, if the data required by the model is 5 hours of traffic, and the hourly traffic in the data set is used as a time step, then the input data will be constructed into an array with a shape of [1, 5, 1], where the first "1" in the array represents a sample, the "5" in the array represents 5 time steps, and the second "1" in the array represents a feature (i.e., traffic). The formatted data is input into the model for prediction, and the prediction result can be an array representing the traffic prediction value at each time step in the second statistical period (for example, every hour, the length of the second statistical period is usually different from the length of the first statistical period, but it can also be the same, depending on the prediction requirements and the applicability of the model). In some embodiments, the prediction function of the model can be called multiple times, each time using the latest data of the first statistical period for prediction, and the prediction results are rolled and added to the end of the first statistical period to form a new time series data, and then prediction is performed again until the prediction of the entire second statistical period is completed.

[0052] Step S206, determining the change trend of the traffic indicated by the traffic prediction results corresponding to the multiple cameras.

[0053] In the above step S206, the traffic change trend refers to a change pattern of traffic over time, such as an increase, decrease, stability or periodic change, which is used for dynamic allocation of network resources.

[0054] In some embodiments of the present application, for each camera, the average change rate of the traffic prediction results can be calculated to determine the traffic change trend. For example, the difference between the traffic values ​​at adjacent time points in the traffic prediction data is calculated, and then the average change rate is obtained by averaging: if the average change rate is a positive number, it means that the traffic is showing an overall upward trend during the prediction period; if it is a negative number, it indicates that the traffic is decreasing; if it is close to zero, the traffic may remain stable. Alternatively, the traffic change trend is determined based on a preset threshold. For example, if the growth rate of the traffic prediction value exceeds a certain threshold, it is determined that the traffic trend of the camera is significantly increasing; if the growth rate is lower than another threshold, it is determined that the traffic trend is decreasing; and if the growth rate falls between the two thresholds, it is determined that the traffic trend is stable.

[0055] Step S208: For each of the multiple cameras, adjust the bandwidth allocation weight corresponding to the camera at least according to the change trend.

[0056] In the above step S208, the bandwidth allocation weight refers to a parameter used to determine the priority of each camera in the network, and is a quantitative indicator used to determine the network bandwidth share that should be allocated to different cameras within a specific time. A higher weight means that the camera will be given a higher priority when allocating network resources. The predicted value of camera traffic, the inherent priority of the camera, and the current status of the network can be comprehensively considered to achieve intelligent allocation of network resources.

[0057] In some embodiments of the present application, the bandwidth allocation weight can be adjusted according to the changing trend of the traffic. For example, if the predicted traffic shows an increasing trend, its weight can be increased (such as a 10% increase in weight) to ensure that more bandwidth can be obtained when network resources are limited; if the predicted traffic decreases, its weight can be reduced accordingly (such as a 5% decrease in weight) so that resources can be allocated to other cameras with higher demands; if the traffic prediction results indicate that the traffic is stable, the weight can remain unchanged.

[0058] In order to ensure the data transmission priority of important cameras, the bandwidth allocation weight can be dynamically adjusted according to the importance of the camera and the traffic prediction results. Specifically: obtain the first weight of the camera and the second weight corresponding to the camera in the first statistical period, wherein the first weight includes a weight determined according to the importance of the camera in the substation; determine the key traffic in the traffic prediction results, wherein the key traffic includes the network traffic whose change trend of the traffic prediction results is that the bandwidth demand growth is greater than the first preset threshold; compare the camera's traffic with the key traffic to obtain a comparison result, wherein the comparison result is used to indicate whether the camera's traffic belongs to the key traffic; adjust the camera's second weight according to the first weight and the comparison result to obtain the bandwidth allocation weight.

[0059] The first weight refers to the inherent attributes of the camera and its importance in the substation monitoring system. The first weight reflects the priority of the camera in a specific scenario, such as the location of the camera (whether it is located near key equipment), the monitored area (whether it involves security-sensitive areas), and the type of camera (such as whether it is a high-resolution camera). The first weight is usually determined at the beginning of system design and deployment, and can be calculated through expert evaluation, location and function weight matrix, or predefined rules. For example, the inherent priority of the camera may be based on the following rules:

[0060] (1) The weight of cameras near key equipment is 100.

[0061] (2) The camera weight in security-sensitive areas is 80.

[0062] (3) The camera weight in non-critical areas is 60.

[0063] (4) The weight of high-resolution cameras is increased by an additional 20.

[0064] The second weight refers to the camera weight adjusted according to the network status and actual traffic performance during the first statistical period. The second weight is mainly derived from the real-time network status and traffic prediction results, reflecting the actual priority of the camera under the current network conditions. It is dynamically adjusted by analyzing the changing trends of real-time network traffic and prediction model output.

[0065] Critical traffic includes network traffic with a high degree of importance in the traffic prediction result, such as network traffic whose bandwidth demand increases by more than a preset threshold. Critical traffic can also be determined based on quality of service requirements. For example, some cameras may require low latency, high stability, and low packet loss rate. Even if their bandwidth requirements do not exceed the preset threshold, the data streams of these cameras should be considered critical traffic. In some embodiments, this can be achieved by defining thresholds for Quality of Service Parameters (QoS), such as a latency threshold of 100 milliseconds and a packet loss rate threshold of 1%. If the data stream of a camera exceeds these thresholds, it is marked as critical traffic.

[0066] Critical traffic can also be determined based on the type and content of data flows. For example, some cameras may be used to monitor security-sensitive areas. Even if the traffic in the area is not high, its data flow is critical to security and should be considered critical traffic. In some embodiments, deep packet inspection (DPI) can be used to identify specific data types or patterns in critical traffic, such as encrypted data flows or traffic of specific protocols.

[0067] Critical traffic can also be triggered based on events. For example, when the monitoring system detects an abnormal situation (such as intrusion or fire), the traffic of the relevant cameras is automatically upgraded to critical traffic.

[0068] In some embodiments of the present application, the flow of the camera can be compared with the critical flow based on a threshold, for example, a critical flow threshold is determined based on historical flow data and a prediction model. In a specific embodiment, when historical data shows that the average flow of a camera at a specific time point is 10Mbps, the critical flow threshold can be set by increasing a certain percentage (such as 20%), that is, 12Mbps, and the real-time flow of the camera is compared with the critical flow threshold. If the real-time flow of the camera exceeds 12Mbps, the comparison result will indicate that the flow of the camera belongs to the critical flow.

[0069] According to the first weight and the comparison result, the second weight of the camera is dynamically adjusted. For example, for cameras with critical traffic, the second weight can be increased to 150% of the first weight to ensure that they can transmit data first when bandwidth demand increases.

[0070] In the power monitoring system, in order to effectively balance the data transmission requirements between different cameras and improve the utilization efficiency of network resources, different weight adjustment ratios can be set to more finely control bandwidth allocation. Specifically: when the comparison result indicates that the camera's traffic belongs to the critical traffic and the camera's first weight is greater than the second preset threshold, the camera's second weight is increased according to the first preset ratio to obtain the bandwidth allocation weight; when the comparison result indicates that the camera's traffic belongs to the critical traffic and the camera's first weight is less than the second preset threshold, the camera's second weight is determined to be the bandwidth allocation weight; when the comparison result indicates that the camera's traffic does not belong to the critical traffic and the camera's first weight is greater than the second preset threshold, the camera's second weight is increased according to the second preset ratio to obtain the bandwidth allocation weight, wherein the second preset ratio is less than the first preset ratio; when the comparison result indicates that the camera's traffic does not belong to the critical traffic and the camera's first weight is less than the second preset threshold, the camera's second weight is determined to be the bandwidth allocation weight.

[0071] The second preset threshold refers to a threshold used to distinguish camera priorities. When the first weight exceeds the threshold, it indicates that the camera has a higher inherent priority. The first preset ratio and the second preset ratio refer to a ratio used to adjust the second weight. The first preset ratio is usually higher than the second preset ratio to ensure that the priority of key cameras is more significantly improved.

[0072] Step S210, allocating bandwidth to the camera traffic according to the bandwidth allocation weight.

[0073] In the above step S210, bandwidth allocation refers to the process of allocating appropriate network bandwidth to each camera in the system according to the bandwidth allocation weight, so as to balance the network resource utilization and camera data transmission requirements and ensure the real-time and integrity of key monitoring data.

[0074] In some embodiments of the present application, bandwidth allocation can be performed based on weighted fair queuing (Weighted Fair Queueing, referred to as WFQ), that is, the power monitoring system uses a weighted fair queuing (WFQ) algorithm to allocate bandwidth to the camera traffic. The WFQ algorithm allocates network resources to different data streams in proportion according to the bandwidth allocation weight of each camera. In a specific embodiment:

[0075] (1) Determine the total bandwidth in the network, for example, the total bandwidth is 100 Mbps.

[0076] (2) Calculate the sum of the bandwidth allocation weights of all cameras, assuming that the sum of the weights is 200.

[0077] (3) For each camera, bandwidth is allocated according to its bandwidth allocation weight. For example, if the bandwidth allocation weight of camera A is 90, it will be allocated (90 / 200)*100Mbps=45Mbps bandwidth.

[0078] (4) The bandwidth allocation weight of camera B is 60, so it will be allocated a bandwidth of (60 / 200)*100Mbps=30Mbps.

[0079] In order to optimize network performance while meeting the minimum bandwidth requirement, a bandwidth allocation strategy can be constructed based on the objective function and constraints. Specifically: obtain the objective function, where the objective function is used to represent the functional relationship between the network performance optimization goal and the bandwidth allocation plan; obtain the constraints, where the constraints include the minimum bandwidth of the camera determined according to the bandwidth allocation weight; construct at least one bandwidth allocation plan that meets the constraints; determine the objective function value corresponding to at least one bandwidth allocation plan on the objective function; determine the target bandwidth allocation plan based on the objective function value, and allocate bandwidth to the camera traffic according to the target bandwidth allocation plan.

[0080] The objective function is a mathematical expression used to quantify the relationship between the network performance optimization goal and the bandwidth allocation scheme. It can include one or more indicators (optimization goals), such as maximizing network throughput (i.e. ensuring the efficiency and capacity of network data transmission), minimizing latency (i.e. reducing the delay time of data packet transmission), minimizing maximum bandwidth usage (i.e. avoiding link or node overload), and giving priority to bandwidth for key cameras and applications (i.e. ensuring that the transmission quality of important data streams is not affected). The goal is to find a bandwidth allocation scheme that optimizes the overall network performance. In some embodiments of the present application, the objective function can be set to F(x), where x represents the bandwidth allocation of different cameras. Assume that the goal of the power monitoring system is to maximize the overall network throughput while minimizing latency and bandwidth waste. The objective function can be expressed as:

[0081] F(x)=w1*T(x)-w2*D(x)-w3*W(x)

[0082] Among them, T(x) represents network throughput, D(x) represents average delay, W(x) represents bandwidth waste, w1 represents the weight corresponding to network throughput, w2 represents the weight of average delay, and w3 represents the weight of bandwidth waste.

[0083] Constraints define rules or restrictions that bandwidth allocation schemes must meet. In the power monitoring system, constraints include the minimum bandwidth requirements of cameras determined by bandwidth allocation weights to ensure basic transmission quality for each camera.

[0084] The bandwidth allocation scheme refers to the specific strategy or configuration of the network bandwidth allocated to each camera in the system under given network conditions, including the bandwidth share of each camera, allocation priority, etc. In some embodiments of the present application, multiple bandwidth allocation schemes that meet the constraints can be constructed through a multi-objective optimization algorithm, such as a genetic algorithm or a particle swarm optimization algorithm. In a multi-objective optimization algorithm, the bandwidth allocation weight can determine the importance of different performance indicators in the objective function and help the algorithm find the optimal compromise between multiple objectives. For example, in an electric power monitoring system, if the bandwidth allocation weight of camera A is high, this may mean that camera A needs to give priority to ensuring the transmission quality of its video stream when monitoring key areas. When constructing the target bandwidth allocation scheme, the algorithm will use this weight to ensure that camera A can obtain more network bandwidth than other cameras with lower weights.

[0085] The target bandwidth allocation scheme is a specific bandwidth allocation strategy calculated based on the network performance optimization objectives and constraints, which specifies in detail the amount of bandwidth that should be allocated to each camera or data stream in the system to achieve the best performance of the overall network. In some embodiments of the present application, after constructing a set of bandwidth allocation schemes, the optimal solution for a set of bandwidth allocations can be found by solving the optimization problem of the objective function F(x). For example, linear programming or quadratic programming is used to ensure that the allocation scheme meets the constraints while maximizing the objective function value. The scheme with the largest objective function value is selected as the target bandwidth allocation scheme, and bandwidth is allocated to the camera traffic according to the determined target bandwidth allocation scheme.

[0086] In order to find the optimal balance point among multiple performance indicators, the target bandwidth allocation scheme can be determined by the following steps: traversing at least one bandwidth allocation scheme, comparing the objective function value of the first bandwidth allocation scheme with the objective function values ​​of other bandwidth allocation schemes; judging whether all objective function values ​​of other bandwidth allocation schemes are greater than or equal to the objective function values ​​respectively corresponding to the first bandwidth allocation scheme, obtaining a first judgment result, and judging whether at least one objective function value of other bandwidth allocation schemes is greater than the objective function value corresponding to the first bandwidth allocation scheme, obtaining a second judgment result; if both the first judgment result and the second judgment result are negative, determining that the first bandwidth allocation scheme is a non-dominated bandwidth allocation scheme, and determining the target bandwidth allocation scheme from all non-dominated bandwidth allocation schemes, wherein the non-dominated bandwidth allocation scheme is a bandwidth allocation scheme for which no other bandwidth scheme is superior to the non-dominated bandwidth allocation scheme in all network performance optimization objectives.

[0087] In the above steps, the Pareto Optimality algorithm is used to measure whether the solution has reached the optimal state in multi-objective optimization. The Pareto optimal solution (corresponding to the non-dominated bandwidth allocation solution) refers to a solution that cannot make at least one objective better without making any objective worse.

[0088] (1) The first judgment result is no, and the second judgment result is no: it means that no other bandwidth allocation scheme is greater than or equal to the first bandwidth allocation scheme in all objective function values, and no other scheme is strictly greater than the first bandwidth allocation scheme in any objective function value, that is, the first bandwidth allocation scheme is a non-dominated solution (a possible Pareto optimal solution). In this case, the first bandwidth allocation scheme can be added to the non-dominated solution set (Pareto frontier).

[0089] (2) The first judgment result is no, and the second judgment result is yes: it means that no other bandwidth allocation scheme is greater than or equal to the first bandwidth allocation scheme in all objective function values, but there is at least one bandwidth allocation scheme that is greater than the first bandwidth allocation scheme in at least one objective function value. In this case, the first bandwidth allocation scheme is a non-dominated solution, but not a Pareto optimal solution, because it is surpassed by other schemes in at least one objective. It can be confirmed that the scheme does not belong to the target bandwidth allocation scheme.

[0090] (3) The first judgment result is yes, and the second judgment result is no: it means that there is at least one bandwidth allocation scheme that is greater than or equal to the first bandwidth allocation scheme in all objective function values, but no other scheme is strictly greater than the first bandwidth allocation scheme in any objective function value. Although the first bandwidth allocation scheme is not dominated in all objectives, it cannot be determined as a non-dominated solution because at least one bandwidth allocation scheme is not inferior to it in all objectives. It can be confirmed that this scheme does not belong to the target bandwidth allocation scheme.

[0091] (4) Both the first judgment result and the second judgment result are yes: it means that there is at least one bandwidth allocation scheme that is greater than or equal to the first bandwidth allocation scheme in all objective function values, and there is at least one bandwidth allocation scheme that is strictly greater than the first bandwidth allocation scheme in at least one objective function value. This situation clearly indicates that the first bandwidth allocation scheme is not a non-dominated solution, because it is surpassed in at least one objective and does not show superiority in all objectives. It can be confirmed that the scheme does not belong to the target bandwidth allocation scheme.

[0092] By predicting the changing trend of network load and dynamically adjusting the queue priority of camera data, it is possible to make predictions and adjustments before network congestion, effectively prevent data packet loss in the power monitoring system, and ensure the timely transmission of key video data. Specifically: obtain the network load of the network device; use the traffic prediction results corresponding to multiple network flows to determine the changing trend of the network load, where the changing trend includes an upward trend and a downward trend; when the network load is greater than the third preset threshold and the changing trend is an upward trend, use the bandwidth allocation weight to adjust the queue priority of the camera, where the queue priority is used to indicate the transmission order of the network traffic.

[0093] The network load of a network device refers to the current bandwidth utilization of the network device (such as a router or switch), including indicators such as bandwidth utilization, packet processing speed, delay, and packet loss rate. The heavier the network load, the higher the possibility of network congestion. In some embodiments of the present application, the SNMP protocol or network monitoring software can be used to regularly monitor the traffic and bandwidth usage of the network device, and the network load indicators such as bandwidth utilization, packet processing delay, etc. can be calculated by analyzing the collected traffic data.

[0094] In some embodiments of the present application, the changing trend of the network load can be analyzed by comparing the current network load with the traffic prediction result. For example, if the prediction result shows that the future traffic will increase significantly, and the current network load is already high, then it can be determined that the network load is on an upward trend.

[0095] A queue refers to a data structure used to manage the transmission order of data packets in a network device (such as a router or a switch). The queue mechanism in the network device is used to queue the data packets to be sent according to a certain strategy to control the transmission order and rate of the data packets. Queue priority refers to the fact that different data streams are assigned different priorities in network data transmission, and high-priority data streams are processed and transmitted first. By adjusting the queue priority of the camera data, it can be ensured that the transmission of key camera data is not affected when the network load is high. In some embodiments of the present application, when the network load is greater than the third preset threshold and the change trend is an upward trend, the bandwidth allocation weight can be applied to the network traffic scheduling and bandwidth allocation strategy, that is, on a network device (such as a router or a switch), the data streams of key cameras will be processed and sent first to ensure that the data of these cameras can be transmitted in time even under high network load.

[0096] In order to reduce the packet sending rate before the network traffic peak arrives and prevent congestion in the power monitoring network, the congestion window can be adjusted in advance by executing the following steps: using the traffic prediction results corresponding to multiple network traffic to determine the peak time point of the network traffic and the predicted traffic peak value corresponding to the peak time point; determining the congestion window value corresponding to the predicted traffic peak, wherein the congestion window value is less than the slow start threshold; within the preset time before the peak time point, gradually reducing the congestion window to the congestion window value according to the preset step size.

[0097] In some embodiments of the present application, the peak time point and its corresponding predicted traffic peak value may be determined by the following steps:

[0098] Step 1: Collect and analyze the prediction results for each network flow. For each camera or business flow, there is a traffic prediction based on historical data and machine learning models (such as LSTM), which will provide the expected traffic of each flow at a future point in time.

[0099] Step 2: Determine the composition of the overall network traffic. The overall network traffic is the sum of all camera and business traffic, so the predicted traffic of each flow needs to be added together to get the traffic forecast of the overall network.

[0100] Step 3: Identify peak time points. Analyze the overall network traffic forecast to find the highest traffic point. For example, by calculating the maximum value of the overall traffic forecast curve, or by using a sliding window analysis to find the period of continuous traffic increase.

[0101] Step 4: Determine the predicted traffic peak. At the identified peak time point, the value of the overall network traffic forecast is the predicted traffic peak, which provides the maximum traffic that the network is expected to withstand at that time point.

[0102] Congestion Window (CWND for short) refers to a parameter of TCP that controls the transmission rate, indicating the number of packets that the sender can send continuously without waiting for confirmation. The slow start threshold (ssthresh) is used when CWND exceeds ssthresh, TCP switches from slow start mode to congestion avoidance mode, thereby increasing CWND more conservatively. In some embodiments of the present application, the setting of the target CWND size (i.e., the congestion window value) needs to take into account the predicted traffic peak and the actual bandwidth capacity of the network. In the power monitoring network, the target CWND size should be set to a value sufficient to handle the predicted traffic peak, but not enough to cause network congestion. For example, the target CWND size can be calculated based on the relationship between the maximum bandwidth of the network and the predicted peak traffic.

[0103] The preset duration refers to the time window in which the system needs to adjust the CWND in advance before the traffic peak arrives. The preset step size refers to the increment or decrement of each adjustment of CWND, which is used to smoothly control the packet sending rate. In some embodiments of the present application, before the predicted traffic peak time point, the network needs to gradually reduce the congestion window (CWND) to reach the target CWND value. This adjustment process can be carried out using a smooth strategy. For example, if the predicted peak will arrive in two hours, the network can start to decrease the CWND value every minute or every few seconds until the target CWND value is reached. The step size of the decrease (such as the number of bytes or packets reduced each time) should be small enough to avoid drastic fluctuations in network performance.

[0104] Through the above steps S202 to S210, a dynamic weight allocation method is adopted to detect the network traffic of business equipment such as cameras in the substation in real time, use the traffic prediction model to predict the traffic change trend, and use the traffic change trend to adjust the bandwidth allocation of the camera in real time, so as to achieve the purpose of dynamically adjusting the camera bandwidth according to the traffic change trend, thereby achieving the technical effect of ensuring that the camera obtains sufficient bandwidth resources during high-traffic periods and maintaining the stability of the camera viewing image, thereby solving the technical problem that the related technology mainly relies on manual adjustment of hardware equipment and hardware parameters when solving the abnormal problem of camera viewing images deployed on a large scale in substations, and the operation is complicated and inefficient.

[0105] Figure 3 is a structural diagram of a bandwidth allocation device according to an embodiment of the present application, such as Figure 3 As shown, the device comprises:

[0106] A detection module 302 is used to detect a plurality of network flows corresponding to a plurality of interfaces in a network device for connecting to a substation, wherein the plurality of network flows are network flows within a first statistical period in a historical record of the substation, and the plurality of network flows at least include flows of a plurality of cameras deployed in the substation;

[0107] The prediction module 304 is used to analyze the time information of the multiple network flows and the first statistical period using the flow prediction model to obtain flow prediction results corresponding to the multiple network flows in the second statistical period, wherein the second statistical period is the next statistical period of the first statistical period;

[0108] A determination module 306, used to determine a change trend of traffic indicated by traffic prediction results corresponding to a plurality of cameras;

[0109] An adjustment module 308, configured to adjust, for each of the plurality of cameras, a bandwidth allocation weight corresponding to the camera at least according to a change trend;

[0110] The execution module 310 is used to allocate bandwidth to the camera traffic according to the bandwidth allocation weight.

[0111] In the above-mentioned bandwidth allocation device, the adjustment module is also used to obtain a first weight of the camera and a second weight corresponding to the camera in a first statistical period, wherein the first weight includes a weight determined based on the importance of the camera in the substation; determine the key traffic in the traffic prediction result, wherein the key traffic includes network traffic whose changing trend in the traffic prediction result is a bandwidth demand growth greater than a first preset threshold; compare the camera's traffic with the key traffic to obtain a comparison result, wherein the comparison result is used to indicate whether the camera's traffic belongs to the key traffic; adjust the camera's second weight based on the first weight and the comparison result to obtain the bandwidth allocation weight.

[0112] In the above-mentioned bandwidth allocation device, the adjustment module is also used to increase the second weight of the camera according to the first preset ratio to obtain the bandwidth allocation weight when the comparison result indicates that the camera traffic belongs to the critical traffic and the first weight of the camera is greater than the second preset threshold; when the comparison result indicates that the camera traffic belongs to the critical traffic and the first weight of the camera is less than the second preset threshold, determine the second weight of the camera as the bandwidth allocation weight; when the comparison result indicates that the camera traffic does not belong to the critical traffic and the first weight of the camera is greater than the second preset threshold, increase the second weight of the camera according to the second preset ratio to obtain the bandwidth allocation weight, wherein the second preset ratio is less than the first preset ratio; when the comparison result indicates that the camera traffic does not belong to the critical traffic and the first weight of the camera is less than the second preset threshold, determine the second weight of the camera as the bandwidth allocation weight.

[0113] In the above-mentioned bandwidth allocation device, the execution module is also used to obtain an objective function, wherein the objective function is used to represent the functional relationship between the network performance optimization objective and the bandwidth allocation scheme; obtain constraint conditions, wherein the constraint conditions include the minimum bandwidth of the camera determined according to the bandwidth allocation weight; construct at least one bandwidth allocation scheme that meets the constraint conditions; determine the objective function value corresponding to at least one bandwidth allocation scheme on the objective function; determine the target bandwidth allocation scheme based on the objective function value, and allocate bandwidth to the camera traffic according to the target bandwidth allocation scheme.

[0114] In the above-mentioned bandwidth allocation device, the execution module is further used to traverse at least one bandwidth allocation scheme, compare the objective function value of the first bandwidth allocation scheme with the objective function values ​​of other bandwidth allocation schemes; judge whether all objective function values ​​of other bandwidth allocation schemes are greater than or equal to the objective function values ​​corresponding to the first bandwidth allocation scheme respectively, to obtain a first judgment result, and judge whether at least one objective function value of other bandwidth allocation schemes is greater than the objective function value corresponding to the first bandwidth allocation scheme, to obtain a second judgment result; if both the first judgment result and the second judgment result are negative, determine that the first bandwidth allocation scheme is a non-dominated bandwidth allocation scheme, and determine the target bandwidth allocation scheme from all non-dominated bandwidth allocation schemes, wherein the non-dominated bandwidth allocation scheme is a bandwidth allocation scheme for which no other bandwidth scheme is superior to the non-dominated bandwidth allocation scheme in all network performance optimization objectives.

[0115] In the above-mentioned bandwidth allocation device, the detection module is also used to obtain the network load of the network device; determine the change trend of the network load using the traffic prediction results corresponding to multiple network flows, wherein the change trend includes an upward trend and a downward trend; when the network load is greater than a third preset threshold and the change trend is an upward trend, adjust the queue priority of the camera using the bandwidth allocation weight, wherein the queue priority is used to indicate the transmission order of the network flow.

[0116] In the above-mentioned bandwidth allocation device, the detection module is also used to determine the peak time point of the network traffic and the predicted traffic peak value corresponding to the peak time point using the traffic prediction results corresponding to multiple network traffics; determine the congestion window value corresponding to the predicted traffic peak value, wherein the congestion window value is less than the slow start threshold; within a preset time length before the peak time point, gradually reduce the congestion window to the congestion window value according to a preset step size.

[0117] It should be noted that Figure 3 The bandwidth allocation device shown is used to perform Figure 2 The bandwidth allocation method shown is therefore Figure 2 The explanations in the bandwidth allocation method in also apply to Figure 3 The bandwidth allocation device shown is not described in detail here.

[0118] An embodiment of the present application further provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the steps of the method for bandwidth allocation in each embodiment of the present application.

[0119] For example, the processor performs the following functions by executing program instructions stored in the memory:

[0120] Detect multiple network flows corresponding to multiple interfaces in a network device for connecting to a substation, wherein the multiple network flows are network flows within a first statistical period in the historical records of the substation, and the multiple network flows at least include flows of multiple cameras deployed in the substation; use a flow prediction model to analyze the multiple network flows and time information of the first statistical period to obtain flow prediction results corresponding to the multiple network flows within a second statistical period, wherein the second statistical period is a statistical period next to the first statistical period; determine a change trend of the flow indicated by the flow prediction results corresponding to the multiple cameras; for each of the multiple cameras, at least adjust the bandwidth allocation weight corresponding to the camera according to the change trend; and allocate bandwidth to the flow of the camera according to the bandwidth allocation weight.

[0121] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the steps of the bandwidth allocation method in each embodiment of the present application by running the computer program.

[0122] For example, when the above computer program is running, the device can be controlled to perform the following steps:

[0123] Detect multiple network flows corresponding to multiple interfaces in a network device for connecting to a substation, wherein the multiple network flows are network flows within a first statistical period in the historical records of the substation, and the multiple network flows at least include flows of multiple cameras deployed in the substation; use a flow prediction model to analyze the multiple network flows and time information of the first statistical period to obtain flow prediction results corresponding to the multiple network flows within a second statistical period, wherein the second statistical period is a statistical period next to the first statistical period; determine a change trend of the flow indicated by the flow prediction results corresponding to the multiple cameras; for each of the multiple cameras, at least adjust the bandwidth allocation weight corresponding to the camera according to the change trend; and allocate bandwidth to the flow of the camera according to the bandwidth allocation weight.

[0124] The embodiment of the present application further provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the bandwidth allocation method in each embodiment of the present application.

[0125] The embodiments of the present application also provide a computer program, which, when executed by a processor, implements the steps of the bandwidth allocation method in each embodiment of the present application.

[0126] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0127] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0128] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0132] The above is only a preferred implementation 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 method for allocating bandwidth, characterized in that: include: Detecting a plurality of network flows corresponding to a plurality of interfaces in a network device for connecting to a substation, wherein the plurality of network flows are network flows within a first statistical period in a historical record of the substation, and the plurality of network flows at least include flows of a plurality of cameras deployed in the substation; Using a traffic prediction model to analyze the multiple network flows and the time information of the first statistical period, to obtain traffic prediction results corresponding to the multiple network flows in a second statistical period, wherein the second statistical period is a statistical period next to the first statistical period; Determine a change trend of traffic indicated by traffic prediction results respectively corresponding to the multiple cameras; For each of the plurality of cameras, adjusting a bandwidth allocation weight corresponding to the camera at least according to the change trend; Bandwidth allocation is performed on the traffic of the camera according to the bandwidth allocation weight.

2. The method according to claim 1, characterized in that Adjusting the bandwidth allocation weight corresponding to the camera at least according to the change trend includes: Obtaining a first weight of the camera and a second weight of the camera corresponding to the first statistical period, wherein the first weight includes a weight determined according to the importance of the camera in the substation; Determine the key traffic in the traffic prediction result, wherein the key traffic includes network traffic whose change trend of the traffic prediction result is a bandwidth demand increase greater than a first preset threshold; Comparing the flow of the camera with the key flow to obtain a comparison result, wherein the comparison result is used to indicate whether the flow of the camera belongs to the key flow; The second weight of the camera is adjusted according to the first weight and the comparison result to obtain the bandwidth allocation weight.

3. The method according to claim 2, characterized in that Adjusting the second weight of the camera according to the first weight and the comparison result to obtain the bandwidth allocation weight includes: When the comparison result indicates that the traffic of the camera belongs to the critical traffic and the first weight of the camera is greater than the second preset threshold, increasing the second weight of the camera according to the first preset ratio to obtain the bandwidth allocation weight; When the comparison result indicates that the traffic of the camera belongs to the critical traffic and the first weight of the camera is less than the second preset threshold, determining the second weight of the camera as the bandwidth allocation weight; When the comparison result indicates that the traffic of the camera does not belong to the critical traffic and the first weight of the camera is greater than the second preset threshold, increasing the second weight of the camera according to a second preset ratio to obtain the bandwidth allocation weight, wherein the second preset ratio is less than the first preset ratio; When the comparison result indicates that the traffic of the camera does not belong to the critical traffic and the first weight of the camera is less than the second preset threshold, the second weight of the camera is determined to be the bandwidth allocation weight.

4. The method according to claim 1, characterized in that: The bandwidth allocation for the camera traffic is performed according to the bandwidth allocation weight, including: Obtaining an objective function, wherein the objective function is used to represent a functional relationship between a network performance optimization objective and a bandwidth allocation scheme; Obtaining a constraint condition, wherein the constraint condition includes a minimum bandwidth of the camera determined according to the bandwidth allocation weight; constructing at least one bandwidth allocation scheme satisfying the constraint conditions; Determine an objective function value corresponding to the at least one bandwidth allocation scheme on the objective function; A target bandwidth allocation scheme is determined according to the objective function value, and bandwidth is allocated to the flow of the camera according to the target bandwidth allocation scheme.

5. The method according to claim 4, characterized in that Determining a target bandwidth allocation scheme according to the objective function value includes: Traversing the at least one bandwidth allocation scheme, and comparing the objective function value of the first bandwidth allocation scheme with the objective function values ​​of other bandwidth allocation schemes in the at least one bandwidth allocation scheme; Determine whether all objective function values ​​of the other bandwidth allocation schemes are greater than or equal to the objective function values ​​respectively corresponding to the first bandwidth allocation scheme, to obtain a first determination result, and determine whether at least one objective function value of the other bandwidth allocation schemes is greater than the objective function value corresponding to the first bandwidth allocation scheme, to obtain a second determination result; When both the first judgment result and the second judgment result are negative, the first bandwidth allocation scheme is determined to be a non-dominated bandwidth allocation scheme, and the target bandwidth allocation scheme is determined from all non-dominated bandwidth allocation schemes, wherein the non-dominated bandwidth allocation scheme is a bandwidth allocation scheme for which no other bandwidth scheme is superior to the non-dominated bandwidth allocation scheme in all network performance optimization objectives.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining a network load of the network device; Determine a change trend of the network load using the flow prediction results respectively corresponding to the plurality of network flows, wherein the change trend includes an upward trend and a downward trend; When the network load is greater than a third preset threshold and the change trend is an upward trend, the queue priority of the camera is adjusted using the bandwidth allocation weight, wherein the queue priority is used to indicate the transmission order of network traffic.

7. The method according to claim 1, characterized in that The method further comprises: Determine the peak time point of the network traffic and the predicted traffic peak value corresponding to the peak time point using the traffic prediction results corresponding to the multiple network traffics respectively; Determining a congestion window value corresponding to the predicted traffic peak, wherein the congestion window value is less than a slow start threshold; Within a preset time period before the peak time point, the congestion window is gradually reduced to the congestion window value according to a preset step size.

8. A bandwidth allocation device, characterized in that: include: A detection module, used to detect a plurality of network flows corresponding to a plurality of interfaces in a network device for connecting to a substation, wherein the plurality of network flows are network flows within a first statistical period in a historical record of the substation, and the plurality of network flows at least include flows of a plurality of cameras deployed in the substation; A prediction module, configured to analyze the plurality of network flows and the time information of the first statistical period by using a flow prediction model, and obtain flow prediction results corresponding to the plurality of network flows in a second statistical period, wherein the second statistical period is a statistical period next to the first statistical period; A determination module, used to determine a change trend of the traffic indicated by the traffic prediction results respectively corresponding to the multiple cameras; An adjustment module, configured to adjust, for each of the plurality of cameras, a bandwidth allocation weight corresponding to the camera at least according to the change trend; An execution module is used to allocate bandwidth to the traffic of the camera according to the bandwidth allocation weight.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and is used to execute the bandwidth allocation method described in any one of claims 1 to 7.

10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the bandwidth allocation method described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Flow distribution system based on redundant switch

    CN120128542A

  • Large-bandwidth network flow scheduling management method and system

    CN120528799A

  • Data intelligent optimization system and method based on artificial intelligence

    CN120880914A

  • An artificial intelligence-based data intelligent optimization system and method

    CN120880914B