Environmental configuration information comparison method, device, terminal and storage medium

The environmental configuration information comparison method using multiple comparison methods solves the limitations and inefficiency of existing technologies, realizes efficient configuration information comparison and difference analysis of multiple environments, and supports rationality analysis and whitelist management.

CN115495355BActive Publication Date: 2025-09-16PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211154010.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2025-09-16
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

In the prior art, only the configuration information of a production environment and a test environment can be compared. The comparison method is relatively limited and inefficient, and the difference data of the test environment configuration information cannot be effectively processed.

Method used

Provides an environment configuration information comparison method that supports multiple comparison methods, including baseline comparison and full comparison. It can compare the configuration information of a production environment and multiple test environments, or between multiple test environments. By determining the baseline environment and the comparison environment, the configuration parameter identifiers and parameter values ​​are used to generate and analyze difference information.

Benefits of technology

It achieves efficient comparison of environment configuration information, can identify and analyze the difference types of configuration information, improves comparison efficiency, and supports rationality analysis and whitelist management of comparison results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115495355B_ABST
    Figure CN115495355B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an environment configuration information comparison method, device, terminal and storage medium, wherein the method includes: an application identifier of an application, obtaining multiple production environments and test environments of the application through the application identifier, determining a baseline environment and a comparison environment, and comparing the configuration information of the baseline environment and the comparison environment based on the comparison type, wherein the comparison type includes baseline comparison and full comparison. When performing a baseline comparison, the configuration parameter identifier of the baseline environment is used as a reference, and the configuration information of the two environments is obtained as difference information, wherein the configuration parameter identifiers are the same but the corresponding configuration parameter values ​​are different. When performing a full comparison, the configuration information of the two environments is obtained as difference information, wherein the configuration parameter identifiers and / or configuration parameter values ​​are different. Through the above method, multiple comparison methods of environment configuration information can be realized, and the setting of the comparison range of environment configuration information can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, terminal, and storage medium for comparing environmental configuration information. Background Art

[0002] With the rapid development of the Internet, functional applications are being updated and released more frequently. To ensure that functional applications run correctly and smoothly, development and test personnel need to conduct comprehensive testing on them. During daily testing, in addition to program code issues, the configuration based on the program code also plays a vital role in the environment, and the configuration information needs to be compared.

[0003] Configuration information includes production environment configuration information and test environment configuration information. After developing or updating a functional application, the production environment configuration information is usually not changed. However, due to the large number of test types and test scenarios, the test environment configuration information may be changed, resulting in some significant differences between the production environment configuration information and the test environment configuration information, as well as relatively large differences between the test environment and the test environment configuration information, which affects verification.

[0004] In the prior art, it is usually only possible to compare the configuration information of a production environment and a test environment. This comparison method is relatively limited and has low comparison efficiency. Summary of the Invention

[0005] The embodiments of the present application provide an environment configuration information comparison method, device, terminal and storage medium, which can implement multiple comparison methods of environment configuration information.

[0006] The present invention provides a method for comparing environment configuration information, the method comprising:

[0007] Acquire multiple associated environments according to an application identifier of an application program for which configuration information comparison is required, the multiple environments including at least one production environment and at least one test environment;

[0008] Determining one of the production environment and one of the test environment from the multiple environments as a baseline environment, and determining at least one of the test environment from the multiple environments as a comparison environment;

[0009] Determining a comparison type between the baseline environment and the comparison environment, and comparing the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, where the comparison type includes baseline comparison and full comparison, and the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier;

[0010] When the comparison type is a baseline comparison, taking the configuration parameter identifier of the first configuration information as a reference, obtaining configuration information in the first configuration information and the second configuration information in which the configuration parameter identifier is the same but the configuration parameter values ​​corresponding to the configuration parameter identifier are different as baseline comparison difference information, and generating a baseline comparison report;

[0011] When the comparison type is a full comparison, the configuration information of the first configuration information and the second configuration information, including configuration parameter identifiers and / or configuration parameter values ​​that are different, is obtained as full comparison difference information, and a full comparison report is generated.

[0012] In some embodiments, the configuration information having the same configuration parameter identifier but different configuration parameter values ​​corresponding to the configuration parameter identifier is used as baseline comparison difference information, and a baseline comparison report is generated, including:

[0013] Generating a baseline comparison difference report based on the baseline comparison difference information;

[0014] The configuration parameter identifier and the configuration parameter value corresponding to the configuration parameter identifier in the first configuration information and the second configuration information are obtained as the same configuration information, and the same configuration report is generated based on the same configuration information.

[0015] In some embodiments, after generating a baseline comparison difference report based on the baseline comparison difference information, the method further includes:

[0016] The baseline comparison difference information is analyzed to determine a difference type of the baseline comparison difference information, where the difference type includes a modification type.

[0017] In some embodiments, the configuration parameter identifiers and / or configuration parameter values ​​having different configuration information are used as full comparison difference information, and a full comparison report is generated, including:

[0018] Generate a full comparison difference report based on the full comparison difference information;

[0019] The configuration information having the same configuration parameter identifier and the same configuration parameter value corresponding to the configuration parameter identifier in the first configuration information and the second configuration information is obtained as the same configuration information, and an same configuration report is generated based on the same configuration information.

[0020] In some embodiments, after generating the full comparison difference report based on the full comparison difference information, the method further includes:

[0021] The full comparison difference information is analyzed to determine the difference type of the full comparison difference information, where the difference type includes a modification type, a deletion type, a new addition type, and a modification type.

[0022] In some embodiments, after determining one of the production environment and one of the test environments from the multiple environments as a baseline environment, and determining at least one of the test environments from the multiple environments as a comparison environment, the method further includes:

[0023] Storing the configuration information of the baseline environment and the comparison environment in a database;

[0024] A scheduled task is set, and when the scheduled task is triggered, configuration information of the baseline environment and the comparison environment is retrieved from the database.

[0025] In some embodiments, after the configuration information with different configuration parameter identifiers and / or configuration parameter values ​​is used as full comparison difference information and a full comparison report is generated, the method further includes:

[0026] The full comparison report is sent to the target link address, and the user obtains the full comparison report through the target link address, performs rationality analysis on the full comparison difference information, determines reasonable difference information from the full comparison difference information, and adds the reasonable difference information to a preset whitelist.

[0027] The present invention also provides an environment configuration information comparison device, comprising:

[0028] An acquiring unit, configured to acquire, based on an application identifier of an application program for which configuration information comparison is required, a plurality of associated environments, the plurality of environments including at least one production environment and at least one test environment;

[0029] A first determining unit is configured to determine one of the production environment and one of the test environments from the multiple environments as a baseline environment, and to determine at least one of the test environments from the multiple environments as a comparison environment;

[0030] a second determining unit, configured to determine a comparison type between the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, wherein the comparison type includes baseline comparison and full comparison, and the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier;

[0031] a first comparison unit, configured to, when the comparison type is a baseline comparison, obtain, based on the configuration parameter identifier of the first configuration information, configuration information in which the configuration parameter identifier is the same but the configuration parameter values ​​corresponding to the configuration parameter identifier are different in the first configuration information and the second configuration information as baseline comparison difference information, and generate a baseline comparison report;

[0032] The second comparison unit is used to obtain the configuration information of the first configuration information and the second configuration information, and the configuration information with different configuration parameter identifiers and / or configuration parameter values ​​as full comparison difference information when the comparison type is a full comparison, and generate a full comparison report.

[0033] An embodiment of the present application also provides a terminal, including a memory and a processor, wherein the memory is used to store instructions and data, and the processor is used to execute the above-mentioned environmental configuration information comparison method.

[0034] An embodiment of the present application further provides a storage medium, in which a plurality of instructions are stored. The instructions are suitable for being loaded by a processor to execute the above-mentioned environmental configuration information comparison method.

[0035] The environment configuration information comparison method in the embodiment of the present application can perform a baseline comparison or a full comparison of the environment configuration information, and can compare the environment configuration information of a production environment and one or more test environments, and can compare the environment configuration information between multiple test environments. Through the comparison method of the embodiment of the present application, multiple comparison methods of the environment configuration information can be realized, as well as the setting of the comparison range of the environment configuration information and high comparison efficiency can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 This is a flowchart of an environmental configuration information comparison method provided in an embodiment of the present application.

[0038] Figure 2 It is a structural diagram of an environmental configuration information comparison device provided in an embodiment of the present application.

[0039] Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0041] The embodiments of the present application provide an environment configuration information comparison method, device, terminal and storage medium, which can realize multiple comparison methods between environment configuration information, and can set the comparison range of environment configuration information. The environment configuration information comparison method, device, terminal and storage medium will be described in detail below.

[0042] See also Figure 1 , Figure 1 A flowchart of an environment configuration information comparison method provided in an embodiment of the present application, the method comprising the following contents:

[0043] 101. Acquire multiple associated environments based on an application identifier of an application program whose configuration information needs to be compared, where the multiple environments include at least one production environment and at least one test environment.

[0044] In an embodiment of the present application, a tool for implementing environment configuration comparison is set as a comparison tool, which is connected to a configuration center and a website system so that the comparison tool can obtain required information from the configuration center and the website system.

[0045] For example, the comparison tool is connected to the Apollo configuration center and the CMS system, and the comparison tool can obtain information from the Apollo configuration center and the CMS system.

[0046] The application identifier of the application can be optionally an application ID. Through the application ID, multiple environments related to the application ID can be obtained from a comparison tool that implements environment configuration comparison. It can be understood that by entering the application ID in the comparison tool, the corresponding tool can call out multiple related environments for the user to select.

[0047] In the embodiments of the present application, the environment may be a production environment and a test environment based on the application as a dimension, or a production environment and a test environment based on the function of the application as a dimension. Here, the definition and scope of the environment are not limited.

[0048] For example, the environment can be the production environment or test environment of the WeChat application, or the environment can be the production environment or test environment of the Moments function module in the WeChat application.

[0049] Optionally, the method of obtaining multiple associated environments based on the application identifier of the application includes: in the comparison tool for using the environment configuration comparison, a functional module for accessing the application to be tested is set as an application access module, and the interface of the application access module is entered through a virtual button, and multiple information input fields can be set on the interface. For example, there are a subsystem input field, an application ID input field, an application code input field, an application name input field, an affiliated department input field, an affiliated group input field, a development person in charge input field, a test person in charge input field, and an email sending type input field, etc. When the user needs to perform an environment configuration comparison, the corresponding information is entered in each input field. The comparison tool can automatically parse this information and obtain the associated multiple environments and their configuration information from the connected configuration center and the website system according to the preset information acquisition method.

[0050] 102. Determine one of the production environments or one of the test environments from the multiple environments as a baseline environment, and determine at least one of the test environments from the multiple environments as a comparison environment.

[0051] After obtaining multiple environments associated with the application identifier of the application program, a baseline environment and a comparison environment are determined, and configuration information of the determined baseline environment and the comparison environment are compared.

[0052] Preferably, the baseline environment can be a production environment or a test environment, and there is only one baseline environment and the comparison environment is a test environment, and there can be multiple comparison environments. When there is only one baseline environment and one comparison environment, the difference in configuration information between the two environments is obtained; when there is only one baseline environment and multiple comparison environments, the difference in configuration information between each comparison environment and the baseline environment is obtained.

[0053] That is, the configuration comparison of the environment includes the comparison between a production environment and one or more test environments, and the comparison between a test environment and one or more test environments. When the configuration information of multiple environments is compared, high comparison efficiency can be achieved.

[0054] When the baseline environment is a production environment and the comparison environment is a test environment, the purpose of the comparison is to identify differences between the test and production environments, so that the test environment's configuration information can be modified and adjusted based on the production environment's configuration information to ensure consistency between the two environments and avoid test failures. When both the baseline and comparison environments are test environments, the purpose of the comparison is to identify differences between the test environments of multiple versions of the application, so that any test environments with significant differences can be repaired accordingly.

[0055] It should be noted that the definition of the baseline environment and the comparison environment can be an environment based on the application as the dimension, an environment based on the function of the application as the dimension, or an environment based on the module of the function as the dimension. Here, there is no restriction on the definition and scope of the baseline environment and the comparison environment.

[0056] For example, the application to be compared with the environment configuration is WeChat. When the comparison is of the entire WeChat environment configuration, the baseline environment can be the production environment or test environment of the WeChat application, and the comparison environment can be the test environment of multiple versions of one or more WeChat.

[0057] For example, the application to be compared with the environment configuration is WeChat, and the environment configuration that needs to be compared is the WeChat Moments function module. Then, the baseline environment can be the production environment or test environment of the WeChat Moments function module, and the comparison environment can be the test environment of one or more versions of the WeChat Moments function module.

[0058] Optionally, in some embodiments, the configuration information of the baseline environment and the comparison environment is stored in a database, a scheduled task is set, and when the scheduled task is triggered, the configuration information of the baseline environment and the comparison environment is retrieved from the database.

[0059] In this embodiment, after determining the baseline environment and the comparison environment, the comparison tool will automatically store the configuration information of the baseline environment and the comparison environment in the database, and only after the comparison is automatically triggered or manually confirmed, will the corresponding baseline environment and comparison environment be retrieved from the database to realize the comparison of the environment configuration information.

[0060] 103. Determine the comparison type between the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, wherein the comparison type includes baseline comparison and full comparison, and the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier.

[0061] In an embodiment of the present application, the configuration information of the baseline environment is set as the first configuration information, and the configuration information of the comparison environment is set as the second configuration information. When performing the comparison, the first configuration information and the second configuration information are compared.

[0062] After triggering a scheduled task or manually determining the comparison, the corresponding baseline environment and comparison environment are retrieved from the database. When no selection instruction is input, a baseline comparison is performed by default. When a selection instruction is received, the comparison type corresponding to the selection instruction is obtained, and the first configuration information and the second configuration information are compared based on the comparison type.

[0063] Optionally, the environment configuration information is set in the form of a key-value pair, that is, the configuration information in the first configuration information and the second configuration information are both in the form of a key-value pair, the configuration parameter identifier in the configuration information is equivalent to the key of the key-value pair, and accordingly, the configuration parameter value corresponding to the configuration parameter identifier is the value of the key-value pair. When comparing the environment configuration information, the key and value in the key-value pair are compared according to a character comparison method to obtain the key-value pairs that differ between the first configuration information and the second configuration information.

[0064] 104. When the comparison type is a baseline comparison, taking the configuration parameter identifier of the first configuration information as a benchmark, obtain the configuration information in the first configuration information and the second configuration information in which the configuration parameter identifier is the same but the configuration parameter values ​​corresponding to the configuration parameter identifier are different as the baseline comparison difference information, and generate a baseline comparison report.

[0065] In an embodiment of the present application, the configuration information of the first configuration environment and the second configuration environment are both in the form of key-value pairs, that is, the configuration parameter identifier in the configuration information corresponds to the key of the key-value pair, and the configuration parameter value corresponding to the configuration parameter identifier corresponds to the value of the key-value pair, and a baseline comparison of the configuration information is performed based on the key-value pair.

[0066] For example, the baseline environment is a production environment, the comparison environment is a test environment, and the first configuration information of the baseline environment includes three pairs of configuration information, namely (name, x), (age, 18) and (height, 155), and the second configuration information of the comparison environment includes three pairs of configuration information, namely (name, y), (age, 18) and (height, 165). Then, name, age and height are configuration parameter identifiers, and correspondingly, x, y, 18, 155 and 165 are configuration parameter values ​​of the corresponding configuration parameter identifiers. In the baseline comparison, the first configuration information is used as the benchmark, that is, (name, x), (age, 18) and (height, 155) are used as the baseline, and configuration information with the same configuration parameter identifier in the second configuration information but different configuration parameter values ​​corresponding to the configuration parameter identifiers is obtained as the baseline comparison difference information, that is, the obtained baseline comparison difference information is (name, x), (name, y), (height, 155) and (height, 165).

[0067] In the baseline comparison, if there is configuration information in the comparison environment but no corresponding configuration information in the baseline environment, even if the configuration information obtained in the comparison is difference information, the difference information will not be used as the baseline comparison difference information, but will be ignored.

[0068] For example, the baseline environment is a production environment, the comparison environment is a test environment, and the first configuration information of the baseline environment includes three pairs of configuration information, namely (name, x), (age, 18) and (height, 155), and the second configuration information of the comparison environment includes four pairs of configuration information, namely (name, y), (age, 18), (height, 165) and (sex, B). Then, name, age, height and sex are configuration parameter identifiers, and correspondingly, x, y, 18, 155, 165 and B are corresponding configuration parameters. The configuration parameter value identified by the identifier, in the baseline comparison, the difference information obtained includes (name, x), (name, y), (height, 155), (height, 165) and (sex, B). However, since the difference information (sex, B) belongs to the comparison environment and the configuration parameter identifier corresponding to the difference information does not exist in the baseline environment, the difference information is ignored. The baseline comparison difference information obtained by performing the baseline comparison on the two environments is (name, x), (name, y), (height, 155) and (height, 165).

[0069] In baseline comparison, when there is one baseline environment and multiple comparison environments, the difference in configuration information between each comparison environment and the baseline environment is obtained.

[0070] For example, the baseline environment is a production environment, the comparison environment is the first test environment and the second test environment, and the first configuration information of the baseline environment includes three pairs of configuration information, namely (name, x), (age, 18) and (height, 155), the second configuration information of the first test environment includes three pairs of configuration information, namely (name, y), (age, 18) and (height, 165), and the second configuration information of the second test environment includes four pairs of configuration information, namely (name, z), (age, 20) and (height, 155). Then, in the baseline comparison between the baseline environment and the first test environment, the baseline comparison difference information obtained is (name, x), (name, y), (height, 155) and (height, 165), and in the baseline comparison between the baseline environment and the second test environment, the baseline comparison difference information obtained is (name, x), (name, z), (age, 18) and (age, 20).

[0071] During baseline comparison, the comparison process and results are visualized, allowing users to view information such as comparison content, comparison progress, and comparison results from the display interface.

[0072] Optionally, in some embodiments, a baseline comparison difference report is generated based on the baseline comparison difference information, and the configuration information of the configuration parameter identifier and the configuration parameter value corresponding to the configuration parameter identifier in the first configuration information and the second configuration information is obtained as the same configuration information, and the same configuration report is generated based on the same configuration information.

[0073] That is, in addition to obtaining baseline comparison difference information, baseline comparison can also obtain the same configuration information of the compared environment. The same configuration information is defined as configuration information with the same configuration parameter identifier and its corresponding configuration parameter value.

[0074] After the environment comparison is completed, two reports can be generated, including a baseline comparison difference report and an identical configuration report, or only one baseline comparison difference report can be generated. In addition to recording the baseline comparison difference information, the report also records the identical configuration information and marks the baseline comparison difference information.

[0075] Optionally, in some embodiments, after generating the baseline comparison difference report based on the baseline comparison difference information, the baseline comparison difference information is analyzed to determine the difference type of the baseline comparison difference information, where the difference type includes a modification type.

[0076] Optionally, in some embodiments, after generating the baseline comparison report, the baseline comparison report is sent to the target link address, the user obtains the baseline comparison report through the target link address, performs a rationality analysis on the baseline comparison difference information, determines reasonable difference information from the baseline comparison difference information, and adds the reasonable difference information to a preset whitelist.

[0077] After adding reasonable difference information to the whitelist, when performing subsequent comparisons, if the comparison finds the existence of the difference information, the difference information is ignored, that is, the difference information in the whitelist is not used as the baseline comparison difference information.

[0078] Alternatively, after adding reasonable difference information to the whitelist, if the comparison indicates the existence of such difference information during a subsequent comparison, the difference information will be recorded in the baseline comparison report and marked using a preset marking method. For example, if the marking method for difference information in the whitelist is set to display green characters, then the difference information in the whitelist will be displayed in green characters in the baseline comparison report.

[0079] 105. When the comparison type is a full comparison, obtain configuration information with different configuration parameter identifiers and / or configuration parameter values ​​in the first configuration information and the second configuration information as full comparison difference information, and generate a full comparison report.

[0080] In an embodiment of the present application, the configuration information of the first configuration environment and the second configuration environment are both in the form of key-value pairs, that is, the configuration parameter identifier in the configuration information corresponds to the key of the key-value pair, and the configuration parameter value corresponding to the configuration parameter identifier corresponds to the value of the key-value pair, and a full comparison of the configuration information is performed based on the key-value pair.

[0081] For example, the baseline environment is a production environment, the comparison environment is a test environment, and the first configuration information of the baseline environment includes three pairs of configuration information, namely (name, x), (age, 18) and (height, 155), and the second configuration information of the comparison environment includes four pairs of configuration information, namely (name, y), (age, 18), (height, 165) and (sex, B). Then, name, age, height and sex are configuration parameter identifiers, and correspondingly, x, y, 18, 155, 165 and B are configuration parameter values ​​of the corresponding configuration parameter identifiers. Then, in the full comparison, the configuration information of the first configuration information and the second configuration information with different configuration parameter identifiers and / or configuration parameter values ​​is obtained as the full comparison difference information, that is, the full comparison difference information obtained is (name, x), (name, y), (height, 155), (height, 165) and (sex, B).

[0082] Therefore, in the full comparison, all configuration information that is different between the baseline environment and the comparison environment is obtained. Moreover, when there is one baseline environment and multiple comparison environments, all configuration information that is different between the configuration information of each comparison environment and the baseline environment is obtained.

[0083] For example, the baseline environment is a production environment, the comparison environment is the first test environment and the second test environment, and the first configuration information of the baseline environment includes three pairs of configuration information, namely (name, x), (age, 18) and (height, 155), the second configuration information of the first test environment includes three pairs of configuration information, namely (name, y), (age, 18) and (height, 165), and the second configuration information of the second test environment includes four pairs of configuration information, namely (name, x), (age, 18), (height, 175) and (sex, B). Then, in the full comparison between the baseline environment and the first test environment, the full comparison difference information obtained is (name, x), (name, y), (height, 155) and (height, 165), and in the full comparison between the baseline environment and the second test environment, the full comparison difference information obtained is (height, 155), (height, 175) and (sex, B).

[0084] During full comparison, the comparison process and results are visualized, allowing users to view information such as comparison content, comparison progress, and comparison results from the display interface.

[0085] Optionally, in some embodiments, a full comparison difference report is generated based on the full comparison difference information, and configuration information in the first configuration information and the second configuration information in which the configuration parameter identifiers are the same and the configuration parameter values ​​corresponding to the configuration parameter identifiers are also the same is obtained as the same configuration information, and an identical configuration report is generated based on the same configuration information.

[0086] That is, in addition to obtaining full comparison difference information, full comparison can also obtain the same configuration information of the compared environment. The same configuration information is defined as configuration information with the same configuration parameter identifier and its corresponding configuration parameter value.

[0087] After the environment comparison is completed, two reports can be generated, including a full comparison difference report and an identical configuration report, or only one full comparison difference report can be generated. In addition to recording the full comparison difference information, the report also records the identical configuration information and marks it on the full comparison difference information.

[0088] Optionally, in some embodiments, after generating a full comparison difference report based on the full comparison difference information, the full comparison difference information is analyzed to determine the difference type of the full comparison difference information, which includes a modification type, a deletion type, a new addition type, and a modification type.

[0089] Optionally, in some embodiments, after generating the full comparison report, the full comparison report is sent to the target link address, the user obtains the full comparison report through the target link address, performs a rationality analysis on the full comparison difference information, determines reasonable difference information from the full comparison difference information, and adds the reasonable difference information to a preset whitelist.

[0090] After adding reasonable difference information to the whitelist, during subsequent comparisons, if the comparison shows that the difference information exists, the difference information is ignored, that is, the difference information in the whitelist is not used as the full comparison difference information.

[0091] Alternatively, after adding reasonable difference information to the whitelist, if the comparison indicates the existence of the difference information during the subsequent comparison, the difference information will be recorded in the full comparison report and marked using a preset marking method. For example, if the marking method for the difference information in the whitelist is set to green characters, then the difference information in the whitelist will be displayed in green characters in the full comparison report.

[0092] The environment configuration information comparison method of an embodiment of the present application includes obtaining an application identifier of an application program for configuration information comparison as needed, obtaining multiple associated environments, the multiple environments including at least one production environment and at least one test environment; determining a production environment or a test environment from the multiple environments as a baseline environment, and determining at least one test environment from the multiple environments as a comparison environment; determining a comparison type of the baseline environment and the comparison environment, and comparing first configuration information of the baseline environment with second configuration information of the comparison environment based on the comparison type, the comparison type including baseline comparison and full comparison, and the configuration information including a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier; when the comparison type is baseline comparison, taking the configuration parameter identifier of the first configuration information as a reference, obtaining configuration information in the first configuration information and the second configuration information with the same configuration parameter identifier but different configuration parameter values ​​corresponding to the configuration parameter identifier as baseline comparison difference information, and generating a baseline comparison report; when the comparison type is full comparison, obtaining configuration information in the first configuration information and the second configuration information with different configuration parameter identifiers and / or configuration parameter values ​​as full comparison difference information, and generating a full comparison report. Through the above method, multiple comparison modes of the environment configuration information can be realized, and the setting of the comparison range of the environment configuration information and high comparison efficiency can be achieved.

[0093] See also Figure 2 , Figure 2 This is a schematic diagram of the structure of an environment configuration information comparison device provided in an embodiment of the present application. The environment configuration information comparison device 200 includes the following units:

[0094] The acquisition unit 201 is configured to acquire multiple associated environments according to an application identifier of an application program for which configuration information comparison is required, where the multiple environments include at least one production environment and at least one test environment.

[0095] The first determining unit 202 is configured to determine a production environment or a test environment from multiple environments as a baseline environment, and to determine at least one test environment from multiple environments as a comparison environment.

[0096] The second determination unit 203 is used to determine the comparison type of the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type. The comparison type includes baseline comparison and full comparison, and the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier.

[0097] The first comparison unit 204 is used to obtain, when the comparison type is a baseline comparison, configuration information in the first configuration information and the second configuration information in which the configuration parameter identifiers are the same but the configuration parameter values ​​corresponding to the configuration parameter identifiers are different, as baseline comparison difference information, and generate a baseline comparison report.

[0098] The second comparison unit 205 is used to obtain configuration information with different configuration parameter identifiers and / or configuration parameter values ​​in the first configuration information and the second configuration information as full comparison difference information when the comparison type is full comparison, and generate a full comparison report.

[0099] Optionally, the environment configuration information comparison device 200 of the embodiment of the present application further includes other units and sub-units, which are not described in detail here.

[0100] The environment configuration information comparison device 200 of the embodiment of the present application includes an acquisition unit 201, which is used to obtain multiple associated environments according to the application identifier of the application program for which configuration information comparison is required, and the multiple environments include at least one production environment and at least one test environment; a first determination unit 202, which is used to determine a production environment or a test environment from the multiple environments as a baseline environment, and to determine at least one test environment from the multiple environments as a comparison environment; a second determination unit 203, which is used to determine the comparison type of the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, and the comparison type includes baseline comparison and Full comparison, the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier; the first comparison unit 204 is used to, when the comparison type is a baseline comparison, take the configuration parameter identifier of the first configuration information as a benchmark, obtain the configuration information in the first configuration information and the second configuration information with the same configuration parameter identifier but different configuration parameter values ​​corresponding to the configuration parameter identifier as baseline comparison difference information, and generate a baseline comparison report; the second comparison unit 205 is used to, when the comparison type is a full comparison, obtain the configuration information in the first configuration information and the second configuration information with different configuration parameter identifiers and / or configuration parameter values ​​as full comparison difference information, and generate a full comparison report. Through the above-mentioned device, multiple comparison methods of environmental configuration information can be realized, as well as the setting of the comparison range of environmental configuration information and high comparison efficiency can be achieved.

[0101] See also Figure 3 , Figure 3A schematic structural diagram of a terminal provided in an embodiment of the present application, wherein the terminal 300 may be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc. The terminal 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor 301. The processor 301 is electrically connected to the memory 302. It will be understood by those skilled in the art that the terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components.

[0102] The processor 301 is the control center of the terminal 300. It uses various interfaces and lines to connect the various parts of the entire terminal 300. By running or loading software programs and / or modules stored in the memory 302 and calling data stored in the memory 302, it executes various functions of the terminal 300 and processes data, thereby monitoring the terminal 300 as a whole.

[0103] In the embodiment of the present application, the processor 301 in the terminal 300 loads instructions corresponding to one or more application processes into the memory 302 according to the following steps, and the processor 301 runs the application stored in the memory 302 to implement various functions:

[0104] Acquire multiple associated environments according to an application identifier of an application program for which configuration information comparison is required, the multiple environments including at least one production environment and at least one test environment;

[0105] Determine a production environment or a test environment from multiple environments as a baseline environment, and determine at least one test environment from multiple environments as a comparison environment;

[0106] Determine a comparison type between the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, where the comparison type includes baseline comparison and full comparison, and the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier;

[0107] When the comparison type is baseline comparison, taking the configuration parameter identifier of the first configuration information as a reference, obtaining configuration information in the first configuration information and the second configuration information where the configuration parameter identifier is the same but the configuration parameter values ​​corresponding to the configuration parameter identifier are different as baseline comparison difference information, and generating a baseline comparison report;

[0108] When the comparison type is a full comparison, the configuration information of the first configuration information and the second configuration information with different configuration parameter identifiers and / or configuration parameter values ​​is obtained as full comparison difference information, and a full comparison report is generated.

[0109] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0110] Optionally, the terminal 300 further includes a touch screen 303, an input unit 304 and a power supply 305, wherein the processor 301 is electrically connected to the touch screen 303, the input unit 304 and the power supply 305. Those skilled in the art will understand that Figure 3 The terminal structure shown in the figure does not constitute a limitation to the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0111] The touch display screen 303 can be used for displaying a graphical user interface and receiving the operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 can include a display panel and a touch panel. Among them, the display panel can be used for displaying the information input by the user or the information provided to the user and various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used for collecting the touch operation of the user thereon or near it (such as the user uses any suitable object or accessory such as a finger, a stylus on the touch panel or near the touch panel), and generates corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 304 to realize the input function.

[0112] The input unit 304 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0113] Power supply 305 is used to supply power to various components of terminal 300. Optionally, power supply 305 can be logically connected to processor 301 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 305 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0114] although Figure 3Not shown in the figure, the terminal 300 may further include a sensor and a radio frequency module, etc., which will not be described in detail here.

[0115] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0116] As can be seen from the above, the terminal 300 provided in this embodiment obtains multiple associated environments according to the application identifier of the application program for which configuration information comparison is required, and the multiple environments include at least one production environment and at least one test environment; determines a production environment or a test environment from the multiple environments as a baseline environment, and determines at least one test environment from the multiple environments as a comparison environment; determines the comparison type of the baseline environment and the comparison environment, and compares the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, the comparison type includes baseline comparison and full comparison, and the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier; when the comparison type is baseline comparison, the configuration parameter identifier of the first configuration information is used as a reference, and configuration information in which the configuration parameter identifier is the same but the configuration parameter value corresponding to the configuration parameter identifier is different in the first configuration information and the second configuration information is obtained as baseline comparison difference information, and a baseline comparison report is generated; when the comparison type is full comparison, configuration information in which the configuration parameter identifier and / or configuration parameter value are different in the configuration information of the first configuration information and the second configuration information is obtained as full comparison difference information, and a full comparison report is generated.

[0117] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0118] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute the steps of any of the environmental configuration information comparison methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0119] Acquire multiple associated environments according to an application identifier of an application program for which configuration information comparison is required, the multiple environments including at least one production environment and at least one test environment;

[0120] Determine a production environment or a test environment from multiple environments as a baseline environment, and determine at least one test environment from multiple environments as a comparison environment;

[0121] Determine a comparison type between the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, where the comparison type includes baseline comparison and full comparison, and the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier;

[0122] When the comparison type is baseline comparison, taking the configuration parameter identifier of the first configuration information as a reference, obtaining configuration information in the first configuration information and the second configuration information where the configuration parameter identifier is the same but the configuration parameter values ​​corresponding to the configuration parameter identifier are different as baseline comparison difference information, and generating a baseline comparison report;

[0123] When the comparison type is a full comparison, the configuration information of the first configuration information and the second configuration information with different configuration parameter identifiers and / or configuration parameter values ​​is obtained as full comparison difference information, and a full comparison report is generated.

[0124] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0125] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0126] Since the computer program stored in the storage medium can execute the steps in any one of the environmental configuration information comparison methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the environmental configuration information comparison methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0127] The above is a detailed introduction to the environmental configuration information comparison method, device, terminal and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core ideas. At the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for comparing environmental configuration information, characterized in that: The method comprises: Acquire multiple associated environments according to an application identifier of an application program for which configuration information comparison is required, the multiple environments including at least one production environment and at least one test environment; Determining one of the production environment and one of the test environment from the multiple environments as a baseline environment, and determining at least one of the test environment from the multiple environments as a comparison environment; Determine a comparison type between the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, the comparison type including baseline comparison and full comparison, the configuration information including a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier, the first configuration information and the second configuration information are both in the form of a key-value pair, the configuration parameter identifier in the configuration information is equivalent to the key of the key-value pair, and the configuration parameter value corresponding to the configuration parameter identifier is the value of the key-value pair, and when performing the comparison, compare the key and value in the key-value pair according to a character comparison method to obtain key-value pairs that differ between the first configuration information and the second configuration information; When the comparison type is a baseline comparison, taking the configuration parameter identifier of the first configuration information as a reference, obtaining configuration information in the first configuration information and the second configuration information in which the configuration parameter identifier is the same but the configuration parameter values ​​corresponding to the configuration parameter identifier are different as baseline comparison difference information, and generating a baseline comparison difference report based on the baseline comparison difference information; Acquire the configuration parameter identifier and the configuration parameter value corresponding to the configuration parameter identifier in the first configuration information and the second configuration information as the same configuration information, and generate the same configuration report based on the same configuration information; When the comparison type is a full comparison, the configuration information of the first configuration information and the second configuration information, including configuration parameter identifiers and / or configuration parameter values ​​that are different, is obtained as full comparison difference information, and a full comparison report is generated.

2. The method for comparing environmental configuration information according to claim 1, wherein: After generating a baseline comparison difference report based on the baseline comparison difference information, the method further includes: The baseline comparison difference information is analyzed to determine a difference type of the baseline comparison difference information, where the difference type includes a modification type.

3. The method for comparing environmental configuration information according to claim 1, wherein: The configuration parameter identifiers and / or configuration parameter values ​​with different configuration information are used as full comparison difference information, and a full comparison report is generated, including: Generate a full comparison difference report based on the full comparison difference information; The configuration information having the same configuration parameter identifier and the same configuration parameter value corresponding to the configuration parameter identifier in the first configuration information and the second configuration information is obtained as the same configuration information, and an same configuration report is generated based on the same configuration information.

4. The method for comparing environmental configuration information according to claim 3, wherein: After generating a full comparison difference report based on the full comparison difference information, the method further includes: The full comparison difference information is analyzed to determine the difference type of the full comparison difference information, where the difference type includes a modification type, a deletion type, a new addition type, and a modification type.

5. The method for comparing environmental configuration information according to claim 1, wherein: After determining one of the production environment or one of the test environments from the multiple environments as a baseline environment, and determining at least one of the test environments from the multiple environments as a comparison environment, the method further includes: Storing the configuration information of the baseline environment and the comparison environment in a database; A scheduled task is set, and when the scheduled task is triggered, configuration information of the baseline environment and the comparison environment is retrieved from the database.

6. The method for comparing environmental configuration information according to claim 1, wherein: After the configuration information with different configuration parameter identifiers and / or configuration parameter values ​​is used as full comparison difference information and a full comparison report is generated, the method further includes: The full comparison report is sent to the target link address, and the user obtains the full comparison report through the target link address, performs rationality analysis on the full comparison difference information, determines reasonable difference information from the full comparison difference information, and adds the reasonable difference information to a preset whitelist.

7. An environmental configuration information comparison device, characterized in that: The device comprises: An acquiring unit, configured to acquire, based on an application identifier of an application program for which configuration information comparison is required, a plurality of associated environments, the plurality of environments including at least one production environment and at least one test environment; A first determining unit is configured to determine one of the production environment and one of the test environments from the multiple environments as a baseline environment, and to determine at least one of the test environments from the multiple environments as a comparison environment; A second determining unit is used to determine a comparison type between the baseline environment and the comparison environment, and compare the first configuration information of the baseline environment with the second configuration information of the comparison environment based on the comparison type, wherein the comparison types include baseline comparison and full comparison, the configuration information includes a configuration parameter identifier and a configuration parameter value corresponding to the configuration parameter identifier, the first configuration information and the second configuration information are both in the form of a key-value pair, the configuration parameter identifier in the configuration information is equivalent to the key of the key-value pair, and the configuration parameter value corresponding to the configuration parameter identifier is the value of the key-value pair. When performing the comparison, the key and value in the key-value pair are compared according to a character comparison method to obtain a key-value pair in which there is a difference between the first configuration information and the second configuration information; A first comparison unit is configured to, when the comparison type is a baseline comparison, obtain, based on the configuration parameter identifier of the first configuration information, configuration information in which the configuration parameter identifier is the same but the configuration parameter values ​​corresponding to the configuration parameter identifier are different in the first configuration information and the second configuration information as baseline comparison difference information, and generate a baseline comparison difference report based on the baseline comparison difference information; obtain, from the first configuration information and the second configuration information, configuration information in which the configuration parameter identifier and the configuration parameter value corresponding to the configuration parameter identifier are the same configuration information, and generate an same configuration report based on the same configuration information; The second comparison unit is used to obtain the configuration information of the first configuration information and the second configuration information, and the configuration information with different configuration parameter identifiers and / or configuration parameter values ​​as full comparison difference information when the comparison type is a full comparison, and generate a full comparison report.

8. A terminal, characterized in that: It includes a memory and a processor, the memory is used to store instructions and data, and the processor is used to execute the environmental configuration information comparison method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a plurality of instructions, which are suitable for being loaded by a processor to execute the environmental configuration information comparison method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • A profile comparison method and a profile comparison system

    CN109240755A

  • Data comparison method and device based on Hash algorithm, equipment and storage medium

    CN114020813A