CN113703870A - Configuration file checking method, device, equipment and storage medium - Google Patents

Configuration file checking method, device, equipment and storage medium Download PDF

Info

Publication number
CN113703870A
CN113703870A CN202111016970.7A CN202111016970A CN113703870A CN 113703870 A CN113703870 A CN 113703870A CN 202111016970 A CN202111016970 A CN 202111016970A CN 113703870 A CN113703870 A CN 113703870A
Authority
CN
China
Prior art keywords
current
data sequence
configuration
current data
configuration value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111016970.7A
Other languages
Chinese (zh)
Inventor
魏杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202111016970.7A priority Critical patent/CN113703870A/en
Publication of CN113703870A publication Critical patent/CN113703870A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a method, a device, equipment and a storage medium for checking a configuration file, wherein the method comprises the following steps: acquiring a configuration file, loading corresponding configuration data, and preprocessing the configuration data to acquire a current data sequence; performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing memory enhancement processing on a merging result, and predicting a category label of the current data sequence through full connection and activation processing; and when the class label predicts the current data sequence correctly, extracting the current configuration value and the data class from the current data sequence, calling a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result. Through the mode, the invention can improve the judgment precision and the inspection efficiency and reduce the omission factor.

Description

Configuration file checking method, device, equipment and storage medium
Technical Field
The present invention relates to the field of artificial intelligence technology, and in particular, to a method, an apparatus, a device, and a storage medium for checking a configuration file.
Background
The configuration of a computer and a network device refers to various settings of the device and computer programs such as an operating system, a server application, a user application and the like running thereon, and is essential for the normal running of the device and the computer programs. In the operation of computers and network devices, a great number of configuration files are involved, the configuration files belong to applications, databases, middleware, hosts, networks, storage devices and the like, and currently, system management configuration files such as Zookeeper, Disconf, Apollo and the like are generally used. However, in the operation of a computer and network equipment, the information of the configuration files cannot be completely mastered by individuals due to the cooperation of multiple persons, and in the information transmission, the information is easy to lose and error.
The traditional configuration file checking method is single, a manual detection mode or a software product checking mode is adopted, and the manual detection mode detects errors in the configuration file by detecting configuration commands in the configuration file one by one, and the method can meet the conventional operation and maintenance requirements, but has the problems of high labor cost and low detection efficiency and flexibility; with the continuous development of artificial intelligence and big data, the tasks of data mining, labeling and judging are more efficient, and meanwhile, the large-batch work can be easily completed.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for checking a configuration file, which can improve the judgment precision and the checking efficiency and reduce the omission factor.
In order to solve the technical problems, the invention adopts a technical scheme that: provided is a method for checking a configuration file, comprising the following steps:
acquiring a configuration file, loading corresponding configuration data, and preprocessing the configuration data to acquire a current data sequence;
performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing memory enhancement processing on a merging result, and predicting a category label of the current data sequence through full connection and activation processing;
when the class label predicts that the current data sequence is correct, extracting a current configuration value and a data class from the current data sequence, calling a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result.
According to an embodiment of the present invention, the step of performing a first feature extraction and a second feature extraction on the current data sequence by using an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing a memory enhancement process on a merged result, and predicting a category label of the current data sequence through a full-link and activation process includes:
inputting the current data sequence into the recurrent neural network model, acquiring the output of the recurrent neural network model at the last moment, and acquiring a first characteristic of the current data sequence according to the output at the last moment and the current data sequence based on a sigmoid activation function;
acquiring a second characteristic of the current data sequence based on a sigmoid activation function and a tanh activation function;
merging the first feature and the second feature in an addition mode;
and carrying out memory enhancement processing on the combined result, and predicting the class label of the current data sequence through full connection and activation processing.
According to an embodiment of the present invention, when the class label predicts that the current data sequence is correct, extracting a current configuration value and a data class from the current data sequence, invoking a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result further includes:
extracting a current configuration value and a data type from the current data sequence, calling the verification system to match the current configuration value with the data type, and judging the correctness of the current configuration value according to a matching result;
and carrying out secondary judgment on the correctness of the current data sequence according to the correctness judgment result of the current configuration value.
According to an embodiment of the present invention, the step of extracting the current configuration value and the data type from the current data sequence, calling the verification system to match the current configuration value with the data type, and determining the correctness of the current configuration value according to the matching result further includes:
extracting a current configuration value from the current data sequence, and performing word segmentation processing on a character string corresponding to the current configuration value based on a jieba word segmentation algorithm to obtain a plurality of character segments;
extracting data types from the current data sequence, and matching the character segments with the data types one by one;
when all the data categories are matched with the character segments, obtaining a historical configuration file, extracting historical configuration values from the historical configuration file, predicting whether the current configuration values belong to the historical configuration values or not by adopting a naive Bayes algorithm based on the historical configuration values, and judging the correctness of the current configuration values according to the prediction result.
According to an embodiment of the present invention, when all the data categories are matched with the character segments, obtaining a historical configuration file, extracting a historical configuration value from the historical configuration file, predicting whether the current configuration value belongs to the historical configuration value by using a naive bayes algorithm based on the historical configuration value, and determining the correctness of the current configuration value according to the prediction result further includes:
setting classification labels for the historical configuration values, and calculating the conditional probability of each historical configuration value under each classification label;
calculating the class probability of whether the current configuration value belongs to the historical configuration value or not according to the conditional probability;
selecting a classification label corresponding to a larger class probability as the classification of the current configuration value;
and when the current configuration value belongs to the historical configuration value, judging that the current configuration value is correct, and when the current configuration value does not belong to the historical configuration value, judging that the current configuration value is wrong.
According to an embodiment of the present invention, the steps of performing first feature extraction and second feature extraction on the current data sequence by using an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing memory enhancement processing on a merged result, and predicting a category label of the current data sequence through full-connection and activation processing further include:
and when the category label predicts an error for the configuration data, sending alarm information to a worker.
According to an embodiment of the present invention, when the class label predicts that the configuration data is correct, extracting a current configuration value and a data class from the current data sequence, invoking a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result further includes:
when the current data sequence is judged to be correct for the second time, submitting the configuration data to a configuration management system;
and when the current data sequence is judged to be wrong for the second time, sending alarm information to a worker.
In order to solve the technical problem, the invention adopts another technical scheme that: provided is a device for checking a configuration file, including:
the acquisition module is used for acquiring the configuration file, loading corresponding configuration data, preprocessing the configuration data and acquiring a current data sequence;
the prediction module is used for performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, combining the first feature and the second feature, performing memory enhancement processing on a combined result, and predicting a category label of the current data sequence through full connection and activation processing;
and the secondary judgment module is used for extracting a current configuration value and a data type from the current data sequence when the type label predicts the correctness of the current data sequence, calling a verification system to match the current configuration value with the data type, and carrying out secondary judgment on the correctness of the current data sequence according to a matching result.
In order to solve the technical problems, the invention adopts another technical scheme that: there is provided a computer device comprising: the system comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the checking method of the configuration file when executing the computer program.
In order to solve the technical problems, the invention adopts another technical scheme that: there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described method of checking a configuration file.
The invention has the beneficial effects that: the configuration file is checked for the first time through the artificial intelligence recognition model, so that the automation and the intelligence of the detection of the configuration file are realized, the large-batch detection of the configuration file can be realized, the labor cost is reduced, and the missing rate of wrong configuration is reduced; the configuration file is checked for the second time through the verification system, the judgment precision is improved, and the detection efficiency and the detection precision of the configuration file are effectively improved by combining the artificial intelligence recognition model and the verification system for double detection.
Drawings
FIG. 1 is a flowchart illustrating a configuration file checking method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating step S102 in the method for checking a configuration file according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating step S103 in the method for checking a configuration file according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating step S301 in the method for checking a configuration file according to the embodiment of the present invention;
FIG. 5 is a flowchart illustrating a configuration file checking method according to a second embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for checking a configuration file according to a third embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an apparatus for checking a configuration file according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a computer device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer storage medium according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first", "second" and "third" in the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise. All directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present invention are only used to explain the relative positional relationship between the components, the movement, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Fig. 1 is a flowchart illustrating a method for checking a configuration file according to an embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 1 if the results are substantially the same. As shown in fig. 1, the method comprises the steps of:
step S101: and acquiring a configuration file, loading corresponding configuration data, and preprocessing the configuration data to acquire a current data sequence.
In step S101, the configuration files include an initial configuration file generated by initialization and an intermediate configuration file generated by continuous update. In this embodiment, the configuration file of the system is collected by using the configuration file management system Apollo, and a data set of the configuration file is formed by combining the system information and the change time. The configuration file is composed of a plurality of configuration items, and each configuration item is used as a piece of configuration data. The configuration data includes configuration item name, configuration value, corresponding system information (including system type, system name, system function), manual remark, keyword, version parameter, requirement information, test result, etc. The corresponding system information and manual remarks can be obtained from a configuration management system Apollo, keywords are determined from special character strings in configuration item names and configuration values, version parameters, requirement information and test results are obtained from a release and project management system, and common software release and project management systems include Jenkins, redmine, Zen channel and the like.
In the embodiment, the word embedding method is adopted to preprocess the configuration data, and the vector representation (i.e. the current data sequence) of the configuration data is obtained and is used as the input of the recurrent neural network model in the following steps. The Word embedding method of the present embodiment includes Natural Language Processing (NLP) methods such as a TF-IDF method, a TextRank method, or a Word2Vec Word clustering method.
Step S102: and performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing memory enhancement processing on a merging result, and predicting a category label of the current data sequence through full connection and activation processing.
In step S102, the recurrent neural network model of the present embodiment is an Artificial Intelligence (AI) classification model, wherein AI is a theory, method, technique, and application system that simulates, extends, and expands human Intelligence, senses environment, acquires knowledge, and uses knowledge to obtain an optimal result using a digital computer or a machine controlled by a digital computer. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The recurrent neural network model of the embodiment is specifically a multilayer bidirectional LSTM recurrent neural network model, the specific number of layers of LSTM is determined by training parameters, and the recurrent neural network model structure includes an input layer, a hidden layer and an output layer, wherein the input layer is composed of a series of neurons and is used for acquiring an input current data sequence; the hidden layer is formed by stacking a plurality of bidirectional LSTM layers, each LSTM layer is respectively provided with a plurality of neurons, and each neuron corresponds to one LSTM memory block. The memory block includes a self-connected state neuron and a forgetting gate, an input gate and an output gate. Reducing the influence of overfitting by adopting a regularization method between LSTM layers at the same time step; the output layer is a fully-connected layer with a plurality of neurons, respectively corresponds to target categories to be predicted, and converts the output of the hidden layer into classification prediction results through a normalization exponential function (softmax activation function). The forgetting gate of this embodiment is used to control a feature that a current data sequence selects a moment to be forgotten, that is, to obtain a non-forgotten feature (a first feature) in the current data sequence, the input gate is used to screen a memory feature (a second feature) in the current data sequence, and to combine the non-forgotten feature output by the forgetting gate and the memory feature output by the input gate, and the output gate is used to perform memory enhancement processing on the combined feature, and to perform full connection and activation processing and output.
Further, the air conditioner is provided with a fan,
the calculation formula of the forgetting door is as follows: f. oft=σ(wf·[ht-1,xt]+bf);
The input gate is calculated as: i.e. it=σ(wi·[ht-1,xt]+bi);
The calculation formula of the memory gate is as follows: c't=tanh(wc·[ht-1,xt]+bc);
The update formula of the cell state is: c. Ct=ft*ct-1+it*c′t
The calculation formula of the output gate is as follows: ot=σ(wo·[ht-1,xt]+bo);ht=(1-ft)ot*tanh(ct);
Wherein h ist: the output of the LSTM unit at the time t; h ist-1,: the output of the LSTM unit at time t-1; c. Ct: LSTM cell state at time t; c. Ct-1: LSTM cell state at time t-1; x is the number oft(ii) a Inputting an LSTM unit at the time t; w is af: a forgetting gate weight matrix; σ: a sigmoid function; bf: a bias term to forget the gate; tan h: a hyperbolic tangent function; w is ai: inputting a weight matrix of the gate; bi: inputting the offset term of the gate; w is ac: memorizing a weight matrix of the gate; bc: memorizing the bias term of the gate; w is ao: outputting a weight matrix of the gate; bo: the bias term of the gate is output.
According to the embodiment, the non-forgetting value is enhanced by modifying the calculation formula of the output gate, the effect of enhancing memory is achieved, the problem that the accuracy degree of the existing neural network is not high enough can be solved, the cyclic neural network model can deal with a large amount of data and gradually evolve, and the accurate operation of a production system can be ensured.
Further, referring to fig. 2, step S102 further includes the following steps:
step S201: and inputting the current data sequence into the recurrent neural network model, acquiring the output of the recurrent neural network model at the last moment, and acquiring the first characteristic of the current data sequence according to the output at the last moment and the current data sequence based on the sigmoid activation function.
The value of the sigmoid activation function in this embodiment is between 0 and 1, and the sigmoid activation function processes the input of the LSTM layer to obtain the probability value of some features of the output of the current data sequence at the moment when the current data sequence is forgotten, so as to obtain the first feature of the current data sequence.
Step S202: and acquiring a second characteristic of the current data sequence based on the sigmoid activation function and the tanh activation function.
The current data sequence of the embodiment obtains a first output through sigmoid activation function processing, obtains a second output through tanh activation function processing, and takes a product result of the first output and the second output as a second characteristic.
Step S203: the first feature and the second feature are combined in an additive manner.
The present embodiment combines the first feature and the second feature to update the cell state.
Step S204: and carrying out memory enhancement processing on the combined result, and predicting the class label of the current data sequence through full connection and activation processing.
In the embodiment, the non-forgetting value is enhanced by modifying the calculation formula of the output gate, so that the effect of enhancing the memory is achieved. The category label includes "1" and "0", and when the category label is "1", which indicates that the prediction of the current data sequence is correct, step S103 is executed; and when the class label is '0', indicating that the current data sequence is wrong in prediction, sending alarm information to a worker for manual checking.
Further, before step S102, the method further includes training a recurrent neural network model, and determining the parameter w through trainingf、bf、wi、bi、wc、bc、wo、boAnd adjusting the number of layers of the hidden layer and the optimization parameters through the BPTT back propagation algorithm and the cross entropy loss function to obtain the optimized recurrent neural network model.
Step S103: and when the class label predicts the current data sequence correctly, extracting the current configuration value and the data class from the current data sequence, calling a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result.
In step S103, if there is no character segment in the character string of the current configuration value that conflicts with the data type, it indicates that the current configuration value matches the data type, which indicates that the current configuration value may be correct, and at this time, the correctness of the current configuration value needs to be verified; and if the verification result is that the current configuration value is correct, determining that the secondary judgment of the configuration data is correct, submitting the configuration data to a configuration management system for application, otherwise, determining that the secondary judgment of the configuration data is wrong, and sending alarm information to a worker. If the character segment which conflicts with the data type exists in the character string of the current configuration value and indicates that the current configuration value is not matched with the data type, the current configuration value is wrong, the secondary judgment of the configuration data is determined to be wrong, and warning information is sent to a worker.
Further, referring to fig. 3, step S103 further includes the following steps:
step S301: and extracting the current configuration value and the data type from the current data sequence, calling a verification system to match the current configuration value with the data type, and judging the correctness of the current configuration value according to the matching result.
Further, referring to fig. 4, step S301 further includes the following steps:
step S401: and extracting a current configuration value from the current data sequence, and performing word segmentation processing on the character string corresponding to the current configuration value based on a jieba word segmentation algorithm to obtain a plurality of character segments.
In step S401, the specific word segmentation process of the jieba word segmentation algorithm is as follows: loading a dictionary to generate a trie tree; using regular pattern to obtain continuous Chinese characters and English characters from input character strings, segmenting into phrase lists, using DAG (dictionary lookup) and dynamic programming to obtain a maximum probability path for each phrase, combining characters which are not searched in the dictionary in the DAG into a new segment phrase, and using an HMM model to perform word segmentation; and finally, generating a word generator by using the yield grammar of python, and returning words. After the character segments are obtained, judging whether each character segment has a form error; when there is no form error in the character segment, step S402 is performed. The formal errors of the embodiment include common writing errors (such as wrongly written characters), port writing errors, and error-prone special characters, such as spaces. If there is one error, it indicates that the character segment has a form error.
Step S402: and extracting data types from the current data sequence, and matching the character segments with the data types one by one.
In step S402, the data categories include system type, system name, system function, manual remarks, keywords, version parameters, requirement information, and test results. The one-to-one matching of the character segments and the data categories specifically comprises the following steps: matching the character segment with the system type, and judging whether the character segment which is not consistent with the system type exists; matching the character segment with the system name, and judging whether the character segment which is not consistent with the system name exists or not; matching the character segment with the system function, and judging whether the character segment which is not consistent with the system function exists; matching the character segments with the manual remarks, and judging whether character segments which do not accord with the manual remarks exist or not; matching the character segments with the keywords, and judging whether character segments which are not matched with the keywords exist or not; matching the character segment with the version parameter, judging whether the character segment which does not conform to the version parameter exists, matching the character segment with the requirement information, and judging whether the character segment which does not conform to the version parameter exists; and matching the character segment with the test result, and judging whether the character segment which does not accord with the test result exists. For example, the embodiment will not have a character segment that does not match the system type as a match, otherwise, the embodiment does not match, for example, the keyword of the production environment is prd (representing the vocabulary of the production environment), and test (representing the vocabulary of the test environment) appears in the character segment of the current configuration value, and the keyword does not match the character segment, so long as there is a mismatch, it indicates that the current configuration value may be wrong. The current configuration value does not conflict with the data category, but it is uncertain whether the current configuration value is correct, and therefore, step S403 is performed.
Step S403: when all data types are matched with the character segments, obtaining a historical configuration file, extracting historical configuration values from the historical configuration file, predicting whether the current configuration values belong to the historical configuration values or not by adopting a naive Bayes algorithm based on the historical configuration values, and judging the correctness of the current configuration values according to the prediction result.
In step S403, a naive bayes algorithm may be used to calculate whether the predicted current configuration value is correct or not based on the historical configuration values, for example, 10 corresponding system names are system-a and the system name included in the current configuration value is system-B, so that the current configuration value may be an error value through bayes probability calculation.
Further, setting classification labels for the historical configuration values, and calculating the conditional probability of each historical configuration value under each classification label; calculating the class probability of whether the current configuration value belongs to the historical configuration value or not according to the conditional probability; selecting a classification label corresponding to a larger class probability as the classification of the current configuration value; and when the current configuration value does not belong to the historical configuration value, judging that the current configuration value is wrong.
Step S302: and carrying out secondary judgment on the correctness of the current data sequence according to the correctness judgment result of the current configuration value.
In step S302, when the current configuration value is determined to be correct, the secondary verification result indicates that the configuration data is correct; and when the current configuration value is judged to be wrong, the configuration data of the secondary verification result is wrong.
According to the method for checking the configuration files, disclosed by the first embodiment of the invention, the configuration files are checked for the first time through the artificial intelligent recognition model, so that the automation and the intelligence of the detection of the configuration files are realized, the configuration files can be detected in a large batch, the labor cost is reduced, and the missing rate of wrong configuration is reduced; the configuration file is checked for the second time through the verification system, the judgment precision is improved, and the detection efficiency and the detection precision of the configuration file are effectively improved by combining the artificial intelligence recognition model and the verification system for double detection.
Fig. 5 is a flowchart illustrating a configuration file checking method according to a second embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 5 if the results are substantially the same. As shown in fig. 5, the method includes the steps of:
step S501: and acquiring a configuration file, loading corresponding configuration data, and preprocessing the configuration data to acquire a current data sequence.
In this embodiment, step 501 in fig. 5 is similar to step S101 in fig. 1, and for brevity, is not described again here.
Step S502: and performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing memory enhancement processing on a merging result, and predicting a category label of the current data sequence through full connection and activation processing.
In this embodiment, step S502 in fig. 5 is similar to step S102 in fig. 1, and for brevity, is not described herein again. In step S502, if the current data sequence prediction is correct, step S503 is performed, and if the current data sequence prediction is incorrect, step S504 is performed.
Step S503: and when the class label predicts the current data sequence correctly, extracting the current configuration value and the data class from the current data sequence, calling a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result.
In this embodiment, step S503 in fig. 5 is similar to step S103 in fig. 1, and for brevity, is not described herein again.
Step S504: and when the category label is wrong in the prediction of the current data sequence, sending alarm information to a worker.
According to the configuration file checking method, the configuration file is checked for the first time through the artificial intelligence recognition model, the configuration file is checked for the second time through the verification system, the judgment precision is improved, and the detection efficiency and the detection precision of the configuration file are effectively improved by combining double detection of the artificial intelligence recognition model and the verification system.
Fig. 6 is a flowchart illustrating a method for checking a configuration file according to an embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 6 if the results are substantially the same. As shown in fig. 6, the method includes the steps of:
step S601: and acquiring a configuration file, loading corresponding configuration data, and preprocessing the configuration data to acquire a current data sequence.
In this embodiment, step S601 in fig. 6 is similar to step S101 in fig. 1, and for brevity, is not described herein again.
Step S602: and performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing memory enhancement processing on a merging result, and predicting a category label of the current data sequence through full connection and activation processing.
In this embodiment, step S602 in fig. 6 is similar to step S102 in fig. 1, and for brevity, is not described herein again.
Step S603: and when the class label predicts the current data sequence correctly, extracting the current configuration value and the data class from the current data sequence, calling a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result.
In this embodiment, step S603 in fig. 6 is similar to step S103 in fig. 1, and for brevity, is not described herein again. If the current data sequence is determined to be correct for the second time, step S604 is executed, and if the current data sequence is determined to be incorrect for the second time, step S605 is executed.
Step S604: and when the current data sequence is judged to be correct for the second time, submitting the configuration data to a configuration management system.
Step S605: and when the current data sequence is judged to be wrong for the second time, sending alarm information to the staff.
In step S605, after the second verification, if the verification result is an error, it indicates that the prediction result of the artificial intelligence recognition model is inconsistent with the verification result of the verification system. In this case, the errors of the configuration file exceed the range of the historical data of the artificial intelligence recognition model training and also exceed the judgment range of the verification system. Therefore, manual involvement is required for the processing. At the moment, the system sends alarm information to the staff, and the staff checks the specific conditions and performs manual verification after receiving the alarm information. If the current configuration value is verified to be correct manually, the verification rule of the verification system is wrong, and the correction is needed. If the current configuration value is verified to be wrong manually, the fact that the artificial intelligence recognition model is obtained without training for the errors or is not accurately fitted indicates that the wrong configuration data needs to be added into a training data set to retrain the model. After continuous iteration, the model is continuously perfected, and finally, the judgment precision is provided.
The method for checking the configuration file in the third embodiment of the invention effectively improves the detection efficiency and the detection precision of the configuration file by combining the artificial intelligence recognition model and the verification system for double detection, adds artificial processing to the error verification result after secondary verification, and can accurately find the problem and timely correct the verification system or the artificial intelligence model.
Fig. 7 is a schematic structural diagram of an apparatus for checking a configuration file according to an embodiment of the present invention. As shown in fig. 7, the apparatus 70 includes an obtaining module 71, a predicting module 72, and a secondary judging module 73.
The obtaining module 71 is configured to obtain a configuration file, load corresponding configuration data, and pre-process the configuration data to obtain a current data sequence;
the prediction module 72 is configured to perform first feature extraction and second feature extraction on the current data sequence by using an activation function based on a recurrent neural network model, merge the first feature and the second feature, perform memory enhancement processing on a merging result, and predict a category label of the current data sequence through full connection and activation processing;
the secondary judgment module 73 is configured to, when the class label predicts that the current data sequence is correct, extract a current configuration value and a data class from the current data sequence, invoke the verification system to match the current configuration value with the data class, and perform secondary judgment on the correctness of the current data sequence according to a matching result.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in fig. 8, the computer device 80 includes a processor 81 and a memory 82 coupled to the processor 81.
The memory 82 stores program instructions for implementing the method for checking a configuration file according to any of the above embodiments.
The processor 81 is operable to execute program instructions stored in the memory 82 to check the configuration file.
The processor 81 may also be referred to as a CPU (Central Processing Unit). The processor 81 may be an integrated circuit chip having signal processing capabilities. Processor 81 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a computer storage medium according to an embodiment of the present invention. The computer storage medium of the embodiment of the present invention stores a program file 91 capable of implementing all the methods described above, where the program file 91 may be stored in the computer storage medium in the form of a software product, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned computer storage media include: various media capable of storing program codes, such as a usb disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or terminal devices, such as a computer, a server, a mobile phone, and a tablet.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for checking a configuration file, comprising:
acquiring a configuration file, loading corresponding configuration data, and preprocessing the configuration data to acquire a current data sequence;
performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, merging the first feature and the second feature, performing memory enhancement processing on a merging result, and predicting a category label of the current data sequence through full connection and activation processing;
when the class label predicts that the current data sequence is correct, extracting a current configuration value and a data class from the current data sequence, calling a verification system to match the current configuration value with the data class, and performing secondary judgment on the correctness of the current data sequence according to a matching result.
2. The inspection method according to claim 1, wherein the step of performing a first feature extraction and a second feature extraction on the current data sequence by using an activation function based on a recurrent neural network model, combining the first feature and the second feature, and performing a memory enhancement process on a combined result, and predicting the class label of the current data sequence by a full join and activation process comprises:
inputting the current data sequence into the recurrent neural network model, acquiring the output of the recurrent neural network model at the last moment, and acquiring a first characteristic of the current data sequence according to the output at the last moment and the current data sequence based on a sigmoid activation function;
acquiring a second characteristic of the current data sequence based on a sigmoid activation function and a tanh activation function;
merging the first feature and the second feature in an addition mode;
and carrying out memory enhancement processing on the combined result, and predicting the class label of the current data sequence through full connection and activation processing.
3. The inspection method according to claim 1, wherein when the class label predicts that the current data sequence is correct, extracting a current configuration value and a data class from the current data sequence, invoking a verification system to match the current configuration value with the data class, and performing a secondary judgment on the correctness of the current data sequence according to a matching result further comprises:
extracting a current configuration value and a data type from the current data sequence, calling the verification system to match the current configuration value with the data type, and judging the correctness of the current configuration value according to a matching result;
and carrying out secondary judgment on the correctness of the current data sequence according to the correctness judgment result of the current configuration value.
4. The inspection method of claim 3, wherein the steps of extracting a current configuration value and a data category from the current data sequence, invoking the verification system to match the current configuration value with the data category, and determining the correctness of the current configuration value according to the matching result further comprise:
extracting a current configuration value from the current data sequence, and performing word segmentation processing on a character string corresponding to the current configuration value based on a jieba word segmentation algorithm to obtain a plurality of character segments;
extracting data types from the current data sequence, and matching the character segments with the data types one by one;
when all the data categories are matched with the character segments, obtaining a historical configuration file, extracting historical configuration values from the historical configuration file, predicting whether the current configuration values belong to the historical configuration values or not by adopting a naive Bayes algorithm based on the historical configuration values, and judging the correctness of the current configuration values according to the prediction result.
5. The checking method according to claim 4, wherein when all the data categories match the character segments, obtaining a historical configuration file, extracting historical configuration values from the historical configuration file, predicting whether the current configuration value belongs to the historical configuration value by a naive Bayes algorithm based on the historical configuration values, and determining the correctness of the current configuration value according to the prediction result further comprises:
setting classification labels for the historical configuration values, and calculating the conditional probability of each historical configuration value under each classification label;
calculating the class probability of whether the current configuration value belongs to the historical configuration value or not according to the conditional probability;
selecting a classification label corresponding to a larger class probability as the classification of the current configuration value;
and when the current configuration value belongs to the historical configuration value, judging that the current configuration value is correct, and when the current configuration value does not belong to the historical configuration value, judging that the current configuration value is wrong.
6. The inspection method according to claim 1, wherein the steps of performing a first feature extraction and a second feature extraction on the current data sequence by using an activation function based on a recurrent neural network model, combining the first feature and the second feature, performing a memory enhancement process on a combined result, and predicting a class label of the current data sequence by a full join and activation process further include:
and when the category label predicts an error for the configuration data, sending alarm information to a worker.
7. The inspection method according to claim 1, wherein when the class label predicts that the configuration data is correct, extracting a current configuration value and a data class from the current data sequence, invoking a verification system to match the current configuration value with the data class, and performing a secondary judgment on the correctness of the current data sequence according to a matching result further comprises:
when the current data sequence is judged to be correct for the second time, submitting the configuration data to a configuration management system;
and when the current data sequence is judged to be wrong for the second time, sending alarm information to a worker.
8. An apparatus for checking a configuration file, comprising:
the acquisition module is used for acquiring the configuration file, loading corresponding configuration data, preprocessing the configuration data and acquiring a current data sequence;
the prediction module is used for performing first feature extraction and second feature extraction on the current data sequence by adopting an activation function based on a recurrent neural network model, combining the first feature and the second feature, performing memory enhancement processing on a combined result, and predicting a category label of the current data sequence through full connection and activation processing;
and the secondary judgment module is used for extracting a current configuration value and a data type from the current data sequence when the type label predicts the correctness of the current data sequence, calling a verification system to match the current configuration value with the data type, and carrying out secondary judgment on the correctness of the current data sequence according to a matching result.
9. A computer device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the method for checking a configuration file according to any of claims 1 to 7 when executing the computer program.
10. A computer storage medium on which a computer program is stored, which computer program, when being executed by a processor, carries out the method of checking a configuration file according to any one of claims 1 to 7.
CN202111016970.7A 2021-08-31 2021-08-31 Configuration file checking method, device, equipment and storage medium Pending CN113703870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111016970.7A CN113703870A (en) 2021-08-31 2021-08-31 Configuration file checking method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111016970.7A CN113703870A (en) 2021-08-31 2021-08-31 Configuration file checking method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113703870A true CN113703870A (en) 2021-11-26

Family

ID=78658419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111016970.7A Pending CN113703870A (en) 2021-08-31 2021-08-31 Configuration file checking method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113703870A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100223306A1 (en) * 2009-02-27 2010-09-02 International Business Machines Corporation Method and apparatus for discovering application configuration files in a system
CN110851675A (en) * 2019-10-10 2020-02-28 厦门市美亚柏科信息股份有限公司 Data extraction method, device and medium
CN111694612A (en) * 2020-05-28 2020-09-22 平安普惠企业管理有限公司 Configuration checking method, device, computer system and storage medium
CN112015647A (en) * 2020-08-27 2020-12-01 深圳壹账通智能科技有限公司 Configuration item monitoring method and device, computer equipment and storage medium
CN112949282A (en) * 2021-02-26 2021-06-11 中国联合网络通信集团有限公司 Configuration file checking method and device
US20210182660A1 (en) * 2019-12-16 2021-06-17 Soundhound, Inc. Distributed training of neural network models
US20210201130A1 (en) * 2019-12-30 2021-07-01 International Business Machines Corporation Job-launch time reduction by node pre-configuration

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100223306A1 (en) * 2009-02-27 2010-09-02 International Business Machines Corporation Method and apparatus for discovering application configuration files in a system
CN110851675A (en) * 2019-10-10 2020-02-28 厦门市美亚柏科信息股份有限公司 Data extraction method, device and medium
US20210182660A1 (en) * 2019-12-16 2021-06-17 Soundhound, Inc. Distributed training of neural network models
US20210201130A1 (en) * 2019-12-30 2021-07-01 International Business Machines Corporation Job-launch time reduction by node pre-configuration
CN111694612A (en) * 2020-05-28 2020-09-22 平安普惠企业管理有限公司 Configuration checking method, device, computer system and storage medium
CN112015647A (en) * 2020-08-27 2020-12-01 深圳壹账通智能科技有限公司 Configuration item monitoring method and device, computer equipment and storage medium
CN112949282A (en) * 2021-02-26 2021-06-11 中国联合网络通信集团有限公司 Configuration file checking method and device

Similar Documents

Publication Publication Date Title
Lee et al. Multi-label zero-shot learning with structured knowledge graphs
CN111753081B (en) System and method for text classification based on deep SKIP-GRAM network
CN109446517B (en) Reference resolution method, electronic device and computer readable storage medium
US11361151B1 (en) Methods and systems for intelligent editing of legal documents
CN110781919A (en) Classification model training method, classification device and classification equipment
WO2021208727A1 (en) Text error detection method and apparatus based on artificial intelligence, and computer device
US11016740B2 (en) Systems and methods for virtual programming by artificial intelligence
US20150161232A1 (en) Noise-enhanced clustering and competitive learning
CN110019795B (en) Sensitive word detection model training method and system
CN113657098B (en) Text error correction method, device, equipment and storage medium
KR102379660B1 (en) Method for utilizing deep learning based semantic role analysis
CN112528634A (en) Text error correction model training and recognition method, device, equipment and storage medium
WO2021148625A1 (en) A method for identifying vulnerabilities in computer program code and a system thereof
WO2014073206A1 (en) Information-processing device and information-processing method
Kumar et al. Future of machine learning (ml) and deep learning (dl) in healthcare monitoring system
CN110580213A (en) Database anomaly detection method based on cyclic marking time point process
WO2021129411A1 (en) Text processing method and device
CN113642727A (en) Training method of neural network model and processing method and device of multimedia information
Romero et al. Margin maximization with feed-forward neural networks: a comparative study with SVM and AdaBoost
WO2023116572A1 (en) Word or sentence generation method and related device
US20240005912A1 (en) Acoustic model for multilingual speech recognition
CN113703870A (en) Configuration file checking method, device, equipment and storage medium
US20220269718A1 (en) Method And Apparatus For Tracking Object
WO2023173554A1 (en) Inappropriate agent language identification method and apparatus, electronic device and storage medium
US20220147709A1 (en) Method and apparatus for analyzing text data capable of generating domain-specific language rules

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination