Configuration verification method and device, electronic equipment and storage medium
By adding operation code and version number to the newly added configuration items in the cloud cluster, the edge nodes perform configuration checksum updates, solving the problem of inconsistent configuration of edge servers, improving verification efficiency and real-timeness, and ensuring service quality.
Patent Information
- Application Number
- CN202411776805.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In a cloud cluster, due to network delay or machine failure, the edge server fails to receive the configuration issued by the configuration center in time, resulting in the configuration of the edge server being inconsistent with the configuration expected by the configuration center, affecting the service quality of the edge server.
By adding operation code and version number to the newly added configuration items in the central configuration node, the edge node will find the configuration items to be verified in the historical configuration item set after receiving them, obtain the different configuration items and execute the corresponding operation code, and store the different configuration items to ensure configuration consistency.
It realizes efficient verification of newly added configurations in the central configuration node, avoids the process of sorting multiple configurations, improves verification efficiency and real-timeness, saves system resources of edge nodes, and ensures normal service of edge servers.
Smart Images

Figure CN119766653A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a configuration verification method, device, electronic device and storage medium. Background Art
[0002] In practice, in a cloud cluster, a configuration center usually sends configurations to each edge server. However, due to various reasons such as network delays or machine failures, the edge server does not receive the configuration sent by the configuration center, resulting in inconsistency between the configuration of the edge server and the configuration sent by the configuration center (the configuration that the configuration center expects the edge server to have), which in turn affects the edge server's provision of external services. Therefore, it is necessary to verify the configuration of the edge server and the configuration sent by the configuration center to ensure that the configuration of the edge server is consistent with the configuration sent by the configuration center. Summary of the invention
[0003] The present application shows a configuration verification method, device, electronic device and storage medium.
[0004] In a first aspect, the present application shows a configuration verification method, which is applied to an edge node, and the method includes:
[0005] Receive the benchmark configuration item sent by the central configuration node; the benchmark configuration item includes: the benchmark configuration, the operation code corresponding to the benchmark configuration and the version number of the benchmark configuration, and the benchmark configuration is the configuration newly added in the central configuration node;
[0006] In the historical configuration item set stored in the edge node, the configuration item to be verified is searched, and the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified; the version number in the configuration item to be verified is the same as the version number in the benchmark configuration item;
[0007] Obtain the difference configuration items between the baseline configuration items and the configuration items to be verified;
[0008] Execute the operation code in the difference configuration item on the configuration in the difference configuration item;
[0009] When there is no distinguishing configuration item in the historical configuration item set, the distinguishing configuration item is stored in the historical configuration item set.
[0010] In a second aspect, the present application shows a configuration verification method, which is applied to a central configuration node, and the method includes:
[0011] Obtaining a baseline configuration item, which includes: a baseline configuration, an operation code corresponding to the baseline configuration, and a version number of the baseline configuration. The baseline configuration is a configuration newly added in the central configuration node;
[0012] Send the baseline configuration item to the edge node; so that the edge node receives the baseline configuration item sent by the central configuration node, and searches for the configuration item to be verified in the historical configuration item set stored in the edge node, wherein the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified, and the version number in the configuration item to be verified is the same as the version number in the baseline configuration item; obtain the difference configuration item between the baseline configuration item and the configuration item to be verified; execute the operation code in the difference configuration item on the configuration in the difference configuration item; if the difference configuration item does not exist in the historical configuration item set, store the difference configuration item in the historical configuration item set.
[0013] In a third aspect, the present application shows a configuration verification device, which is applied to an edge node, and the device includes:
[0014] A receiving module, used to receive a benchmark configuration item sent by a central configuration node; the benchmark configuration item includes: a benchmark configuration, an operation code corresponding to the benchmark configuration, and a version number of the benchmark configuration, and the benchmark configuration is a configuration newly added in the central configuration node;
[0015] A search module is used to search for a configuration item to be verified in a set of historical configuration items stored in the edge node, wherein the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified; the version number in the configuration item to be verified is the same as the version number in the benchmark configuration item;
[0016] A first acquisition module is used to acquire the difference configuration items between the reference configuration items and the configuration items to be verified;
[0017] An execution module, used for executing the operation code in the difference configuration item on the configuration in the difference configuration item;
[0018] The storage module is used to store the distinguishing configuration item in the historical configuration item set when the distinguishing configuration item does not exist in the historical configuration item set.
[0019] In a fourth aspect, the present application shows a configuration verification device, which is applied to a central configuration node, and the device includes:
[0020] A second acquisition module is used to acquire a benchmark configuration item, wherein the benchmark configuration item includes: a benchmark configuration, an operation code corresponding to the benchmark configuration, and a version number of the benchmark configuration, wherein the benchmark configuration is a configuration newly added in the central configuration node;
[0021] A sending module is used to send a baseline configuration item to an edge node; so that the edge node receives the baseline configuration item sent by the central configuration node, and searches for a configuration item to be verified in a set of historical configuration items stored in the edge node, wherein the configuration item to be verified includes: a configuration to be verified, an operation code corresponding to the configuration to be verified, and a version number of the configuration to be verified, wherein the version number in the configuration item to be verified is the same as the version number in the baseline configuration item; obtains a difference configuration item between the baseline configuration item and the configuration item to be verified; executes the operation code in the difference configuration item on the configuration in the difference configuration item; and stores the difference configuration item in the set of historical configuration items when the difference configuration item does not exist in the set of historical configuration items.
[0022] In a fifth aspect, the present application illustrates an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.
[0023] In a sixth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.
[0024] In a seventh aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.
[0025] The technical solution provided by this application may have the following beneficial effects:
[0026] The present application implements configuration verification of newly added configurations that need to be verified in the central configuration node by adding operation codes and version numbers to the newly added configurations that need to be verified in the central configuration node. There is no need to sort multiple configurations for each verification, which saves time, improves verification efficiency, has high real-time performance, and saves system resources of edge nodes, avoiding affecting the normal external service provision of edge nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flowchart of the steps of a configuration verification method of the present application.
[0028] Figure 2 It is a structural block diagram of a configuration verification device of the present application.
[0029] Figure 3 It is a structural block diagram of a configuration verification device of the present application.
[0030] Figure 4 It is a block diagram of an electronic device of the present application.
[0031] Figure 5It is a block diagram of an electronic device of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The general configuration verification method is to determine whether the MD5 (Message-Digest Algorithm) value of the edge server's configuration file is consistent with the MD5 value of the configuration sent by the configuration center. If they are inconsistent, it means that the configuration of the edge server is inconsistent with the configuration sent by the configuration center (the configuration that the configuration center expects the edge server to have), and the configuration center re-sends the configuration to the edge server.
[0034] However, the configuration sent by the configuration center to the edge server at one time may contain multiple configurations, and there is a default order between the multiple configurations. The overall MD5 value of the multiple configurations sent by the configuration center is related to the default order between the multiple configurations. However, due to network delays, machine failures and other reasons, the order between the multiple configurations received by the edge server is different from the default order. The overall MD5 value of the multiple configurations calculated by the edge server is related to the receiving order between the multiple configurations received.
[0035] As a result, the edge server actually loads multiple configurations issued by the configuration center and completes the correct configuration, that is, it indicates that the configuration of the edge server is consistent with the configuration issued by the configuration center (the configuration that the configuration center expects the edge server to have), but the overall MD5 value of the multiple configurations issued by the configuration center is different from the overall MD5 value of the multiple configurations calculated by the edge server, which may mistakenly believe that the edge server has not loaded the multiple configurations issued by the configuration center, that is, it mistakenly believes that the configuration of the edge server is inconsistent with the configuration issued by the configuration center (the configuration that the configuration center expects the edge server to have), resulting in an incorrect verification result.
[0036] To this end, the edge server can reorder each of the multiple configurations received to the default order, and calculate the overall MD5 value of the sorted multiple configurations. In this way, the overall MD5 value of the multiple configurations sent by the configuration center will be the same as the overall MD5 value of the multiple configurations calculated by the edge server, and there will be no incorrect verification result.
[0037] However, the process of the edge server reordering each of the received multiple configurations into a default order often takes a long time, resulting in low verification efficiency and low real-time performance.
[0038] Especially for a large number of different configurations of the same type (all IP addresses or URLs, etc.) configured as multiple blacklist IP (Internet Protocol) addresses, multiple whitelist IP addresses, multiple to-be-unblocked URLs (Uniform Resource Locator), the problem of long sorting time and low verification efficiency is very significant.
[0039] To this end, the solution of this application is proposed.
[0040] Before introducing the solution of the present application, the technical terms that may be involved in the present application are first explained.
[0041] Incremental update: Based on the full data at a certain moment, the updated data is sent to the machines that need to be updated, that is, only the difference data is updated.
[0042] The present application provides a configuration verification system, which includes a central configuration node and an edge node.
[0043] The central configuration node and the edge nodes can be located in the same cloud cluster.
[0044] The central configuration node may be a physical machine in the cloud cluster, or a virtual machine installed on a physical machine in the cloud cluster.
[0045] The edge node may be a physical machine in the cloud cluster, or a virtual machine installed on a physical machine in the cloud cluster.
[0046] There may be multiple edge nodes in the cloud cluster, and the central configuration node communicates with each edge node respectively.
[0047] Reference Figure 1 , shows a flowchart of the steps of a configuration verification method of the present application, wherein the method comprises:
[0048] In step S101, the central configuration node obtains a reference configuration item, which includes: a reference configuration, an operation code corresponding to the reference configuration, and a version number of the reference configuration. The reference configuration is a configuration newly added in the central configuration node.
[0049] For example, the central configuration node has previously sent configurations 1, 2, and 3 to edge nodes. Later, the central configuration node receives configurations 4 and 5 from the operation and maintenance personnel that need to be sent to edge nodes. The baseline configurations are configurations 4 and 5.
[0050] In this way, the benchmark configuration items acquired by the central configuration node are benchmark configuration item 4 and benchmark configuration item 5.
[0051] The benchmark configuration item 4 includes: benchmark configuration 4, an operation code corresponding to the benchmark configuration 4, and a version number of the benchmark configuration 4.
[0052] The benchmark configuration item 5 includes: benchmark configuration 5, an operation code corresponding to benchmark configuration 5, and a version number of benchmark configuration 5.
[0053] The operation code corresponds to an operation mode. By executing the operation code corresponding to the configuration, the configuration can be executed in the "operation mode corresponding to the operation code". The operation modes include adding, deleting, delaying, and advancing, etc.
[0054] The version number is used to indicate the updated version of the configuration item, and the version number can be an increasing sequence.
[0055] In one example, the baseline configuration item includes "ip address|operation code|version number". The operation code uses "0" or "1", "0" represents a delete operation (perform a delete operation on the IP address in the configuration item, for example, delete the IP address in the IP address list), and "1" represents an add operation (perform an add operation on the IP address in the configuration item, for example, add the IP address in the IP address list). The version number uses a set of increasing sequences, "1", "2", "3" gradually increase.
[0056] Generally, edge nodes store configuration items sent by central configuration nodes, for example, by storing them in a set of historical configuration items stored in the edge nodes.
[0057] When the edge server needs to use the configuration, it can load each historical configuration item in sequence according to the order in which each historical configuration item is stored in the historical configuration item set from earliest to latest.
[0058] In step S102, the central configuration node sends the benchmark configuration item to the edge node.
[0059] The number of baseline configuration items can be one or more.
[0060] If multiple baseline configuration items are sent in each batch, the multiple baseline configuration items need to be a complete version of the configuration items, that is, the configuration items with the same version number can be sent to the edge node for verification in the same batch.
[0061] The central configuration server can record the version number of each configuration item sent down, and multiple configuration items corresponding to the same version number will only be sent to the edge node once.
[0062] In step S103, the edge node receives the reference configuration item sent by the central configuration node.
[0063] In step S104, the edge node searches for the configuration item to be verified in the historical configuration item set stored in the edge node, and the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified. The version number in the configuration item to be verified is the same as the version number in the benchmark configuration item.
[0064] The historical configuration item set stored in the edge node is used to store: historical configuration items stored by the edge node in the historical process. The historical configuration items include: historical configuration, operation code corresponding to the historical configuration, and version number of the historical configuration.
[0065] The found configuration items to be verified may be one or more.
[0066] For example, the version number in the baseline configuration item can be obtained, and then all historical configuration items with the version number can be found in the historical configuration item set stored in the edge node, and all of them are used as configuration items to be verified.
[0067] In step S105, the edge node obtains the difference configuration items between the reference configuration items and the configuration items to be verified.
[0068] Use the configuration and version number in the configuration item as keywords and the operation code as the keyword value, and compare the keywords and keyword values in the baseline configuration item with those in the configuration item to be verified.
[0069] Get configuration items with the same keyword but different keyword values, as well as configuration items whose keywords only exist in the baseline configuration items and configuration items whose keywords only exist in the configuration items to be verified.
[0070] Baseline configuration items with the same keywords but different keyword values can be regarded as difference configuration items.
[0071] Configuration items to be verified whose keywords do not exist in the baseline configuration items but exist in the configuration items to be verified can be regarded as redundant configuration items.
[0072] A baseline configuration item whose keyword exists in the baseline configuration item but does not exist in the configuration item to be verified can be regarded as a missing configuration item.
[0073] Differential configuration items, redundant configuration items, and missing configuration items can be regarded as different configuration items between the baseline configuration items and the configuration items to be verified.
[0074] To facilitate comparison with the benchmark configuration items provided by the central configuration node, the configuration items to be verified are stored in the form of a multi-level hash table in this embodiment.
[0075] For example, the first level of the hash table uses the version number as the key, and the value is still a hash table. The second level of the hash table uses the configuration as the key, and the value is the operation code.
[0076] In this way, the hash table of the configuration items to be verified is traversed, and the hash table of the benchmark configuration items is searched using the version number and configuration as indexes.
[0077] If the configuration item to be checked is not found in the hash table of the benchmark configuration item, then the configuration item to be checked is a redundant configuration item.
[0078] If the operation code found in the hash table of the baseline configuration item is different from the operation code in the configuration to be verified, the baseline configuration item compared with the configuration item to be verified is the difference configuration item. This comparison is continued until the entire content of the hash table of the configuration item to be verified is traversed.
[0079] Traverse the hash table of the baseline configuration items again. If there is a baseline configuration item that has not been visited when traversing the hash table of the configuration items to be verified, then the baseline configuration item is a missing configuration item.
[0080] After two traversals, the difference configuration items, redundant configuration items and missing configuration items are obtained.
[0081] In this way, the consistency check of the benchmark configuration items provided by the edge node and the central configuration node can be achieved, and the inconsistent configuration items are output, which is the basis for subsequent corrections.
[0082] In step S106, the edge node executes the operation code in the difference configuration item on the configuration in the difference configuration item.
[0083] This is to operate the configurations in the different configuration items according to the operation methods corresponding to the operation codes in the different configuration items.
[0084] In step S107, when there is no distinguishing configuration item in the historical configuration item set, the edge node stores the distinguishing configuration item in the historical configuration item set.
[0085] Alternatively, when the edge node has a distinguishing configuration item in the historical configuration item set, the distinguishing configuration item may not be repeatedly stored in the historical configuration item set.
[0086] The present application implements configuration verification of newly added configurations that need to be verified in the central configuration node by adding operation codes and version numbers to the newly added configurations that need to be verified in the central configuration node. There is no need to sort multiple configurations for each verification, which saves time, improves verification efficiency, has high real-time performance, and saves system resources of edge nodes, avoiding affecting the normal external service provision of edge nodes.
[0087] The present application is particularly suitable for situations where a central configuration node needs to send a large number of configurations to edge nodes, and where the operation codes corresponding to the same configuration in a large number of configurations are frequently changed, which can save verification time and improve verification efficiency.
[0088] In one embodiment of the present application, there are multiple baseline configuration items. Any two of the multiple baseline configuration items are different, and the difference means that at least one of the configuration, operation code and version number of the two baseline configuration items is different.
[0089] The version numbers in the multiple baseline configuration items are not unique. For example, after deduplication of the version numbers in the multiple baseline configuration items, there are at least two different version numbers. In addition, there may be multiple different configuration items.
[0090] Thus, when the operation code in the difference configuration item is executed on the configuration in the difference configuration item in step S106, it can be detected whether there are at least two difference configuration items with the same configuration but different version numbers in the multiple difference configuration items.
[0091] When there are at least two difference configuration items with the same configuration but different version numbers among the multiple difference configuration items, the difference configuration item with the latest version number is searched among the at least two difference configuration items with the same configuration but different version numbers.
[0092] In the present application, the version number of the configuration may be gradually increasing, for example, version 1.0, version 2.0, version 3.0 and version 4.0, etc., increasing in sequence. The latest version number may be understood as the largest version number. For example, at least two difference configuration items include difference configuration item 1 and difference configuration item 2, the configuration in difference configuration item 1 is the same as the configuration in difference configuration item 2, the version number in difference configuration item 1 is version 1.0, and the version number in difference configuration item 2 is version 2.0. Since version 2.0 is greater than version 1.0, version 2.0 is newer than version 1.0, and therefore, the difference configuration item with the latest version number included therein is difference configuration item 2.
[0093] Then, the operation code in the found difference configuration item is executed for the configuration in the found difference configuration item.
[0094] In this embodiment, among the at least two distinguishing configuration items with the same configuration but different version numbers, the time when the operation and maintenance personnel sets the distinguishing configuration item with the latest version number is often later than the time when the operation and maintenance personnel sets the distinguishing configuration item with a non-latest version number. The distinguishing configuration item with the latest version number is often set by the operation and maintenance personnel according to the current actual needs. In this way, the validity, priority or practicality of the distinguishing configuration item with the latest version number is greater than the validity, priority or practicality of the distinguishing configuration item with the non-latest version number. In this way, among the at least two distinguishing configuration items with the same configuration but different version numbers, since the configurations are the same, the edge node needs to perform verification based on the distinguishing configuration item with the latest version number, which can improve the precision or accuracy of the verification configuration.
[0095] In other words, even if the operation code in the difference configuration item with a non-latest version number is executed on the configuration in the difference configuration item with a non-latest version number, since the operation code in the difference configuration item with the latest version number needs to be executed on the configuration in the difference configuration item with the latest version number later, the edge node will ultimately be based on the difference configuration item with the latest version number. In this way, the previous "execution of the operation code in the difference configuration item with a non-latest version number on the configuration in the difference configuration item with a non-latest version number" is equivalent to an invalid operation, which wastes the system resources of the edge node in vain.
[0096] However, this embodiment does not perform the invalid operation of "executing the operation code in the difference configuration item whose version number is not the latest on the configuration included in the difference configuration item", thereby saving the system resources of the edge node.
[0097] Accordingly, in step S107, when there is no distinguishing configuration item in the historical configuration item set, when storing the distinguishing configuration item in the historical configuration item set, if there is no found distinguishing configuration item in the historical configuration item set, the found distinguishing configuration item is stored in the historical configuration item set.
[0098] Through this embodiment, the difference configuration items with the latest version numbers included in the historical configuration item set are stored, while the difference configuration items with non-latest version numbers (invalid configuration items) included in the historical configuration item set may not be stored in the historical configuration item set, so that the storage space of the edge node can be saved.
[0099] In one embodiment of the present application, there are multiple baseline configuration items. Any two of the multiple baseline configuration items are different, and the difference means that at least one of the configuration, operation code and version number of the two baseline configuration items is different.
[0100] The version numbers in the multiple baseline configuration items are not unique. For example, after deduplication of the version numbers in the multiple baseline configuration items, there are at least two different version numbers. In addition, there may be multiple different configuration items.
[0101] Thus, when the operation code in the difference configuration item is executed on the configuration in the difference configuration item in step S106, it can be detected whether there are at least two difference configuration items with the same configuration and the same version number in the multiple difference configuration items.
[0102] In the present application, the version number of the configuration may be gradually increased, for example, version 1.0, version 2.0, version 3.0, and version 4.0, etc., increasing in sequence. For example, at least two difference configuration items include difference configuration item 1 and difference configuration item 2, the configuration in difference configuration item 1 is the same as the configuration in difference configuration item 2, the version number in difference configuration item 1 is the same as the version number in difference configuration item 2, the version number in difference configuration item 1 is version 2.0, the version number in difference configuration item 2 is version 2.0, and version 2.0 is equal to version 2.0. Therefore, the at least two difference configuration items with the same configuration and the same version number are difference configuration item 1 and difference configuration item 2.
[0103] Then, when there are at least two difference configuration items with the same configuration and the same version number among the multiple difference configuration items, at least two candidate configuration items located in the multiple baseline configuration items are searched among the at least two difference configuration items with the same configuration and the same version number.
[0104] Among the at least two difference configuration items with the same configuration and the same version number, some difference configuration items are located in multiple baseline configuration items, that is, some difference configuration items are the same as some of the baseline configuration items in the multiple baseline configuration items, and other difference configuration items are not located in the multiple baseline configuration items, that is, other difference configuration items are different from all the baseline configuration items in the multiple baseline configuration items.
[0105] It is necessary to search for a different configuration item located in multiple baseline configuration items among at least two different configuration items that have the same configuration and the same version number, and use it as a candidate configuration item.
[0106] If at least two candidate configuration items are found, the position sorting order of each candidate configuration item in the multiple benchmark configuration items is obtained.
[0107] There is a position sorting order between the multiple benchmark configuration items, and the position sorting order between the multiple benchmark configuration items can be specified by the operation and maintenance personnel in the central configuration node according to actual needs.
[0108] For example, before the central configuration node sends multiple benchmark configuration items to the edge node, for any one of the multiple benchmark configuration items, the operation and maintenance personnel can add a sequence field to the benchmark configuration item, and record the position sorting order of the benchmark configuration item in the multiple benchmark configuration items in the sequence field (the position sorting order can be reflected by numbers, for example, the number "1" represents the first position sorting order, the number "2" represents the second position sorting order, the number "3" represents the third position sorting order, and so on. The larger the number, the later the corresponding position sorting order, and the smaller the number, the earlier the corresponding position sorting order). The same is true for each other benchmark configuration item in the multiple benchmark configuration items. Then control the central configuration node to send multiple benchmark configuration items to the edge node.
[0109] In this way, when obtaining the position sorting order of each candidate configuration item in a plurality of reference configuration items, the position sorting order of each candidate configuration item in a plurality of reference configuration items recorded in the sequence field can be obtained.
[0110] Then, among the at least two candidate configuration items, the candidate configuration item with the last position sorting order among the multiple reference configuration items is selected.
[0111] As mentioned above, the order fields in the multiple benchmark configuration items respectively record the position sorting order of the multiple benchmark configuration items through numbers, and the candidate configuration item with the largest number in the order field can be selected and used as the last candidate configuration item in the position sorting order among the multiple benchmark configuration items.
[0112] Then, the operation code in the selected candidate configuration item is executed on the configuration in the selected candidate configuration item.
[0113] In this embodiment, among the at least two different configuration items with the same configuration and the same version number, the time when the operation and maintenance personnel sets the candidate configuration item with the last position sorting order among the multiple benchmark configuration items is often later than the time when the operation and maintenance personnel sets the candidate configuration item with the last position sorting order among the multiple benchmark configuration items. The candidate configuration item with the last position sorting order among the multiple benchmark configuration items is often set by the operation and maintenance personnel according to the current actual needs. In this way, the validity, priority or practicality of the candidate configuration item with the last position sorting order among the multiple benchmark configuration items is greater than the validity, priority or practicality of the candidate configuration item with the last position sorting order among the multiple benchmark configuration items. In this way, among the at least two different configuration items with the same configuration and the same version number, since the configurations and the version numbers are the same, the edge node needs to perform verification based on the candidate configuration item with the last position sorting order among the multiple benchmark configuration items, which can improve the precision or accuracy of the verification configuration.
[0114] In other words, even if the operation code in the candidate configuration item that is not the last in the position sorting order among multiple benchmark configuration items is executed for the configuration in the candidate configuration item that is not the last in the position sorting order among multiple benchmark configuration items, since the operation code in the candidate configuration item that is last in the position sorting order among multiple benchmark configuration items needs to be executed for the configuration in the candidate configuration item that is last in the position sorting order among multiple benchmark configuration items later, the edge node will ultimately be based on the candidate configuration item that is last in the position sorting order among multiple benchmark configuration items. In this way, the previous "execution of the operation code in the candidate configuration item that is not the last in the position sorting order among multiple benchmark configuration items for the configuration in the candidate configuration item that is not the last in the position sorting order among multiple benchmark configuration items" is equivalent to an invalid operation, which wastes the system resources of the edge node in vain.
[0115] However, this embodiment does not perform the invalid operation of "executing the operation code in the candidate configuration item whose position sorting order is not the last among multiple benchmark configuration items on the configuration in the candidate configuration item whose position sorting order is not the last among multiple benchmark configuration items", thereby saving system resources of the edge node.
[0116] Accordingly, in step S107, when there is no distinguishing configuration item in the historical configuration item set, when the distinguishing configuration item is stored in the historical configuration item set, when there is no selected candidate configuration item in the historical configuration item set, the selected candidate configuration item is stored in the historical configuration item set.
[0117] Through this embodiment, the candidate configuration item that is last in the position sorting order among multiple benchmark configuration items is stored in the historical configuration item set, while the candidate configuration item (invalid configuration item) that is not last in the position sorting order among multiple benchmark configuration items may not be stored in the historical configuration item set. In this way, the storage space of the edge node can be saved.
[0118] In one embodiment of the present application, regardless of whether there is one or more baseline configuration items, when obtaining the difference configuration items between the baseline configuration items and the configuration items to be verified in step S105, for any baseline configuration item, if the version number in the baseline configuration item is the same as the version number in one of the configuration items to be verified (the configuration items to be verified may be one or more), the configuration in the baseline configuration item is the same as the configuration in the one of the configuration items to be verified, and the operation code in the baseline configuration item is different from the operation code in the one of the configuration items to be verified, then the baseline configuration item is determined to be a difference configuration item, and the baseline configuration item can be regarded as a difference configuration item. Subsequently, the configuration in the edge node needs to be verified based on the baseline configuration item, instead of verifying the configuration in the edge node based on the one of the configuration items to be verified.
[0119] For example, when the operation code in the difference configuration item is executed on the configuration in the difference configuration item in step S106, the operation code in the baseline configuration item may be executed on the configuration in the baseline configuration item.
[0120] Also, in step S107, when there is no difference configuration item in the historical configuration item set, when storing the difference configuration item in the historical configuration item set, if there is no reference configuration item in the historical configuration item set, the reference configuration item may be stored in the historical configuration item set.
[0121] Secondly, when one of the configuration items to be verified exists in the historical configuration item set, the one of the configuration items to be verified can be deleted from the historical configuration item set to save storage space.
[0122] In one embodiment of the present application, regardless of whether there is one or more baseline configuration items, when obtaining the difference configuration items between the baseline configuration items and the configuration items to be verified in step S105, for any configuration item to be verified, if each baseline configuration item does not simultaneously have the configuration and version number in the configuration item to be verified (the configuration item to be verified may be one or more), then the configuration item to be verified can be regarded as a redundant configuration item, and then in the preset operation code pair, another operation code different from the operation code in the configuration item to be verified can be screened.
[0123] The preset operation code pair has two operation codes, and the two operation codes correspond to different operation modes.
[0124] For example, the two operation codes correspond to opposite operation modes.
[0125] For example, the operation mode corresponding to an operation code is addition. After the edge node executes the operation code on a configuration, the configuration will be added to the edge node. For example, assuming that the configuration is a blacklist IP address, after the edge node executes the operation code on the blacklist IP address, the blacklist IP address will be added to the blacklist in the edge node.
[0126] For another example, the operation mode corresponding to another operation code is deletion. After the edge node executes another operation code on a configuration, the configuration will be deleted in the edge node. For example, assuming that the configuration is a blacklist IP address, after the edge node executes another operation code on the blacklist IP address, the blacklist IP address will be deleted from the blacklist in the edge node.
[0127] Then, another operation code can be used to replace the operation code in the configuration item to be verified to obtain a new configuration item, which is determined as a distinguishing configuration item. Subsequently, the configuration in the edge node needs to be verified based on the new configuration item instead of the configuration item to be verified.
[0128] For example, if the operation mode corresponding to the operation code in the configuration item to be verified is addition, then the operation mode corresponding to the operation code in the new configuration item is deletion.
[0129] For another example, if the operation mode corresponding to the operation code in the configuration item to be verified is deletion, then the operation mode corresponding to the operation code in the new configuration item is addition.
[0130] In the present application, the central configuration node does not perform useless updates, for example, it does not directly update the deletion operation when there is no addition operation. In this way, another operation code can be used to replace the operation code in the configuration item to be verified.
[0131] Alternatively, in another embodiment, the validity of the redundant configuration item that performs the deletion operation may be verified, that is, whether the same configuration has been added before is verified. If so, the redundant configuration item is loaded again.
[0132] For example, when the operation code in the difference configuration item is executed on the configuration in the difference configuration item in step S106, the operation code in the new configuration item may be executed on the configuration in the new configuration item.
[0133] And, in step S107, when there is no distinguishing configuration item in the historical configuration item set, when the distinguishing configuration item is stored in the historical configuration item set, when there is no new configuration item in the historical configuration item set, the new configuration item is stored in the historical configuration item set.
[0134] Secondly, when the configuration item to be verified exists in the historical configuration item set, the configuration item to be verified can be deleted from the historical configuration item set to save storage space.
[0135] In one embodiment of the present application, whether there is one or more reference configuration items, when obtaining the difference configuration items between the reference configuration items and the configuration items to be verified in step S105, for any reference configuration item, if each configuration item to be verified (the configuration item to be verified may be one or more than two) does not have the configuration and version number in the reference configuration item at the same time, the reference configuration item is determined as the difference configuration item. The reference configuration item can be regarded as a missing configuration item, and the configuration in the edge node needs to be verified based on the reference configuration item later.
[0136] For example, when the operation code in the difference configuration item is executed on the configuration in the difference configuration item in step S106, the operation code in the baseline configuration item may be executed on the configuration in the baseline configuration item.
[0137] Also, in step S107, when there is no difference configuration item in the historical configuration item set, when storing the difference configuration item in the historical configuration item set, if there is no reference configuration item in the historical configuration item set, the reference configuration item may be stored in the historical configuration item set.
[0138] In another embodiment of the present application, in the historical configuration item set, detecting whether there are at least two historical configuration items included therein with the same configuration but different version numbers may be performed by regularly detecting whether there are at least two historical configuration items included therein with the same configuration but different version numbers. The regular period may be determined based on actual conditions, and the present application does not impose any limitation on this.
[0139] When there are at least two historical configuration items in the historical configuration item set, a duplicate configuration item is searched in the at least two historical configuration items, where the duplicate configuration item is a configuration item other than the historical configuration item with the latest version number included in the at least two historical configuration items.
[0140] In the historical configuration item set, duplicate configuration items are deleted, so that the configurations in any two configuration items in the historical configuration item set are different.
[0141] Since there is a historical configuration item with the latest version number included in at least two historical configuration items, the configuration items other than the historical configuration item with the latest version number included in the at least two historical configuration items will actually no longer take effect. In this way, in the historical configuration item set, deleting duplicate configuration items can save storage space of the edge node.
[0142] After the subsequent edge node is restarted, it is not necessary to repeatedly load configuration items other than the historical configuration item with the latest version number in the at least two historical configuration items, thereby saving storage resources of the edge node.
[0143] Furthermore, in another embodiment of the present application, if the operation mode corresponding to the operation code in the historical configuration item with the latest version number included in at least two historical configuration items is a deletion operation, then the historical configuration item with the latest version number included in at least two historical configuration items is often an invalid configuration item. Even if the invalid configuration item is loaded after the subsequent edge node is restarted, no valid operation will actually be performed on the configuration in the invalid configuration item, but the system resources of the edge node will be wasted, and time will be wasted.
[0144] Thus, further, in the historical configuration item set, the historical configuration item with the latest version number included in at least two historical configuration items can be deleted, which can save time and system resources of the edge node, and can further save storage space of the edge node.
[0145] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0146] Reference Figure 2 , shows a configuration verification device of the present application, which is applied to an edge node, and the device includes:
[0147] The receiving module 11 is used to receive the benchmark configuration items sent by the central configuration node; the benchmark configuration items include: the benchmark configuration, the operation code corresponding to the benchmark configuration and the version number of the benchmark configuration, and the benchmark configuration is a configuration newly added in the central configuration node;
[0148] The search module 12 is used to search for the configuration item to be verified in the historical configuration item set stored in the edge node, where the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified; the version number in the configuration item to be verified is the same as the version number in the reference configuration item;
[0149] A first acquisition module 13 is used to acquire different configuration items between the reference configuration item and the configuration item to be verified;
[0150] An execution module 14, configured to execute an operation code in a different configuration item on a configuration in the different configuration item;
[0151] The storage module 15 is configured to store the distinguishing configuration item in the historical configuration item set when the distinguishing configuration item does not exist in the historical configuration item set.
[0152] There are multiple baseline configuration items, and the version numbers in the multiple baseline configuration items are not unique; there are multiple difference configuration items;
[0153] The execution module includes:
[0154] A detection unit, configured to detect whether there are at least two different configuration items with the same configuration but different version numbers among the multiple different configuration items;
[0155] a searching unit, configured to search for a different configuration item with the latest version number among the at least two different configuration items with the same configuration but different version numbers, if there are at least two different configuration items with the same configuration but different version numbers among the multiple different configuration items;
[0156] A first execution unit, configured to execute an operation code in the found difference configuration item on the configuration in the found difference configuration item;
[0157] Accordingly, the storage module includes:
[0158] The first storage unit is used to store the found different configuration items in the historical configuration item set when the found different configuration items do not exist in the historical configuration item set.
[0159] Wherein, the first acquisition module includes:
[0160] A first determining unit is configured to, for any one of the benchmark configuration items, determine the benchmark configuration item as a distinguishing configuration item if a version number in the benchmark configuration item is the same as a version number in one of the configuration items to be verified, a configuration in the benchmark configuration item is the same as a configuration in one of the configuration items to be verified, and an operation code in the benchmark configuration item is different from an operation code in one of the configuration items to be verified;
[0161] Accordingly, the execution module includes:
[0162] A second execution unit, configured to execute an operation code in the benchmark configuration item on a configuration in the benchmark configuration item;
[0163] Accordingly, the storage module includes:
[0164] The second storage unit is configured to store the reference configuration item in the historical configuration item set when the reference configuration item does not exist in the historical configuration item set.
[0165] Wherein, the first acquisition module includes:
[0166] a screening unit, for screening, for any configuration item to be verified, another operation code different from the operation code in the configuration item to be verified in a preset operation code pair if each benchmark configuration item does not simultaneously have the configuration and version number in the configuration item to be verified, wherein the preset operation code pair has two operation codes, and the two operation codes respectively correspond to different operation modes;
[0167] The replacing unit is used to replace the operation code in the configuration item to be verified with the other operation code to obtain a new configuration item, and determine the new configuration item as a distinguishing configuration item.
[0168] Accordingly, the execution module includes:
[0169] A third execution unit, configured to execute the operation code in the new configuration item on the configuration in the new configuration item;
[0170] Accordingly, the storage module includes:
[0171] The third storage unit is configured to store the new configuration item in the historical configuration item set when the new configuration item does not exist in the historical configuration item set.
[0172] Wherein, the first acquisition module includes:
[0173] A second determining unit is configured to, for any one benchmark configuration item, determine the benchmark configuration item as a distinguishing configuration item if each configuration item to be verified does not have both the configuration and the version number in the benchmark configuration item;
[0174] Accordingly, the execution module includes:
[0175] a fourth execution unit, configured to execute an operation code in the benchmark configuration item on a configuration in the benchmark configuration item;
[0176] Accordingly, the storage module includes:
[0177] The fourth storage unit is configured to store the reference configuration item in the historical configuration item set if the reference configuration item does not exist in the historical configuration item set.
[0178] The present application implements configuration verification of newly added configurations that need to be verified in the central configuration node by adding operation codes and version numbers to the newly added configurations that need to be verified in the central configuration node. There is no need to sort multiple configurations for each verification, which saves time, improves verification efficiency, has high real-time performance, and saves system resources of edge nodes, avoiding affecting the normal external service provision of edge nodes.
[0179] Reference Figure 3 , shows a configuration verification device of the present application, which is applied to a central configuration node, and the device includes:
[0180] The second acquisition module 21 is used to acquire a benchmark configuration item, wherein the benchmark configuration item includes: a benchmark configuration, an operation code corresponding to the benchmark configuration, and a version number of the benchmark configuration, wherein the benchmark configuration is a configuration newly added in the central configuration node;
[0181] The sending module 22 is used to send the benchmark configuration item to the edge node; so that the edge node receives the benchmark configuration item sent by the central configuration node, and searches for the configuration item to be verified in the historical configuration item set stored in the edge node, wherein the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified, and the version number in the configuration item to be verified is the same as the version number in the benchmark configuration item; obtain the difference configuration item between the benchmark configuration item and the configuration item to be verified; execute the operation code in the difference configuration item on the configuration in the difference configuration item; if the difference configuration item does not exist in the historical configuration item set, store the difference configuration item in the historical configuration item set.
[0182] The present application implements configuration verification of newly added configurations that need to be verified in the central configuration node by adding operation codes and version numbers to the newly added configurations that need to be verified in the central configuration node. There is no need to sort multiple configurations for each verification, which saves time, improves verification efficiency, has high real-time performance, and saves system resources of edge nodes, avoiding affecting the normal external service provision of edge nodes.
[0183] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0184] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0185] Figure 4 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0186] Reference Figure 4 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0187] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0188] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0189] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0190] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also monitor the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0191] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0192] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0193] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can monitor the open / closed state of the device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also monitor the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to monitor the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0194] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (I rDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0195] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0196] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0197] Figure 5 1 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
[0198] Reference Figure 5 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0199] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0200] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0201] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0202] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0203] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0204] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0205] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0206] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0207] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0208] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0209] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A configuration verification method, characterized in that: Applied to an edge node, the method comprises: Receive the benchmark configuration item sent by the central configuration node; the benchmark configuration item includes: the benchmark configuration, the operation code corresponding to the benchmark configuration and the version number of the benchmark configuration, and the benchmark configuration is the configuration newly added in the central configuration node; In the historical configuration item set stored in the edge node, the configuration item to be verified is searched, and the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified; the version number in the configuration item to be verified is the same as the version number in the benchmark configuration item; Obtain the difference configuration items between the baseline configuration items and the configuration items to be verified; Execute the operation code in the difference configuration item on the configuration in the difference configuration item; When there is no distinguishing configuration item in the historical configuration item set, the distinguishing configuration item is stored in the historical configuration item set.
2. The method according to claim 1, characterized in that There are multiple baseline configuration items, and the version numbers in the multiple baseline configuration items are not unique; The difference is that there are multiple configuration items; The step of executing the operation code in the different configuration items on the configurations in the different configuration items includes: Among the multiple different configuration items, detecting whether there are at least two different configuration items included therein having the same configuration but different version numbers; When there are at least two difference configuration items with the same configuration but different version numbers among the multiple difference configuration items, searching for the difference configuration item with the latest version number among the at least two difference configuration items with the same configuration but different version numbers; Execute the operation code in the found difference configuration item for the configuration in the found difference configuration item; Accordingly, when there is no distinguishing configuration item in the historical configuration item set, storing the distinguishing configuration item in the historical configuration item set includes: When the found difference configuration item does not exist in the historical configuration item set, the found difference configuration item is stored in the historical configuration item set.
3. The method according to claim 1, characterized in that The obtaining of the difference configuration items between the reference configuration items and the configuration items to be verified includes: For any one of the reference configuration items, if the version number in the reference configuration item is the same as the version number in one of the configuration items to be verified, the configuration in the reference configuration item is the same as the configuration in one of the configuration items to be verified, and the operation code in the reference configuration item is different from the operation code in one of the configuration items to be verified, then the reference configuration item is determined as a distinguishing configuration item; Accordingly, executing the operation code in the difference configuration item on the configuration in the difference configuration item includes: Execute the operation code in the benchmark configuration item on the configuration in the benchmark configuration item; Accordingly, when there is no distinguishing configuration item in the historical configuration item set, storing the distinguishing configuration item in the historical configuration item set includes: In the case that the reference configuration item does not exist in the historical configuration item set, the reference configuration item is stored in the historical configuration item set.
4. The method according to claim 1, characterized in that The obtaining of the difference configuration items between the reference configuration items and the configuration items to be verified includes: For any configuration item to be verified, if each benchmark configuration item does not have the configuration and version number of the configuration item to be verified at the same time, in the preset operation code pair, another operation code different from the operation code in the configuration item to be verified is selected, and the preset operation code pair has two operation codes, and the two operation codes respectively correspond to different operation modes; Using the other operation code to replace the operation code in the configuration item to be verified to obtain a new configuration item, and determining the new configuration item as a distinguishing configuration item; Accordingly, executing the operation code in the difference configuration item on the configuration in the difference configuration item includes: Execute the operation code in the new configuration item on the configuration in the new configuration item; Accordingly, when there is no distinguishing configuration item in the historical configuration item set, storing the distinguishing configuration item in the historical configuration item set includes: In the case that the new configuration item does not exist in the historical configuration item set, the new configuration item is stored in the historical configuration item set.
5. The method according to claim 1, characterized in that: The obtaining of the difference configuration items between the reference configuration items and the configuration items to be verified includes: For any benchmark configuration item, if each configuration item to be verified does not have both the configuration and version number in the benchmark configuration item, the benchmark configuration item is determined as a distinguishing configuration item; Accordingly, executing the operation code in the difference configuration item on the configuration in the difference configuration item includes: Execute the operation code in the benchmark configuration item on the configuration in the benchmark configuration item; Accordingly, when there is no distinguishing configuration item in the historical configuration item set, storing the distinguishing configuration item in the historical configuration item set includes: In the case that the reference configuration item does not exist in the historical configuration item set, the reference configuration item is stored in the historical configuration item set.
6. A configuration verification method, characterized in that: Applied to a central configuration node, the method comprises: Obtaining a baseline configuration item, which includes: a baseline configuration, an operation code corresponding to the baseline configuration, and a version number of the baseline configuration. The baseline configuration is a configuration newly added in the central configuration node; Send the baseline configuration item to the edge node; so that the edge node receives the baseline configuration item sent by the central configuration node, and searches for the configuration item to be verified in the historical configuration item set stored in the edge node, wherein the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified, and the version number in the configuration item to be verified is the same as the version number in the baseline configuration item; obtain the difference configuration item between the baseline configuration item and the configuration item to be verified; execute the operation code in the difference configuration item on the configuration in the difference configuration item; if the difference configuration item does not exist in the historical configuration item set, store the difference configuration item in the historical configuration item set.
7. A configuration verification device, characterized in that: Applied to an edge node, the device comprises: A receiving module, used to receive a benchmark configuration item sent by a central configuration node; the benchmark configuration item includes: a benchmark configuration, an operation code corresponding to the benchmark configuration, and a version number of the benchmark configuration, and the benchmark configuration is a configuration newly added in the central configuration node; A search module is used to search for a configuration item to be verified in a set of historical configuration items stored in the edge node, wherein the configuration item to be verified includes: the configuration to be verified, the operation code corresponding to the configuration to be verified, and the version number of the configuration to be verified; the version number in the configuration item to be verified is the same as the version number in the benchmark configuration item; A first acquisition module is used to acquire the difference configuration items between the reference configuration items and the configuration items to be verified; An execution module, used for executing the operation code in the difference configuration item on the configuration in the difference configuration item; The storage module is used to store the distinguishing configuration item in the historical configuration item set when the distinguishing configuration item does not exist in the historical configuration item set.
8. A configuration verification device, characterized in that: Applied to a central configuration node, the device comprises: A second acquisition module is used to acquire a benchmark configuration item, wherein the benchmark configuration item includes: a benchmark configuration, an operation code corresponding to the benchmark configuration, and a version number of the benchmark configuration, wherein the benchmark configuration is a configuration newly added in the central configuration node; A sending module is used to send a baseline configuration item to an edge node; so that the edge node receives the baseline configuration item sent by the central configuration node, and searches for a configuration item to be verified in a set of historical configuration items stored in the edge node, wherein the configuration item to be verified includes: a configuration to be verified, an operation code corresponding to the configuration to be verified, and a version number of the configuration to be verified, wherein the version number in the configuration item to be verified is the same as the version number in the baseline configuration item; obtains a difference configuration item between the baseline configuration item and the configuration item to be verified; executes the operation code in the difference configuration item on the configuration in the difference configuration item; and stores the difference configuration item in the set of historical configuration items when the difference configuration item does not exist in the set of historical configuration items.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 6 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
File configuration method and device based on distributed file edge nodes
CN112286898A
Configuration file verification method and device, storage medium and electronic equipment
CN116436784A
Method for verifying configuration consistency between controller and network element in SDN (Software Defined Network)
CN118714009A