A method for automatic adjustment of network resource configuration based on probabilistic grammar model
Through the automatic adjustment method of network resource configuration based on the probability syntax model, the high cost and error rate problems of manual configuration parameters in the prior art are solved, and the automation, flexibility and efficient network resource configuration optimization is achieved.
Patent Information
- Application Number
- CN202410464290.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-04-17
AI Technical Summary
The prior art requires a large manual overhead when configuring parameters for network equipment, high skill requirements and easy to cause errors, and the configuration update work is complicated and costly when the network structure changes.
The automatic adjustment method of network resource configuration based on the probability syntax model is adopted. By training the network disconnection data, a probability knowledge graph is built, the node status is automatically predicted and adjusted, and the automatic optimization of network resource configuration is achieved.
It improves configuration efficiency, reduces operation and maintenance costs and error rates, realizes high degree of automation, low deployment costs, strong interpretability, strong expansion capabilities, low migration costs and dynamic resource allocation, and improves network performance and resource utilization.
Smart Images

Figure CN118353777B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network resource configuration, and in particular to a method for automatically adjusting network resource configuration based on a probabilistic grammar model. Background Art
[0002] With the rapid development and increasing complexity of network technology, especially the rise of mobile Internet, the automated operation and maintenance of network equipment has become the focus of network construction.
[0003] However, in the process of configuring parameters for network devices, it is necessary to manually use certain automated equipment to determine the configuration parameters of each device, which requires a large amount of labor overhead, high requirements on personnel skills, and it is easy for manual errors to occur during the configuration process. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a method, device, electronic device and storage medium for automatically adjusting network resource configuration based on a probabilistic grammar model, which can improve configuration efficiency.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for automatically adjusting network resource configuration based on a probabilistic grammar model, comprising the following steps:
[0007] The probability grammar model is trained based on the network connection data to obtain a probability grammar model corresponding to each service state, wherein the probability grammar model is constructed based on the probability knowledge graph;
[0008] Acquire working status data of a target node within a target time period, input the working status data into the probabilistic grammar model to obtain first graph data, and select target graph data having the highest similarity to the first graph data from at least one second graph data obtained by pre-training, and determine the working status based on the target graph data;
[0009] The node state of the target node is predicted based on the working state, and the target node is adjusted according to the prediction result.
[0010] In a second aspect, an embodiment of the present application further provides a device for automatically adjusting network resource configuration based on a probabilistic grammar model, the device comprising:
[0011] A training module, used to train the probabilistic grammar model based on network connection data to obtain a probabilistic grammar model corresponding to each service state, wherein the probabilistic grammar model is constructed based on a probabilistic knowledge graph;
[0012] A determination module, used for obtaining working status data of a target node within a target time period, inputting the working status data into the probabilistic grammar model to obtain first graph data, and selecting target graph data having the highest similarity to the first graph data from at least one second graph data obtained by pre-training, and determining the working status based on the target graph data;
[0013] An adjustment module is used to predict the node state of the target node based on the working state, and adjust the target node according to the prediction result.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the method for automatic adjustment of network resource configuration based on a probabilistic grammar model as described in any one of the first aspects.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for automatically adjusting network resource configuration based on a probabilistic grammar model as described in any one of the first aspects is executed.
[0016] The embodiments of the present application have the following beneficial effects:
[0017] (1) High degree of automation: The system can automatically learn and adapt to network changes, reducing the need for manual intervention, thereby reducing operation and maintenance costs and error rates.
[0018] (2) Low deployment cost: The system does not require high hardware configuration, is easy to deploy, and has low operation and maintenance costs, making it suitable for resource-constrained environments.
[0019] (3) Strong interpretability: The probabilistic grammar model provides an intuitive way to understand and explain the optimization process of network configuration, making it easier for network administrators to debug and maintain.
[0020] (4) Strong scalability: The system can adapt to the addition of new nodes without the need for manual definition of new rules, and automatically expand network configuration strategies, thereby improving the scalability of the system.
[0021] (5) Low migration cost: The system can automatically adapt to the business conditions of different LANs, reducing the configuration update work caused by changes in network structure and lowering migration costs.
[0022] (6) Dynamic resource allocation: The system can dynamically adjust network resource allocation based on real-time network traffic prediction results, thereby improving resource utilization and network performance.
[0023] (7) Through these advantages, the technical solution of the present invention can realize automatic optimization of network resource configuration without sacrificing network performance, providing an efficient and intelligent solution for network operation and maintenance management. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 is a flowchart of steps S101-S103 provided in an embodiment of the present application;
[0026] Figure 2 It is a sample diagram of a PKG including 5 source nodes and 5 destination nodes provided in an embodiment of the present application;
[0027] Figure 3 It is a schematic diagram of constructing grammatical model features provided in an embodiment of the present application;
[0028] Figure 4 This is one of the probability distribution diagrams provided in the embodiments of the present application;
[0029] Figure 5 This is the second probability distribution diagram provided in the embodiment of the present application;
[0030] Figure 6 It is a structural diagram of a device for automatically adjusting network resource configuration based on a probabilistic grammar model provided in an embodiment of the present application;
[0031] Figure 7 It is a schematic diagram of the composition structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0032] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme 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. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0033] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0034] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0035] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0036] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0038] Before implementing the embodiments of the present application, the applicant discovered that the prior art had the following problems:
[0039] Generally speaking, after the network deployment is completed, it is necessary to configure parameters for the network devices in the network. In order to better understand the method for automatically adjusting the network resource configuration provided by the embodiment of the present application, the method for configuring network device parameters in the prior art is described in detail below:
[0040] (1) Network planning.
[0041] Network planning is a high-level design. Existing technologies often require manual completion. The results of network planning are generally output in the form of documents. Network planning mainly involves the selection of network architecture, network protocols, topology, and equipment models.
[0042] (2) Configuration / parameter planning.
[0043] Determining what parameters the devices in the network should use often requires manual work with existing technologies, and the planning results are usually in the form of documents.
[0044] (3) Generate a configuration file for the device and save it in the network management system. The process of generating a configuration file for the device is the process of determining the configuration parameters of the device. The configuration file contains the configuration parameters of the device. When generating a configuration file for the device, you can first determine the parameter template, and then generate the configuration file for the device based on the parameter template. After generating the configuration file, you can save the configuration files of multiple devices in the network management system so that the configuration files can be downloaded from the network management system after the device goes online.
[0045] (4) In the network management system, match the configuration file with the device identifier.
[0046] After the configuration file of the device is saved in the network management system, a mapping relationship can be established between the device and the configuration file, that is, the device identification is matched with the configuration file, so that the configuration file corresponding to the device can be found according to the device identification of the device.
[0047] (5) The device goes online, matches the configuration file, and downloads it.
[0048] After the device is online, you can find the configuration file corresponding to the device according to the device ID of the device, and download the configuration file to obtain the parameters configured for the device.
[0049] In the above process of configuring parameters for network devices, it is necessary to manually use certain automated equipment to determine the configuration parameters of each device, which requires a large amount of manual effort, high requirements on personnel skills, and it is easy for manual errors to occur during the configuration process.
[0050] Prior art 1 (CN201610882471.9) Method and device for configuring network equipment parameters Technical principle: Based on the configuration database in the network configuration system, the basic topological units of the network to be configured are identified and the network hierarchy is automatically divided using a hierarchical strategy. The method first determines the basic topological units contained in the network to be configured, and then determines the network hierarchy based on the attribute information of these units using clustering algorithms and other technologies. Next, the network configuration system configures the first parameters for the network device according to the network hierarchy, such as IP addresses and routing area numbers. In addition, the method also includes determining the local topological feature information of the device to be configured, searching for reference devices similar to the device to be configured in the configuration database, and using the configuration parameters of these reference devices to configure the second parameters for the device to be configured.
[0051] Prior art 2 (CN202210037957.8) Technical principle of equipment automatic configuration method and device: This technology realizes automatic configuration of equipment through dynamic update of network topology diagram and intelligent analysis of port connection status. First, the device connection status in the network topology diagram is updated by receiving the interconnection information message sent by the network device. Subsequently, the system analyzes the port connection status in the network topology diagram, identifies the ports connecting the two devices, and automatically configures according to the device configuration information connected to these ports. If the network device is connected to a terminal, the system will further analyze the connection status between the terminal and the device port, and adjust the port configuration as needed.
[0052] Disadvantages of existing technology:
[0053] (1) Insufficient rule description: Prior art 1 (ZN201610882471.9) relies on manually defined hierarchical policies and parameter configurations. These rules may not fully cover various situations that may occur in the network, resulting in inflexible and inaccurate configuration. Prior art 2 (ZN202210037957.8) relies on automatic inference of port connection conditions and may not be able to handle complex network configuration requirements, such as specific port configuration or business logic.
[0054] (2) Weak expansion capability: Existing technology 1 (ZN201610882471.9) The addition of new nodes requires manual observation and definition of new rules, which not only increases the workload but also may cause configuration errors due to human factors. Existing technology 2 (ZN202210037957.8) The addition of new devices may require re-evaluation of the network topology, which may cause interruption and recalculation of the configuration process, affecting the stability and efficiency of the network.
[0055] (3) High migration cost: Prior art 1 (ZN201610882471.9) The differences in business conditions of different LANs require administrators to define multiple sets of rules for each LAN and update them as nodes change, which increases the complexity and cost of deployment and operation and maintenance. Prior art 2 (ZN202210037957.8) Although this method provides a certain degree of automatic configuration, manual intervention may still be required to adjust the configuration when the network structure changes, especially when migrating across different network environments.
[0056] See also Figure 1 , Figure 1 is a flow chart of steps S101-S103 of the method for automatically adjusting network resource configuration based on a probability grammar model provided in an embodiment of the present application, which will be combined with Figure 1 Steps S101-S103 are shown for explanation.
[0057] Step S101: training a probability grammar model based on network connection data to obtain a probability grammar model corresponding to each service state, wherein the probability grammar model is constructed based on a probability knowledge graph;
[0058] Step S102: obtaining the working status data of the target node in the target time period, inputting the working status data into the probabilistic grammar model to obtain first graph data, and selecting target graph data having the highest similarity to the first graph data from at least one second graph data obtained by pre-training, and determining the working status based on the target graph data;
[0059] Step S103: predicting the node state of the target node based on the working state, and adjusting the target node according to the prediction result.
[0060] The above-mentioned method for automatically adjusting network resource configuration based on the probabilistic grammar model has the following beneficial effects:
[0061] (1) High degree of automation: The system can automatically learn and adapt to network changes, reducing the need for manual intervention, thereby reducing operation and maintenance costs and error rates.
[0062] (2) Low deployment cost: The system does not require high hardware configuration, is easy to deploy, and has low operation and maintenance costs, making it suitable for resource-constrained environments.
[0063] (3) Strong interpretability: The probabilistic grammar model provides an intuitive way to understand and explain the optimization process of network configuration, making it easier for network administrators to debug and maintain.
[0064] (4) Strong scalability: The system can adapt to the addition of new nodes without the need for manual definition of new rules, and automatically expand network configuration strategies, thereby improving the scalability of the system.
[0065] (5) Low migration cost: The system can automatically adapt to the business conditions of different LANs, reducing the configuration update work caused by changes in network structure and lowering migration costs.
[0066] (6) Dynamic resource allocation: The system can dynamically adjust network resource allocation based on real-time network traffic prediction results, thereby improving resource utilization and network performance.
[0067] (7) Through these advantages, the technical solution of the present invention can realize automatic optimization of network resource configuration without sacrificing network performance, providing an efficient and intelligent solution for network operation and maintenance management.
[0068] The above exemplary steps of the embodiments of the present application are described below respectively.
[0069] In step S101, a probabilistic grammar model is trained based on network connection data to obtain a probabilistic grammar model corresponding to each service state, wherein the probabilistic grammar model is constructed based on a probabilistic knowledge graph.
[0070] In step S102, the working status data of the target node within the target time period is obtained, the working status data is input into the probabilistic grammar model to obtain first graph data, and the target graph data with the highest similarity to the first graph data is selected from at least one second graph data obtained by pre-training, and the working status is determined based on the target graph data.
[0071] In step S103, the node state of the target node is predicted based on the working state, and the target node is adjusted according to the prediction result.
[0072] The core of the technical solution of the embodiment of the present application is to use the probabilistic grammar model to capture the statistical laws of network disconnection behavior, thereby predicting changes in network status and dynamically adjusting network configuration parameters based on the prediction results. The solution is mainly divided into two stages: model training and model use. Then, the configuration of network resources is optimized based on the analysis results.
[0073] In the model training phase, in some embodiments, the probabilistic grammar model is trained based on the network disconnection data to obtain a probabilistic grammar model corresponding to each service state, including:
[0074] The format of the network disconnection data is defined as a five-tuple, and data for more than 24 hours is continuously recorded with a sampling interval of not less than 1 second as the network disconnection data;
[0075] Based on the business situation, at least two business states are defined, and a corresponding probability grammar model is trained for each business state.
[0076] In some embodiments, the training of a corresponding probability grammar model for each service state includes:
[0077] Constructing the probabilistic knowledge graph, wherein the probabilistic knowledge graph includes a destination node layer and a source node layer, the destination node layer includes at least one destination node, the source node layer includes at least one source node, and the nodes between the destination node layer and the source node layer are in a fully connected relationship;
[0078] Statistics are performed on different node probabilities and parameterized modeling is performed; wherein the different node probabilities include the probability of node Si connecting to Dj, the prior probability of a certain node state appearing, the probability of a certain node state jumping from time t1 to time t2, the probability of a certain node state changing, the probability of a certain node state continuing, and the port usage probability of a certain node; wherein Si represents the source node and Dj represents the destination node;
[0079] Quantify the variable values, and perform statistics on the different node probabilities to obtain a discrete probability distribution;
[0080] The statistically obtained probability distribution is fitted based on a parameterized probability model to obtain a parameterized description of each node to complete the training of the probability grammar model.
[0081] Specifically, in the model training phase, the network disconnection data represented by the five-tuple format (<source node, source port, destination node, destination port, protocol type>) is mainly used to train the probability grammar model; the present invention requires recording data for at least 24 consecutive hours, with a sampling interval of no less than 1s. According to the business situation, no less than 2 business states (such as weekday daytime, weekday night, etc.) are defined, and then an independent probability grammar model is trained for each business state.
[0082] Given several hours of data collected continuously under a business state, the present invention provides a probabilistic grammar model defined by a probabilistic knowledge graph (PKG). The graph is divided into two layers, one layer is the destination node D, and the other layer is the source node S. The nodes in the two layers are fully connected. Figure 2 A sample PKG containing 5 source nodes and 5 destination nodes is given.
[0083] Based on the above definition, the model training phase mainly focuses on statistical and parameterized modeling of various probabilities. Common probabilities include but are not limited to:
[0084] 1) The probability that node Si is connected to Dj is P0(Dj|Si), where the total number of times the edge between S and D appears is equal to the total number of valid training data, which can be used for statistics, such as
[0085] P0(Dj|Si)=in the form of<Si,…,Dj,…,…> The number of times the sample appears / the total number of samples in the training set.
[0086] 2) The prior probability of a node state appearing, for example, the probability of a state appearing at time t, P1(s_t), where s_t represents the state at time t, which can be s = {the number of data packets per unit time (unit: pieces / s)} or s = {the total amount of data per unit time (unit: bytes / s)}.
[0087] 3) The state transition probability of a node from time t1 to time t2 is P12(s_t2|s_t1).
[0088] 4) The probability of a node state change, for example, P2(△s_t), where △s = {the change in the number of data packets per unit time (unit: pieces / s)} or △s = {the change in the total amount of data per unit time (unit: bytes / s)} or △s = {…,-200,-100,-50,0,50,100,200,…}.
[0089] A negative number represents a decrease in the number of data packets or the amount of data, a positive number represents an increase in the number of data packets or the amount of data, and 0 represents that the number of data packets or the amount of data remains unchanged.
[0090] 5) The probability of a node state persisting, for example, P3 (△s = 0 for T seconds), where T is the statistical interval, with a value of [1, T max ], where T max is the maximum idle time.
[0091] 6) The port usage probability of a node, for example, P4 (port k |Si) = the number of times port k is used by node Si / the number of all behaviors of node Si.
[0092] By quantifying the variable values and performing statistics on the defined probabilities, a discrete probability distribution can be obtained. Then, an appropriate parameterized probability model (such as a normal distribution model, a multinomial distribution model, a Gaussian mixture model, etc.) is used to fit the statistically derived probability distribution, and a parameterized description of each node can be obtained, which is recorded as ...and so on, where μ x Represents the probability parameter. Once the parameterized description of all nodes is obtained, the training of the probability grammar model PKG is completed.
[0093] In the model use phase, the network connection data of the node is analyzed based on the trained PKG to achieve traffic prediction for the node of interest, which includes two parts: working status judgment and node status prediction.
[0094] For the working state judgment, in some embodiments, the at least one second graph data is determined based on the training results of the probabilistic grammar model in different time periods; the at least one second graph data obtained from the pre-training selects the target graph data with the highest similarity to the first graph data, including:
[0095] For any second graph data in the at least one second graph data, the node probability parameters therein are arranged to obtain a structured feature vector TZ={μ0,μ1,…,μ k}; According to the similarity between node feature vectors, group and cluster the source nodes and destination nodes respectively to obtain Nd destination node cluster centers and Ns source node cluster centers Thus, Ns+Nd feature vectors of the second atlas data are obtained;
[0096] For each source node in the first graph data, calculate the similarity with each of the Ns cluster centers of the second graph data. If the similarity is greater than the first threshold, it is determined that the source node belongs to the corresponding second graph data. For each destination node in the first graph data, calculate the similarity with each Nd cluster center of the second graph data, if the similarity with the cluster center If the similarity is greater than the second threshold, it is determined that the destination node belongs to the corresponding second graph data. If the destination node in the first graph data does not belong to any class in the second graph data, the node is determined to be an outlier; the similarity between the first graph data and the second graph data is obtained as follows:
[0097]
[0098] Among them, PKG_new represents the first graph data, PKG1 represents the second graph data, Sim(A,B) represents the similarity between node A and cluster center B, N in1 is the number of source nodes of a certain type in PKG1 in PKG_new, N in2 is the number of destination nodes of a certain type in PKG1 in PKG_new, N all is the number of all nodes in PKG_new, and α, β, and γ are weight coefficients.
[0099] Specifically, given the five-tuple data of the node of interest within a period of time (recorded as Data1), the main purpose of this step is to analyze the overall working state of the network composed of the nodes of interest during this period. Assuming that PKG1, PKG2, ..., PKGn are n PKGs trained using data from different time periods, in order to determine the overall working state of the network when Data1 is collected, the following three steps are used:
[0100] 1) Feature construction.
[0101] Given a PKG, the node probability parameters are arranged together to obtain a structured feature vector TZ = {μ0,μ1,…,μ k}; Then, according to the similarity between the node feature vectors, group and cluster the source nodes and the destination nodes respectively to obtain Nd destination node cluster centers and Ns source node cluster centers Thus, we obtain Ns+Nd feature vectors about PKG, such as Figure 3 The schematic diagram of grammatical model feature construction is given as follows.
[0102] By using the above feature construction method for PKG1, PKG2, ..., PKGn, n groups of PKG feature vectors can be obtained, each group including Ns+Nd clustering centers.
[0103] 2)PKG similarity calculation.
[0104] Using Data1 as training data, we can obtain a new probabilistic knowledge graph PKG_new using the model training method of the present invention. For each source node in PKG_new, calculate its similarity (or distance) with the Ns cluster centers of PKG1. If the similarity with a certain center is greater than the threshold (or the distance is less than the threshold), the node is considered to belong to the category in PKG1; and so on, if for each destination node in PKG_new, calculate its similarity with the Nd cluster centers of PKG1, if the similarity with a certain center is greater than the threshold (or the distance is less than the threshold), the node is considered to belong to the category in PKG1; if a node in PKG_new does not belong to any category in PKG1, the node is considered to be an outlier. Based on the above calculations, the similarity between PKG1 and PKG_new can be obtained as:
[0105]
[0106] Where Sim(A,B) represents the similarity between node A and cluster center B. Possible calculation methods include Gaussian similarity measurement Cosine similarity measure Wait, N in1 is the number of source nodes in PKG_new that can be regarded as a certain type in PKG1, N in2 is the number of destination nodes in PKG_new that can be regarded as a certain type in PKG1, N all is the number of all nodes in PKG_new, and α, β, and γ are weight coefficients.
[0107] 3) Determination of working status.
[0108] According to the calculation results of PKG similarity, assuming that PKG_new and PKG_m have the highest similarity, it is considered that the working state corresponding to the Data1 acquisition period is the working state during the PKG_m training sample acquisition period.
[0109] Regarding node status prediction, in some embodiments, before predicting the node status of the target node based on the working status, the method further includes:
[0110] The second graph data is used as training data of the prediction model, and the prediction model is trained to obtain a target prediction model Pred, wherein the prediction model is a time series prediction model, and the time series prediction model includes one of ARIMA, XGBOOST, and artificial neural network.
[0111] In some embodiments, predicting the node state of the target node based on the working state includes:
[0112] Based on the target prediction model Pred, we can get
[0113] TZ T1+1 =Pred({TZ0,TZ1,TZ2,…,TZ T1}),
[0114] TZ T1+2 =Pred({TZ1,TZ2,TZ3,…,TZ T1+1}), ... until the complete state2 = {s T1+1 ,s T1+2 ,…,s T1+T2};
[0115] Among them, historical feature state1={TZ0,TZ1,TZ2,…,TZ T1}, T1+1, T1+2 represent future time. TZ T1+1 represents the characteristics of the target node at time T1+1, TZ T1+2 It represents the characteristics of the target node at time T1+2, and state2 represents the predicted result of the node state of the target node.
[0116] In some embodiments, adjusting the target node according to the prediction result includes:
[0117] According to the prediction result, the network traffic quota of the corresponding node is adjusted; the adjustment strategy includes at least one of direct adjustment, time sliding window adjustment, global weight allocation adjustment or partial adjustment.
[0118] Specifically, assume that the current working state of the network is the working state during the collection of PKG_m training samples, and the states {s0,s1,s2,…,s T1}, this application performs node-level state prediction based on the following steps. According to the definition of state in the "model training phase" of this application, the node state involved in the present invention mainly includes the number of data packets N received and sent by the node per unit time. pack , data size N Size Etc. are physical quantities commonly used in network connectivity data analysis.
[0119] For source nodes Si (such as personal workstations, mobile terminals), the main purpose of state prediction is to predict the node probability and historical features of PKG_m based on state1 = {TZ0, TZ1, TZ2, ..., TZ T1}, it is inferred that in the future time period t = [T1+1, T1+2, ... T1+T2], the characteristics of node Si are recorded as state2 = {TZ T1+1 ,TZ T1+2 ,…,TZ T1+T2 The specific steps used in the embodiment of this application are as follows:
[0120] 1) Prediction model training: Take the training data of Data_arg and PKG_m together as the training data of the prediction model, train the prediction model, and obtain the prediction model Pred. Common time series prediction models include ARIMA, XGBOOST, artificial neural network, etc. You can reasonably select the time series prediction model according to the actual data volume and accuracy requirements.
[0121] Here, in addition to the second atlas data, the data used as training data for the prediction model may also include sampling of various probabilities of PKG1 to generate data that can be used to train the prediction model. In the embodiment of the present application, these data are recorded as Data_arg. This embodiment uses a time series prediction model to perform state prediction, and then generates time series data similar to state1 as training sample Data_arg through two probability distributions such as P1, P12, and P24.
[0122] 2) State prediction: Use the prediction model to perform reasoning and obtain
[0123] TZ T1+1 =Pred({TZ0,TZ1,TZ2,…,TZ T1}), TZ T1+2 =Pred({TZ1,TZ2,TZ3,…,TZ T1+1}), …
[0124] And so on, until the complete state2={s T1+1 ,s T1+2 ,…,s T1+T2}.
[0125] Regarding configuration adjustment, in some embodiments, adjusting the target node includes:
[0126] According to the prediction result, the network traffic quota of the corresponding node is adjusted; the adjustment strategy includes at least one of direct adjustment, time sliding window adjustment, global weight allocation adjustment or partial adjustment.
[0127] For known nodes (in PKG training data): the system adjusts the network traffic quota Ni of the ith node according to the node status prediction results. The adjustment strategy can be direct adjustment, time sliding window adjustment, global weight allocation adjustment or partial adjustment, for example:
[0128] (1) Direct adjustment: Ni_new = Ni_pred;
[0129] (2) Time sliding window adjustment: Ni_new = a×Ni+(1-a)×Ni_pred;
[0130] (3) Global weight allocation adjustment: Ni_new = Ni_pred / sum of all node predicted traffic × total available bandwidth, where Ni_pred represents the prediction result.
[0131] For newly added nodes (not in PKG training data).
[0132] Below, the embodiments of the present application will be fully described.
[0133] This embodiment uses the network connectivity data of a company's local area network in December 2023 as a data set to technically implement the solution of the present invention.
[0134] 1. Model training phase.
[0135] By analyzing the data, we selected the network disconnection data of a whole working day as the data set. We further divided the 24-hour data into five time periods: [00:00-09:00], [09:00-12:00], [12:00-13:30], [13:30-18:30], and [18:30-23:59] according to whether it is a working period, forming five data sets, which are recorded as Data1, Data2, Data3, Data4, and Data5.
[0136] PKG contains source node Si and destination node Di. For source node Si, the common probability described in the method is selected here:
[0137] (1) The prior probability P1(s_t) of the node Si sending different numbers of data packets per unit time, where s refers to the number of data packets sent within 1s.
[0138] (2) The port usage probability P4 of node Si k |Si).
[0139] For the destination node Di, we also use the above two probabilities. Below, we give an example to show how to implement the two probabilities. The results of the Data2 dataset during the morning working hours are shown.
[0140] In order to calculate the prior probability P1(s_t), first extract all the data packet records of a source node Si from the data set. According to its timestamp, all the data packets can be divided into multiple time slices with a time length of 1s. The number of data packets in each time slice is the number of data packets sent by node Si per unit time. Figure 4 shown.
[0141] For the port usage probability P4(port k |Si), we know that the transmission includes the source port and the destination port, so P4 (port k|Si) is a two-dimensional probability distribution. The numerical range of the port is 0 to 65535. According to the port usage specification, 0 to 1023 are well-known ports. These port numbers are assigned by the Internet Assigned Numbers Authority (IANA) and are usually used for important services that cannot be changed by the operating system or administrator. 1024 to 49151 are registered ports. These port numbers are used for user-level applications or protocols. They are not as strictly controlled by IANA as well-known ports, but are usually registered by software vendors to avoid port conflicts. 49152 to 65535 are dynamic or private ports. These ports are usually selected and used dynamically by applications and do not require IANA registration. These ports are mainly used for short-term or temporary tasks. According to the above characteristics of the port, the well-known ports can be expanded in relatively detail, and registered ports and dynamic or private ports can be classified into one category each. The second probability distribution diagram is obtained as follows Figure 5 shown.
[0142] For the destination node Di, similar results P1(s_t) and P4(port k |Di).
[0143] After obtaining the discrete probability distribution of the two features of the source node Si and the destination node Di respectively, we can use an appropriate parameterized probability model (here we use a Gaussian mixture model) to fit the statistical probability distribution, and then we can get a parametric description of each node. For the source node Si prior probability P1(s_t), we use a three-component one-dimensional mixed Gaussian model for fitting. Therefore, the parameterized model contains 3 means, 3 standard deviations, 3 component weights, and a total of 9 parameters. P4 (port k |Si), we use a 4-component 2D Gaussian mixture model for fitting. The same parameterized model contains 8 means, 8 covariances, 4 component weights, and a total of 20 parameters. After flattening the two features of Si, we can get a 29-dimensional feature vector of Si. For Di, we can also get a 29-dimensional feature vector.
[0144] 2. Model usage phase.
[0145] (1) Determine the overall working status of the network.
[0146] 1) Feature construction.
[0147] Data2 contains 695 source nodes Si and 11470 destination nodes Di. Clustering the 695 source nodes Si according to the 29-dimensional vector in the model construction can obtain 12 29-dimensional class centers. Clustering the 11470 destination nodes Di according to the 29-dimensional vector in the model construction can obtain 48 29-dimensional class centers. Therefore, by arranging the 12 class centers of all source nodes Si and the 48 class centers of the destination nodes together, a structured feature vector of PKG2 containing 60 elements can be obtained, and each element in the feature vector is a 29-dimensional vector.
[0148] For other data sets Data1, Data3, Data4, and Data5, the discrete probability distribution of node features is fitted with a parameterized model with a dimension of 29. However, in the clustering process, the number of cluster centers is different, namely 48, 36, 72, and 28. Therefore, multiple probability grammar models PKG can be obtained as shown in Table 1.
[0149] Dataset Probabilistic Grammar Model PKG Data1 <![CDATA[{{μ0,…,μ 28 }0, {μ0,…,μ 28 }1,…{μ0,…,μ 28 } 47 }]]> Data2 <![CDATA[{{μ0,…,μ 28 }0, {μ0,…,μ 28 }1,…{μ0,…,μ 28 } 59 }]]> Data3 <![CDATA[{{μ0,…,μ 28 }0, {μ0,…,μ 28 } 1, …{μ0,…,μ 28 } 35 }]]> Data4 <![CDATA[{{μ0,…,μ 28 }0, {μ0,…,μ 28 }1,…{μ0,…,μ 28 } 71 }<!-- 10 --> ]]> Data5 <![CDATA[{{μ0,…,μ 28 }0, {μ0,…,μ 28 }1,…{μ0,…,μ 28 } 27 }]]>
[0150] Table 1
[0151] 2)PKG similarity calculation.
[0152] To calculate the similarity of PKG, we use the formula:
[0153] In the formula, α, β, and γ are 0.4, 0.4, and 0.2 respectively. The similarity is measured by cosine similarity. We calculated the similarity between the above five data sets and found that the similarity between Data2 and Data4 was high, which was 0.83. The similarity between Data1 and Data5 was high, which was 0.79. The similarity between Data3 and several data sets was low, all less than 0.35. It just met our expected results. The PKG similarity between working hours was high, the PKG similarity between the midnight and after-get off work time periods of the company was high, and the PKG during the lunch break was different from the PKG during other time periods.
[0154] 3) Determination of working status.
[0155] We extracted 30 minutes of data from 20:00 to 20:30 in Data5 as test data to verify the effectiveness of PKG in judging the work of the network. By calculating the similarity between the PKG of the test data and the PKG of Data1 to 4, we found that the similarity between the test data and the PKG of Data1 is relatively high, so the network working status of the test data is consistent with the working status collected by the PKG1 training set.
[0156] (2) Node status prediction
[0157] 1) Prediction model training: ARIMA is selected as the time series prediction model in this embodiment. For a certain node (Si or Di), we divide the 24-hour data of the node the day before into 24 segments of data, each segment being 1 hour. For each segment of data, a 29-dimensional feature vector for that time period can be calculated similarly to the training phase. We use the 24 29-dimensional vectors of this node as the Data_arg input of the prediction model. At the same time, we use the 29-dimensional feature vector calculated for the node from 0:00 to 1:00 on the same day as PKG_m, as another input to the prediction model. Thus, we have completed the construction of the prediction model Pred.
[0158] 2) State prediction:
[0159] The input of the prediction model is 25 29-dimensional feature vectors;
[0160] state1={TZ0, TZ1,…,TZ 24}={{μ0,…,μ 28}0,{μ0,…,μ 28}1,…{μ0,…,μ 28} 24}
[0161] Use the prediction model to perform inference and obtain 29-dimensional feature vectors for subsequent multiple time periods;
[0162] s 25 = Pred{TZ0, TZ1, ..., TZ 24}
[0163] = Pred{{μ0, ..., μ 28}0,{μ0,…,μ 28}1,…{μ0,…,μ 28} 24}
[0164] =[μ0,…,μ 28} 25 , get the complete state2 = {TZ 24+1 , TZ 24+2 , …, TZ 24+T2}
[0165] After obtaining the 29-dimensional feature vector of the subsequent time period, the first 9-dimensional parameters are substituted into the 3-component one-dimensional Gaussian mixture model to obtain the probability distribution of the node sending the data packet in the time period.
[0166] 3. Configuration optimization.
[0167] In the optimization configuration, we use the mathematical expectation of the traffic probability distribution described by state2 as the predicted value of the number of packets sent in the future T2. Taking three nodes as an example, the expected values of the number of packets sent are N1_pred=1000, N2_pred=1500, and N3_pred=1200. This embodiment adopts a global weight allocation adjustment strategy, and the total available bandwidth is total_bandwidth=500Mbps.
[0168] First, calculate the sum of all nodes' predicted traffic:
[0169] total_pred=N1_pred+N2_pred+N3_pred
[0170] =1000+1500+1200
[0171] =3700.
[0172] Then, the new weights are calculated based on the global weight distribution adjustment:
[0173] N1_new=N1_pred / total_pred×total_bandwidth
[0174] =1000 / 3700×500
[0175] ≈135.14Mbps.
[0176] N2_new=N2_pred / total_pred×total_bandwidth
[0177] =1500 / 3700×500
[0178] ≈203.38Mbps.
[0179] N3_new=N3_pred / total_pred×total_bandwidth
[0180] =1200 / 3700×500
[0181] ≈161.49Mbps.
[0182] Therefore, after the optimized configuration, the traffic distribution of node 1 is about 135.14 Mbps, the traffic distribution of node 2 is about 203.38 Mbps, and the traffic distribution of node 3 is about 161.49 Mbps.
[0183] The technical solutions in the embodiments of the present application have alternative solutions in some solutions:
[0184] Alternatives to node clustering:
[0185] a) Density-based clustering: Use density-based algorithms such as DBSCAN to cluster nodes.
[0186] b) Hierarchical clustering: Hierarchical clustering methods such as AGNES or BIRCH are used to discover the hierarchical structure of nodes.
[0187] Alternatives to node traffic prediction
[0188] The prediction model Pred is replaced from a time series prediction model to a change prediction model. A neural network with a structure like AlexNet or RNN can be selected. The input is the features of the historical moment, and the output is the change value of the features of the future moment. The prediction method thus becomes:
[0189] (1)
[0190] (2)
[0191] In summary, the embodiments of the present application have the following beneficial effects:
[0192] (1) High degree of automation: The system can automatically learn and adapt to network changes, reducing the need for manual intervention, thereby reducing operation and maintenance costs and error rates.
[0193] (2) Low deployment cost: The system does not require high hardware configuration, is easy to deploy, and has low operation and maintenance costs, making it suitable for resource-constrained environments.
[0194] (3) Strong interpretability: The probabilistic grammar model provides an intuitive way to understand and explain the optimization process of network configuration, making it easier for network administrators to debug and maintain.
[0195] (4) Strong scalability: The system can adapt to the addition of new nodes without the need for manual definition of new rules, and automatically expand network configuration strategies, thereby improving the scalability of the system.
[0196] (5) Low migration cost: The system can automatically adapt to the business conditions of different LANs, reducing the configuration update work caused by changes in network structure and lowering migration costs.
[0197] (6) Dynamic resource allocation: The system can dynamically adjust network resource allocation based on real-time network traffic prediction results, thereby improving resource utilization and network performance.
[0198] (7) Through these advantages, the technical solution of the present invention can realize automatic optimization of network resource configuration without sacrificing network performance, providing an efficient and intelligent solution for network operation and maintenance management.
[0199] Based on the same inventive concept, the embodiment of the present application also provides an automatic adjustment device for network resource configuration based on a probabilistic grammar model corresponding to the automatic adjustment method for network resource configuration based on a probabilistic grammar model in the first embodiment. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned automatic adjustment method for network resource configuration based on a probabilistic grammar model, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0200] like Figure 6 As shown, Figure 6 600 is a schematic diagram of a network resource configuration automatic adjustment device 600 based on a probability grammar model provided in an embodiment of the present application. The network resource configuration automatic adjustment device 600 based on a probability grammar model includes:
[0201] A training module 601 is used to train a probabilistic grammar model based on network connection data to obtain a probabilistic grammar model corresponding to each service state, wherein the probabilistic grammar model is constructed based on a probabilistic knowledge graph;
[0202] A determination module 602 is used to obtain working state data of a target node within a target time period, input the working state data into the probabilistic grammar model to obtain first graph data, and select target graph data having the highest similarity to the first graph data from at least one second graph data obtained by pre-training, and determine the working state based on the target graph data;
[0203] The adjustment module 602 is used to predict the node state of the target node based on the working state, and adjust the target node according to the prediction result.
[0204] Those skilled in the art should understand that Figure 6 The implementation functions of each unit in the apparatus 600 for automatically adjusting network resource configuration based on a probability grammar model can be understood by referring to the related description of the method for automatically adjusting network resource configuration based on a probability grammar model. Figure 6 The functions of the various units in the apparatus 600 for automatically adjusting network resource configuration based on a probabilistic grammar model can be implemented by a program running on a processor, or by a specific logic circuit.
[0205] In a possible implementation, the training module 601 trains the probability grammar model based on the network disconnection data to obtain the probability grammar model corresponding to each service state, including:
[0206] The format of the network disconnection data is defined as a five-tuple, and data for more than 24 hours is continuously recorded with a sampling interval of not less than 1 second as the network disconnection data;
[0207] Based on the business situation, at least two business states are defined, and a corresponding probability grammar model is trained for each business state.
[0208] In a possible implementation, the training module 601 trains a corresponding probability grammar model for each service state, including:
[0209] Constructing the probabilistic knowledge graph, wherein the probabilistic knowledge graph includes a destination node layer and a source node layer, the destination node layer includes at least one destination node, the source node layer includes at least one source node, and the nodes between the destination node layer and the source node layer are in a fully connected relationship;
[0210] Statistics are performed on different node probabilities and parameterized modeling is performed; wherein the different node probabilities include the probability of node Si connecting to Dj, the prior probability of a certain node state appearing, the probability of a certain node state jumping from time t1 to time t2, the probability of a certain node state changing, the probability of a certain node state continuing, and the port usage probability of a certain node; wherein Si represents the source node and Dj represents the destination node;
[0211] Quantify the variable values, and perform statistics on the different node probabilities to obtain a discrete probability distribution;
[0212] The statistically obtained probability distribution is fitted based on a parameterized probability model to obtain a parameterized description of each node to complete the training of the probability grammar model.
[0213] In a possible implementation, the at least one second graph data is determined based on the training results of the probabilistic grammar model in different time periods, and the determination module 602 selects the target graph data with the highest similarity to the first graph data from the at least one second graph data obtained by pre-training, including:
[0214] For any second graph data in the at least one second graph data, the node probability parameters therein are arranged to obtain a structured feature vector TZ={μ0,μ1,…,μ k}; According to the similarity between node feature vectors, group and cluster the source nodes and destination nodes respectively to obtain Nd destination node cluster centers and Ns source node cluster centers Thus, Ns+Nd feature vectors of the second atlas data are obtained;
[0215] For each source node in the first graph data, calculate the similarity with each of the Ns cluster centers of the second graph data. If the similarity is greater than the first threshold, it is determined that the source node belongs to the corresponding second graph data. For each destination node in the first graph data, calculate the similarity with each Nd cluster center of the second graph data, if the similarity with the cluster center If the similarity is greater than the second threshold, it is determined that the destination node belongs to the corresponding second graph data. If the destination node in the first graph data does not belong to any class in the second graph data, the node is determined to be an outlier; the similarity between the first graph data and the second graph data is obtained as follows:
[0216]
[0217] Among them, PKG_new represents the first graph data, PKG1 represents the second graph data, Sim(A,B) represents the similarity between node A and cluster center B, N in1 is the number of source nodes of a certain type in PKG1 in PKG_new, N in2 is the number of destination nodes of a certain type in PKG1 in PKG_new, N all is the number of all nodes in PKG_new, and α, β, and γ are adjustable weights.
[0218] In a possible implementation manner, before the adjustment module 603 predicts the node state of the target node based on the working state, the method further includes:
[0219] The second graph data is used as training data of the prediction model, and the prediction model is trained to obtain a target prediction model Pred, wherein the prediction model is a time series prediction model, and the time series prediction model includes one of ARIMA, XGBOOST, and artificial neural network.
[0220] In a possible implementation manner, the adjusting module 603 predicts the node state of the target node based on the working state, including:
[0221] Based on the target prediction model Pred, we can get:
[0222] TZ T1+1 =Pred({TZ0,TZ1,TZ2,…,TZ T1}),
[0223] TZ T1+2 =Pred({TZ1,TZ2,TZ3,…,TZ T1+1}), ... until the complete state2 = {s T1+1 ,s T1+2 ,…,s T1+T2};
[0224] Among them, historical feature state1={TZ0,TZ1,TZ2,…,TZ T1}, T1+1, T1+2 represent future time. TZ T1+1 represents the characteristics of the target node at time T1+1, TZ T1+2 It represents the characteristics of the target node at time T1+2, and state2 represents the predicted result of the node state of the target node.
[0225] In a possible implementation, the adjustment module 603 adjusts the target node according to the prediction result, including:
[0226] According to the prediction result, the network traffic quota of the corresponding node is adjusted; the adjustment strategy includes at least one of direct adjustment, time sliding window adjustment, global weight allocation adjustment or partial adjustment.
[0227] The above-mentioned network resource configuration automatic adjustment device based on probability grammar model has the following beneficial effects:
[0228] (1) High degree of automation: The system can automatically learn and adapt to network changes, reducing the need for manual intervention, thereby reducing operation and maintenance costs and error rates.
[0229] (2) Low deployment cost: The system does not require high hardware configuration, is easy to deploy, and has low operation and maintenance costs, making it suitable for resource-constrained environments.
[0230] (3) Strong interpretability: The probabilistic grammar model provides an intuitive way to understand and explain the optimization process of network configuration, making it easier for network administrators to debug and maintain.
[0231] (4) Strong scalability: The system can adapt to the addition of new nodes without the need for manual definition of new rules, and automatically expand network configuration strategies, thereby improving the scalability of the system.
[0232] (5) Low migration cost: The system can automatically adapt to the business conditions of different LANs, reducing the configuration update work caused by changes in network structure and lowering migration costs.
[0233] (6) Dynamic resource allocation: The system can dynamically adjust network resource allocation based on real-time network traffic prediction results, thereby improving resource utilization and network performance.
[0234] (7) Through these advantages, the technical solution of the present invention can realize automatic optimization of network resource configuration without sacrificing network performance, providing an efficient and intelligent solution for network operation and maintenance management.
[0235] like Figure 7 As shown, Figure 7The present invention provides a schematic diagram of the structure of an electronic device 700, wherein the electronic device 700 includes:
[0236] A processor 701, a storage medium 702 and a bus 703, wherein the storage medium 702 stores machine-readable instructions executable by the processor 701. When the electronic device 700 is running, the processor 701 communicates with the storage medium 702 via the bus 703, and the processor 701 executes the machine-readable instructions to perform the steps of the method for automatic adjustment of network resource configuration based on a probabilistic grammar model described in an embodiment of the present application.
[0237] In actual application, the components in the electronic device 700 are coupled together via the bus 703. It is understood that the bus 703 is used to realize the connection and communication between these components. In addition to the data bus, the bus 703 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus 703.
[0238] The above electronic device has the following beneficial effects:
[0239] (1) High degree of automation: The system can automatically learn and adapt to network changes, reducing the need for manual intervention, thereby reducing operation and maintenance costs and error rates.
[0240] (2) Low deployment cost: The system does not require high hardware configuration, is easy to deploy, and has low operation and maintenance costs, making it suitable for resource-constrained environments.
[0241] (3) Strong interpretability: The probabilistic grammar model provides an intuitive way to understand and explain the optimization process of network configuration, making it easier for network administrators to debug and maintain.
[0242] (4) Strong scalability: The system can adapt to the addition of new nodes without the need for manual definition of new rules, and automatically expand network configuration strategies, thereby improving the scalability of the system.
[0243] (5) Low migration cost: The system can automatically adapt to the business conditions of different LANs, reducing the configuration update work caused by changes in network structure and lowering migration costs.
[0244] (6) Dynamic resource allocation: The system can dynamically adjust network resource allocation based on real-time network traffic prediction results, thereby improving resource utilization and network performance.
[0245] (7) Through these advantages, the technical solution of the present invention can realize automatic optimization of network resource configuration without sacrificing network performance, providing an efficient and intelligent solution for network operation and maintenance management.
[0246] The embodiment of the present application also provides a computer-readable storage medium, which stores executable instructions. When the executable instructions are executed by at least one processor 701, the method for automatically adjusting network resource configuration based on the probabilistic grammar model described in the embodiment of the present application is implemented.
[0247] In some embodiments, the storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface storage, an optical disk, or a compact disc read-only memory (CD ROM); it can also be various devices including one or any combination of the above memories.
[0248] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0249] As an example, executable instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0250] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0251] The computer-readable storage medium has the following advantages:
[0252] (1) High degree of automation: The system can automatically learn and adapt to network changes, reducing the need for manual intervention, thereby reducing operation and maintenance costs and error rates.
[0253] (2) Low deployment cost: The system does not require high hardware configuration, is easy to deploy, and has low operation and maintenance costs, making it suitable for resource-constrained environments.
[0254] (3) Strong interpretability: The probabilistic grammar model provides an intuitive way to understand and explain the optimization process of network configuration, making it easier for network administrators to debug and maintain.
[0255] (4) Strong scalability: The system can adapt to the addition of new nodes without the need for manual definition of new rules, and automatically expand network configuration strategies, thereby improving the scalability of the system.
[0256] (5) Low migration cost: The system can automatically adapt to the business conditions of different LANs, reducing the configuration update work caused by changes in network structure and lowering migration costs.
[0257] (6) Dynamic resource allocation: The system can dynamically adjust network resource allocation based on real-time network traffic prediction results, thereby improving resource utilization and network performance.
[0258] (7) Through these advantages, the technical solution of the present invention can realize automatic optimization of network resource configuration without sacrificing network performance, providing an efficient and intelligent solution for network operation and maintenance management.
[0259] In the several embodiments provided in the present application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0260] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0261] 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.
[0262] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform 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: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0263] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for automatically adjusting network resource configuration based on a probabilistic grammar model, characterized in that: The method comprises: The probability grammar model is trained based on the network connection data to obtain a probability grammar model corresponding to each service state, wherein the probability grammar model is constructed based on the probability knowledge graph; Acquire working status data of a target node within a target time period, input the working status data into the probabilistic grammar model to obtain first graph data, and select target graph data having the highest similarity to the first graph data from at least one second graph data obtained by pre-training, and determine the working status based on the target graph data; Predicting a node state of the target node based on the working state, and adjusting the target node according to the prediction result; The probabilistic grammar model is trained based on the network disconnection data to obtain a probabilistic grammar model corresponding to each service state, including: The format of the network disconnection data is defined as a five-tuple, and data for more than 24 hours is continuously recorded with a sampling interval of not less than 1 second as the network disconnection data; Based on the business situation, define at least 2 business states and train the corresponding probabilistic grammar model for each business state; The training of the corresponding probability grammar model for each service state includes: Constructing the probabilistic knowledge graph, wherein the probabilistic knowledge graph includes a destination node layer and a source node layer, the destination node layer includes at least one destination node, the source node layer includes at least one source node, and the nodes between the destination node layer and the source node layer are in a fully connected relationship; Statistics are performed on different node probabilities and parameterized modeling is performed; wherein the different node probabilities include the probability of node Si connecting to Dj, the prior probability of a certain node state appearing, the probability of a certain node state jumping from time t1 to time t2, the probability of a certain node state changing, the probability of a certain node state continuing, and the port usage probability of a certain node; wherein Si represents the source node and Dj represents the destination node; Quantify the variable values, and perform statistics on the different node probabilities to obtain a discrete probability distribution; The statistically obtained probability distribution is fitted based on a parameterized probability model to obtain a parameterized description of each node to complete the training of the probability grammar model.
2. The method according to claim 1, characterized in that The at least one second graph data is determined based on the training results of the probabilistic grammar model in different time periods; The selecting, from the at least one second atlas data obtained by pre-training, target atlas data having the highest similarity to the first atlas data comprises: For any second graph data in the at least one second graph data, the node probability parameters therein are arranged to obtain a structured feature vector TZ={ }; According to the similarity between node feature vectors, group and cluster the source nodes and destination nodes respectively to obtain Nd destination node cluster centers { } and Ns source node cluster centers { }, thereby obtaining Ns+Nd feature vectors of the second atlas data; For each source node in the first graph data, calculate the similarity with each of the Ns cluster centers of the second graph data. If the similarity is greater than the first threshold, it is determined that the source node belongs to the corresponding second graph data. For each destination node in the first graph data, calculate the similarity with each Nd cluster center of the second graph data, if the similarity with the cluster center If the similarity is greater than the second threshold, it is determined that the destination node belongs to the corresponding second graph data. If the destination node in the first graph data does not belong to any class in the second graph data, the node is determined to be an outlier; the similarity between the first graph data and the second graph data is obtained as follows: ; Among them, PKG_new represents the first atlas data, PKG1 represents the second atlas data, Represents the similarity between node A and cluster center B, is the number of source nodes of a certain type in PKG1 in PKG_new, The number of destination nodes of a certain type in PKG1 in PKG_new. is the number of all nodes in PKG_new, , , is the weight coefficient.
3. The method according to claim 1, characterized in that Before predicting the node state of the target node based on the working state, the method further includes: The second graph data is used as training data of the prediction model, and the prediction model is trained to obtain a target prediction model Pred, wherein the prediction model is a time series prediction model, and the time series prediction model includes one of ARIMA, XGBOOST, and artificial neural network.
4. The method according to claim 3, characterized in that The predicting the node state of the target node based on the working state includes: Based on the target prediction model Pred, we can get 、 , until you get the complete ; Among them, historical characteristics , T1+1, T1+2 represent future time; represents the characteristics of the target node at time T1+1, represents the characteristics of the target node at time T1+2, Represents the prediction result of the node state of the target node.
5. The method according to claim 4, characterized in that The step of adjusting the target node according to the prediction result includes: According to the prediction result, the network traffic quota of the corresponding node is adjusted; the adjustment strategy includes at least one of direct adjustment, time sliding window adjustment, global weight allocation adjustment or partial adjustment.
6. A network resource configuration automatic adjustment device based on a probabilistic grammar model, characterized in that: The device comprises: A training module, for training a probabilistic grammar model based on network disconnection data to obtain a probabilistic grammar model corresponding to each business state, wherein the probabilistic grammar model is constructed based on a probabilistic knowledge graph; the training of the probabilistic grammar model based on the network disconnection data to obtain a probabilistic grammar model corresponding to each business state includes: defining the format of the network disconnection data as a five-tuple, and continuously recording data for more than 24 hours at a sampling interval of not less than 1 second as the network disconnection data; defining at least 2 business states based on business conditions, and training a corresponding probabilistic grammar model for each business state; the training of the corresponding probabilistic grammar model for each business state includes: constructing the probabilistic knowledge graph, wherein the probabilistic knowledge graph includes a destination node layer and a source node layer, and the destination node layer includes at least A destination node, the source node layer includes at least one source node, and the nodes between the destination node layer and the source node layer are in a fully connected relationship; different node probabilities are counted and parameterized modeling is performed; wherein the different node probabilities include the probability of node Si connecting to Dj, the prior probability of a node state appearing, the probability of a state jump from time t1 to time t2 of a node, the probability of a node state change, the probability of a node state continuation, and the port usage probability of a node; wherein Si represents the source node and Dj represents the destination node; the variable values are quantized, and the different node probabilities are counted to obtain a discrete probability distribution; the probability distribution obtained by statistics is fitted based on the parameterized probability model to obtain a parameterized description of each node to complete the training of the probability grammar model; A determination module, used for obtaining working status data of a target node within a target time period, inputting the working status data into the probabilistic grammar model to obtain first graph data, and selecting target graph data having the highest similarity to the first graph data from at least one second graph data obtained by pre-training, and determining the working status based on the target graph data; An adjustment module is used to predict the node state of the target node based on the working state, and adjust the target node according to the prediction result.
7. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the method for automatic adjustment of network resource configuration based on a probabilistic grammar model as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for automatically adjusting network resource configuration based on a probabilistic grammar model according to any one of claims 1 to 5 is executed.
Citation Information
Patent Citations
Method and apparatus for configuring network device parameters
CN107919973B
Automatic configuration method and device of equipment
CN114520765A
Power grid day-ahead scheduling plan optimization decision-making method based on knowledge graph
CN114936667A
Atlas merging method and device, electronic equipment and storage medium
CN116842183A