A file comparison method and apparatus
By automatically judging and verifying the unique parameters of the configuration file, the problem of low file comparison efficiency caused by MD5 code differences is solved, realizing efficient and accurate file consistency judgment and update, and reducing operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CSC FINANCIAL CO LTD
- Filing Date
- 2023-04-07
- Publication Date
- 2026-05-01
AI Technical Summary
In existing file comparison solutions, differences in the MD5 hashes of configuration files lead to low file comparison efficiency, making it difficult to automatically determine file consistency. This requires manual determination by operations and maintenance personnel, resulting in low efficiency.
By determining whether the configuration files in the devices are the same, unique configuration parameters are identified and their validity is verified. The configuration parameters are then displayed using preset parameter value ranges and parsing methods, and the files are automatically updated to ensure consistency.
It improves the efficiency of document comparison, reduces the workload of maintenance personnel, lowers maintenance costs, avoids human error, and ensures the accuracy of document comparison and the reliability of business processing systems.
Smart Images

Figure CN116483949B_ABST
Abstract
Description
A document comparison method and apparatus Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a document comparison method and apparatus. Background Technology
[0002] In maintaining a business processing system with multiple business processing centers, such as a two-site three-center or a city-wide active-active system, in order to ensure that the services provided to users by each business processing center are consistent, the versions of the applications that the devices contained in each business processing center depend on are consistent. Therefore, it is necessary to compare the files stored in the devices contained in each business processing center.
[0003] Existing file comparison schemes typically use the MD5 (Message-Digest Algorithm 5) hash of files to determine if they are identical. If the MD5 hashes of the files to be compared are the same, then the files are considered identical; if the MD5 hashes are different, the user needs to manually determine whether each file is identical.
[0004] When using existing file comparison schemes to compare files stored on devices in different business processing centers, the configuration files in different devices may differ due to differences in device geographical location, device IP, and other information. These differences can easily lead to different MD5 codes in the configuration files. As a result, it is difficult to use MD5 codes to compare configuration files of different devices. The operation and maintenance personnel can only manually determine whether the configuration files are consistent, resulting in low file comparison efficiency. Summary of the Invention
[0005] The purpose of this invention is to provide a document comparison method and apparatus to improve the efficiency of document comparison. The specific technical solution is as follows:
[0006] In a first aspect, embodiments of the present invention provide a document comparison method, the method comprising:
[0007] Obtain the first configuration file of each device in the device group in use, wherein the device group includes devices belonging to different business processing centers and having a comparative relationship;
[0008] For each device, determine whether the configuration parameters contained in the first configuration file and the second configuration file in the device are the same. If they are the same, determine the unique configuration parameters of the first configuration file in the device and obtain the parameter values of the determined parameters. The second configuration file is the configuration file obtained after the most recent modification of the configuration parameters in the device.
[0009] Based on the parameter values of the unique configuration parameters of each first configuration file, the validity of the unique configuration parameters of each first configuration file is verified to obtain the first verification result;
[0010] Verify whether the configuration parameters in each first configuration file are consistent, except for the unique configuration parameters, to obtain the second verification result;
[0011] If both the first and second verification results indicate that the verification has passed, then the first configuration files are determined to be consistent.
[0012] In one embodiment of the present invention, the method further includes:
[0013] For each device, if the configuration parameters contained in the first configuration file and the second configuration file in the device are not entirely the same, then the configuration parameters contained in the first configuration file in the device are displayed, the configuration parameters specified by the user in the displayed configuration parameters are determined as the unique configuration parameters of the first configuration file in the device, and the second configuration file in the device is updated to the first configuration file in the device.
[0014] The determination of the unique configuration parameters of the first configuration file in the device includes:
[0015] Among the configuration parameters contained in the first configuration file of the device, the configuration parameter that is the same as the unique configuration parameter of the second configuration file of the device is determined as the unique configuration parameter of the first configuration file of the device.
[0016] In one embodiment of the present invention, the configuration parameters included in the first configuration file of the device include:
[0017] Based on the preset correspondence between file formats and parsing methods, determine the target parsing method corresponding to the file format of the first configuration file in the device;
[0018] According to the target parsing method, the first configuration file in the device is parsed to obtain the configuration parameters in the first configuration file of the device, which are in a preset parameter format;
[0019] Display the obtained configuration parameters.
[0020] In one embodiment of the present invention, the step of validating the unique configuration parameters of each first configuration file based on the parameter values of the unique configuration parameters of each first configuration file includes:
[0021] For each first configuration file, if a normal parameter value range for the unique configuration parameters contained in the first configuration file is pre-set, it is determined whether the parameter value of the unique configuration parameter contained in the first configuration file belongs to the normal parameter value range. If it does, it is determined that the unique configuration parameter contained in the first configuration file has passed the verification.
[0022] For each first configuration file, without setting a normal parameter value range for the unique configuration parameters contained in that first configuration file, it is determined that the unique configuration parameters contained in that first configuration file pass the verification.
[0023] In one embodiment of the present invention, the method further includes:
[0024] If the first or second verification result indicates that the verification has failed, then the configuration files of each device in the device group will be processed for exceptions.
[0025] In one embodiment of the present invention, the abnormal handling of the configuration files of each device in the device group includes:
[0026] Display each primary configuration file;
[0027] Determine the baseline profile specified by the user in each of the first profiles displayed;
[0028] The configuration file of the target device is updated according to the baseline configuration file, wherein the target device is the device corresponding to the other configuration files in the first configuration file besides the baseline configuration file.
[0029] Secondly, embodiments of the present invention also provide a document comparison device, the device comprising:
[0030] The file acquisition module is used to acquire the first configuration file used by each device in the device group, wherein the device group includes devices belonging to different business processing centers and having a comparative relationship;
[0031] The parameter determination module is used to determine for each device whether the configuration parameters contained in the first configuration file and the second configuration file in the device are the same. If they are the same, the parameter determination module is triggered. The second configuration file is the configuration file obtained after the most recent modification of the configuration parameters in the device.
[0032] The parameter determination module is used to determine the unique configuration parameters of the first configuration file in the device and obtain the parameter values of the determined parameters.
[0033] The first verification module is used to verify the validity of the unique configuration parameters of each first configuration file based on the parameter values of the unique configuration parameters of each first configuration file, and obtain the first verification result.
[0034] The second verification module is used to verify whether the configuration parameters in each first configuration file are consistent except for the unique configuration parameters, and to obtain the second verification result.
[0035] The file determination module is used to determine that each first configuration file is consistent when both the first verification result and the second verification result indicate that the verification has passed.
[0036] In one embodiment of the present invention, the parameter judgment module is specifically used to, for each device, if it is determined that the configuration parameters contained in the first configuration file and the second configuration file in the device are not entirely the same, then trigger the parameter display module.
[0037] The device further includes:
[0038] The parameter display module is used to display the configuration parameters contained in the first configuration file in the device, determine the configuration parameters specified by the user in the displayed configuration parameters as unique configuration parameters of the first configuration file in the device, and update the second configuration file in the device to the first configuration file in the device.
[0039] The parameter determination module is specifically used for:
[0040] Among the configuration parameters contained in the first configuration file in the device, the configuration parameter that is the same as the unique configuration parameter in the second configuration file in the device is determined as the unique configuration parameter in the first configuration file in the device, and the parameter value of the determined parameter is obtained.
[0041] In one embodiment of the present invention, the parameter display module is specifically used for:
[0042] Based on the preset correspondence between file formats and parsing methods, determine the target parsing method corresponding to the file format of the first configuration file in the device;
[0043] According to the target parsing method, the first configuration file in the device is parsed to obtain the configuration parameters in the first configuration file of the device, which are in a preset parameter format;
[0044] Display the obtained configuration parameters;
[0045] The configuration parameters specified by the user in the displayed configuration parameters are determined as unique configuration parameters of the first configuration file in the device, and the second configuration file in the device is updated to the first configuration file in the device.
[0046] In one embodiment of the present invention, the first verification module is specifically used for:
[0047] For each first configuration file, if a normal parameter value range for the unique configuration parameters contained in the first configuration file is pre-set, it is determined whether the parameter value of the unique configuration parameter contained in the first configuration file belongs to the normal parameter value range. If it does, it is determined that the unique configuration parameter contained in the first configuration file has passed the verification.
[0048] For each first configuration file, without setting a normal parameter value range for the unique configuration parameters contained in that first configuration file, it is determined that the unique configuration parameters contained in that first configuration file pass the verification.
[0049] In one embodiment of the present invention, the apparatus further includes:
[0050] An exception handling module is used to perform exception handling on the configuration files of each device in the device group if the first verification result or the second verification result indicates that the verification has failed.
[0051] In one embodiment of the present invention, the exception handling module is specifically used for:
[0052] Display each primary configuration file;
[0053] Determine the baseline profile specified by the user in each of the first profiles displayed;
[0054] The configuration file of the target device is updated according to the baseline configuration file, wherein the target device is the device corresponding to the other configuration files in the first configuration file besides the baseline configuration file.
[0055] Thirdly, embodiments of the present invention also provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0056] Memory, used to store computer programs;
[0057] When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0058] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the methods described in the first aspect above.
[0059] Beneficial effects of the embodiments of the present invention:
[0060] As can be seen from the above, when applying the file comparison scheme provided in the embodiments of the present invention, for each device in the device group, if the configuration parameters contained in the first configuration file and the second configuration file of the same device are the same, the unique configuration parameters of the first configuration file of that device are determined. Thus, after determining the unique configuration parameters of each first configuration file, on the one hand, the validity of the unique configuration parameters in each first configuration file is verified based on the parameter values of the unique configuration parameters of each first configuration file; on the other hand, it is verified whether the other configuration parameters in each first configuration file are consistent, thereby enabling the comparison of configuration files with differences without requiring maintenance personnel to manually determine whether the configuration files are consistent. Therefore, applying the file comparison scheme provided in the embodiments of the present invention can improve file comparison efficiency, reduce the workload of maintenance personnel, and reduce the maintenance costs of each business processing center.
[0061] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0063] Figure 1 is a flowchart illustrating the first document comparison method provided in an embodiment of the present invention;
[0064] Figure 2 is a flowchart illustrating the second document comparison method provided in an embodiment of the present invention;
[0065] Figure 3 is a flowchart illustrating the third document comparison method provided in an embodiment of the present invention;
[0066] Figure 4a is a schematic diagram of a business processing system maintenance process provided by an embodiment of the present invention;
[0067] Figure 4b is a schematic diagram of a page displaying configuration parameters provided by an embodiment of the present invention;
[0068] Figure 4c is a schematic diagram of a document comparison result provided in an embodiment of the present invention;
[0069] Figure 5 is a schematic diagram of a document comparison device provided in an embodiment of the present invention;
[0070] Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0071] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on the present invention are within the scope of protection of the present invention.
[0072] First, the executing entity of the document comparison scheme provided in the embodiments of the present invention will be described.
[0073] The aforementioned executing entities may be platforms, devices, etc., used in the business processing system to maintain, deploy, or manage the devices contained in each business processing center.
[0074] The following describes in detail the document comparison method and apparatus provided in the embodiments of the present invention, taking the maintenance platform that maintains the equipment included in each business processing center as an example.
[0075] Referring to Figure 1, which is a flowchart of the first document comparison method provided by an embodiment of the present invention, the method includes the following steps S101-S106.
[0076] Step S101: Obtain the first configuration file used by each device in the device group.
[0077] The equipment group includes equipment belonging to different business processing centers and having a comparative relationship.
[0078] The devices in the aforementioned device group can be devices that provide the same business functions in different business processing centers, devices that are in the same position in the device topology of different business processing centers, or devices that are specified by the user among the devices included in different business processing centers.
[0079] Specifically, the first configuration file for each device in the device group can be obtained through any of the following three methods.
[0080] In the first implementation, the business processing system, in addition to including multiple business processing centers, may also include a configuration management system for managing each business processing center. The configuration management system can store configuration files for the devices included in each business processing center, and can periodically collect these configuration files to update the stored files, ensuring that the configuration files stored by the configuration management system are the ones currently in use by each device. Therefore, when the maintenance platform obtains the aforementioned first configuration file, it can send a request to the configuration management system to retrieve the configuration files for each device in the aforementioned device group, thereby obtaining the configuration files returned by the configuration management system as the first configuration files for each device in the aforementioned device group.
[0081] In the second implementation, the business processing system may further include a collection platform for collecting files stored by each device in the system. When the maintenance platform obtains the first configuration file, it may send a collection instruction to the collection platform to collect the configuration files of each device in the device group, so that the collection platform responds to the collection instruction and collects the configuration files of each device in the device group. Thus, the maintenance platform can obtain the configuration files collected by the collection platform as the first configuration files of each device in the device group.
[0082] In the third implementation, the maintenance platform can also directly send a request command to each device in the aforementioned device group to obtain the configuration file, thereby obtaining the configuration file fed back by each device in the aforementioned device group in response to the request command, which serves as the first configuration file.
[0083] In addition, each device in the device group can include an Agent module for managing files within the device. After the maintenance platform sends a retrieval command to the device, the Agent module can query the managed configuration files and send the retrieved configuration files to the maintenance platform.
[0084] Step S102: For each device, determine whether the configuration parameters contained in the first configuration file and the second configuration file in the device are the same. If they are the same, proceed to step S103.
[0085] The second configuration file is the configuration file obtained after the most recent modification of the configuration parameters in this device.
[0086] Specifically, the maintenance platform can store the second configuration files of the devices included in each business processing center. In each file comparison process, after obtaining the first configuration files of each device in the device group, it can determine whether the configuration parameters contained in the first configuration file of the device are the same as those contained in the stored second configuration file of the device for each device in the device group. If it is determined that the configuration parameters contained in the first configuration file and the second configuration file of the device are the same, step S103 can be executed.
[0087] In one embodiment of the present invention, during the process of storing the second configuration files of the devices included in each business processing center on the maintenance platform, since modifying the configuration parameters of the devices usually requires manual modification by the user, after the user has modified the configuration parameters of the devices, the user can instruct the modified configuration file to be sent to the maintenance platform. In this way, after the maintenance platform obtains the modified configuration file of the device, it can update the configuration file of the same device stored therein with the modified configuration file.
[0088] In one embodiment of the present invention, when determining whether the configuration parameters contained in the first configuration file and the second configuration file are the same, the MD5 codes of the first configuration file and the second configuration file can be calculated respectively, and it can be determined whether the MD5 codes of the first configuration file and the second configuration file are the same.
[0089] Step S103: Determine the unique configuration parameters of the first configuration file in the device and obtain the parameter values of the determined parameters.
[0090] In one embodiment of the present invention, the unique configuration parameters of the first configuration file in the device can be determined by either of the following two implementation methods.
[0091] In the first implementation, since the maintenance platform stores the second configuration file of the device, the configuration parameters contained in the second configuration file can be shown to the user in advance, and the configuration parameters specified by the user can be determined to be unique configuration parameters in the second configuration file. Since the configuration parameters contained in the first configuration file and the second configuration file are the same, the configuration parameters that are the same as the unique configuration parameters in the second configuration file can be determined from the configuration parameters contained in the first configuration file and used as unique configuration parameters in the first configuration file.
[0092] In the second implementation, after obtaining the device's first configuration file, the configuration parameters contained in the first configuration file can be displayed to the user, thereby obtaining the configuration parameters specified by the user in the configuration parameters contained in the first configuration file, which are then used as unique configuration parameters in the first configuration file.
[0093] Step S104: Based on the parameter values of the unique configuration parameters of each first configuration file, verify the validity of the unique configuration parameters of each first configuration file to obtain the first verification result.
[0094] In one embodiment of the present invention, for each first configuration file, the validity of the unique configuration parameters of the first configuration file can be verified by any of the following two implementation methods.
[0095] In the first implementation, if a normal parameter value range for the unique configuration parameters contained in the first configuration file is pre-set, it is determined whether the parameter value of the unique configuration parameters contained in the first configuration file belongs to the normal parameter value range. If it does, it is determined that the unique configuration parameters contained in the first configuration file have passed the verification.
[0096] Specifically, after specifying unique configuration parameters in the first or second configuration file, users can pre-set the normal parameter value range for those parameters. When validating the first configuration file, the system can determine if the parameter values fall within the set normal range. If they do, the parameter values are considered normal, resulting in a successful validation result. Conversely, if they do not, the parameter values are considered abnormal, resulting in a failed validation result.
[0097] For each first configuration file, if no normal parameter value range is set for the unique configuration parameters contained in the first configuration file, the absence of a normal parameter value range for the unique configuration parameters means that as long as the unique configuration parameters exist in the configuration file, the unique configuration parameters are considered normal parameters. In this case, it can be directly determined that the unique configuration parameters of the first configuration file have passed the verification.
[0098] This solution provides two opposing methods to verify the validity of the unique configuration parameters contained in the first configuration file. This way, regardless of whether the configuration files to be compared are different, the verification methods in the above two cases can be used for verification, thus expanding the scope of application of parameter verification.
[0099] In the second implementation, the unique configuration parameters of the first configuration file can be validated using existing validity verification techniques based on their parameter values.
[0100] Step S105: Verify whether the configuration parameters in each first configuration file are consistent except for the unique configuration parameters, and obtain the second verification result.
[0101] Specifically, it can be verified whether the configuration parameters other than the unique configuration parameters in each first configuration file are the same, and whether the parameter values of the configuration parameters are the same, so as to obtain the verification results for the configuration parameters and parameter values, which can be used as the second verification result mentioned above.
[0102] Step S106: If both the first verification result and the second verification result indicate that the verification has passed, determine that each first configuration file is consistent.
[0103] Specifically, both the first and second verification results indicate that the verification is passed, which means that the unique configuration parameters of each first configuration file are valid and normal, and that the other configuration parameters in each first configuration file are consistent except for the unique configuration parameters. Thus, each first configuration file can be understood as the same configuration file, that is, each first configuration file is consistent.
[0104] Furthermore, if at least one of the first and second verification results fails verification, it indicates that the various first configuration files are not the same configuration files. Therefore, it can be determined that the various first configuration files are inconsistent.
[0105] As can be seen from the above, when applying the file comparison scheme provided in the embodiments of the present invention, for each device in the device group, if the configuration parameters contained in the first configuration file and the second configuration file of the same device are the same, the unique configuration parameters of the first configuration file of that device are determined. Thus, after determining the unique configuration parameters of each first configuration file, on the one hand, the validity of the unique configuration parameters in each first configuration file is verified based on the parameter values of the unique configuration parameters of each first configuration file; on the other hand, it is verified whether the other configuration parameters in each first configuration file are consistent, thereby enabling the comparison of configuration files with differences without requiring maintenance personnel to manually determine whether the configuration files are consistent. Therefore, applying the file comparison scheme provided in the embodiments of the present invention can improve file comparison efficiency, reduce the workload of maintenance personnel, and reduce the maintenance costs of each business processing center.
[0106] In addition, the document comparison scheme provided by the embodiments of the present invention does not require human intervention, thus avoiding potential risks caused by human error in the document comparison process, ensuring the accuracy of document comparison and the authority of the services provided by each business processing center in the business processing system.
[0107] When determining whether the configuration parameters contained in the first configuration file and the second configuration file in the device are the same in step S102 above, if it is determined that the configuration parameters contained in the first configuration file and the second configuration file in the device are not completely the same, the unique configuration parameters in the first configuration file can be determined by executing step S107 in the embodiment shown in Figure 2 below, and the parameter values of the unique configuration parameters can be obtained.
[0108] In one embodiment of the present invention, referring to FIG2, a flowchart of a second document comparison method is provided. In this embodiment, the above method further includes the following step S107, and the above step S103 is implemented by the following step S103A.
[0109] Step S107: Display the configuration parameters contained in the first configuration file in the device, determine the configuration parameters specified by the user in the displayed configuration parameters as unique configuration parameters of the first configuration file in the device, obtain the parameter values of the determined parameters, and update the second configuration file in the device to the first configuration file in the device.
[0110] This step is similar to the method of determining the unique configuration parameters contained in the second configuration file in step S103 above, and will not be repeated here.
[0111] If the above method further includes step S107, step S103 can be implemented by step S103A.
[0112] Step S103A: Among the configuration parameters contained in the first configuration file in the device, determine the configuration parameter that is the same as the unique configuration parameter in the second configuration file in the device, and use it as the unique configuration parameter of the first configuration file in the device, and obtain the parameter value of the determined parameter.
[0113] Specifically, for each device, when the configuration parameters contained in the first configuration file and the second configuration file in the device are the same, since the second configuration file is the configuration file obtained after the most recent modification of the configuration parameters in the device, while the first configuration file is the configuration file currently in use by the device, the second configuration file is a historical configuration file used by the device before the first configuration file. When comparing the configuration file before modification and the second configuration file after modification, the configuration parameters contained in these two configuration files are not entirely the same. Therefore, the unique configuration parameters in the second configuration file can be determined through the above step S106. In this way, when the configuration parameters contained in the first configuration file and the second configuration file are the same, the configuration parameters in the first configuration file are also the same as the unique configuration parameters in the second configuration file. Therefore, the configuration parameters that are the same as the unique configuration parameters in the second configuration file can be determined from the configuration parameters contained in the first configuration file and used as the unique configuration parameters of the first configuration file.
[0114] For example, if the unique configuration parameter in the second configuration file is parameter 'a', since the first and second configuration files contain the same configuration parameters, the first configuration file also contains parameter 'a'. Thus, it can be determined that parameter 'a' in the first configuration file is a unique configuration parameter of the first configuration file.
[0115] As can be seen from the above, when applying the comparison file provided by the embodiments of the present invention, for each device, if the configuration parameters contained in the first configuration file and the second configuration file of the device are not entirely the same, the configuration parameters specified by the user in the configuration parameters contained in the first configuration file can be determined as unique configuration parameters, and the second configuration file of the device can be updated to the first configuration file of the device. Therefore, by applying the file comparison scheme provided by the embodiments of the present invention, different methods can be used to determine the unique configuration parameters of the first configuration file of the device in two cases: the configuration parameters contained in the first configuration file and the configuration parameters contained in the second configuration file of the device are the same and they are different. This expands the scope of application for determining the unique configuration parameters of the first configuration file of the device, and thus expands the scope of application for file comparison.
[0116] When displaying the configuration parameters contained in the first configuration file, since configuration files are usually not very readable, directly displaying the content contained in the first configuration file may result in a poor user experience when viewing the configuration parameters contained in the first configuration file.
[0117] To address the aforementioned issues, in one embodiment of the present invention, when displaying the configuration parameters contained in the first configuration file in the device, a target parsing method corresponding to the file format of the first configuration file in the device can be determined based on the preset correspondence between file formats and parsing methods; the first configuration file in the device is parsed according to the target parsing method to obtain the configuration parameters in the preset parameter format contained in the first configuration file in the device; and the obtained configuration parameters are displayed.
[0118] The configuration files can be in various formats, including properties, ini, json, yml, and xml.
[0119] In one embodiment of the present invention, the preset parameter format can be a key-value format.
[0120] For each configuration file format, the file structure of that format can be obtained in advance, and based on the obtained file structure, the parsing method used to parse that format can be determined, thereby establishing the correspondence between the file format of the configuration file and the parsing method.
[0121] In one embodiment of the present invention, for a properties format configuration file, which records each configuration parameter line by line and the configuration parameters recorded in each line are not related to each other, when parsing the properties format configuration file, the configuration file can be directly traversed line by line to identify the configuration parameters and parameter values recorded in each line of the configuration file, and the identified configuration parameters and parameter values can be converted into a preset parameter format.
[0122] Compared to properties format configuration files, INI format configuration files have added groups for the configuration parameters. When parsing an INI format configuration file, the configuration parameters and the group information of the configuration parameters can be concatenated, and the concatenated configuration parameters and their values can be converted into a preset parameter format.
[0123] For configuration files in JSON, YAML, and XML formats, the SAXReader tool can be used to parse the configuration files in these formats. The parsing process will proceed sequentially from the root node of the configuration file according to the syntax corresponding to the above formats until the tags, attribute relationships, and parameter values of the configuration parameters are found in the child nodes. The found content will then be converted into the preset parameter format.
[0124] For configuration files in formats other than the five formats mentioned above, you can first convert the configuration file to any one of the five formats mentioned above, and then parse the configuration file according to the parsing method described above.
[0125] Specifically, after pre-setting the parsing methods for each file format of the configuration file, during the parsing of the first configuration file, the file format of the first configuration file can be obtained, the target parsing method corresponding to the file format of the first configuration file can be determined, and then the first configuration file can be parsed according to the target parsing method to obtain the configuration parameters contained in the first configuration file in the preset parameter format. In this way, when displaying the configuration parameters contained in the first configuration file, the configuration parameters in the preset parameter format can be displayed.
[0126] As can be seen from the above, when applying the comparison file of the solution provided in the embodiments of the present invention, the configuration parameters in the preset parameter format contained in the first configuration file can be obtained by parsing the first configuration file, so that the configuration parameters in the preset parameter format can be displayed for the user to view.
[0127] When validating the unique configuration parameters of each first configuration file, the unique configuration parameters of the first configuration file may be invalid. Furthermore, when verifying the consistency of other configuration parameters in each first configuration file besides the unique configuration parameters, the other configuration parameters in each first configuration file may be inconsistent. In this case, step S107 in the embodiment shown in Figure 3 can be applied for subsequent processing.
[0128] In one embodiment of the present invention, referring to FIG3, a flowchart of a third document comparison method is provided. In this embodiment, the above method further includes the following step S108.
[0129] Step S108: If the first verification result or the second verification result indicates that the verification has failed, then perform anomaly handling on the configuration files of each device in the device group.
[0130] Specifically, if at least one of the first and second verification results indicates a failure to verify, it means that the first configuration files are inconsistent, which in turn means that the application versions relied upon by the devices in the device group are inconsistent. This could lead to inconsistencies in the services provided to users by the different service processing centers. Therefore, if either the first or second verification result indicates a failure to verify, exception handling can be performed on the configuration files of each device in the device group to ensure that the configuration files used by each device are consistent after the handling process.
[0131] In one embodiment of the present invention, the configuration file of the device can be abnormally handled by either of the following two implementation methods.
[0132] In the first implementation, an alarm message can be sent to the user to remind them that the configuration files being used by the devices in the device group are inconsistent.
[0133] In the second implementation method, it is also possible to display each first configuration file; determine the baseline configuration file specified by the user in each of the displayed first configuration files; and update the configuration file of the target device according to the baseline configuration file.
[0134] The target device refers to the device corresponding to the other configuration files in the first configuration file shown, excluding the baseline configuration file.
[0135] The aforementioned baseline configuration file can be understood as the latest version of the configuration file determined by the user based on their own experience among various primary configuration files.
[0136] For details on the specific implementation of each first configuration file, please refer to step S106 above, which will not be repeated here.
[0137] After the user specifies the baseline configuration file from each of the first configuration files, the target device corresponding to the other first configuration files can be determined, and the configuration parameters contained in the configuration file used in the target device can be adjusted according to the configuration parameters in the baseline configuration file.
[0138] For example, if the configuration parameters contained in the baseline configuration file are inconsistent with the configuration parameters contained in the configuration file used by the target device, such as the baseline configuration file containing parameters b, c, and d, while the configuration file used by the target device contains parameters b, c, and e, then parameter e in the configuration file used by the target device can be modified to parameter d.
[0139] In this implementation, updating the target device's configuration file based on the baseline configuration file ensures that the updated configuration file used by the target device is consistent with the baseline configuration file. This, in turn, ensures that the versions of applications that each device in the device group depends on are consistent, and that the services provided to users by each business processing center are consistent.
[0140] As can be seen from the above, when applying the comparison file provided in the embodiments of the present invention, if the first verification result or the second verification result indicates that the verification has failed, the configuration files of each device in the device group are anomaly-handled. This ensures that the configuration files of each device in the device group remain consistent after processing, thereby ensuring that the versions of the applications that each device depends on are consistent, and that the services provided to users by each business processing center are consistent, enabling the business processing system to operate normally. Therefore, applying the file comparison scheme provided in the embodiments of the present invention can improve the reliability of the business processing system.
[0141] In one embodiment of the present invention, referring to Figure 4a, which is a schematic diagram of the maintenance platform maintaining the business processing system, after all the devices included in each business processing center of the business processing system have been deployed, the maintenance platform can collect all the files of the devices included in each business processing center. The full files of the devices can include the device's program files, configuration files, log files, and extended files generated by the program during operation, etc. After collecting the full files of the devices, the maintenance platform can enter the file information of each device into the corresponding preset version table and record the MD5 code of each file. For each file, it can be determined whether the file type is a configuration file. If it is, the configuration file can be parsed to obtain all the configuration parameters contained in the configuration file, and the parsed configuration parameters are stored in a preset first database. The configuration parameters of the file stored in the first database are then displayed. In this way, the user can indicate the unique configuration parameters in the displayed configuration parameters, and the maintenance platform can mark the unique configuration parameters in the configuration parameters according to the user's instructions, such as tagging the unique configuration parameters in the displayed configuration parameters, as shown in Figure 4b, which is a schematic diagram of the page displaying the configuration parameters in the first database. Users can also input the normal parameter value range corresponding to each unique configuration parameter. After obtaining the unique configuration parameters and normal parameter value range marked by the user, the unique configuration parameters and normal parameter value range can be stored in the second database. This allows the unique configuration parameters in the device's configuration file to be determined based on the unique configuration parameters stored in the second database when comparing the device's configuration file. If the file type is not a configuration file, then the file will not contain configuration parameters, thus eliminating the need for parsing, storing, or other processing of the file.
[0142] In one embodiment of the present invention, when marking unique configuration parameters of a configuration file, for a properties format configuration file, any line of configuration parameters in the configuration file can be marked, and the configuration parameters and parameter values of the marked line can be obtained, thereby storing the obtained content in a second database in the form of key and value.
[0143] For INI format files, the label-attribute value of the configuration parameters can be marked to obtain the labels and attributes of the configuration parameters, and stored in a second database in the form of key and value.
[0144] For JSON, YAML, and XML files, the line containing the configuration parameter with attribute value can be marked, the full path of the marked line and the parameter value can be obtained, and the obtained path and parameter value can be stored in the second database in the form of key and value.
[0145] The above can be understood as preparatory work before comparing the full files of each device in the device group. When comparing the full files of each device in the device group, the topological relationships of the devices contained in each business processing center stored in the configuration management system can be obtained. Based on the obtained topological relationships, the devices in each business processing center with comparison relationships are identified as the devices in the device group. After determining the device group, the full files of each device in the device group can be compared. For program files, the MD5 hashes of the program files of each device can be compared. For configuration files, the unique configuration parameters in the configuration files of each device can be verified based on the normal parameter value range corresponding to that device stored in the second database. It can also be verified whether other configuration parameters in the configuration files of each device are consistent. For files other than program files and configuration files, these files can be added to the file comparison whitelist, eliminating the need to compare other files.
[0146] After comparing the full files of each device in the device group and obtaining the comparison results, it can be determined whether the comparison results indicate file consistency. If so, the comparison results can be recorded, as shown in Figure 4c. Figure 4c is a schematic diagram of the results of multiple file comparisons recorded by the maintenance platform. In Figure 4c, the business processing system maintained by the maintenance platform is a two-site, three-center business processing system, including a production center, a local disaster recovery center, and a remote disaster recovery center. The information in each comparison result in Figure 4c includes the production center IP, local disaster recovery IP, remote disaster recovery IP, module relative path, the production and collection date of the files of the collection device, and the date of the file comparison difference comparison. The module relative path can be understood as the position of each device in the topology of each center. In addition, the fourth column in Figure 4c records the comparison results between the files of the devices included in the production center and the files of the devices included in the local disaster recovery center, and the sixth column records the comparison results between the files of the devices included in the production center and the files of the devices included in the remote disaster recovery center.
[0147] Additionally, if the comparison results indicate file inconsistency, the user can be notified of the comparison results. This allows the user to confirm whether the production version of the application that each device in the device group depends on is incorrect, i.e., whether the file used by the device is incorrect. If the production version of the application that the device depends on is incorrect, such as being outdated or having a problem, the maintenance platform can remotely deploy the device with the incorrect production version of the application to correct the production version of the application. If the production version of the application that the device depends on is correct, the configuration file used by the device can be re-collected, and the configuration file of the device stored on the maintenance platform can be updated to the collected configuration file.
[0148] Corresponding to the above-described document comparison method, this embodiment of the invention also provides a document comparison device.
[0149] In one embodiment of the present invention, referring to FIG5, a document comparison device is provided, the device comprising:
[0150] The file acquisition module 501 is used to acquire the first configuration file used by each device in the device group, wherein the device group includes devices belonging to different business processing centers and having a comparative relationship.
[0151] The parameter judgment module 502 is used to determine for each device whether the configuration parameters contained in the first configuration file and the second configuration file in the device are the same. If they are the same, the parameter determination module 503 is triggered. The second configuration file is the configuration file obtained after the most recent modification of the configuration parameters in the device.
[0152] The parameter determination module 503 is used to determine the unique configuration parameters of the first configuration file in the device and obtain the parameter values of the determined parameters.
[0153] The first verification module 504 is used to verify the validity of the unique configuration parameters of each first configuration file based on the parameter values of the unique configuration parameters of each first configuration file, and obtain the first verification result.
[0154] The second verification module 505 is used to verify whether the configuration parameters in each first configuration file are consistent except for the unique configuration parameters, and to obtain the second verification result.
[0155] The file determination module 506 is used to determine that each first configuration file is consistent when both the first verification result and the second verification result indicate that the verification has been passed.
[0156] As can be seen from the above, when applying the file comparison scheme provided in the embodiments of the present invention, for each device in the device group, if the configuration parameters contained in the first configuration file and the second configuration file of the same device are the same, the unique configuration parameters of the first configuration file of that device are determined. Thus, after determining the unique configuration parameters of each first configuration file, on the one hand, the validity of the unique configuration parameters in each first configuration file is verified based on the parameter values of the unique configuration parameters of each first configuration file; on the other hand, it is verified whether the other configuration parameters in each first configuration file are consistent, thereby enabling the comparison of configuration files with differences without requiring maintenance personnel to manually determine whether the configuration files are consistent. Therefore, applying the file comparison scheme provided in the embodiments of the present invention can improve file comparison efficiency, reduce the workload of maintenance personnel, and reduce the maintenance costs of each business processing center.
[0157] In one embodiment of the present invention, the parameter judgment module is specifically used to, for each device, if it is determined that the configuration parameters contained in the first configuration file and the second configuration file in the device are not entirely the same, then trigger the parameter display module.
[0158] The device further includes:
[0159] The parameter display module is used to display the configuration parameters contained in the first configuration file in the device, determine the configuration parameters specified by the user in the displayed configuration parameters as unique configuration parameters of the first configuration file in the device, and update the second configuration file in the device to the first configuration file in the device.
[0160] The parameter determination module is specifically used for:
[0161] Among the configuration parameters contained in the first configuration file in the device, the configuration parameter that is the same as the unique configuration parameter in the second configuration file in the device is determined as the unique configuration parameter in the first configuration file in the device, and the parameter value of the determined parameter is obtained.
[0162] As can be seen from the above, when applying the comparison file provided by the embodiments of the present invention, for each device, if the configuration parameters contained in the first configuration file and the second configuration file of the device are not entirely the same, the configuration parameters specified by the user in the configuration parameters contained in the first configuration file can be determined as unique configuration parameters, and the second configuration file of the device can be updated to the first configuration file of the device. Therefore, by applying the file comparison scheme provided by the embodiments of the present invention, different methods can be used to determine the unique configuration parameters of the first configuration file of the device in two cases: the configuration parameters contained in the first configuration file and the configuration parameters contained in the second configuration file of the device are the same and they are different. This expands the scope of application for determining the unique configuration parameters of the first configuration file of the device, and thus expands the scope of application for file comparison.
[0163] In one embodiment of the present invention, the parameter display module is specifically used for:
[0164] Based on the preset correspondence between file formats and parsing methods, determine the target parsing method corresponding to the file format of the first configuration file in the device;
[0165] According to the target parsing method, the first configuration file in the device is parsed to obtain the configuration parameters in the first configuration file of the device, which are in a preset parameter format;
[0166] Display the obtained configuration parameters;
[0167] The configuration parameters specified by the user in the displayed configuration parameters are determined as unique configuration parameters of the first configuration file in the device, and the second configuration file in the device is updated to the first configuration file in the device.
[0168] As can be seen from the above, when applying the comparison file of the solution provided in the embodiments of the present invention, the configuration parameters in the preset parameter format contained in the first configuration file can be obtained by parsing the first configuration file, so that the configuration parameters in the preset parameter format can be displayed for the user to view.
[0169] In one embodiment of the present invention, the first verification module is specifically used for:
[0170] For each first configuration file, if a normal parameter value range for the unique configuration parameters contained in the first configuration file is pre-set, it is determined whether the parameter value of the unique configuration parameter contained in the first configuration file belongs to the normal parameter value range. If it does, it is determined that the unique configuration parameter contained in the first configuration file has passed the verification.
[0171] For each first configuration file, without setting a normal parameter value range for the unique configuration parameters contained in that first configuration file, it is determined that the unique configuration parameters contained in that first configuration file pass the verification.
[0172] This solution provides two opposing methods to verify the validity of the unique configuration parameters contained in the first configuration file. This way, regardless of whether the configuration files to be compared are different, the verification methods in the above two cases can be used for verification, thus expanding the scope of application of parameter verification.
[0173] In one embodiment of the present invention, the apparatus further includes:
[0174] An exception handling module is used to perform exception handling on the configuration files of each device in the device group if the first verification result or the second verification result indicates that the verification has failed.
[0175] As can be seen from the above, when applying the comparison file provided in the embodiments of the present invention, if the first verification result or the second verification result indicates that the verification has failed, the configuration files of each device in the device group are anomaly-handled. This ensures that the configuration files of each device in the device group remain consistent after processing, thereby ensuring that the versions of the applications that each device depends on are consistent, and that the services provided to users by each business processing center are consistent, enabling the business processing system to operate normally. Therefore, applying the file comparison scheme provided in the embodiments of the present invention can improve the reliability of the business processing system.
[0176] In one embodiment of the present invention, the exception handling module is specifically used for:
[0177] Display each primary configuration file;
[0178] Determine the baseline profile specified by the user in each of the first profiles displayed;
[0179] The configuration file of the target device is updated according to the baseline configuration file, wherein the target device is the device corresponding to the other configuration files in the first configuration file besides the baseline configuration file.
[0180] In this solution, updating the target device's configuration file based on the baseline configuration file ensures that the updated configuration file used by the target device is consistent with the baseline configuration file. This, in turn, ensures that the versions of applications that each device in the device group depends on are consistent, and that the services provided to users by each service processing center are consistent.
[0181] This invention also provides an electronic device, as shown in FIG6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0182] Memory 603 is used to store computer programs;
[0183] When processor 601 executes a program stored in memory 603, it performs the following steps:
[0184] Obtain the first configuration file of each device in the device group in use, wherein the device group includes devices belonging to different business processing centers and having a comparative relationship;
[0185] For each device, determine whether the configuration parameters contained in the first configuration file and the second configuration file in the device are the same. If they are the same, determine the unique configuration parameters of the first configuration file in the device and obtain the parameter values of the determined parameters. The second configuration file is the configuration file obtained after the most recent modification of the configuration parameters in the device.
[0186] Based on the parameter values of the unique configuration parameters of each first configuration file, the validity of the unique configuration parameters of each first configuration file is verified to obtain the first verification result;
[0187] Verify whether the configuration parameters in each first configuration file are consistent, except for the unique configuration parameters, to obtain the second verification result;
[0188] If both the first and second verification results indicate that the verification has passed, then the first configuration files are determined to be consistent.
[0189] Other schemes for implementing surgical robot navigation and positioning by the processor 601 executing the program stored in the memory 603 are the same as those mentioned in the foregoing method embodiments, and will not be repeated here.
[0190] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0191] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0192] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0193] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be 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, or discrete hardware components.
[0194] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described file comparison methods.
[0195] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the file comparison methods described in the above embodiments.
[0196] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0197] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0198] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0199] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A document comparison method, characterized in that, The method includes: obtaining a first configuration file used by each device in a device group, wherein the device group includes devices belonging to different business processing centers and having a comparative relationship; for each device, determining whether the configuration parameters contained in the first configuration file of the device are the same as those contained in the second configuration file of the device; if they are the same, determining the unique configuration parameters of the first configuration file of the device and obtaining the parameter values of the determined parameters, wherein the second configuration file is: the configuration file obtained after the most recent modification of the configuration parameters in the device, and the unique configuration parameters are configuration parameters specified by the user; for each first configuration file, a pre-set unique configuration parameter set for the first configuration file contains... Under the condition of normal parameter value range, determine whether the parameter value of the unique configuration parameter contained in the first configuration file belongs to the normal parameter value range. If it does, it is determined that the unique configuration parameter contained in the first configuration file has passed the verification. For each first configuration file, if no normal parameter value range is set for the unique configuration parameter contained in the first configuration file, it is determined that the unique configuration parameter contained in the first configuration file has passed the verification, and a first verification result is obtained. Verify whether the other configuration parameters in each first configuration file are consistent except for the unique configuration parameter, and obtain a second verification result. If both the first verification result and the second verification result indicate that the verification has passed, it is determined that each first configuration file is consistent.
2. The method according to claim 1, characterized in that, The method further includes: for each device, if the configuration parameters contained in the first configuration file in the device are not entirely the same as those contained in the second configuration file in the device, then displaying the configuration parameters contained in the first configuration file in the device, determining the configuration parameters specified by the user in the displayed configuration parameters as unique configuration parameters of the first configuration file in the device, and updating the second configuration file in the device to the first configuration file in the device; the determination of the unique configuration parameters of the first configuration file in the device includes: among the configuration parameters contained in the first configuration file in the device, determining the configuration parameters that are the same as the unique configuration parameters of the second configuration file in the device, and using them as unique configuration parameters of the first configuration file in the device.
3. The method according to claim 2, characterized in that, The process of displaying the configuration parameters contained in the first configuration file of the device includes: determining the target parsing method corresponding to the file format of the first configuration file of the device according to the preset correspondence between file formats and parsing methods; parsing the first configuration file of the device according to the target parsing method to obtain the configuration parameters of the preset parameter format contained in the first configuration file of the device; and displaying the obtained configuration parameters.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: if the first verification result or the second verification result indicates that the verification has failed, then anomaly handling is performed on the configuration files of each device in the device group.
5. The method according to claim 4, characterized in that, The abnormal handling of the configuration files of each device in the device group includes: displaying each first configuration file; determining the baseline configuration file specified by the user in each of the displayed first configuration files; and updating the configuration file of the target device according to the baseline configuration file, wherein the target device is the device corresponding to the other configuration files in the displayed first configuration files besides the baseline configuration file.
6. A document comparison device, characterized in that, The device includes: a file acquisition module, used to acquire a first configuration file used by each device in a device group, wherein the device group includes devices belonging to different business processing centers and having a comparative relationship; a parameter judgment module, used to, for each device, determine whether the configuration parameters contained in the first configuration file of the device are the same as those in the second configuration file of the device, and if they are the same, trigger a parameter determination module, wherein the second configuration file is: the configuration file obtained after the most recent modification of the configuration parameters in the device; the parameter determination module is used to determine the unique configuration parameters of the first configuration file in the device and obtain the parameter values of the determined parameters, wherein the unique configuration parameters are configuration parameters specified by the user; and a first verification module, specifically used to: for each first configuration file, in a pre-set configuration for the first configuration file... If the unique configuration parameters contained in the first configuration file fall within the normal parameter value range, it is determined whether the parameter values of the unique configuration parameters contained in the first configuration file belong to the normal parameter value range. If they do, the unique configuration parameters contained in the first configuration file are determined to have passed verification. For each first configuration file, if no normal parameter value range is set for the unique configuration parameters contained in the first configuration file, the unique configuration parameters contained in the first configuration file are determined to have passed verification, and a first verification result is obtained. The second verification module is used to verify whether the other configuration parameters in each first configuration file are consistent except for the unique configuration parameters, and a second verification result is obtained. The file determination module is used to determine that each first configuration file is consistent if both the first verification result and the second verification result indicate that the verification has passed.
7. The apparatus according to claim 6, characterized in that, The parameter judgment module is specifically used to, for each device, if it is determined that the configuration parameters contained in the first configuration file and the second configuration file in the device are not entirely the same, then trigger the parameter display module; the device further includes: the parameter display module, used to display the configuration parameters contained in the first configuration file in the device, determine the configuration parameters specified by the user in the displayed configuration parameters as unique configuration parameters of the first configuration file in the device, and update the second configuration file in the device to the first configuration file in the device; the parameter determination module is specifically used to: among the configuration parameters contained in the first configuration file in the device, determine the configuration parameters that are the same as the unique configuration parameters of the second configuration file in the device, use them as unique configuration parameters of the first configuration file in the device, and obtain the parameter value of the determined parameter.
8. An electronic device, characterized in that, The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements the steps of the method described in any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-5.