Method and apparatus for adjusting network change policy, electronic device, and storage medium

CN116527502BActive Publication Date: 2026-09-08INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310565421.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2026-09-08
Estimated Expiration
2043-05-18

AI Technical Summary

Technical Problem

[0005]本发明实施例提供了一种网络变更策略的调整方法及其装置、电子设备及存储介质,以至少解决相关技术中,在进行网络变更时,无法在网络变更前对网络变更策略进行评估,导致网络变更的成功率较低的技术问题

Benefits of technology

[0026] In this disclosure, the following steps are performed: first, the network change strategy is parsed to obtain the network change command; then, the bag-of-words list is queried based on the network change command to obtain the change vector; then, the change vector is input into the prediction model to output the change execution result of the network change strategy; finally, if the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold, the network change strategy is adjusted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527502B_ABST
    Figure CN116527502B_ABST
Patent Text Reader

Abstract

The application discloses a network change strategy adjustment method and device, electronic equipment and a storage medium, and relates to the field of financial technology, wherein the network change strategy adjustment method comprises the following steps: analyzing a network change strategy to obtain a network change command; querying a bag-of-words list based on the network change command to obtain a change vector; inputting the change vector into a prediction model to output a change execution result of the network change strategy; and adjusting the network change strategy in the case where the change execution result indicates that the change success rate of the network change strategy is lower than a success rate threshold. The application solves the technical problem in the related art that the network change strategy cannot be evaluated before network change, resulting in a low network change success rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial technology and other related technical fields. Specifically, it relates to a method, apparatus, electronic device and storage medium for adjusting network change strategies. Background Technology

[0002] With the rapid growth of server scale, the demand for server network changes has also surged. The need to ensure network stability and expand business directly translates into high-frequency and massive network changes. Compared with server storage and other change operations, network changes have many scenarios, high complexity, wide-ranging impact of failures, and are difficult to trace.

[0003] In related technologies, to improve the automation rate of network changes, network operations teams utilize information technology to develop automated tools to support their operations. Departments responsible for network operations handle a large number of network change tasks daily. However, due to objective factors such as inconsistent machine models and subjective factors such as human error, the execution of network change tasks is not always successful, making it difficult to improve the accuracy of these tasks. For failed network change tasks, on the one hand, operations personnel need to troubleshoot the problem using the change plan to complete the change as quickly as possible to ensure normal business operations; on the other hand, related automated tools in the network management platform store failure logs in databases or other storage media to preserve the execution status of the change. Both of these solutions involve remedial measures after a change fails, making it difficult to identify and resolve problems before execution, thus resulting in a low success rate for network changes.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides a method, apparatus, electronic device, and storage medium for adjusting network change strategies, to at least solve the technical problem in the related art where the network change strategy cannot be evaluated before the network change is performed, resulting in a low success rate of network change.

[0006] According to one aspect of the present invention, a method for adjusting a network change strategy is provided, comprising: parsing the network change strategy to obtain a network change command, wherein the network change strategy includes at least: a network change command, a change group, a change order number, and a change time; querying a bag-of-words list based on the network change command to obtain a change vector, wherein the bag-of-words list is pre-constructed based on historical change failure logs within a historical time period; inputting the change vector into a prediction model to output the change execution result of the network change strategy; and adjusting the network change strategy if the change execution result indicates that the success rate of the network change strategy is lower than a success rate threshold.

[0007] Optionally, the step of querying the bag-of-words list based on the network change command to obtain the change vector includes: splitting the network change command into N change command keywords based on a preset splitting rule, where N is a positive integer greater than or equal to 1; querying the bag-of-words list to obtain a feature value corresponding to each change command keyword, wherein the bag-of-words list includes at least M historical change command keywords that failed to change; if the bag-of-words list contains the change command keyword to be queried, a first feature value is obtained; if the bag-of-words list does not contain the change command keyword to be queried, a second feature value is obtained, where M is a positive integer greater than or equal to 1 and M is greater than or equal to N; and concatenating the feature values ​​corresponding to the N change command keywords to obtain the change vector.

[0008] Optionally, constructing the bag-of-words list includes: obtaining a set of historical change failure information, wherein the set of historical change failure information includes at least the following historical change failure information: historical change group, historical change failure log, historical change time, and historical change order number; preprocessing the set of historical change failure information to obtain a set of historical change failure data, wherein the preprocessing includes at least: encrypting the historical change group, desensitizing the historical change failure log, replacing sensitive information in the historical change failure log with a first type of preset character, and replacing variable data in the historical change failure log with a second type of preset character, wherein the sensitive information includes at least one of the following: network IP address, network port, and subnet mask; extracting a set of change failure command keywords from the set of historical change failure data, and determining the frequency band to which each change failure command keyword belongs, wherein the frequency band is used to indicate the level to which the frequency of the change failure command keyword belongs; constructing key-value pairs based on the change failure command keywords and the frequency band to which the change failure command keywords belong, and constructing the bag-of-words list based on the key-value pairs.

[0009] Optionally, the step of determining the frequency band to which each change failure command keyword belongs includes: grouping all the change failure command keywords; counting the frequency of each change failure command keyword in each change group; and segmenting the frequency of the change failure command keywords based on a preset segmentation rule to obtain the frequency band to which each change failure command keyword belongs.

[0010] Optionally, after preprocessing the historical change failure information set to obtain a historical change failure data set, the method further includes: summarizing the historical change failure data set into various change groups to obtain a summarization result, wherein the summarization result includes at least: the change failure command corresponding to each change failure log; for the I-th change group, counting the frequency of each change failure command and the total number of all change failure commands in the I-th change group, where I is an integer greater than or equal to 1; sorting all change failure commands according to the frequency of each change failure command to obtain the command sorting result of the I-th change group; calculating the ratio between the total number of all change failure commands in the I-th change group and the total number of change commands; inputting the ratio into a preset calculation formula to output the number of commands to be extracted; extracting the change failure commands ranked before the number of commands to be extracted from the command sorting result of the I-th change group, and sending the extracted change failure commands to the user terminal corresponding to the I-th change group.

[0011] Optionally, the prediction model is pre-built. Building the prediction model includes: obtaining a set of historical change strategies, wherein each historical change strategy includes at least: a historical change command, the execution result of each historical change command, and the execution success rate; constructing training samples and test samples based on the set of historical change strategies; inputting the training samples into a binary classification model for iterative training to obtain an initial prediction model; inputting the test samples into the initial prediction model to obtain test results; and obtaining the prediction model if the similarity between the test results and the execution success rate in the test samples is greater than a similarity threshold.

[0012] Optionally, the step of constructing training samples based on the historical change strategy set includes: extracting a training set from the historical change strategy set based on a first preset ratio; dividing the historical change commands in the training set into positive samples and negative samples according to the execution results, wherein the positive samples are used to indicate that the execution result of the historical change command is successful, and the negative samples are used to indicate that the execution result of the historical change command is unsuccessful; adjusting the ratio of the positive samples and the negative samples through a preset enhancement algorithm to obtain a set of positive and negative samples that meets the preset sample ratio requirement; querying the bag-of-words list to obtain a vector set for each historical change command in the set of positive and negative samples; and constructing the training samples based on the vector set of each historical change command in the set of positive and negative samples.

[0013] Optionally, the step of constructing training samples based on the historical change strategy set includes: extracting a test set from the historical change strategy set based on a second preset ratio; querying the bag-of-words list to obtain a vector set for each historical change command in the test set; and constructing the test samples based on the vector set for each historical change command in the test set.

[0014] Optionally, after the change execution result indicates that the success rate of the network change policy is lower than the success rate threshold, the method further includes: extracting the change group to which the current network change belongs in the network change policy, determining the user terminal corresponding to the change group; sending the change execution result to the user terminal corresponding to the change group, and adjusting the network change policy.

[0015] According to another aspect of the present invention, a network change policy adjustment apparatus is also provided, comprising: a parsing unit, configured to parse the network change policy to obtain a network change command, wherein the network change policy includes at least: a network change command, a change group, a change order number, and a change time; a query unit, configured to query a bag-of-words list based on the network change command to obtain a change vector, wherein the bag-of-words list is pre-constructed based on historical change failure logs within a historical time period; an output unit, configured to input the change vector into a prediction model and output the change execution result of the network change policy; and an adjustment unit, configured to adjust the network change policy when the change execution result indicates that the change success rate of the network change policy is lower than a success rate threshold.

[0016] Optionally, the query unit includes: a first splitting module, used to split the network change command into N change command keywords based on a preset splitting rule, where N is a positive integer greater than or equal to 1; a first query module, used to query the bag-of-words list to obtain a feature value corresponding to each change command keyword, wherein the bag-of-words list includes at least M historical change command keywords that failed to change, and if the bag-of-words list contains the change command keyword to be queried, a first feature value is obtained, and if the bag-of-words list does not contain the change command keyword to be queried, a second feature value is obtained, where M is a positive integer greater than or equal to 1 and M is greater than or equal to N; and a first concatenation module, used to concatenate the feature values ​​corresponding to the N change command keywords to obtain the change vector.

[0017] Optionally, the network change policy adjustment device further includes: a first acquisition module, used to acquire a set of historical change failure information, wherein the set of historical change failure information includes at least the following historical change failure information: historical change group, historical change failure log, historical change time, and historical change order number; and a first preprocessing module, used to preprocess the set of historical change failure information to obtain a set of historical change failure data, wherein the preprocessing includes at least: encrypting the historical change group, desensitizing the historical change failure log, and replacing the historical change failure log with a first type of preset character. Sensitive information, using a second type of preset character to replace variable data in the historical change failure log, the sensitive information including at least one of the following: network IP address, network port, subnet mask; a first determining module, used to extract the set of change failure command keywords from the historical change failure data set, and determine the frequency band to which each change failure command keyword belongs, wherein the frequency band is used to indicate the level to which the frequency of the change failure command keyword belongs; a first constructing module, used to construct key-value pairs based on the change failure command keywords and the frequency band to which the change failure command keywords belong, and construct the bag-of-words list based on the key-value pairs.

[0018] Optionally, the first determining module includes: a first grouping submodule, used to group all the change failure command keywords; a first statistics submodule, used to count the frequency of each change failure command keyword in each change group; and a first segmentation submodule, used to segment the frequency of the change failure command keywords based on preset segmentation rules to obtain the frequency segment to which each change failure command keyword belongs.

[0019] Optionally, the network change strategy adjustment device further includes: a first summarization module, used to summarize the historical change failure data set into each change group to obtain a summarization result, wherein the summarization result includes at least: change failure commands corresponding to each change failure log; a first statistics module, used to, for the I-th change group, count the frequency of each change failure command and the total number of all change failure commands in the I-th change group, where I is an integer greater than or equal to 1; a first sorting module, used to sort all change failure commands according to the frequency of each change failure command to obtain the command sorting result of the I-th change group; a first calculation module, used to calculate the ratio between the total number of all change failure commands in the I-th change group and the total number of change commands; a first output module, used to input the ratio into a preset calculation formula and output the number of commands to be extracted; and a first sending module, used to extract the change failure commands ranked before the number of commands to be extracted from the command sorting result of the I-th change group and send the extracted change failure commands to the user terminal corresponding to the I-th change group.

[0020] Optionally, the network change strategy adjustment device further includes: a second acquisition module, used to acquire a set of historical change strategies, wherein each historical change strategy includes at least: a historical change command, an execution result of each historical change command, and an execution success rate; a second construction module, used to construct training samples and test samples based on the set of historical change strategies; a first training module, used to input the training samples into a binary classification model for iterative training to obtain an initial prediction model; and a first testing module, used to input the test samples into the initial prediction model to obtain test results, and if the similarity between the test results and the execution success rate in the test samples is greater than a similarity threshold, the prediction model is obtained.

[0021] Optionally, the second construction module includes: a first extraction submodule, used to extract a training set from the historical change strategy set based on a first preset ratio; a first partitioning submodule, used to partition the historical change commands in the training set into positive samples and negative samples according to the execution results, wherein the positive samples are used to indicate that the execution result of the historical change command is successful, and the negative samples are used to indicate that the execution result of the historical change command is unsuccessful; a first adjustment submodule, used to adjust the ratio of the positive samples and the negative samples through a preset enhancement algorithm to obtain a set of positive and negative samples that meets the preset sample ratio requirements; a first query submodule, used to query the bag-of-words list to obtain a vector set of each historical change command in the set of positive and negative samples; and a first construction submodule to construct the training samples based on the vector set of each historical change command in the set of positive and negative samples.

[0022] Optionally, the second construction module further includes: a second extraction submodule, used to extract a test set from the historical change strategy set based on a second preset ratio; a second query submodule, used to query the bag-of-words list to obtain a vector set of each historical change command in the test set; and a second construction submodule, used to construct the test sample based on the vector set of each historical change command in the test set.

[0023] Optionally, the network change policy adjustment device further includes: a first extraction module, used to extract the change group to which the current network change belongs in the network change policy, and determine the user terminal corresponding to the change group; and a second sending module, used to send the change execution result to the user terminal corresponding to the change group to adjust the network change policy.

[0024] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the adjustment method of any of the above-described network change policies.

[0025] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the adjustment method of any of the above-described network change strategies.

[0026] In this disclosure, the following steps are performed: first, the network change strategy is parsed to obtain the network change command; then, the bag-of-words list is queried based on the network change command to obtain the change vector; then, the change vector is input into the prediction model to output the change execution result of the network change strategy; finally, if the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold, the network change strategy is adjusted.

[0027] In this disclosure, when making network changes, a pre-built bag-of-words list and a prediction model can be used to evaluate the change strategy before execution. This allows for adjustments to network change strategies with a success rate below a preset threshold, significantly improving the success rate of network change strategy execution. This solves the technical problem in related technologies where the network change strategy cannot be evaluated before the change, leading to a low success rate.

[0028] In this disclosure, historical change failure logs can also be collected to construct a bag-of-words list, which can make full use of change failure log data to comprehensively analyze the reasons for change failures in the historical change process. Attached Figure Description

[0029] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0030] Figure 1 This is a flowchart of an optional network change strategy adjustment method according to an embodiment of the present invention;

[0031] Figure 2 This is a system architecture diagram for adjusting an optional network change strategy according to an embodiment of the present invention;

[0032] Figure 3 This is a schematic diagram of an optional network change strategy adjustment device according to an embodiment of the present invention;

[0033] Figure 4 This is a hardware structure block diagram of an electronic device (or mobile device) according to an embodiment of the present invention, which describes a method for adjusting a network change strategy. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:

[0037] AUC, or Area Under the ROC curve, is an indicator of a model's quality by comparing the area under the curve.

[0038] It should be noted that the method and apparatus for adjusting network change strategies in this disclosure can be used in the field of fintech for evaluating and adjusting network change strategies, and can also be used in any field other than fintech for evaluating and adjusting network change strategies. This disclosure does not limit the application areas of the method and apparatus for adjusting network change strategies.

[0039] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) disclosed herein are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, and processing of such data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding access points are provided for users to choose to authorize or refuse. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information must be sent to the aforementioned user or organization through the interface, and the relevant information will be obtained only after receiving consent from the aforementioned user or organization.

[0040] The following embodiments of the present invention can be applied to various network change success rate evaluation systems / applications / devices, or to various network change strategy adjustment systems / applications / devices. The present invention constructs a bag-of-words list based on historical change failure logs, extracts keywords from the historical change failure logs, and constructs key-value pairs between the extracted keywords and their frequencies. When evaluating target network change strategies in real time, the solutions can be quantified and vectorized by querying the bag-of-words list, allowing them to be directly input into the prediction model for automatic evaluation of network change strategies, thereby improving the success rate of network changes.

[0041] This invention can also make full use of the log data of the change failure log to comprehensively analyze the reasons for network change failures during historical change processes.

[0042] The present invention will now be described in detail with reference to various embodiments.

[0043] Example 1

[0044] According to an embodiment of the present invention, an embodiment of a method for adjusting a network change strategy is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0045] Figure 1 This is a flowchart of an optional network change strategy adjustment method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0046] Step S101: Parse the network change policy to obtain the network change command. The network change policy includes at least: network change command, change group, change order number, and change time.

[0047] Step S102: Query the bag-of-words list based on the network change command to obtain the change vector. The bag-of-words list is pre-built based on historical change failure logs within a historical time period.

[0048] Step S103: Input the change vector into the prediction model and output the change execution result of the network change strategy;

[0049] Step S104: If the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold, the network change strategy is adjusted.

[0050] Through the above steps, the network change strategy is first parsed to obtain the network change command. Then, the bag-of-words list is queried based on the network change command to obtain the change vector. The change vector is then input into the prediction model to output the change execution result of the network change strategy. Finally, if the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold, the network change strategy is adjusted.

[0051] In this embodiment, when making network changes, a pre-built bag-of-words list and prediction model can be used to evaluate the change strategy before execution. This allows for adjustments to network change strategies with a success rate below a preset threshold, thereby improving the success rate of network change strategy execution. This solves the technical problem in related technologies where the network change strategy cannot be evaluated before the change, leading to a low success rate.

[0052] The embodiments of the present invention will now be described in detail with reference to the steps described above.

[0053] It should be noted that the implementation subject of this embodiment of the invention is a network change strategy adjustment system. The system includes a pre-built bag-of-words list and a prediction model. The bag-of-words list is used to transform the change plan into a vector that can be input into the model, thereby inputting the plan into the model for success rate evaluation.

[0054] It should be noted that network changes refer to modifying, updating, or improving the existing server network to meet new requirements. For example, setting access policies, allowing a specific network segment to access the server, or creating directories for the server. Network changes may involve various aspects, including software, hardware, and various configuration settings. When making network changes, careful planning and ensuring the plan is controllable are essential. Incorrect implementation of the change plan may lead to problems such as server data loss, business interruption, and business paralysis. Therefore, strategy evaluation before network changes is particularly important.

[0055] Step S101: parse the network change policy to obtain the network change command.

[0056] It should be noted that network change policies are submitted by each business department (group) based on change requirements. A network change policy includes at least the following: network change command, change group, change order number, and change time. The network change command is used to modify network-related configurations, including IP addresses, ports, subnet masks, etc. Through the network change command, users can operate on the console or command-line interface to obtain the required network status. The change group indicates the group or department to which each network change belongs. The final evaluation report of the network change policy will be sent to the user terminal of the corresponding department or group based on the change group. The change order number is the query identifier for this network change. Users can use the change order number to query the execution progress of the current network change. The change time indicates the start time of this network change.

[0057] Step S102: Query the bag-of-words list based on the network change command to obtain the change vector.

[0058] It should be noted that before evaluating the change strategy, the text or programming language in the change plan needs to be converted into vectors that the model can process. In this embodiment of the invention, a bag-of-words list is pre-built. During real-time execution, only the change command keywords need to be entered into the query box of the bag-of-words list to obtain the feature values. The change vector can be obtained by concatenating the feature values.

[0059] Optionally, the bag-of-words list is pre-built. Building the bag-of-words list includes: obtaining a set of historical change failure information, wherein the set of historical change failure information includes at least the following historical change failure information: historical change group, historical change failure log, historical change time, and historical change order number; preprocessing the historical change failure information set to obtain a set of historical change failure data, wherein the preprocessing includes at least: encrypting the historical change group, desensitizing the historical change failure log, replacing sensitive information in the historical change failure log with a first type of preset character, and replacing variable data in the historical change failure log with a second type of preset character. Sensitive information includes at least one of the following: network IP address, network port, and subnet mask; extracting a set of change failure command keywords from the historical change failure data set, and determining the frequency band to which each change failure command keyword belongs, wherein the frequency band is used to indicate the level to which the frequency of the change failure command keyword belongs; constructing key-value pairs based on the change failure command keywords and the frequency bands to which the change failure command keywords belong, and constructing a bag-of-words list based on the key-value pairs.

[0060] It should be noted that before constructing the bag-of-words, there may be confidentiality requirements for some historical change failure information. Therefore, the historical change failure information needs to be preprocessed. For example, the change group is encrypted, and information such as network IP addresses, network ports, and subnet masks involved in the change failure log are desensitized and replaced with the first type of preset characters. In addition, the variables involved in the log also need to be processed and replaced with the second type of preset characters. For example, use ACL name or ACL_name to replace ACL name A, ACL name B, etc.

[0061] Optionally, the step of determining the frequency band to which each change failure command keyword belongs includes: grouping all change failure command keywords; counting the frequency of each change failure command keyword in each change group; and segmenting the frequency of change failure command keywords based on preset segmentation rules to obtain the frequency band to which each change failure command keyword belongs.

[0062] It should be noted that the bag-of-words list is constructed based on historical change failure information over a historical period. The bag-of-words list contains M change failure command keywords. The frequency of each command keyword is calculated, grouped by change group, and then the command keyword is divided into frequency bands based on the calculated frequency. Key-value pairs are then constructed based on the command keyword and frequency band, for example, the key-value pair {Command}. ij Range k}, where Command ij This represents the j-th command for the i-th group change, Range kThe frequency of the command corresponds to the k-th frequency band marker.

[0063] Optionally, after preprocessing the historical change failure information set to obtain the historical change failure data set, the method further includes: summarizing the historical change failure data set into each change group to obtain a summarization result, wherein the summarization result includes at least: the change failure command corresponding to each change failure log; for the I-th change group, counting the frequency of each change failure command and the total number of all change failure commands in the I-th change group, where I is an integer greater than or equal to 1; sorting all change failure commands according to the frequency of each change failure command to obtain the command sorting result of the I-th change group; calculating the ratio between the total number of all change failure commands in the I-th change group and the total number of change commands; inputting the ratio into a preset calculation formula and outputting the number of commands to be extracted; extracting the change failure commands ranked before the number of commands to be extracted from the command sorting result of the I-th change group, and sending the extracted change failure commands to the user terminal corresponding to the I-th change group.

[0064] It should be noted that after preprocessing the historical change failure information set, the high-frequency error commands corresponding to each change group need to be sent to the user terminals of the departments or groups corresponding to the change groups. Each change group will then analyze and modify the error commands, and finally store the high-frequency error commands and modification plans in the database.

[0065] Optionally, the step of querying the bag-of-words list based on the network change command to obtain the change vector includes: splitting the network change command into N change command keywords based on a preset splitting rule, where N is a positive integer greater than or equal to 1; querying the bag-of-words list to obtain the feature value corresponding to each change command keyword, wherein the bag-of-words list includes at least M historical change command keywords that failed to change; if the bag-of-words list contains the change command keyword to be queried, a first feature value is obtained; if the bag-of-words list does not contain the change command keyword to be queried, a second feature value is obtained, where M is a positive integer greater than or equal to 1 and M is greater than or equal to N; and concatenating the feature values ​​corresponding to the N change command keywords to obtain the change vector.

[0066] It should be noted that when converting the change plan into a change vector, the entire network change command needs to be extracted first to obtain the change command keywords. Then, each keyword is input into the query area of ​​the bag-of-words list to check if the command keyword exists in the bag-of-words list. If the key in the key-value pair in the bag-of-words list contains the keyword, the corresponding first feature value is obtained. If the key in the key-value pair in the bag-of-words list does not contain the keyword, the corresponding second feature value is obtained. Taking the first feature value as 1 and the second feature value as 0 as an example, assuming there are 3 command keywords in the bag-of-words list, namely a, b, and c, and the first new change strategy only contains a, the corresponding vector is 100. The second new change strategy contains bc, the corresponding vector is 011.

[0067] Step S103: Input the change vector into the prediction model and output the change execution result of the network change strategy.

[0068] It should be noted that the prediction model is built based on the success rate of change commands and change results in the historical change log. Therefore, you only need to input the change vector corresponding to the network change strategy to be predicted into the prediction model to obtain the execution success rate of the network change strategy. Adjustments can be made to network change strategies with low success rates to improve their execution success rate before the network change strategy is executed.

[0069] Optionally, the prediction model is pre-built. Building the prediction model includes: obtaining a set of historical change strategies, wherein each historical change strategy includes at least: a historical change command, the execution result of each historical change command, and the execution success rate; constructing training samples and test samples based on the set of historical change strategies; inputting the training samples into a binary classification model for iterative training to obtain an initial prediction model; inputting the test samples into the initial prediction model to obtain test results; and obtaining the prediction model if the similarity between the test results and the execution success rates in the test samples is greater than a similarity threshold.

[0070] Optionally, the step of constructing training samples based on the historical change strategy set includes: extracting a training set from the historical change strategy set based on a first preset ratio; dividing the historical change commands in the training set into positive samples and negative samples according to the execution results, wherein positive samples are used to indicate that the execution result of the historical change command is successful, and negative samples are used to indicate that the execution result of the historical change command is unsuccessful; adjusting the ratio of positive samples and negative samples through a preset enhancement algorithm to obtain a set of positive and negative samples that meets the preset sample ratio requirements; querying the bag-of-words list to obtain the vector set of each historical change command in the positive and negative sample set; and constructing training samples based on the vector set of each historical change command in the positive and negative sample set.

[0071] Optionally, the step of constructing training samples based on the historical change strategy set includes: extracting a test set from the historical change strategy set based on a second preset ratio; querying the bag-of-words list to obtain the vector set of each historical change command in the test set; and constructing test samples based on the vector set of each historical change command in the test set.

[0072] It should be noted that when constructing the prediction model, a neural network with two hidden layers is selected as the binary classification model. The binary classification model is iteratively trained to finally obtain the trained prediction model.

[0073] It should be noted that before building the prediction model, training samples and test samples need to be built separately. The training samples include positive samples and negative samples.

[0074] It should be noted that when constructing training samples, after obtaining the historical change strategy set, training and test sets are extracted according to a preset ratio. For the training set, it is divided into positive and negative samples based on the execution result of each network change command. Positive samples are network change strategies that were successfully executed, and negative samples are network change strategies that failed to execute. Since the ratio of positive to negative samples is unbalanced, in order to ensure the training of the model, the number of negative samples is increased through an augmentation algorithm to make the ratio of positive to negative samples close to 1:1. The vector of each sample is obtained by querying the bag-of-words list, and the resulting vector set is used as the training sample.

[0075] It should be noted that when obtaining the vector of each sample by querying the bag-of-words list, each sample is split to obtain command keyword samples. Then, the command keyword samples are input into the query area of ​​the bag-of-words list to obtain the corresponding feature values. The feature values ​​are then concatenated to obtain the vector of each sample.

[0076] It should be noted that when constructing test samples, after obtaining the historical change strategy set, the training set and test set are extracted according to the preset ratio. Then, the vector of each test set sample is obtained by querying the bag-of-words list. This includes splitting each sample to obtain command keyword samples, then inputting the command keyword samples into the query area of ​​the bag-of-words list to obtain the corresponding feature values, and concatenating the feature values ​​to obtain the vector of each test sample and construct the test sample.

[0077] Alternatively, during model training, the loss function corresponding to the prediction model is the cross-entropy loss function, with AUC as the evaluation metric. The model training is achieved by learning from the input training samples. By observing the AUC and loss function curves, the regularization term, learning rate, optimization algorithm, etc. of the model are adjusted until the optimal prediction model is obtained.

[0078] Step S104: If the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold, the network change strategy is adjusted.

[0079] Optionally, after the change execution result indicates that the success rate of the network change policy is lower than the success rate threshold, the method further includes: extracting the change group to which the current network change belongs in the network change policy, determining the user terminal corresponding to the change group; sending the change execution result to the user terminal corresponding to the change group, and adjusting the network change policy.

[0080] Alternatively, the user terminal can access the database to find historical change commands similar to the current network change command, and obtain command modification schemes to adjust the change commands of the current network change policy.

[0081] The following describes in detail another optional implementation method.

[0082] Figure 2 This is a system architecture diagram for adjusting an optional network change strategy according to an embodiment of the present invention, such as... Figure 2 As shown, the network change strategy adjustment system includes the following subsystems: D1 Change Failure Log Processing Subsystem, D2 Change Failure Log Analysis Subsystem, D3 Change Failure Bag-of-Words Construction Subsystem, D4 Training Sample Construction Subsystem, D5 Test Sample Construction Subsystem, D6 Prediction Model Training Subsystem, and D7 Prediction Model Application Subsystem.

[0083] The D1 change failure log processing subsystem is responsible for extracting failure log data for the corresponding fields from the data table, and desensitizing variables such as network IP address and port in the change failure log through methods such as regular expression matching. At the same time, it normalizes the change commands.

[0084] The steps for preprocessing historical failure logs are as follows:

[0085] Step S11: Obtain historical change failure log data by calling the data interface. The obtained historical change failure log data includes change group, change failure log, change time, and change order number.

[0086] Step S12: Considering the confidentiality requirements of network professional work, it is necessary to encrypt the changed group and desensitize the network IP address, port, subnet mask and other information involved in the change failure log;

[0087] Step S13: Replace sensitive information in the change failure log with the first type of special characters. Sensitive information includes network IP address, port, subnet mask, etc.

[0088] Step S14: Replace variable information in the change failure log with second-class special characters, such as using acl name or acl_name to replace acl name A, acl name B, etc.

[0089] The D2 change failure log analysis subsystem divides the commands involved in the change failure logs according to the change group, and obtains the reverse-order sorted data of the command statistics frequency in the change failure logs of each change group, and takes the top N to report the change group.

[0090] The process for analyzing change failure logs is as follows:

[0091] Step S21: Divide the change failure log data according to the change group;

[0092] Step S22: Calculate the frequency of commands involved in the change failure log for each change group;

[0093] Step S23: Sort the commands in the change failure log of each change group in descending order of frequency;

[0094] Step S24, determine the proportion w of change failure logs for change group i out of the total number. i , where i represents the i-th change group;

[0095] Step S25: Obtain the top N items involved in the change failure log of the changed group. i Command, where, because each change group's w i Different, so N for each group here i The value of N may vary, and its calculation formula is N. i =w i ×10+1;

[0096] Step S26, select the top N items involved in each change group. i The command feedback is sent to the relevant group leader, who then analyzes these frequently erroneous commands, modifies them, and stores the frequently erroneous commands and modification plans in the database.

[0097] The D3 Change Failure Bag-of-Words List Construction Subsystem removes commands that are no longer valid and do not meet the frequency threshold. It then stores the command keywords and their corresponding frequency segmented results from the change failure logs that meet the frequency threshold in key-value pair format and adds them to the bag-of-words list.

[0098] The process for constructing the bag-of-words list of failed changes is as follows:

[0099] Step S31: Due to reasons such as equipment manufacturer change, certain command keywords will no longer be available in the future. These command keywords are timeless commands. Before building the bag of words, the timeless command keywords involved in the change failure log need to be removed.

[0100] Step S32: For some change group change failure logs, there are many command keywords involved. The frequency of command keywords can be calculated and sorted in reverse order, and command keywords with lower frequency can be removed.

[0101] Step S33: In order to facilitate the identification of the frequency of command keywords involved in the change failure log, the frequency is segmented and marked, so that it is converted from a numerical variable to a categorical variable;

[0102] Step S34: Store the relevant command keywords and their frequency band tags in the change failure log as key-value pairs, such as {Command} ij Range k}, where Command ij This represents the j-th command for the i-th group change, Range k The frequency of the command keyword corresponds to the k-th frequency band marker;

[0103] Step S35: Construct a bag-of-words list based on multiple key-value pairs.

[0104] The D4 training sample construction subsystem is responsible for dividing training samples into positive and negative samples at the label level and for converting text-based training samples into vectors that the model can process at the feature level.

[0105] The process for constructing training samples is as follows:

[0106] Step S41: When constructing training samples, after obtaining the historical change strategy set, the training set and test set are extracted according to the preset ratio.

[0107] Step S42: For the training set, divide it into positive samples and negative samples according to the execution result of each network change command. Positive samples are network change strategies that were successfully executed, and negative samples are network change strategies that failed to be executed.

[0108] Step S43: Since the ratio of positive samples to negative samples is unbalanced, in order to ensure the training of the model, the number of negative samples is increased by the augmentation algorithm so that the ratio of positive samples to negative samples is close to 1:1.

[0109] Step S44: Obtain the vector of each sample by querying the bag-of-words list, and use the obtained vector set as training samples. When obtaining the vector of each sample by querying the bag-of-words list, each sample needs to be split to obtain command keyword samples. Then, input the command keyword samples into the query area of ​​the bag-of-words list to obtain the corresponding feature values. Concatenate the feature values ​​to obtain the vector of each sample.

[0110] The D5 test sample construction subsystem is responsible for converting test samples into vectors that the model can process.

[0111] The process of building test samples includes:

[0112] Step S51: After obtaining the historical change strategy set, extract the training set and test set according to the preset ratio.

[0113] Step S52: For the test set, obtain the vector of each test set sample by querying the bag-of-words list. Specifically, this includes splitting each sample to obtain command keyword samples, then inputting the command keyword samples into the query area of ​​the bag-of-words list to obtain the corresponding feature values, and concatenating the feature values ​​to obtain the vector of each test sample and construct the test sample.

[0114] The D6 prediction model training subsystem is responsible for training the model based on the training samples, including adjusting the model hyperparameters, selecting the loss function, and selecting the evaluation index, in order to obtain the optimal model.

[0115] When constructing the prediction model, a neural network with two hidden layers is selected as the binary classification model, and the binary classification model is iteratively trained to finally obtain the trained model.

[0116] During model training, the loss function corresponding to the prediction model is the cross-entropy loss function, and AUC is used as the evaluation metric. The model training is achieved by learning from the input training samples. By observing the AUC and loss function curves, the regularization term, learning rate, optimization algorithm, etc. of the model are adjusted until the optimal model is obtained.

[0117] The process of building a predictive model includes:

[0118] Step S61: Obtain a set of historical change strategies, wherein each historical change strategy includes at least: historical change command, execution result of each historical change command, and execution success rate;

[0119] Step S62: Construct training samples and test samples based on the historical change strategy set;

[0120] Step S63: Input the training samples into the binary classification model for iterative training to obtain the initial prediction model;

[0121] Step S64: Input the test sample into the initial prediction model to obtain the test result. If the similarity between the test result and the execution success rate in the test sample is greater than the similarity threshold, the prediction model is obtained.

[0122] The D7 prediction model application subsystem is responsible for inputting new samples into the model, predicting the probability of successful implementation of the change, and determining whether the change plan needs to be adjusted based on the success rate.

[0123] The application process of predictive models includes:

[0124] Step S71: Parse the network change policy to obtain the network change command;

[0125] Step S72, querying the bag-of-words list based on the network change command to obtain the change vector, specifically includes: splitting the network change command into N change command keywords based on a preset splitting rule, where N is a positive integer greater than or equal to 1; querying the bag-of-words list to obtain the feature value corresponding to each change command keyword, where the bag-of-words list includes at least M historical change command keywords that failed to change; if the bag-of-words list contains the change command keyword to be queried, a first feature value is obtained; if the bag-of-words list does not contain the change command keyword to be queried, a second feature value is obtained, where M is a positive integer greater than or equal to 1 and M is greater than or equal to N; concatenating the feature values ​​corresponding to the N change command keywords to obtain the change vector;

[0126] Step S73: Input the change vector into the prediction model and output the change execution result of the network change strategy;

[0127] Step S74: If the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold, adjust the network change strategy.

[0128] User terminals can access the database to find historical change commands similar to the current network change command, and obtain command modification schemes to adjust the change commands of the current network change policy.

[0129] In the above embodiments, a bag-of-words list is constructed based on historical change failure logs. Keywords in the logs are extracted and their frequencies are used to form key-value pairs. When evaluating the target network change strategy, the solution can be quantified and vectorized by querying the bag-of-words list, so that it can be directly input into the prediction model to automatically evaluate the network change strategy, thereby improving the success rate of network change.

[0130] The following is a detailed description with reference to another embodiment.

[0131] Example 2

[0132] The network change strategy adjustment device provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in Embodiment 1 above.

[0133] Figure 3 This is a schematic diagram of an optional network change strategy adjustment device according to an embodiment of the present invention, such as... Figure 3 As shown, the network change strategy adjustment device may include: a parsing unit 31, a query unit 32, an output unit 33, and an adjustment unit 34, wherein,

[0134] The parsing unit 31 is used to parse the network change policy and obtain the network change command. The network change policy includes at least the following: network change command, change group, change order number, and change time.

[0135] The query unit 32 is used to query the bag-of-words list based on the network change command to obtain the change vector, wherein the bag-of-words list is pre-built based on the historical change failure logs within a historical time period;

[0136] Output unit 33 is used to input the change vector into the prediction model and output the change execution result of the network change strategy;

[0137] The adjustment unit 34 is used to adjust the network change strategy when the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold.

[0138] The aforementioned network change strategy adjustment device parses the network change strategy through the parsing unit 31 to obtain the network change command; queries the bag-of-words list based on the network change command through the query unit 32 to obtain the change vector; inputs the change vector into the prediction model through the output unit 33 to output the change execution result of the network change strategy; and adjusts the network change strategy through the adjustment unit 34 when the change execution result indicates that the success rate of the network change strategy is lower than the success rate threshold.

[0139] In this embodiment, when making network changes, a pre-built bag-of-words list and prediction model can be used to evaluate the change strategy before execution. This allows for adjustments to network change strategies with a success rate below a preset threshold, thereby improving the success rate of network change strategy execution. This solves the technical problem in related technologies where the network change strategy cannot be evaluated before the change, leading to a low success rate.

[0140] Optionally, the query unit includes: a first splitting module, used to split the network change command into N change command keywords based on a preset splitting rule, where N is a positive integer greater than or equal to 1; a first query module, used to query a bag-of-words list to obtain the feature value corresponding to each change command keyword, where the bag-of-words list includes at least M historical change command keywords that failed to change; if the bag-of-words list contains the change command keyword to be queried, a first feature value is obtained; if the bag-of-words list does not contain the change command keyword to be queried, a second feature value is obtained, where M is a positive integer greater than or equal to 1 and M is greater than or equal to N; and a first concatenation module, used to concatenate the feature values ​​corresponding to the N change command keywords to obtain a change vector.

[0141] Optionally, the network change policy adjustment device further includes: a first acquisition module, used to acquire a set of historical change failure information, wherein the set of historical change failure information includes at least the following historical change failure information: historical change group, historical change failure log, historical change time, and historical change order number; a first preprocessing module, used to preprocess the set of historical change failure information to obtain a set of historical change failure data, wherein the preprocessing includes at least: encrypting the historical change group, desensitizing the historical change failure log, replacing sensitive information in the historical change failure log with a first type of preset character, and replacing variable data in the historical change failure log with a second type of preset character, wherein the sensitive information includes at least one of the following: network IP address, network port, and subnet mask; a first determination module, used to extract a set of change failure command keywords from the set of historical change failure data and determine the frequency band to which each change failure command keyword belongs, wherein the frequency band is used to indicate the level to which the frequency of the change failure command keyword belongs; and a first construction module, used to construct key-value pairs based on the change failure command keywords and the frequency band to which the change failure command keywords belong, and construct a bag-of-words list based on the key-value pairs.

[0142] Optionally, the first determining module includes: a first grouping submodule, used to group all change failure command keywords; a first statistics submodule, used to count the frequency of each change failure command keyword in each change group; and a first segmentation submodule, used to segment the frequency of change failure command keywords based on preset segmentation rules to obtain the frequency segment to which each change failure command keyword belongs.

[0143] Optionally, the network change strategy adjustment device further includes: a first summarization module, used to summarize the historical change failure data set into each change group to obtain a summarization result, wherein the summarization result includes at least: the change failure command corresponding to each change failure log; a first statistics module, used to, for the I-th change group, count the frequency of each change failure command and the total number of all change failure commands in the I-th change group, where I is an integer greater than or equal to 1; a first sorting module, used to sort all change failure commands according to the frequency of each change failure command to obtain the command sorting result of the I-th change group; a first calculation module, used to calculate the ratio between the total number of all change failure commands in the I-th change group and the total number of change commands; a first output module, used to input the ratio into a preset calculation formula and output the number of commands to be extracted; and a first sending module, used to extract the change failure commands ranked before the number of commands to be extracted from the command sorting result of the I-th change group and send the extracted change failure commands to the user terminal corresponding to the I-th change group.

[0144] Optionally, the network change strategy adjustment device further includes: a second acquisition module for acquiring a set of historical change strategies, wherein each historical change strategy includes at least: a historical change command, the execution result of each historical change command, and the execution success rate; a second construction module for constructing training samples and test samples based on the set of historical change strategies; a first training module for inputting the training samples into a binary classification model for iterative training to obtain an initial prediction model; and a first testing module for inputting test samples into the initial prediction model to obtain test results, and obtaining a prediction model when the similarity between the test results and the execution success rates in the test samples is greater than a similarity threshold.

[0145] Optionally, the second construction module includes: a first extraction submodule, used to extract a training set from the historical change strategy set based on a first preset ratio; a first partitioning submodule, used to partition the historical change commands in the training set into positive samples and negative samples according to the execution results, wherein positive samples are used to indicate that the execution result of the historical change command is successful, and negative samples are used to indicate that the execution result of the historical change command is unsuccessful; a first adjustment submodule, used to adjust the ratio of positive samples and negative samples through a preset enhancement algorithm to obtain a set of positive and negative samples that meets the preset sample ratio requirements; a first query submodule, used to query the bag-of-words list to obtain the vector set of each historical change command in the set of positive and negative samples; and a first construction submodule to construct training samples based on the vector set of each historical change command in the set of positive and negative samples.

[0146] Optionally, the second construction module further includes: a second extraction submodule, used to extract a test set from the historical change strategy set based on a second preset ratio; a second query submodule, used to query the bag-of-words list to obtain the vector set of each historical change command in the test set; and a second construction submodule, used to construct test samples based on the vector set of each historical change command in the test set.

[0147] Optionally, the network change policy adjustment device further includes: a first extraction module, used to extract the change group to which the current network change belongs in the network change policy and determine the user terminal corresponding to the change group; and a second sending module, used to send the change execution result to the user terminal corresponding to the change group to adjust the network change policy.

[0148] The aforementioned network change strategy adjustment device may also include a processor and a memory. The parsing unit 31, query unit 32, output unit 33, adjustment unit 34, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0149] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters allows for the review and adjustment of network change policies.

[0150] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0151] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the adjustment method of any of the above-mentioned network change policies.

[0152] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the adjustment method of any of the above-described network change strategies.

[0153] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: parsing a network change policy to obtain a network change command, wherein the network change policy includes at least: a network change command, a change group, a change order number, and a change time; querying a bag-of-words list based on the network change command to obtain a change vector, wherein the bag-of-words list is pre-constructed based on historical change failure logs within a historical time period; inputting the change vector into a prediction model and outputting the change execution result of the network change policy; and adjusting the network change policy if the change execution result indicates that the success rate of the network change policy is lower than a success rate threshold.

[0154] Figure 4 This is a hardware structure block diagram of an electronic device (or mobile device) according to an embodiment of the present invention, which describes a method for adjusting a network change strategy. Figure 4 As shown, an electronic device may include one or more ( Figure 4 The processor 402 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and the memory 404 for storing data may also be included. In addition, it may include: a display, 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, a keyboard, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 4 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device may also include components that are more... Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown.

[0155] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0156] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0157] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0158] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0159] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0160] If the integrated unit is implemented as 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 invention, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0161] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for adjusting a network change strategy, characterized in that, include: The network change policy is parsed to obtain the network change command, wherein the network change policy includes at least: network change command, change group, change order number, and change time; Based on the network change command, the bag-of-words list is queried to obtain the change vector, wherein the bag-of-words list is pre-constructed based on historical change failure logs within a historical time period; The step of obtaining a change vector by querying the bag-of-words list based on the network change command includes: splitting the network change command into N change command keywords based on a preset splitting rule, where N is a positive integer greater than or equal to 1; querying the bag-of-words list to obtain a feature value corresponding to each change command keyword, wherein the bag-of-words list includes at least M historical change command keywords that failed to change; if the bag-of-words list contains the change command keyword to be queried, a first feature value is obtained; if the bag-of-words list does not contain the change command keyword to be queried, a second feature value is obtained, where M is a positive integer greater than or equal to 1 and M is greater than or equal to N; and concatenating the feature values ​​corresponding to the N change command keywords to obtain the change vector. The change vector is input into the prediction model, and the change execution result of the network change strategy is output. If the change execution result indicates that the success rate of the network change policy is lower than the success rate threshold, the network change policy shall be adjusted.

2. The adjustment method according to claim 1, characterized in that, When constructing the bag-of-words list, the following are included: Obtain a set of historical change failure information, wherein the set of historical change failure information includes at least the following historical change failure information: historical change group, historical change failure log, historical change time, and historical change order number; The historical change failure information set is preprocessed to obtain a historical change failure data set. The preprocessing includes at least: encrypting the historical change group, desensitizing the historical change failure log, replacing sensitive information in the historical change failure log with a first type of preset character, and replacing variable data in the historical change failure log with a second type of preset character. The sensitive information includes at least one of the following: network IP address, network port, and subnet mask. Extract the set of change failure command keywords from the historical change failure data set, and determine the frequency band to which each change failure command keyword belongs, wherein the frequency band is used to indicate the level to which the frequency of the change failure command keyword belongs; Key-value pairs are constructed based on the keyword of the change failure command and the frequency band to which the keyword of the change failure command belongs, and the bag-of-words list is constructed based on the key-value pairs.

3. The adjustment method according to claim 2, characterized in that, The steps to determine the frequency band to which each change failure command keyword belongs include: Group all the aforementioned change failure command keywords; Count the frequency of each keyword in the change failure command within each change group; Based on preset segmentation rules, the frequency of occurrence of the change failure command keywords is segmented to obtain the frequency segment to which each change failure command keyword belongs.

4. The adjustment method according to claim 2, characterized in that, After preprocessing the historical change failure information set to obtain the historical change failure data set, the process further includes: The historical change failure data set is summarized into each change group to obtain the summary result, wherein the summary result includes at least: the change failure command corresponding to each change failure log; For the I-th change group, count the frequency of each change failure command in the I-th change group and the total number of all change failure commands, where I is an integer greater than or equal to 1; Sort all the failed change commands according to the frequency of each failed change command to obtain the command sorting result of the I-th change group; Calculate the ratio between the total number of failed change commands in the I-th change group and the total number of change commands; Input the ratio into the preset calculation formula, and output the number of commands to be extracted; Extract the failed change commands from the command sorting results of the I-th change group, which are ranked before the number of commands to be extracted, and send the extracted failed change commands to the user terminal corresponding to the I-th change group.

5. The adjustment method according to claim 1, characterized in that, The prediction model is pre-built, and the construction of the prediction model includes: Obtain a set of historical change strategies, wherein each historical change strategy includes at least: a historical change command, the execution result of each historical change command, and the execution success rate; Training and testing samples are constructed based on the set of historical change strategies. The training samples are input into a binary classification model for iterative training to obtain an initial prediction model; The test sample is input into the initial prediction model to obtain the test result. If the similarity between the test result and the execution success rate in the test sample is greater than the similarity threshold, the prediction model is obtained.

6. The adjustment method according to claim 5, characterized in that, The steps for constructing training samples based on the set of historical change strategies include: A training set is extracted from the historical change strategy set based on a first preset ratio; The historical change commands in the training set are divided into positive samples and negative samples according to the execution results. The positive samples are used to indicate that the historical change command was executed successfully, and the negative samples are used to indicate that the historical change command was executed unsuccessfully. The ratio of positive samples to negative samples is adjusted by a preset enhancement algorithm to obtain a set of positive and negative samples that meets the preset sample ratio requirements. Query the bag-of-words list to obtain the vector set of each of the historical change commands in the positive and negative sample sets; The training samples are constructed based on the vector set of each of the historical change commands in the positive and negative sample sets.

7. The adjustment method according to claim 5, characterized in that, The steps for constructing training samples based on the set of historical change strategies include: A test set is extracted from the historical change strategy set based on a second preset ratio; Query the bag-of-words list to obtain a vector set for each of the historical change commands in the test set; The test sample is constructed based on the vector set of each of the historical change commands in the test set.

8. The adjustment method according to claim 1, characterized in that, After the change execution result indicates that the success rate of the network change policy is lower than the success rate threshold, the method further includes: Extract the change group to which the current network change belongs from the network change policy, and determine the user terminal corresponding to the change group; The change execution result is sent to the user terminal corresponding to the change group to adjust the network change policy.

9. A device for adjusting a network change strategy, characterized in that, include: The parsing unit is used to parse the network change policy to obtain the network change command, wherein the network change policy includes at least: network change command, change group, change order number, and change time; The query unit is used to query the bag-of-words list based on the network change command to obtain the change vector, wherein the bag-of-words list is pre-constructed based on historical change failure logs within a historical time period; The query unit includes: a first splitting module, used to split the network change command into N change command keywords based on a preset splitting rule, where N is a positive integer greater than or equal to 1; a first query module, used to query the bag-of-words list to obtain a feature value corresponding to each change command keyword, wherein the bag-of-words list includes at least M historical change command keywords that failed to change, and if the bag-of-words list contains the change command keyword to be queried, a first feature value is obtained; if the bag-of-words list does not contain the change command keyword to be queried, a second feature value is obtained, where M is a positive integer greater than or equal to 1 and M is greater than or equal to N; and a first concatenation module, used to concatenate the feature values ​​corresponding to the N change command keywords to obtain the change vector. The output unit is used to input the change vector into the prediction model and output the change execution result of the network change strategy; An adjustment unit is configured to adjust the network change strategy when the change execution result indicates that the success rate of the network change strategy is lower than a success rate threshold.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the adjustment method of the network change policy as described in any one of claims 1 to 8.

11. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the network change policy adjustment method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Network change method and equipment

    CN110855456A

  • Failure recovery recommendations for CLI commands

    US20220091923A1