Configuration verification method and device, storage medium and electronic equipment
By obtaining target configuration information from the configuration management center and performing automated verification, the problem of low efficiency in configuration change verification is solved, and an efficient and accurate configuration verification process is achieved.
Patent Information
- Application Number
- CN202511140249.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-07
AI Technical Summary
In existing technologies, configuration change verification mainly relies on manual inspection, which leads to low efficiency and is prone to errors.
By obtaining the changed target configuration information from the configuration management center, determining that the verification method is incremental verification, identifying multiple service modules associated with the target configuration information, and performing automated verification on these modules, including shadow testing and service activation testing, the target verification results are generated.
It improves the efficiency and accuracy of configuration verification, reduces the tediousness and inefficiency of manual checks, and lowers the possibility of human error.
Smart Images

Figure CN120915667A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of financial technology, in particular to a configuration verification method and device, a storage medium and an electronic device. BACKGROUND
[0002] In highly complex distributed systems, configuration management has become a key link to ensure system stability and efficient operation. In particular, in the field of financial services, the accuracy and real-time performance of configuration directly affect transaction security and user experience. However, the existing technology has significant deficiencies in the face of configuration change verification. Traditional configuration change verification mainly relies on manual inspection, and manual review not only consumes time and effort, but also reduces the accuracy and efficiency of verification due to negligence or omission.
[0003] In view of the problem in the related art that the configuration verification is relatively low in efficiency by means of manual inspection after the configuration change is released, no effective solution has been proposed so far. SUMMARY
[0004] The main purpose of the present application is to provide a configuration verification method and device, a storage medium and an electronic device to solve the problem in the related art that the configuration verification is relatively low in efficiency by means of manual inspection after the configuration change is released.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a configuration verification method is provided. The method comprises: obtaining target configuration information after change from a configuration management center; determining whether the configuration verification mode is an incremental verification mode; if the configuration verification mode is the incremental verification mode, determining a plurality of target service modules associated with the target configuration information; verifying the plurality of target service modules to obtain a target verification result.
[0006] Further, determining the plurality of target service modules associated with the target configuration information comprises: obtaining a configuration push log of the configuration management center; determining a propagation path of the target configuration information according to the configuration push log; and determining the plurality of target service modules according to the propagation path.
[0007] Further, determining the plurality of target service modules according to the propagation path comprises: determining a plurality of first service modules having a direct dependency relationship with the target configuration information according to the propagation path; determining a plurality of second service modules having an indirect dependency relationship with the target configuration information according to a service call chain of the plurality of first service modules; and determining the plurality of target service modules according to the plurality of first service modules and the plurality of second service modules.
[0008] Further, the verifying the plurality of target service modules to obtain a target verification result comprises: determining whether the target configuration information comprises environment configuration information; if the target configuration information comprises the environment configuration information, verifying the environment configuration information according to the environment configuration information corresponding to the plurality of target service modules to obtain a first verification result; testing the plurality of target service modules in an updated environment and an original environment corresponding to the target configuration information to obtain a first test result, and obtaining a second verification result according to the first test result; and obtaining the target verification result according to the first verification result and the second verification result.
[0009] Further, the testing the plurality of target service modules to obtain a first test result comprises: performing shadow testing on each target service module to obtain a first test subresult; performing service liveness testing on each target service module to obtain a second test subresult; and obtaining the first test result according to the first test subresult and the second test subresult.
[0010] Further, the obtaining the changed target configuration information from the configuration management center comprises: obtaining current full-amount configuration information from the configuration management center; obtaining baseline configuration information matched with the current full-amount configuration information; and obtaining the changed target configuration information according to the current full-amount configuration information and the baseline configuration information.
[0011] Further, after determining whether the configuration verification mode is an incremental verification mode, the method further comprises: if the configuration verification mode is a full-amount verification mode, determining a service module corresponding to the configuration management center; testing the service module corresponding to the configuration management center to obtain a second test result; and obtaining the target verification result according to the second test result.
[0012] To achieve the above object, according to another aspect of the present application, a configuration verification device is provided. The device comprises: an obtaining unit configured to obtain changed target configuration information from a configuration management center; a determining unit configured to determine whether a configuration verification mode is an incremental verification mode; a first determining unit configured to determine a plurality of target service modules associated with the target configuration information if the configuration verification mode is the incremental verification mode; and a verifying unit configured to verify the plurality of target service modules to obtain a target verification result.
[0013] Further, the determining unit comprises: a first obtaining module configured to obtain a configuration push log of the configuration management center; a first determining module configured to determine a propagation path of the target configuration information according to the configuration push log; and a second determining module configured to determine the plurality of target service modules according to the propagation path.
[0014] Further, the second determining module comprises: a first determining submodule, configured to determine, according to the propagation path, a plurality of first service modules having a direct dependency relationship with the target configuration information; a second determining submodule, configured to determine, according to a service call chain of the plurality of first service modules, a plurality of second service modules having an indirect dependency relationship with the target configuration information; and a third determining submodule, configured to determine the plurality of target service modules according to the plurality of first service modules and the plurality of second service modules.
[0015] Further, the verifying unit comprises: a judging module, configured to judge whether the target configuration information comprises environment configuration information; a verifying module, configured to, if the target configuration information comprises the environment configuration information, verify the environment configuration information according to the environment configuration information corresponding to the plurality of target service modules to obtain a first verifying result; a testing module, configured to test the plurality of target service modules in an updated environment and an original environment corresponding to the target configuration information to obtain a first testing result, and obtain a second verifying result according to the first testing result; and a third determining module, configured to obtain the target verifying result according to the first verifying result and the second verifying result.
[0016] Further, the testing module comprises: a first testing submodule, configured to perform shadow testing on each target service module to obtain a first testing subresult; a second testing submodule, configured to perform service liveness testing on each target service module to obtain a second testing subresult; and a fourth determining submodule, configured to obtain the first testing result according to the first testing subresult and the second testing subresult.
[0017] Further, the obtaining unit comprises: a second obtaining module, configured to obtain current full-amount configuration information from the configuration management center; a third obtaining module, configured to obtain baseline configuration information matched with the current full-amount configuration information; and a fourth determining module, configured to obtain the changed target configuration information according to the current full-amount configuration information and the baseline configuration information.
[0018] Further, the apparatus further comprises: a second determining unit, configured to, after judging whether the configuration verifying mode is an incremental verifying mode, determine a service module corresponding to the configuration management center if the configuration verifying mode is a full-amount verifying mode; a testing unit, configured to test the service module corresponding to the configuration management center to obtain a second testing result; and a third determining unit, configured to obtain the target verifying result according to the second testing result.
[0019] According to another aspect of the embodiment of the present application, an electronic device is further provided, comprising: a memory storing an executable program; and a processor configured to run the program, wherein the program is configured to execute the configuration verifying method according to any one of the above.
[0020] According to another aspect of the embodiments of the present application, there is also provided a computer readable storage medium storing a program, wherein the program controls a device where the storage medium is located to perform the configuration verification method of any one of the above when the program is run.
[0021] In the embodiments of the present application, the following steps are adopted: obtaining the changed target configuration information from the configuration management center; judging whether the configuration verification mode is the incremental verification mode; if the configuration verification mode is the incremental verification mode, determining a plurality of target service modules associated with the target configuration information; and verifying the plurality of target service modules to obtain the target verification result, thereby solving the technical problem of low efficiency of configuration verification caused by manual checking after the configuration change is published in the related art.
[0022] In the present solution, the changed target configuration information is obtained from the configuration management center, and it is judged whether the configuration verification adopts the incremental verification mode, if the verification mode is determined to be the incremental verification, a plurality of service modules associated with the target configuration information are determined, and finally the target service modules determined are automatically tested to obtain the target verification result, through automatic information acquisition and verification decision, and accurate positioning of the affected service modules, the verification time and workload are reduced, the tediousness and inefficiency of manual checking are avoided, and the configuration verification efficiency is significantly improved. The automatic verification process eliminates the possibility of human error, and further achieves the technical effect of improving the accuracy of configuration verification. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and are used to interpret the illustrative embodiments of the present application and their descriptions, and do not constitute improper limitations to the present application. In the drawings:
[0024] Figure 1 Fig. 1 shows a hardware structure block diagram of a computer terminal for implementing the configuration verification method;
[0025] Figure 2 Fig. 2 is a flowchart of the configuration verification method according to the embodiments of the present application;
[0026] Figure 3 Fig. 3 is a schematic diagram of the configuration verification method according to the embodiments of the present application;
[0027] Figure 4 Fig. 4 is a schematic diagram of the configuration verification device according to the embodiments of the present application;
[0028] Figure 5 Fig. 5 is a structure block diagram of an electronic device according to the embodiments of the present application. DETAILED DESCRIPTION
[0029] In order to enable personnel in the technical field to better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal. For example, the system and the interface between the related users or institutions provide the user with a corresponding operation portal for the user to choose to agree or refuse the automatic decision result; if the user chooses to refuse, the expert decision process is entered.
[0032] Embodiment 1
[0033] According to the embodiments of the present application, a method for configuration verification is also provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0034] The method embodiment provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a configuration verification method is shown. As shown inFigure 1 As shown, the computer terminal 10 (or mobile device) can include one or more processors 102 (the processor 102 can include, but not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can further include more or less components than those shown in the figure, or have a different configuration from that shown in the figure. Figure 1 For example, the computer terminal 10 can further include more or less components than those shown in the figure, or have a different configuration from that shown in the figure. Figure 1 For example, the computer terminal 10 can further include more or less components than those shown in the figure, or have a different configuration from that shown in the figure.
[0035] It should be noted that the one or more processors 102 and / or other data processing circuits described above can be referred to as "data processing circuits" herein. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any combination thereof. In addition, the data processing circuit can be a single independent processing module, or any one of the other elements combined into the computer terminal 10 (or mobile device) in whole or in part. As referred to in the embodiments of the present application, the data processing circuit serves as a processor to control (for example, selection of a variable resistance terminal path connected to an interface).
[0036] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the configuration verification method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the configuration verification method described above. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory remotely disposed with respect to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet via a wireless manner.
[0038] The display can be a liquid crystal display (LCD) that is touch screen type, for example, which can enable a user to interact with a user interface of the computer terminal 10 (or a mobile device).
[0039] In the above operating environment, the present application provides a configuration verification method as shown in Figure 2 Figure 2 is a flowchart of the configuration verification method according to an embodiment of the present application. The configuration verification method includes the following steps:
[0040] In step S201, the changed target configuration information is obtained from a configuration management center.
[0041] Optionally, in a distributed system, the configuration management center plays a key role in storing and distributing the configuration information of an application, so that the configuration can be consistent in multiple servers and environments. When the configuration is changed, the center records the changes and provides an interface for an application or a verification system to query the latest configuration status. In the embodiment of the present application, the changed target configuration information is obtained from the configuration management center. For example, the latest configuration data can be obtained by calling an API of the configuration management center or using a data synchronization mechanism provided by the configuration management center. It should be noted that the target configuration information refers to the configuration information that needs to be verified after the change. The configuration information can be a configuration item related to a single or multiple namespaces (Namespace) and different environments (such as development, testing, and production).
[0042] In step S202, it is determined whether the configuration verification mode is an incremental verification mode.
[0043] Optionally, in the verification process of configuration changes, it is determined whether the verification mode is full verification or incremental verification. Full verification refers to a comprehensive check of the entire configuration set, regardless of whether there are changes. This mode provides the highest degree of verification coverage, but can be time-consuming and resource-intensive, especially when the number of configuration items is large. Incremental verification, on the other hand, focuses on recent changes and only verifies those configuration items that have been modified, added, or deleted, as well as the service modules they directly affect. This approach can significantly reduce the workload and time consumption of verification while ensuring the effectiveness of verification.
[0044] After obtaining the target configuration information, the scope and impact of the changes are analyzed to determine whether full verification or incremental verification is adopted. Generally speaking, for small-scale configuration updates, incremental verification is more efficient; for large-scale configuration adjustments or system architecture changes, full verification is generally selected to ensure the consistency and correctness of all configurations.
[0045] By selecting incremental verification, repeated checks of unmodified configuration items are avoided, significantly shortening the verification period. Especially for frequently changing environments, the effectiveness of the changed configuration can be quickly located and verified, reducing unnecessary resource occupation.
[0046] Step S203, if the configuration verification mode is incremental verification, determine a plurality of target service modules associated with the target configuration information.
[0047] Optionally, in a distributed system, configuration changes often affect multiple service modules, and the scope of influence may directly or indirectly span multiple levels and components. When the configuration verification mode is determined to be incremental verification, the target configuration information is analyzed in depth to determine all associated service modules. For example, static code analysis: checking the code base of the service to find code fragments or dependencies related to the changed configuration item to identify directly affected service modules. Service call chain tracking: analyze the call relationship between services to identify other services that may be indirectly affected by configuration changes by tracking the call chain. Configuration push log: use the push log of the configuration management center to understand which service instances receive the new configuration after the configuration change, and thus determine the affected modules.
[0048] By accurately identifying the affected service modules, repeated verification of modules not affected by the changes is avoided, greatly improving verification efficiency and reducing resource consumption.
[0049] Step S204, verifying the plurality of target service modules to obtain a target verification result.
[0050] Optionally, after determining the plurality of target service modules, the plurality of target service modules are verified, for example, a lightweight ping request is initiated to the target service modules, such as a health check interface, to quickly verify whether the basic state of the service after the configuration is loaded is normal, that is, whether the service can be normally started and responded, and then the target verification result is obtained.
[0051] In an optional embodiment, in the configuration management center, when the developer modifies the configuration of a certain namespace and publishes it, the automated verification system will respond immediately to obtain the latest configuration information from the configuration management center. The system will check which configuration items are modified, and then determine which service modules are directly associated with the modified configuration items and other modules indirectly affected through the service call chain. Finally, the system verifies these service modules to ensure the correctness and safety of the configuration change, providing a guarantee for the stable operation of the system, which can significantly improve the efficiency and reliability of configuration management.
[0052] In summary, the changed target configuration information is obtained from the configuration management center, and it is determined whether the configuration verification adopts the incremental verification mode. If the verification mode is determined to be incremental verification, a plurality of service modules associated with the target configuration information are determined, and finally the target service modules are automatically tested to obtain the target verification result. Through automated information acquisition and verification decision, and accurate positioning of the affected service modules, the verification time and workload are reduced, avoiding the tediousness and inefficiency of manual inspection, and the efficiency of configuration verification is significantly improved. The automated verification process eliminates the possibility of human error, thereby achieving the technical effect of improving the accuracy of configuration verification.
[0053] Optionally, in the configuration verification method provided in the embodiments of the present application, determining the plurality of target service modules associated with the target configuration information comprises: obtaining a configuration push log of the configuration management center; determining a propagation path of the target configuration information according to the configuration push log; and determining the plurality of target service modules according to the propagation path.
[0054] In an optional embodiment, the configuration management center not only stores configuration information, but also records the change history and push log of the configuration. These logs record in detail when and who modified the configuration, and how the modified configuration is distributed to each service module. Therefore, the configuration push log is obtained, and the configuration push log contains key information of configuration propagation, including the changed configuration item, the specific content of the change, and the target service instance of the configuration push. By analyzing the configuration push log, a propagation path map of the target configuration information is constructed, which intuitively shows how the configuration is gradually diffused from the center to the service modules. Finally, the plurality of target service modules are identified based on the propagation path.
[0055] By accurately tracking the propagation path of configuration changes, the focus can be on the truly affected service modules rather than blindly verifying all modules in full, improving the relevance and efficiency of verification work.
[0056] Optionally, in the configuration verification method provided by the embodiments of the present application, determining the plurality of target service modules according to the propagation path comprises: determining a plurality of first service modules having a direct dependency relationship with the target configuration information according to the propagation path; determining a plurality of second service modules having an indirect dependency relationship with the target configuration information according to a service call chain of the plurality of first service modules; and determining the plurality of target service modules according to the plurality of first service modules and the plurality of second service modules.
[0057] In an optional embodiment, after the configuration change, the service modules directly dependent on the target configuration information will be immediately affected, and these modules are usually application instances that directly respond to configuration modification. The configuration push log can clearly show how the configuration information is propagated from the center to each service instance, and by analyzing the log, it can quickly lock which service instances are the direct recipients of the configuration change, i.e. the first service modules.
[0058] In a distributed system, services are usually connected through complex call chains, and a configuration change of a service may indirectly affect other services on the call chain. Therefore, after determining the first service modules that have a direct dependency, it is necessary to further analyze the service call chain to identify the second service modules that may be indirectly affected. For example, using existing service call chain data or real-time call chain tracking technology, it is analyzed which downstream services have a call relationship with the first service modules.
[0059] Finally, the plurality of first service modules and the plurality of second service modules are determined as the plurality of target service modules.
[0060] By determining the target service modules through the propagation path and the service call chain, the comprehensiveness and relevance of the verification are ensured, the resource utilization efficiency is improved, the problem positioning is accelerated, and finally the stability and reliability of the system are improved. At the same time, the automated and intelligent verification process reduces the uncertainty caused by human factors, making the configuration verification more efficient and reliable.
[0061] Optionally, in the configuration verification method provided in the embodiments of the present application, verifying the plurality of target service modules to obtain a target verification result comprises: judging whether the target configuration information comprises environment configuration information; if the target configuration information comprises environment configuration information, verifying the environment configuration information according to the environment configuration information corresponding to the plurality of target service modules to obtain a first verification result; testing the plurality of target service modules in an updated environment corresponding to the target configuration information and an original environment, obtaining a first test result, and obtaining a second verification result according to the first test result; and obtaining the target verification result according to the first verification result and the second verification result.
[0062] In an optional embodiment, in a distributed system, environment configuration information (such as system variables, middleware versions, database connections, network settings, etc.) is crucial for the correct operation of services. These configurations may vary according to different environments (development, testing, production, etc.), so when verifying configuration changes, it is first necessary to determine whether the changes contain environment configuration information. This step can help the verification process to be more focused and targeted.
[0063] If the target configuration change does contain environment configuration information, the environment configuration information is verified according to the environment configuration information (declared environment conditions) corresponding to the plurality of target service modules, to obtain a first verification result. For example, a unique identifier (such as ENV_PROD_XSQ1) is defined for each operating environment, including environment type (DEV / TEST / PROD), deployment area, service version, and other metadata. The @EnvBinding tag is embedded in the comments of the configuration item, declaring the allowed environment conditions (such as @EnvBinding: env_type=PROD®ion=XSQ1). In the configuration loading stage, the @EnvBinding tag of the configuration item is parsed, and logical operation (AND / OR) is performed with the metadata of the current environment (i.e., the environment configuration information corresponding to the target service modules described above), to block illegal configuration injection.
[0064] In order to comprehensively evaluate the impact of configuration changes, the target service modules will also be tested in the updated environment after the configuration change and the original environment before the change to obtain a second verification result. This comparative test can evaluate the behavior differences of the service under different configuration states, helping to identify functional abnormalities or performance degradation that may be caused by configuration changes. The final verification result (target verification result) is obtained by combining the first verification result (environment configuration information verification result) and the second verification result (function and performance test result). The target verification result not only reflects the direct impact of configuration changes on environment configuration, but also considers the overall impact of changes on service function and performance, providing complete and accurate configuration change verification feedback for development and operation teams.
[0065] By verifying the environment configuration information in the target configuration information in a step-by-step manner, and comprehensively testing the target service module in the update environment and the original environment, an accurate and comprehensive verification result can be obtained, and the correctness and reliability of the configuration change in the environment adaptability, service functionality and performance can be ensured.
[0066] Optionally, in the configuration verification method provided in the embodiments of the present application, the testing of the plurality of target service modules to obtain the first test result comprises: performing shadow testing on each target service module to obtain a first test sub-result; performing service liveness testing on each target service module to obtain a second test sub-result; and obtaining the first test result according to the first test sub-result and the second test sub-result.
[0067] In an optional embodiment, in the process of configuration change verification, in order to ensure the accuracy of the change and the impact on the service, shadow testing and lightweight service liveness testing are used to comprehensively evaluate each target service module, and finally the first test result is generated. Shadow testing is a testing method that runs the service module under the new configuration in parallel with the module under the old configuration without interfering with the production traffic, and compares the output results and performance indicators of the two. Through shadow testing, the logic consistency can be verified: it is ensured that the logic processing of the service under the new configuration remains consistent with the old configuration, and no functional abnormalities are introduced. The performance impact is checked: the service performance under the new and old configurations is compared to check whether there is a performance decline or other performance-related problems. The first test sub-result will record the comparison results of the shadow testing in detail, including but not limited to functional differences, performance data, etc.
[0068] Service liveness testing is a lightweight health check that sends a simple request to the service module to check whether it can normally respond and process the request. This test is usually fast to execute and can quickly feedback the basic running state of the service module. The purpose is to confirm service availability: it is ensured that the service module can normally start under the new configuration, receive and process requests, and there is no situation of service unavailability. Detect transient exceptions: capture the abnormal state that may appear temporarily after the configuration change, such as instability in the initial stage of service startup. The second test sub-result contains basic information such as response time, status code of service liveness testing, and whether there is any abnormal state.
[0069] The final first test result integrates the results of shadow testing and liveness testing, for example, including the functional consistency result based on shadow testing, performance comparison data, and the response of service liveness testing, which confirms the basic health status of the service.
[0070] The combination of shadow testing and service probe testing ensures the verification of the logic, performance and service state of the service module, and the double-track verification strategy of shadow testing and probe testing can efficiently and comprehensively test the target service module, ensuring the correctness of the configuration change and reducing the risk caused by configuration errors.
[0071] Optionally, in the configuration verification method provided in the embodiments of the present application, obtaining the changed target configuration information from the configuration management center comprises: obtaining current full-amount configuration information from the configuration management center; obtaining baseline configuration information matched with the current full-amount configuration information; and obtaining the changed target configuration information according to the current full-amount configuration information and the baseline configuration information.
[0072] In an optional embodiment, in a distributed system, the configuration management center stores all configuration information of the entire system. When it is necessary to verify the configuration change, first, the current full-amount configuration information is obtained from the configuration management center, which includes the configuration data of all namespaces, whether or not participating in this change. The full-amount configuration information is obtained to provide complete basic data for subsequent comparative analysis and verification work, ensuring that the verification process can cover all configuration states of the system.
[0073] By comparing the current full-amount configuration information with the baseline configuration information, it can be identified which configuration items are newly added, which are modified, and which are deleted. Based on these differences, the changed target configuration information, i.e., the actual affected configuration set of this configuration change, is obtained. This information is the core of the verification work, which clearly defines the scope and focus of the verification.
[0074] By comparing the current full-amount configuration information with the baseline configuration information, the scope of the configuration change can be accurately identified, avoiding invalid verification of unchanged configurations and improving the efficiency and pertinence of the verification.
[0075] Optionally, in the configuration verification method provided in the embodiments of the present application, after determining whether the configuration verification mode is an incremental verification mode, the method further comprises: if the configuration verification mode is a full-amount verification mode, determining a service module corresponding to the configuration management center; testing the service module corresponding to the configuration management center to obtain a second test result; and obtaining a target verification result according to the second test result.
[0076] In an optional embodiment, in the configuration change verification process, the system first needs to determine which verification mode to adopt. Incremental verification focuses on the configuration items of the last change, and is suitable for small-scale or specific-demand change verification; while full-amount verification covers all configuration information of the configuration center, whether or not any change has occurred, and is suitable for large-scale, complex or uncertain-range configuration changes.
[0077] When the configuration verification method is determined to be full verification, all service modules corresponding to the configuration management center are identified. This includes all services in the system that directly or indirectly depend on the configuration information of the configuration management center. Under the full verification method, all service modules will become the objects of verification to ensure the consistency and correctness of the system configuration.
[0078] A comprehensive testing process will be conducted on the identified service modules, including but not limited to functional testing, performance testing, and environmental adaptability testing. These tests aim to verify: whether configuration information is correctly loaded into the service modules; whether configuration changes affect service behavior as expected; and whether the performance and stability of the service meet requirements after configuration changes. Upon completion of the tests, a second set of test results will be obtained, detailing the test status and performance of each service module.
[0079] Finally, the overall effect of the configuration change is comprehensively evaluated based on the results of the second test, forming the target verification result. The target verification result reflects the impact of the configuration change on all service modules in the system, the correctness of its functionality, and the stability of its performance. By analyzing the test results of all service modules, the safety and effectiveness of the configuration change can be ensured, avoiding system-level risks.
[0080] The full verification method ensures that all service modules in the system are tested, improving the comprehensiveness of verification and reducing the risks introduced by unverified service modules.
[0081] In an alternative embodiment, it can be achieved through, as follows: Figure 3 The diagram illustrates configuration verification. First, it identifies configuration changes, which can be achieved through the configuration management center's change notification mechanism or periodic configuration checks. Next, it determines the verification method: based on the nature and scope of the configuration change, it decides whether to use full verification or incremental verification. Incremental verification only applies to the most recently modified configuration items, while full verification covers all configuration information in the configuration management center. Finally, it retrieves the configuration information: all configuration information is retrieved and compared with the baseline configuration information to determine the target configuration information after the change.
[0082] Identify the target service modules: Identify the first service module that directly depends on the target configuration information. Analyze the service call chain of the first service module to find the second service module that indirectly depends on the target configuration information. Combine the first and second service modules to determine the final set of target service modules.
[0083] Perform configuration verification: Conduct shadow testing and liveness testing on target service modules. Shadow testing: Run new and old configurations in parallel and compare results to detect differences in functionality and performance. Liveness testing: Send lightweight requests to service modules to check if the service is in a normal state after configuration changes. Environment configuration information verification: For changes involving environment configuration, ensure that the configuration matches the running environment. Generate verification report: Aggregate the results of shadow testing, liveness testing, and environment configuration verification. Visualize the test results with different color markings to highlight the scope of configuration changes and potential problem points. Abnormal handling and optimization suggestions: Based on the verification report, the system may provide abnormal handling strategies and automated repair suggestions to assist operations personnel in quickly solving problems.
[0084] Suppose a financial institution is conducting a work involving configuration changes, specifically changing the timeout time and retry strategy of a payment service. Here's an example of how to use the technical solution of the invention to verify: Configuration change identification: The configuration management center change notification mechanism triggers, informing the system that part of the configuration of the payment service has changed. Determine the verification method: Since this change only involves part of the payment service configuration, it is decided to use incremental verification. Obtain configuration information: Grab the recently changed payment service configuration information from the configuration management center, as well as the baseline configuration before the change, for comparative analysis.
[0085] Determine target service modules: Identify the payment service as the first service module. Analyze the call chain of the payment service and find that it is closely related to transaction records, user account updates, and other services, so these services are considered as the second service module. Determine the payment service and the services on its call chain as the final target service modules.
[0086] Perform configuration verification: Shadow testing: Run the new and old timeout time and retry strategy in parallel in an isolated environment, compare transaction success rate and processing time. Liveness testing: Send health check requests to the payment service and associated services to verify that the services respond normally after configuration loading. Environment configuration information verification: Check the cluster environment parameters of the payment service, such as JDK version, network delay, etc., to ensure that these parameters are compatible with the new configuration.
[0087] Generate verification report: Aggregate the change details, shadow testing comparison results, service liveness status, and environment configuration verification results, and generate a report in the Namespace dimension, highlighting the changed items with different colors, such as green for no problem, yellow for attention, and red for abnormality.
[0088] Abnormal handling and optimization suggestions: Based on the abnormalities in the verification report, the system automatically suggests adjusting environment parameters or guiding operations personnel to manually check specific configuration items, thereby quickly fixing problems.
[0089] Through the above process, the Agricultural Bank of China can quickly verify the effectiveness and security of the payment service configuration change, reduce the burden of manual verification, improve the commissioning efficiency of configuration change, and ensure the stable operation of the distributed system after configuration update.
[0090] The configuration verification method provided in the embodiments of the present application obtains the target configuration information changed from the configuration management center; determines whether the configuration verification mode is an incremental verification mode; if the configuration verification mode is the incremental verification mode, determines a plurality of target service modules associated with the target configuration information; and verifies the plurality of target service modules to obtain a target verification result, thereby solving the technical problem in the related art that the configuration verification is implemented by manual checking after the configuration change is published, resulting in relatively low efficiency of configuration verification.
[0091] In the present scheme, the target configuration information changed is obtained from the configuration management center, and it is determined whether the configuration verification adopts the incremental verification mode. If the verification mode is determined to be incremental verification, a plurality of service modules associated with the target configuration information are determined, and finally the target service modules determined are automatically tested to obtain a target verification result. Through automatic information acquisition and verification decision and accurate positioning of the affected service modules, the verification time and workload are reduced, the tediousness and inefficiency of manual checking are avoided, and the efficiency of configuration verification is significantly improved. The automatic verification process eliminates the possibility of human error, thereby achieving the technical effect of improving the accuracy of configuration verification.
[0092] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0093] Embodiment 2
[0094] The embodiments of the present application also provide a configuration verification device. It should be noted that the configuration verification device of the embodiments of the present application can be used to execute the configuration verification method provided by the embodiments of the present application. The configuration verification device provided by the embodiments of the present application is introduced as follows.
[0095] According to the embodiments of the present application, a device for implementing the above configuration verification method is also provided, as shown in Figure 4 The device includes an obtaining unit 401, a determining unit 402, a first determining unit 403, and a verifying unit 404.
[0096] The obtaining unit 401 is configured to obtain target configuration information changed from a configuration management center;
[0097] The determining unit 402 is configured to determine whether the configuration verification mode is an incremental verification mode. The first determining unit 403 is configured to determine a plurality of target service modules associated with the target configuration information if the configuration verification mode is the incremental verification mode. The verifying unit 404 is configured to verify the plurality of target service modules to obtain a target verification result.
[0098] The first determination unit 403 is configured to determine a plurality of target service modules associated with the target configuration information if the configuration verification mode is the incremental verification mode.
[0099] The verification unit 404 is configured to verify the plurality of target service modules to obtain a target verification result.
[0100] The configuration verification apparatus provided in the embodiments of the present application obtains the changed target configuration information from the configuration management center through the obtaining unit 401; the judging unit 402 judges whether the configuration verification mode is the incremental verification mode; the first determination unit 403 determines a plurality of target service modules associated with the target configuration information if the configuration verification mode is the incremental verification mode; and the verification unit 404 verifies the plurality of target service modules to obtain a target verification result, thereby solving the technical problem that the configuration verification is implemented in a manual checking manner after the configuration change is published, resulting in a relatively low efficiency of the configuration verification.
[0101] In the present scheme, the changed target configuration information is obtained from the configuration management center, and it is judged whether the configuration verification adopts the incremental verification mode. If the verification mode is determined to be the incremental verification, a plurality of service modules associated with the target configuration information are determined, and finally the target service modules determined are automatically tested to obtain a target verification result. Through automatic information acquisition and verification decision, and accurate positioning of the affected service modules, the verification time and workload are reduced, the tediousness and inefficiency of manual checking are avoided, and the efficiency of the configuration verification is significantly improved. The automatic verification process eliminates the possibility of human error, and further achieves the technical effect of improving the accuracy of the configuration verification.
[0102] Optionally, in the configuration verification apparatus provided in the embodiments of the present application, the determination unit comprises: a first obtaining module configured to obtain a configuration push log of the configuration management center; a first determination module configured to determine a propagation path of the target configuration information according to the configuration push log; and a second determination module configured to determine the plurality of target service modules according to the propagation path.
[0103] Optionally, in the configuration verification apparatus provided in the embodiments of the present application, the second determination module comprises: a first determination submodule configured to determine a plurality of first service modules having a direct dependency relationship with the target configuration information according to the propagation path; a second determination submodule configured to determine a plurality of second service modules having an indirect dependency relationship with the target configuration information according to a service call chain of the plurality of first service modules; and a third determination submodule configured to determine the plurality of target service modules according to the plurality of first service modules and the plurality of second service modules.
[0104] Optionally, in the configuration verification device provided in the embodiments of the present application, the verification unit comprises: a judging module, configured to judge whether the target configuration information comprises environment configuration information; a verification module, configured to, if the target configuration information comprises environment configuration information, verify the environment configuration information according to the environment configuration information corresponding to the plurality of target service modules, to obtain a first verification result; a testing module, configured to test the plurality of target service modules in the update environment and the original environment corresponding to the target configuration information, to obtain a first test result, and obtain a second verification result according to the first test result; and a third determining module, configured to obtain a target verification result according to the first verification result and the second verification result.
[0105] Optionally, in the configuration verification device provided in the embodiments of the present application, the testing module comprises: a first testing submodule, configured to perform shadow testing on each target service module, to obtain a first test subresult; a second testing submodule, configured to perform service liveness testing on each target service module, to obtain a second test subresult; and a fourth determining submodule, configured to obtain the first test result according to the first test subresult and the second test subresult.
[0106] Optionally, in the configuration verification device provided in the embodiments of the present application, the obtaining unit comprises: a second obtaining module, configured to obtain the current full-amount configuration information from the configuration management center; a third obtaining module, configured to obtain baseline configuration information matched with the current full-amount configuration information; and a fourth determining module, configured to obtain the target configuration information after the change according to the current full-amount configuration information and the baseline configuration information.
[0107] Optionally, in the configuration verification device provided in the embodiments of the present application, the device further comprises: a second determining unit, configured to, after judging whether the configuration verification mode is the incremental verification mode, determine the service module corresponding to the configuration management center if the configuration verification mode is the full-amount verification mode; a testing unit, configured to test the service module corresponding to the configuration management center, to obtain a second test result; and a third determining unit, configured to obtain the target verification result according to the second test result.
[0108] It should be noted that the obtaining unit 401, the judging unit 402, the first determining unit 403 and the verification unit 404 correspond to steps S201 to S204 in Embodiment One, and the four units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment One. It should be noted that the above modules or units can be hardware components or software components stored in a memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), and the above units can also be run in the computer terminal 10 provided in Embodiment One as a part of the device.
[0109] Example 3
[0110] Embodiments of this application may provide an electronic device. Figure 5 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 5 As shown, the electronic device may include: one or more ( Figure 5 Only one of the components is shown: processor 502, memory 504, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module, and display.
[0111] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0112] The processor can access the information and application programs stored in the memory via the transmission device to perform the following steps: obtain the changed target configuration information from the configuration management center; determine whether the configuration verification method is incremental verification; if the configuration verification method is incremental verification, identify multiple target service modules associated with the target configuration information; verify the multiple target service modules to obtain the target verification result.
[0113] The processor can invoke information and applications stored in the memory through the transmission device to perform the following steps: determining multiple target service modules associated with the target configuration information, including: obtaining configuration push logs from the configuration management center; determining the propagation path of the target configuration information based on the configuration push logs; and determining multiple target service modules based on the propagation path.
[0114] The processor can invoke information and applications stored in the memory through the transmission device to perform the following steps: determining multiple target service modules based on the propagation path, including: determining multiple first service modules that have a direct dependency relationship with the target configuration information based on the propagation path; determining multiple second service modules that have an indirect dependency relationship with the target configuration information based on the service call chain of the multiple first service modules; and determining multiple target service modules based on the multiple first service modules and the multiple second service modules.
[0115] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: verifying the plurality of target service modules to obtain a target verification result, including: judging whether the target configuration information includes environment configuration information; if the target configuration information includes environment configuration information, verifying the environment configuration information according to the environment configuration information corresponding to the plurality of target service modules to obtain a first verification result; testing the plurality of target service modules in an updated environment and an original environment corresponding to the target configuration information to obtain a first test result, and obtaining a second verification result according to the first test result; and obtaining the target verification result according to the first verification result and the second verification result.
[0116] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: testing the plurality of target service modules to obtain a first test result, including: performing shadow testing on each target service module to obtain a first test sub-result; performing service ping testing on each target service module to obtain a second test sub-result; and obtaining the first test result according to the first test sub-result and the second test sub-result.
[0117] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining the changed target configuration information from the configuration management center, including: obtaining current full-amount configuration information from the configuration management center; obtaining baseline configuration information matched with the current full-amount configuration information; and obtaining the changed target configuration information according to the current full-amount configuration information and the baseline configuration information.
[0118] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: after judging whether the configuration verification mode is an incremental verification mode, the method further includes: if the configuration verification mode is a full-amount verification mode, determining a service module corresponding to the configuration management center; testing the service module corresponding to the configuration management center to obtain a second test result; and obtaining the target verification result according to the second test result.
[0119] Those skilled in the art can understand that, Figure 5 The structure shown is only schematic, and the electronic device can also be a terminal device such as a smart phone, a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Figure 5 It does not limit the structure of the electronic device. For example, the electronic device can include more or fewer components (such as a network interface, a display device, and the like) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 5 It does not limit the structure of the electronic device. For example, the electronic device can include more or fewer components (such as a network interface, a display device, and the like) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 5 It does not limit the structure of the electronic device. For example, the electronic device can include more or fewer components (such as a network interface, a display device, and the like) than those shown in the figure, or have a different configuration from that shown in the figure.
[0120] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be completed by instructing the terminal device related hardware through a program, and the program can be stored in a computer readable storage medium, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0121] Embodiment 4
[0122] The embodiments of the present application further provide a computer readable storage medium. Optionally, in the embodiments, the storage medium can be used to store the program code executed by the configuration verification method provided in the embodiment 1.
[0123] Optionally, in the embodiments, the storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0124] The present application further provides a computer program product, which, when executed on a data processing device, is adapted to execute the steps of the configuration verification method.
[0125] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0126] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0127] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit described as the division is only a logical function division, and there can be another division way in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.
[0128] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiments.
[0129] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0130] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0131] The above is only the preferred embodiment of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.
Claims
1. A configuration verification method, characterized in that, include: Obtain the changed target configuration information from the configuration management center; Determine whether the configuration verification method is incremental verification. If the configuration verification method is incremental verification, then multiple target service modules associated with the target configuration information are identified; The multiple target service modules are verified to obtain the target verification results.
2. The method according to claim 1, characterized in that, Identifying multiple target service modules associated with the target configuration information includes: Obtain the configuration push logs from the configuration management center; Based on the configuration push logs, determine the propagation path of the target configuration information; Based on the propagation path, the plurality of target service modules are determined.
3. The method according to claim 2, characterized in that, Based on the propagation path, the plurality of target service modules are determined to include: Based on the propagation path, multiple first service modules that have a direct dependency relationship with the target configuration information are identified; Based on the service call chains of the multiple first service modules, multiple second service modules that have indirect dependencies on the standard configuration information are identified; Based on the plurality of first service modules and the plurality of second service modules, the plurality of target service modules are determined.
4. The method according to claim 1, characterized in that, The verification results obtained by verifying the multiple target service modules include: Determine whether the target configuration information includes environment configuration information; If the target configuration information includes the environment configuration information, then the environment configuration information is verified based on the environment configuration information corresponding to the plurality of target service modules to obtain a first verification result; In the updated environment and the original environment corresponding to the target configuration information, the multiple target service modules are tested to obtain a first test result, and a second verification result is obtained based on the first test result; The target verification result is obtained based on the first verification result and the second verification result.
5. The method according to claim 4, characterized in that, The test results obtained from the multiple target service modules include: Perform shadow testing on each target service module to obtain the first test sub-result; Perform service activation testing on each target service module to obtain the second test sub-result; The first test result is obtained based on the first test sub-result and the second test sub-result.
6. The method according to claim 1, characterized in that, The modified target configuration information obtained from the configuration management center includes: Obtain the current full configuration information from the configuration management center; Obtain baseline configuration information that matches the current full configuration information; Based on the current full configuration information and the baseline configuration information, the changed target configuration information is obtained.
7. The method according to claim 1, characterized in that, After determining whether the configuration verification method is incremental verification, the method further includes: If the configuration verification method is a full verification method, then determine the service module corresponding to the configuration management center; The service modules corresponding to the configuration management center were tested, and the second test result was obtained. Based on the second test result, the target verification result is obtained.
8. A configuration verification device, characterized in that, include: The acquisition unit is used to obtain the changed target configuration information from the configuration management center. The judgment unit is used to determine whether the configuration verification method is incremental verification. The first determining unit is used to determine multiple target service modules associated with the target configuration information if the configuration verification method is incremental verification. The verification unit is used to verify the multiple target service modules and obtain the target verification results.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the configuration verification method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program executes the configuration verification method according to any one of claims 1 to 7 when it runs.
Citation Information
Cited By
Configuration change method and device, storage medium and program product
CN121187636A