CN113590181A - 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
CN113590181A
CN113590181A CN202110915920.6A CN202110915920A CN113590181A CN 113590181 A CN113590181 A CN 113590181A CN 202110915920 A CN202110915920 A CN 202110915920A CN 113590181 A CN113590181 A CN 113590181A
Authority
CN
China
Prior art keywords
configuration file
configuration
performance
preset
key 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
CN202110915920.6A
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 CN202110915920.6A priority Critical patent/CN113590181A/en
Publication of CN113590181A publication Critical patent/CN113590181A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Abstract

The application relates to the technical field of configuration file verification, and provides a configuration file verification method, a configuration file verification device, configuration file verification equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a configuration file of an application program, wherein the configuration file comprises a plurality of key value pairs; verifying all key value pairs in the configuration file, and judging whether illegal key value pairs exist in the configuration file; if the configuration file is judged to have no illegal key value pair, at least two preset operation environments required by the operation of the configuration file are obtained; running the configuration files in each preset running environment to obtain the running performance of the configuration files corresponding to each preset running environment; determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to each preset operation environment; and determining whether the configuration file meets the use requirement of the application program according to the performance difference information. The application also relates to a block chain technology, and the configuration file meeting the use requirement of the application program can be stored in the block chain.

Description

Configuration file checking method, device, equipment and storage medium
Technical Field
The present application relates to the field of configuration file verification technologies, and in particular, to a configuration file verification method, apparatus, device, and computer readable storage medium.
Background
Currently, an Apollo (Apollo) configuration center is a popular open source configuration management center at present, and can centrally manage configurations of different environments and different clusters, and can implement configuration of applications by a distributed system based on artificial intelligence. In the process of using the Apollo, the related configuration is generally added in the background page of the Apollo and then stored in the Apollo configuration center manually, and by this way, regardless of whether the uploaded configuration file is wrong, the configuration file can be stored in the configuration center and pushed to the application program or the application program is updated, so that the configuration process or the configuration file is wrong due to lack of the verification process of the configuration file, the data accuracy of the system is reduced, and a situation that the application program is used with a bug or cannot run normally can be caused.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a device and a computer readable storage medium for verifying a configuration file, and aims to verify the configuration file and avoid the problem of configuration process or configuration file error.
In a first aspect, the present application provides a method for verifying a configuration file, where the method for verifying a configuration file includes the following steps:
acquiring a configuration file of an application program, wherein the configuration file comprises a plurality of key value pairs;
verifying all key value pairs in the configuration file, and judging whether illegal key value pairs exist in the configuration file;
if the configuration file is judged to have no illegal key value pair, at least two preset operation environments required for operating the configuration file are obtained;
operating the configuration files in each preset operating environment to obtain the operating performance of the configuration files corresponding to each preset operating environment;
determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to the preset operation environments;
and determining whether the configuration file meets the use requirement of the application program according to the performance difference information.
In a second aspect, the present application further provides a device for verifying a configuration file, where the device for verifying a configuration file includes:
the configuration file acquisition module is used for acquiring a configuration file of an application program, wherein the configuration file comprises a plurality of key value pairs;
the key value pair verification module is used for verifying all key value pairs in the configuration file and judging whether illegal key value pairs exist in the configuration file;
the operating environment obtaining module is used for obtaining at least two preset operating environments required by the configuration file if the configuration file is judged not to have the illegal key value pair;
the operation performance determining module is used for operating the configuration files in each preset operation environment to obtain the operation performance of the configuration files corresponding to each preset operation environment;
the performance difference information determining module is used for determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to the preset operation environments;
and the use requirement determining module is used for determining whether the configuration file meets the use requirement of the application program according to the performance difference information.
In a third aspect, the present application further provides a computer device, which includes a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the steps of the method for verifying a configuration file as described above.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method for verifying a configuration file as described above.
The application provides a method, a device and equipment for verifying a configuration file and a computer readable storage medium, wherein the configuration file of an application program is obtained and comprises a plurality of key value pairs; verifying all key value pairs in the configuration file, and judging whether illegal key value pairs exist in the configuration file; if the configuration file is judged to have no illegal key value pair, at least two preset operation environments required for operating the configuration file are obtained; operating the configuration files in each preset operating environment to obtain the operating performance of the configuration files corresponding to each preset operating environment; determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to the preset operation environments; and determining whether the configuration file meets the use requirement of the application program according to the performance difference information. The problem that when the application program is upgraded or pushed, due to the fact that the configuration file lacks a data verification process, the application program is upgraded or the configuration file is run wrongly is solved, resources for manually comparing the configuration file are effectively saved, the running performance of the configuration file is guaranteed, and errors occurring in the configuration file are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a method for verifying a configuration file according to an embodiment of the present application;
fig. 2 is a schematic view of a scenario of a configuration file verification method according to an embodiment of the present application;
FIG. 3 is a schematic block diagram of a configuration file verification apparatus according to an embodiment of the present application;
fig. 4 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The embodiment of the application provides a configuration file checking method and device, computer equipment and a computer readable storage medium. The configuration file checking method can be applied to terminal equipment, and the terminal equipment can be electronic equipment such as a tablet computer, a notebook computer and a desktop computer. The method can also be applied to a server, which can be an independent server, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data and artificial intelligence platform, and the like.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a method for verifying a configuration file according to an embodiment of the present application.
As shown in fig. 1, the method for verifying the configuration file includes steps S101 to S104.
Step S101, obtaining a configuration file of an application program, wherein the configuration file comprises a plurality of key value pairs.
For example, a configuration file of an application program to be pushed to each client, that is, a configuration file in which the application program is not yet pushed to the client or the application program is updated, may be obtained, where the configuration file is used to upgrade the application program.
The method and the device for processing the configuration file of the application program can acquire and process the configuration file of the application program based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
For example, the configuration file may include a configuration file supporting the operation of the basic function of the application program, and may further include a task configuration file of the application program, for example, when the application program is pushed to a client of a different task, the task configuration file is used to support the application program to perform the different task.
For example, the configuration file for updating the application program may be updated through an Apollo (Apollo) configuration center, and similarly, the configuration file for the application program to be pushed may also pass through the Apollo (Apollo) configuration center, and the configuration file for the application program may be verified based on the Apollo (Apollo) configuration center, and if the verification is passed, the application program may be updated, and if the verification is not passed, a problem occurring in the configuration file may be timely reminded to adjust the configuration file, and the application program is not updated or pushed.
As shown in fig. 2, fig. 2 is a scene diagram of a method for verifying a configuration file according to an embodiment of the present application. The server acquires the configuration file from the terminal for deploying the configuration file and checks the configuration file in the server, wherein the terminal for deploying the configuration file can be a terminal used by a configuration file deployment person, and the server comprises an Apollo (Apollo) configuration center; after the server side completes verification of the configuration file, if the configuration file meets the use requirement of the application program, the configuration file is sent to the client side, namely the terminal provided with the application program; and if the configuration file does not meet the use requirement of the application program, sending the configuration file to a terminal for deploying the configuration file, and instructing the deployment personnel to modify the configuration file.
The configuration file is verified through the server, so that the condition that the application program cannot normally run due to lack of verification of the configuration file can be effectively reduced.
In some embodiments, the terminal for deploying the configuration file may send the configuration file to the blockchain and store the configuration file in the blockchain, and the server may obtain the configuration file from the blockchain.
Illustratively, the server broadcasts a configuration file call request to the blockchain network, where the configuration file call request may include a file address, and may also include an address identifier for identifying the file address, so as to obtain the file address according to a mapping relationship between the address identifier and the file address. The file address is used to indicate a storage location of the configuration file (chainocode) in the block chain, such as on a block of the block chain; the block chain network knows the storage position of the configuration file which needs to be called by the current service end in the block chain according to the file address, and can find the corresponding block of the block chain and extract the configuration file which needs to be called by the service end.
It can be understood that storing the configuration file in the blockchain can effectively reduce the storage pressure in the server, accelerate the processing efficiency of the server, and has certain security, wherein the blockchain referred to in the present application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Illustratively, the configuration file includes a plurality of configuration items stored by key value pairs, and different configuration items may be used to provide different functions for the application programs corresponding to the configuration file.
In some embodiments, obtaining the configuration file of the application comprises: acquiring a push instruction of the application program; and acquiring the configuration file of the application program according to the push instruction.
For example, when the application program is not pushed, the configuration file may be stored in an Apollo (Apollo) configuration center, and when a push instruction of the application program is received, the configuration file corresponding to the application program is acquired in the Apollo (Apollo) configuration center to perform verification. It can be understood that the Apollo (Apollo) configuration center may store a plurality of configuration files, each corresponding to a different application, so that when an application needs to be updated or pushed, the sending time for sending the configuration files to the application of the corresponding client can be shortened.
For example, the push instruction of the application may include an identifier of the application, for example, an identifier of the application, and the configuration file corresponding to the application may be determined in the configuration center by the identifier of the application and the identifier of the configuration file.
Step S102, all key value pairs in the configuration file are verified, and whether illegal key value pairs exist in the configuration file is judged.
Illustratively, the configuration file includes a configuration item stored by using a Key-Value pair (Key-Value), where the Key is fixed as a character string and is represented by using a character string object, the Value may be any one of a character string, a list, a hash, a set, and an ordered set object, and since there is no constraint imposed on the Key usage specification, a developer may create and use the Key at will, at present, the management of the Key usually forms a document specification before use to avoid misuse and misuse of the Key, but the use of the Key cannot be forcibly managed only by the document specification, which may result in that the Key usage scenario, expiration policy, naming specification, length, and the like are illegal, and result in an error or abnormality in the operation of the application program.
Illustratively, whether the configuration file has an illegal key value pair is judged by verifying the key value pair of the configuration file, if at least one illegal key value pair exists in the configuration file, error information is output, and the application program is not updated or pushed.
For example, the illegal Key-value pair may be a blacklist character, the Key-value pair of the configuration file may be verified by using a preset blacklist character, if at least one Key of the Key-value pair in the configuration file is matched with the blacklist character, it is determined that the configuration file has the illegal Key-value pair, and error information is output. By discovering whether an illegal key-value pair exists, the risk of xss attack can be effectively avoided.
Illustratively, if no illegal key value pair exists, the configuration files are detected in different operating environments so as to analyze the adaptability of the configuration files and reduce the error probability of the application program operating in different operating environments.
In some embodiments, the verifying all key-value pairs in the configuration file comprises: acquiring audit information, wherein the audit information comprises a plurality of preset key value pairs which pass the audit; and responding to the audit information, and verifying the key value pairs in the configuration file according to a plurality of preset key values in the audit information.
Illustratively, an auditor of key-value pairs creates preset key-value pairs according to pre-established development and use specifications, wherein the development and use specifications include use scenes, naming specifications, expiration strategies and the like of the key-value pairs, the auditor stores the preset key-value pairs created in the specifications in audit information, when a configuration center or a server performing audit receives the audit information, a plurality of preset key-value pairs passing the audit in the audit information are obtained, the audit information is responded, and the key-value pairs in a configuration file are verified through the preset key-value pairs in the audit information.
In some embodiments, the verifying the key-value pair in the configuration file according to a plurality of preset key-values in the audit information includes: traversing all key-value pairs in the configuration file; matching the key value pairs obtained by traversing with the preset key value pairs one by one; and judging whether the key value pair has an illegal key value pair according to the matching result.
Illustratively, traversing the configuration file to obtain all key value pairs in the configuration file, matching the key value pairs obtained through traversal with preset key value pairs in the audit information one by one, and judging whether illegal key value pairs exist according to the matching result.
For example, 5 key value pairs are obtained through traversal, wherein the number is A, B, C, D, E, the number of the preset key value pairs is ten, the number is 1-10, a and the preset key value pairs with the number is 1-10 are matched one by one, if a and one of the preset key value pairs with the number of 1-10 can be matched, it is determined that a is not an illegal key value pair, it can be understood that B, C, D, E executes the same operation as a, and if B, C, D, E can be successfully matched in the preset key value pairs with the number of 1-10, it can be determined that the configuration file does not have an illegal key value pair. And if at least one key-value pair in A, B, C, D, E cannot be matched with the preset key-value pair with the number of 1-10, judging that the configuration file has an illegal key-value pair.
By determining whether an illegal key-value pair is present, for example, the chance of error in running the configuration file may be avoided and the risk of xss attacks on the application after the configuration file is added to the application may be reduced.
Step S103, if the configuration file is judged not to have the illegal key value pair, at least two preset operation environments required for operating the configuration file are obtained.
Illustratively, if the configuration file does not pass the verification of the key-value pair, the abnormal information of the illegal key-value pair is output without acquiring the operating environment.
Illustratively, if the configuration file passes the verification of the key value pair, that is, the configuration file does not have an illegal key value pair, at least two preset operation environments required for operating the configuration file are obtained.
For example, the running environment may be a testing running environment, a development running environment, a pre-production running environment, a production running environment, and the like in the application program development process, or may be an application running environment of a due program, such as an application running environment of a financial task and an application running environment of a customer service communication task.
For example, the application operating environment of the corresponding configuration file may be obtained through the application environment of the application program corresponding to the configuration file, or the test operating environment, the pre-production operating environment, and the like of other configuration files may be obtained from other configuration files similar to the configuration file, so as to operate the configuration file through the operating environments of other configuration files.
And running the configuration file through the obtained preset running environment to obtain the running performance of the configuration file in different preset environments. Whether the configuration file can support different running environments can be analyzed through the running performance, and therefore whether the application program can run normally in the different running environments can be judged.
And step S104, operating the configuration files in each preset operating environment to obtain the operating performance of the configuration files corresponding to each preset operating environment.
Illustratively, after the preset operation environments are obtained, the configuration file is operated in each preset operation environment, so as to obtain the operation performance of the configuration file in each preset operation environment.
For example, the configuration file is run in the running environment of the financial task to obtain the digital operation performance and the digital matching performance of the configuration file when the money calculation is realized, or the configuration file is run in the application environment of the information matching task to obtain the text information matching performance of the configuration file when the text information matching is realized. It can be understood that if the running performance of the configuration file in the running environment of the financial task is not good, the problem of slow running may also occur when the application program corresponding to the configuration file runs.
By running the configuration files in different running environments, the running performance of the configuration files in each running environment can be analyzed so as to analyze whether the configuration files are suitable for being applied to the application program and whether the application program can realize the expected functions.
In some embodiments, the configuration file comprises a plurality of configuration items, each of the configuration items having a one-to-one correspondence with the key-value pairs, the method further comprising: and grouping the plurality of configuration items according to the key value pairs corresponding to the configuration items, and determining the configuration item group of each configuration item. The step of operating the configuration file in each preset operating environment to obtain the operating performance of the configuration file corresponding to each preset operating environment comprises the following steps: and operating the configuration file in each preset operating environment to obtain the operating performance of each configuration item group in each preset operating environment.
Illustratively, the configuration file comprises a plurality of configuration items, and it is understood that the configuration items are used for supporting the application program using the configuration file to realize different functions, such as an operation function and a matching function.
Illustratively, the configuration items correspond to key value pairs one by one, and the configuration items are grouped through the key value pairs of the configuration items to determine the configuration item group of each configuration item.
For example, configuration items may be stored in a configuration file in the form of Key value pairs, and by comparing the similarity of keys in the Key value pairs, the configuration items are grouped, and it can be understood that the roles or attributes of the configuration items in the same configuration item group are also similar, such as supporting the digital operation function of an application program together.
For example, running the configuration file in each preset running environment may obtain the running performance of each configuration item group in each preset running environment.
In some embodiment modes, the running the configuration file in each preset running environment to obtain the running performance of each configuration item group in each preset running environment includes: running the configuration file in each preset running environment to obtain the running performance of each configuration item; and determining the operation performance of each configuration item group under each preset operation environment according to the operation performance of the configuration items in each configuration item group based on the performance determination algorithm corresponding to each configuration item group.
For example, when the configuration file is run in a preset running environment, the running performance of each configuration item may be obtained, and the running performance of the configuration item group may be determined by the running performance of all configuration items included in the configuration item group.
For example, different configuration item groups may use different performance determination algorithms to determine the operation performance, or may use the same performance determination Algorithm to determine the performance of the configuration item group for matching the text information, for example, by using an illegal character performance determination Algorithm, and the performance of the configuration item group for storing or displaying the information by using a performance determination Algorithm checked by MD5(Message-Digest Algorithm 5).
For example, when the performance determination Algorithm checked by MD5(Message-Digest Algorithm 5) is used to determine the operation performance of the configuration item group, the operation performance of the configuration item group is determined by the operation performance of all configuration items in the configuration item group, and it can be understood that the operation performance of the configuration item group can be represented by data information, that is, the operation performance is represented by the operation performance information; and performing information filling operation on the running performance information corresponding to the configuration item, so that the size of the running performance information corresponding to the configuration item meets the condition that the remainder of 512n is equal to 448n, and adding a 64 n-bit value at the end of the running performance information corresponding to the configuration item, wherein n is a natural number greater than 0, and the content of the 64 n-bit value is used for indicating the size of the running performance information of the configuration item. After the information filling operation is completed, the operation performance information of the configuration item is processed in a segmented mode to obtain n segments of performance information, wherein n is larger than or equal to 1, the n segments of performance information are input into a hash value calculation model to obtain hash values corresponding to each segment of performance information, the hash values corresponding to each segment of performance information are arranged from low to high according to the sequence of addresses to obtain final hash values, and the final hash values are the operation performance values of the configuration item. The hash value calculation model comprises 4 target functions, each target function is executed 64 times, the first section of performance information enters the hash value calculation model, the operation result of the first section of performance information is obtained after the 64 operations of each target function, and the hash value corresponding to the first section of performance information is obtained by adding the operation result of the first section of performance information to the first section of performance information. And sorting the hash values corresponding to the n-terminal performance information to obtain the operation performance value of the configuration item.
For example, after obtaining the operational performance value of the configuration item, the operational performance of the configuration item group in which the configuration item is located may be determined through averaging or weighting calculation.
The operation performance of the configuration file under the preset operation environment can be more accurately determined by determining the operation performance of the configuration item group, and the speed of determining the operation performance of the configuration file can be improved.
Step S105, determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to the preset operation environments.
Illustratively, the performance difference information of the configuration file in different preset environments can be obtained by comparing the operation performances obtained by operating the configuration file in different preset operation environments.
For example, the operation performances obtained by operating the configuration file in different preset operation environments may be compared one by one to obtain performance difference information of the configuration file in two different preset environments, or one-to-many comparison may be performed, where the operation performance in a certain preset environment is used as a target operation performance, and the operation performances in other preset environments are compared with the target operation performance to obtain performance difference information of the operation performance in each preset environment and the target operation performance.
In some embodiments, the determining, according to the configuration file operation performance corresponding to each preset operation environment, performance difference information of the configuration file in different preset operation environments includes: and determining the performance difference information of each configuration item group according to the operation performance of each configuration item group in each preset operation environment.
For example, the performance determination algorithm in step S104 may determine the corresponding operation performance of each configuration item group under different preset operation environments. And determining group performance difference information of the configuration item group under different preset operation environments according to the operation performance of the corresponding configuration item group under different preset operation environments, specifically determining the group performance difference information of the configuration item group under different preset operation environments according to the operation performance value corresponding to the configuration item group. It can be understood that if the operation performance values of two configuration item groups are equal, there is no performance difference between all configuration items in the configuration item groups when operating in the corresponding preset operation environments, and if the operation performance values of two configuration item groups are not equal, there is a performance difference between at least one configuration item in the two configuration item groups when operating in the preset operation environment corresponding to the configuration item, and the size of the performance difference between the configuration items when operating in different preset operation environments is positively correlated with the size of the difference between the operation performance values corresponding to the configuration item groups.
By grouping the configuration items, the configuration items with performance difference can be found more conveniently so as to adjust the configuration files and the related configuration items without searching the related configuration items one by one and accelerate the processing speed; and the difference of the operation performance values of each configuration item group under different preset operation environments can more accurately determine the difference performance of the configuration files under different operation environments.
In some embodiments, the method further comprises: judging whether the configuration item group passes the performance verification or not according to the group performance difference information corresponding to each configuration item group; and if the configuration item group does not pass the performance verification, adjusting at least one configuration item in the configuration item group.
For example, whether the configuration item group can pass the performance verification may be determined by a difference between the operational performance values of the configuration item group in at least two preset operational environments, for example, obtaining a target operational performance value difference, comparing the target operational performance value difference with the operational performance value difference corresponding to the configuration item group, and determining that the configuration item group passes the performance verification if the operational performance value difference of the configuration item group is within the target operational performance value difference.
Illustratively, if the difference of the operational performance values of the configuration item group is outside the target operational performance value difference, it is determined that the configuration item group does not pass the performance verification, error information is output, and at least one configuration item in the configuration item group is adjusted in response to an input of a verifier based on the error information, it can be understood that the adjusted configuration item needs to be verified, the adjusted configuration file can be determined whether an illegal key value pair exists, and the operational environment performance difference information is determined, that is, the above S110-S150 is re-executed, and the adjusted configuration file is verified.
Whether the configuration item passes the performance verification is judged, so that whether the configuration file meets the requirements is judged, and the purposes of verifying the configuration file and adjusting the deployment are achieved.
And step S106, determining whether the configuration file meets the use requirement of the application program according to the performance difference information.
Illustratively, the performance difference information is used to indicate the difference of the running performance of the configuration file in different preset running environments, and it can be understood that a standard performance difference value range may be set, if the performance difference value in the obtained performance difference information is within the standard performance difference value range, the configuration file may be considered to meet the use requirement of the application program, if the performance difference value in the obtained performance difference information is outside the standard performance difference value range, the configuration file does not meet the use requirement of the application program, and if the configuration file is insist on running, problems such as wrong running, flash back, frame blocking, and the like of the application program may occur.
In some embodiments, the determining whether the configuration file meets the usage requirement of the application according to the performance difference information includes: and if the performance difference information of each configuration item group is smaller than the preset difference threshold corresponding to each configuration item group, determining that the configuration file meets the use requirement of the application program.
For example, whether the configuration file meets the use requirement of the application program can be determined by the performance difference information of each configuration item group in the configuration file and a preset difference threshold.
If the performance difference information of each configuration item group in the configuration file is smaller than the preset difference threshold corresponding to each configuration item group, the configuration file can be determined to meet the use requirement of the application program, and the configuration file is pushed to the target terminal so as to instruct the target terminal to update the application program based on the configuration file.
If the performance difference information of at least one configuration item group in the configuration file is not smaller than the preset difference threshold corresponding to the configuration item group, the configuration file can be determined not to conform to the use requirement of the application program, and error information is output or the configuration file is sent to a terminal of a verifier.
In other embodiments, a preset target difference threshold may be set, the performance difference information of each configuration item group is compared with the preset target difference threshold, and if the performance difference information of each configuration item group is smaller than the target difference threshold, it is determined that the configuration file meets the use requirement of the application program; and if the performance difference information of at least one configuration item group is not smaller than a preset target difference threshold value, determining that the configuration file does not meet the use requirement of the application program, wherein the performance difference information of the configuration item group can be represented by the difference value of the operation performance values.
For example, if it is determined that the configuration file meets the use requirement of the application program, the server may send and store the configuration file meeting the use requirement of the application program into the blockchain; when the application program installed in the terminal needs to be configured and updated by using the configuration file, the corresponding configuration file can be obtained from the block chain, wherein when the corresponding configuration file is obtained from the block chain, the configuration file meeting the requirements can be obtained based on an artificial intelligence decision tree, similarity matching or clustering algorithm.
It can be understood that the configuration file is stored in the blockchain, so that the security of the configuration file can be ensured, the information is protected from being leaked, and the storage pressure of the server side can be reduced.
According to the verification method for the configuration file provided by the embodiment, the key value pair of the configuration file is verified, so that the problem that the configuration file lacks a data verification process when an application program is upgraded or pushed is solved, and resources for manually comparing the configuration file are effectively saved; and the configuration files are operated under different preset operation environments, and the obtained operation performance is calculated to obtain the performance difference information, so that the configuration files are suitable for various operation environments, the applicability of the configuration files is improved, and the probability of errors of the configuration files under different operation environments is reduced.
Referring to fig. 3, fig. 3 is a schematic diagram of a configuration file verification apparatus according to an embodiment of the present disclosure, where the configuration file verification apparatus may be configured in a server or a terminal, and is used to execute the configuration file verification method.
As shown in fig. 3, the verification apparatus for configuration files includes: the system comprises a configuration file acquisition module 110, a key value pair verification module 120, a running environment acquisition module 130, a running performance determination module 140, a performance difference information determination module 150 and a use requirement determination module 160.
The configuration file obtaining module 110 is configured to obtain a configuration file of an application, where the configuration file includes a plurality of key value pairs.
A key-value pair verifying module 120, configured to verify all key-value pairs in the configuration file, and determine whether an illegal key-value pair exists in the configuration file.
An operation environment obtaining module 130, configured to obtain at least two preset operation environments required for operating the configuration file if it is determined that the illegal key value pair does not exist in the configuration file.
The operation performance determining module 140 is configured to operate the configuration file in each preset operation environment to obtain the operation performance of the configuration file corresponding to each preset operation environment.
The performance difference information determining module 150 is configured to determine performance difference information of the configuration files in different preset operation environments according to the operation performance of the configuration files corresponding to each preset operation environment.
A usage requirement determining module 160, configured to determine whether the configuration file meets the usage requirement of the application according to the performance difference information.
Illustratively, the checking device of the configuration file further includes a configuration item grouping module, and the operation performance determining module 140 further includes a group operation performance determining sub-module.
And the configuration item grouping module is used for grouping the plurality of configuration items according to the key value pairs corresponding to the configuration items and determining the configuration item groups of the configuration items.
And the group running performance determining submodule is used for running the configuration file in each preset running environment to obtain the running performance of each configuration item group in each preset running environment.
Illustratively, the group of operation performance determination sub-modules further comprises an operation performance determination sub-module of the configuration item and a performance determination algorithm calculation sub-module.
And the operation performance determining submodule of the configuration items is used for operating the configuration file in each preset operation environment to obtain the operation performance of each configuration item.
And the performance determination algorithm calculation sub-module is used for determining the operating performance of each configuration item group under each preset operating environment according to the operating performance of the configuration items in each configuration item group based on the performance determination algorithm corresponding to each configuration item group.
Illustratively, the performance difference information determination module 150 further includes a group performance difference information determination sub-module.
And the group performance difference information determining submodule is used for determining the performance difference information of each configuration item group according to the operation performance of each configuration item group in each preset operation environment.
The usage requirement determining module 160 is further configured to determine that the configuration file meets the usage requirement of the application program if the performance difference information of each configuration item group is smaller than the preset difference threshold corresponding to each configuration item group.
Illustratively, the checking device of the configuration file further comprises a group checking module and a configuration item adjusting module.
And the group checking module is used for judging whether the configuration item group passes the performance checking according to the performance difference information corresponding to the configuration item group.
And the configuration item adjusting module is used for adjusting at least one configuration item in the configuration item group if the configuration item group does not pass the performance check.
Illustratively, the key-value pair verification module 120 further includes an audit information acquisition sub-module.
And the audit information acquisition submodule is used for acquiring audit information, wherein the audit information comprises a plurality of preset key value pairs which pass the audit.
The key-value pair verification module 120 is further configured to respond to the audit information, and verify the key-value pairs in the configuration file according to a plurality of preset key values in the audit information.
Illustratively, the key-value pair verification module 120 further includes a key-value pair traversal sub-module, a key-value pair matching sub-module, and an illegal key-value pair determination sub-module.
And the key-value pair traversing submodule is used for traversing all the key-value pairs in the configuration file.
And the key value pair matching submodule is used for matching the key value pairs obtained by traversing with the preset key value pairs one by one.
And the illegal key-value pair determining submodule is used for judging whether the key-value pairs have illegal key-value pairs according to the matching result.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the apparatus, the modules and the units described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The methods of the present application are operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above-described methods and apparatuses may be implemented, for example, in the form of a computer program that can be run on a computer device as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a computer device according to an embodiment of the present disclosure. The computer device may be a server or a terminal.
As shown in fig. 4, the computer device includes a processor, a memory, and a network interface connected by a system bus, wherein the memory may include a storage medium and an internal memory.
The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause a processor to perform any of the methods for verification of a profile.
The processor is used for providing calculation and control capability and supporting the operation of the whole computer equipment.
The internal memory provides an environment for the execution of a computer program on a storage medium, which when executed by a processor causes the processor to perform any of the methods for verification of a profile.
The network interface is used for network communication, such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
It should be understood that the Processor may be a Central Processing Unit (CPU), and the Processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, in one embodiment, the processor is configured to execute a computer program stored in the memory to implement the steps of:
acquiring a configuration file of an application program, wherein the configuration file comprises a plurality of key value pairs;
verifying all key value pairs in the configuration file, and judging whether illegal key value pairs exist in the configuration file;
if the configuration file is judged to have no illegal key value pair, at least two preset operation environments required for operating the configuration file are obtained;
operating the configuration files in each preset operating environment to obtain the operating performance of the configuration files corresponding to each preset operating environment;
determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to the preset operation environments;
and determining whether the configuration file meets the use requirement of the application program according to the performance difference information.
In one embodiment, when the processor implements the configuration file verification method, the processor is configured to implement:
grouping the configuration items according to the key value pairs corresponding to the configuration items, and determining the configuration item group of each configuration item;
the processor is configured to implement, when the configuration file is run in each preset running environment to obtain the running performance of the configuration file corresponding to each preset running environment:
and operating the configuration file in each preset operating environment to obtain the operating performance of each configuration item group in each preset operating environment.
In an embodiment, when the processor implements running of the configuration file in each preset running environment to obtain the running performance of each configuration item group in each preset running environment, the processor is configured to implement:
running the configuration file in each preset running environment to obtain the running performance of each configuration item;
and determining the operation performance of each configuration item group under each preset operation environment according to the operation performance of the configuration items in each configuration item group based on the performance determination algorithm corresponding to each configuration item group.
In one embodiment, when determining the performance difference information of the configuration file in different preset operation environments according to the configuration file operation performance corresponding to each preset operation environment, the processor is configured to:
determining performance difference information of each configuration item group according to the operation performance of each configuration item group in each preset operation environment;
when determining whether the configuration file meets the use requirement of the application program according to the performance difference information, the processor is used for realizing that:
and if the performance difference information of each configuration item group is smaller than the preset difference threshold corresponding to each configuration item group, determining that the configuration file meets the use requirement of the application program.
In one embodiment, when the processor implements the configuration file verification method, the processor is configured to implement:
judging whether the configuration item group passes the performance verification or not according to the performance difference information corresponding to the configuration item group;
and if the configuration item group does not pass the performance verification, adjusting at least one configuration item in the configuration item group.
In one embodiment, the processor, when performing validation of all key-value pairs in the configuration file, is configured to perform:
acquiring audit information, wherein the audit information comprises a plurality of preset key value pairs which pass the audit;
and responding to the audit information, and verifying the key value pairs in the configuration file according to a plurality of preset key values in the audit information.
In one embodiment, when the processor performs verification on the key-value pairs in the configuration file according to a plurality of preset key-values in the audit information, the processor is configured to perform:
traversing all key-value pairs in the configuration file;
matching the key value pairs obtained by traversing with the preset key value pairs one by one;
and judging whether the key value pair has an illegal key value pair according to the matching result.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process for describing the verification of the configuration file may refer to the corresponding process in the embodiment of the verification control method for the configuration file, and is not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, where the computer program includes program instructions, and a method implemented when the program instructions are executed may refer to various embodiments of the verification method for a configuration file of the present application.
The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments. While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for verifying a configuration file, comprising:
acquiring a configuration file of an application program, wherein the configuration file comprises a plurality of key value pairs;
verifying all key value pairs in the configuration file, and judging whether illegal key value pairs exist in the configuration file;
if the configuration file is judged to have no illegal key value pair, at least two preset operation environments required for operating the configuration file are obtained;
operating the configuration files in each preset operating environment to obtain the operating performance of the configuration files corresponding to each preset operating environment;
determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to the preset operation environments;
and determining whether the configuration file meets the use requirement of the application program according to the performance difference information.
2. The method of verifying a configuration file according to claim 1, wherein the configuration file includes a plurality of configuration items, each of the configuration items having a one-to-one correspondence with the key-value pair, the method further comprising:
grouping the configuration items according to the key value pairs corresponding to the configuration items, and determining the configuration item group of each configuration item;
the step of operating the configuration file in each preset operating environment to obtain the operating performance of the configuration file corresponding to each preset operating environment comprises the following steps:
and operating the configuration file in each preset operating environment to obtain the operating performance of each configuration item group in each preset operating environment.
3. The method for verifying the configuration file according to claim 2, wherein the operating the configuration file in each preset operating environment to obtain the operating performance of each configuration item group in each preset operating environment comprises:
running the configuration file in each preset running environment to obtain the running performance of each configuration item;
and determining the operation performance of each configuration item group under each preset operation environment according to the operation performance of the configuration items in each configuration item group based on the performance determination algorithm corresponding to each configuration item group.
4. The method for verifying the configuration file according to claim 2, wherein the determining, according to the configuration file operation performance corresponding to each of the preset operation environments, the performance difference information of the configuration file in different preset operation environments includes:
determining performance difference information of each configuration item group according to the operation performance of each configuration item group in each preset operation environment;
the determining whether the configuration file meets the use requirement of the application program according to the performance difference information comprises the following steps:
and if the performance difference information of each configuration item group is smaller than the preset difference threshold corresponding to each configuration item group, determining that the configuration file meets the use requirement of the application program.
5. The method for verifying a configuration file according to claim 2, wherein the method further comprises:
judging whether the configuration item group passes the performance verification or not according to the performance difference information corresponding to the configuration item group;
and if the configuration item group does not pass the performance verification, adjusting at least one configuration item in the configuration item group.
6. A method for verification of a configuration file according to any of claims 1-5, wherein said verifying all key-value pairs in said configuration file comprises:
acquiring audit information, wherein the audit information comprises a plurality of preset key value pairs which pass the audit;
and responding to the audit information, and verifying the key value pairs in the configuration file according to a plurality of preset key values in the audit information.
7. The method for verifying the configuration file according to claim 6, wherein the verifying the key-value pair in the configuration file according to the preset key-values in the audit information comprises:
traversing all key-value pairs in the configuration file;
matching the key value pairs obtained by traversing with the preset key value pairs one by one;
and judging whether the key value pair has an illegal key value pair according to the matching result.
8. A device for verifying a configuration file, the device comprising:
the configuration file acquisition module is used for acquiring a configuration file of an application program, wherein the configuration file comprises a plurality of key value pairs;
the key value pair verification module is used for verifying all key value pairs in the configuration file and judging whether illegal key value pairs exist in the configuration file;
the operating environment obtaining module is used for obtaining at least two preset operating environments required by the configuration file if the configuration file is judged not to have the illegal key value pair;
the operation performance determining module is used for operating the configuration files in each preset operation environment to obtain the operation performance of the configuration files corresponding to each preset operation environment;
the performance difference information determining module is used for determining performance difference information of the configuration files under different preset operation environments according to the operation performance of the configuration files corresponding to the preset operation environments;
and the use requirement determining module is used for determining whether the configuration file meets the use requirement of the application program according to the performance difference information.
9. A computer arrangement comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, carries out the steps of the method of verification of a configuration file according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program, wherein the computer program, when being executed by a processor, carries out the steps of the method for verification of a configuration file according to any one of claims 1 to 7.
CN202110915920.6A 2021-08-10 2021-08-10 Configuration file checking method, device, equipment and storage medium Pending CN113590181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110915920.6A CN113590181A (en) 2021-08-10 2021-08-10 Configuration file checking method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110915920.6A CN113590181A (en) 2021-08-10 2021-08-10 Configuration file checking method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113590181A true CN113590181A (en) 2021-11-02

Family

ID=78256951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110915920.6A Pending CN113590181A (en) 2021-08-10 2021-08-10 Configuration file checking method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113590181A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090133A (en) * 2021-11-30 2022-02-25 深圳市元征科技股份有限公司 Application program configuration method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090133A (en) * 2021-11-30 2022-02-25 深圳市元征科技股份有限公司 Application program configuration method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP2021518705A (en) Runtime self-modification for blockchain ledger
EP3178011B1 (en) Method and system for facilitating terminal identifiers
US9256765B2 (en) System and method for identifying software changes
US11750642B1 (en) Automated threat modeling using machine-readable threat models
US9270467B1 (en) Systems and methods for trust propagation of signed files across devices
CN112527912B (en) Data processing method and device based on block chain network and computer equipment
CN104067283A (en) Identifying trojanized applications for mobile environments
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
US20200287723A1 (en) Identity-based security platform and methods
CN104657665A (en) File processing method
US11599645B2 (en) Systems and methods for predicting cybersecurity vulnerabilities
CN112001376B (en) Fingerprint identification method, device, equipment and storage medium based on open source component
CN112860645A (en) Processing method and device for offline compressed file, computer equipment and medium
KR20230005046A (en) Methods and Apparatuses for Installing a Device Application
US11307790B2 (en) Method, device, and computer program product for managing data placement
US10552176B1 (en) Certifying operating system images
US11269540B2 (en) Method, apparatus, and computer program product for managing application system
Stephen et al. Assured cloud-based data analysis with ClusterBFT
CN113590181A (en) Configuration file checking method, device, equipment and storage medium
CN114139161A (en) Method, device, electronic equipment and medium for batch vulnerability detection
US9860230B1 (en) Systems and methods for digitally signing executables with reputation information
CN104657504A (en) Fast file identification method
CN113056739A (en) Verification and installation of file systems into transient, non-persistent storage circuits
US20230315438A1 (en) Contextually cognitive edge server manager
US9998495B2 (en) Apparatus and method for verifying detection rule

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