Method and apparatus for managing application configuration data, electronic device, and storage medium

By generating and synchronizing application configuration data through a configuration management database, the problems of low efficiency and numerous errors associated with email-based methods are resolved. This enables flexible and unified management of application configuration data, reducing the error rate and simplifying operational complexity.

CN116149745BActive Publication Date: 2026-03-24MASHANG CONSUMER FINANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Changing application configuration data via email in existing technologies is inefficient, prone to data omissions and errors, and cumbersome, making it impossible to intelligently and uniformly manage the configuration methods of different types of applications.

Method used

The system generates application configuration data by configuring the database and stores it in the configuration code repository. It obtains the configuration file reading type and location, automatically synchronizes the configuration data to the file reading location, adapts to various types of applications, and achieves unified management.

Benefits of technology

It reduces the error rate of configuration management, simplifies operation complexity, flexibly adapts to various types of applications, and improves the efficiency and security of unified management of configuration data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116149745B_ABST
    Figure CN116149745B_ABST
Patent Text Reader

Abstract

The application provides a kind of application configuration data management method, device, electronic equipment and storage medium, the method includes: in response to received application configuration request, generate the application configuration data corresponding to the application configuration request, the application configuration data is stored to configuration code repository;The configuration file reading type of the application to be configured corresponding to the application configuration request is acquired, and the configuration file reading position corresponding to the configuration file reading type is determined;In the case where the configuration file reading position is not consistent with the configuration code repository, if there is configuration data synchronization event, the application configuration data is synchronized from the configuration code repository to the configuration file reading position, so that the application configuration data is loaded from the configuration file reading position when the application to be configured starts.The way is uniformly managed by configuration management database, reduces the error rate, and simplifies the complexity of configuration management.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a management method and device of application configuration data, an electronic device and a storage medium. BACKGROUND

[0002] With the rapid development of microservice / container technology / virtualization / distributed technology, the number of applications that need to be deployed in actual business is increasing, and the technology stack is becoming more and more rich. Moreover, the configuration methods of different types of applications are different, which brings great difficulty to unified management.

[0003] According to statistics, 70% of online problems are related to application configuration changes. Therefore, the unified management of application configuration files is particularly important. Through the unified management of configuration files, the occurrence rate of online problems can be reduced, the stable operation of online systems can be ensured, and subsequent data analysis, function adjustment, logic optimization, etc. are facilitated.

[0004] In related technologies, in order to realize the unified management of application configuration files, the application configuration data that needs to be changed is sent to the configuration management personnel by the development personnel through the email mode. The configuration management personnel changes the application configuration data stored in the configuration code repository according to the email.

[0005] However, the application configuration data is changed by the email mode at least has the following defects: the email interaction is inefficient, and is easy to cause data omission, error and other problems due to negligence and other factors. Moreover, the configuration management personnel needs to manually determine the corresponding configuration file management mode for different types of applications, which is tedious and not intelligent. SUMMARY

[0006] The present application provides a management method and device of application configuration data, an electronic device and a storage medium, which are used to solve the problems of data errors and tedious operations caused by changing application configuration data through the email mode.

[0007] In a first aspect, the present application provides a management method of application configuration data, applied to a configuration management database, which comprises:

[0008] In response to the received application configuration request, generating application configuration data corresponding to the application configuration request, and storing the application configuration data to a configuration code repository;

[0009] Obtaining a configuration file reading type of a to-be-configured application corresponding to the application configuration request, and determining a configuration file reading position corresponding to the configuration file reading type;

[0010] In a case where the configuration file reading position is inconsistent with the configuration code repository, if there is a configuration data synchronization event, the application configuration data is synchronized from the configuration code repository to the configuration file reading position, so as to load the application configuration data from the configuration file reading position when the application to be configured is started.

[0011] In a second aspect, the present application provides a management apparatus of application configuration data, comprising:

[0012] a generating module, adapted to generate application configuration data corresponding to the application configuration request in response to the received application configuration request, and store the application configuration data to a configuration code repository;

[0013] a determining module, adapted to acquire a configuration file reading type of an application to be configured corresponding to the application configuration request, and determine a configuration file reading position corresponding to the configuration file reading type;

[0014] a synchronizing module, adapted to synchronize the application configuration data from the configuration code repository to the configuration file reading position in a case where the configuration file reading position is inconsistent with the configuration code repository, if there is a configuration data synchronization event, so as to load the application configuration data from the configuration file reading position when the application to be configured is started.

[0015] In a third aspect, the present application provides an electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores one or more computer programs which can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to execute the above method.

[0016] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program, when executed by a processor / processing core, implements the above method.

[0017] The embodiments provided in the application can obtain the configuration file reading type of the to-be-configured application corresponding to the application configuration request after generating the application configuration data corresponding to the received application configuration request and storing the application configuration data to the configuration code repository, so as to determine the configuration file reading position corresponding to the configuration file reading type; and in the case where the configuration file reading position is inconsistent with the configuration code repository, if there is a configuration data synchronization event, the application configuration data is synchronized from the configuration code repository to the configuration file reading position, so that the application configuration data can be loaded from the configuration file reading position when the to-be-configured application starts. As can be seen, the method can uniformly manage the application configuration data through the configuration management database, and can determine the configuration file reading type of the to-be-configured application and the corresponding configuration file reading position, and then automatically synchronize the application configuration data to the configuration file reading position in the case where the configuration file reading position is inconsistent with the configuration code repository, so as to flexibly adapt to various types of applications and realize the unified management of the configuration data of various applications. Compared with the traditional email method, the method can reduce the error rate and simplify the complexity of configuration management by uniformly managing through the configuration management database.

[0018] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent to those skilled in the art through the following description. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings are intended to provide a further understanding of the application and constitute a part of the specification, together with the embodiments of the application, to explain the application, and do not constitute a limitation of the application. The above and other features and advantages will become more apparent to those skilled in the art through the description of the detailed example embodiments by referring to the accompanying drawings, in which:

[0020] Figure 1 A flowchart of a method for managing application configuration data provided by an embodiment of the application is shown;

[0021] Figure 2 A flowchart of a method for managing application configuration data provided by another embodiment of the application is shown;

[0022] Figure 3 The architecture schematic diagram of the application configuration data management system in the present example is shown;

[0023] Figure 4 A block diagram of an application configuration data management device provided by an embodiment of the application is shown;

[0024] Figure 5 A block diagram of an electronic device provided by an embodiment of the application is shown. DETAILED DESCRIPTION

[0025] For a better understanding of the technical solutions of the present application, exemplary embodiments of the present application are described below in conjunction with the drawings, including various details of the embodiments of the present application to help understanding. They should be considered only as exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, for the sake of clarity and conciseness, the description below omits the description of well-known functions and structures.

[0026] In the case of no conflict, each embodiment of the present application and each feature in the embodiments can be combined with each other.

[0027] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0028] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The terms "connected" or "coupled" or similar terms are not limited to a physical or mechanical connection, but can include an electrical connection, whether direct or indirect.

[0029] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present application, and will not be interpreted in an overly literal or overly formal sense unless expressly so defined herein.

[0030] The application configuration data management method according to the embodiments of the present application can be executed by an electronic device such as a terminal device or a server. The terminal device can be a vehicle-mounted device, a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The method can be implemented by a processor invoking a computer program stored in a memory.

[0031] In the related art, the application configuration change information is sent to the configuration management personnel by email. The configuration management personnel directly sends an operation instruction containing the application configuration change information to the configuration code repository according to the application configuration change information contained in the received email, so as to change the application configuration data stored in the configuration code repository. However, in the above manner, after receiving the email, the configuration management personnel needs to manually process the email and manually implement the change operation of the configuration file, which is tedious and prone to errors.

[0032] To solve the above problems, Figure 1 A flowchart of an application configuration data management method according to an embodiment of the present application is provided. The management method is applied to a configuration management database. Referring to Figure 1 The method comprises:

[0033] Step S110: In response to the received application configuration request, generating application configuration data corresponding to the application configuration request, and storing the application configuration data to the configuration code repository.

[0034] The execution subject of the present embodiment is a configuration management database (CMDB). The configuration management database can be configured in an electronic device. When the configuration management database receives an application configuration request sent by a user, the configuration management database obtains an application configuration item contained in the application configuration request, generates corresponding application configuration data according to the obtained application configuration item, and stores the application configuration data to a configuration code repository. The application configuration data is used for configuration operation on an application to be configured, and can specifically implement various operations such as configuration initialization and configuration update.

[0035] The configuration code repository is used to implement persistent storage of the application configuration data. In specific implementation, the application configuration data can be stored in the configuration management database and the configuration code repository at the same time, so that the same application configuration data is stored in the configuration management database and the configuration code repository at the same time, thereby facilitating disaster recovery processing of the configuration data.

[0036] Step S120: Obtain the configuration file reading type of the to-be-configured application corresponding to the application configuration request, and determine the configuration file reading location corresponding to the configuration file reading type.

[0037] The to-be-configured application refers to a specified application that needs to be configured through the application configuration request, and the to-be-configured application can be determined according to the application identifier included in the application configuration request. The configuration file reading types corresponding to different types of to-be-configured applications are also different. Therefore, in this embodiment, the configuration file reading type of the to-be-configured application needs to be further determined.

[0038] As an optional implementation, the reading type identifier information can be directly included in the application configuration request, and the reading type identifier information is used to identify a configuration file reading type. In this way, the configuration management database can determine the configuration file reading type of the to-be-configured application according to the reading type identifier information.

[0039] As another optional implementation, the application basic information of each application can be stored in the configuration management database in advance, and the application basic information of each application includes the configuration file reading type corresponding to each application. In this way, the configuration management database can find the application basic information of the to-be-configured application in the application basic information of each application, and then obtain the configuration file reading type corresponding to the to-be-configured application from the application basic information of the to-be-configured application.

[0040] The configuration file reading type of the to-be-configured application is used to indicate where the to-be-configured application needs to load the configuration file when starting. Correspondingly, the configuration file reading location corresponding to the configuration file reading type refers to the location where the to-be-configured application loads the configuration file when starting. Since the locations where different types of applications load the configuration file during the starting process are different, that is, different configuration file reading types will correspond to different configuration file reading locations, the configuration file reading location corresponding to the configuration file reading type needs to be determined.

[0041] In a specific implementation, there is a corresponding relationship between the configuration file reading type and the configuration file reading position. The configuration file reading position corresponding to the configuration file reading type of the application to be configured can be obtained according to the corresponding relationship between the two. Specifically, the corresponding relationship between the configuration file reading type and the configuration file reading position can be: if the configuration file reading type is a local reading type, it is determined that the configuration file reading position corresponding to the configuration file reading type is consistent with the configuration code repository; if the configuration file reading type is a server reading type, it is determined that the configuration file reading position corresponding to the configuration file reading type is inconsistent with the configuration code repository, and the configuration file reading position is located in the application server of the application to be configured; if the configuration file reading type is a source code reading type, it is determined that the configuration file reading position corresponding to the configuration file reading type is inconsistent with the configuration code repository, and the configuration file reading position is located in the source code of the application to be configured.

[0042] Step S130: If the configuration file reading position is inconsistent with the configuration code repository, and if there is a configuration data synchronization event, the application configuration data is synchronized from the configuration code repository to the configuration file reading position, so that the application configuration data is loaded from the configuration file reading position when the application to be configured starts.

[0043] In this step, it is necessary to determine whether the configuration file reading position is consistent with the configuration code repository. If the configuration file reading position is located in the configuration code repository, it means that the two are consistent, otherwise, it means that the two are inconsistent. In the case where the two are inconsistent, the application configuration data needs to be synchronized from the configuration code repository to the configuration file reading position in the case where a configuration data synchronization event is detected, so that the application configuration data is loaded from the configuration file reading position when the application to be configured starts.

[0044] For example, the configuration file reading position of some to-be-configured applications is the configuration code repository, and for these to-be-configured applications, the step can not be performed. For example, the configuration file reading position of some to-be-configured applications is an application server or application source code, and for these to-be-configured applications, the application configuration data needs to be synchronized from the configuration code repository to the application server or application source code for loading when the to-be-configured applications are started. The configuration data synchronization event is used to trigger the synchronization operation of the application configuration data, and the configuration data synchronization event can be triggered in various ways. For example, the configuration data synchronization event can be triggered according to a preset trigger time and / or trigger condition. The trigger time can be that the configuration data synchronization event is triggered at a preset time after receiving the application configuration request. Alternatively, the trigger condition can be that the configuration data synchronization event is triggered when a preset operation or preset instruction is detected, for example, when an application deployment notification message or application packaging notification message sent by the application deployment system is received. The specific triggering manner of the configuration data synchronization event is not limited in the application.

[0045] In the embodiments provided in the application, the application configuration data is uniformly managed through the configuration management database, and the configuration file reading type of the to-be-configured application and the corresponding configuration file reading position can be determined, and then the application configuration data can be automatically synchronized to the configuration file reading position when the configuration file reading position is inconsistent with the configuration code repository, so that various types of applications can be flexibly adapted, and the unified management of the configuration data of various applications is implemented. Compared with the traditional email method, the method provided in the application can reduce the error rate and simplify the complexity of configuration management by uniformly managing through the configuration management database.

[0046] Referring to Figure 2 Another application configuration data management method provided in the application is shown in the flowchart. Referring to Figure 2 The method can include the following steps:

[0047] Step S200: In response to the received application configuration request, application configuration data corresponding to the application configuration request is generated.

[0048] Specifically, the application configuration request is parsed to obtain account identification information and a configuration object included in the application configuration request; it is determined whether the account permission corresponding to the account identification information matches the configuration object; if yes, the application configuration data corresponding to the application configuration request is generated, and the application configuration data is stored in the configuration management database.

[0049] The account permission includes at least one of a project permission corresponding to a project type of a configuration object, an application permission corresponding to an application type of a configuration object, and a file permission corresponding to a file type of a configuration object.

[0050] Therefore, in the embodiment, different user account permissions can be set for different users according to the research and development department, project role, position and other factors of the user, and different permission granularities can be set for different users, which facilitates the subdivision of the permission granularity, prevents unauthorized users from maliciously tampering with the application configuration data, and improves the security of the application configuration data.

[0051] Step S210: store the application configuration data to the configuration code repository.

[0052] In the previous step, the application configuration data has been stored to the configuration management database, and in the present step, the application configuration data is further stored to the configuration code repository. The configuration code repository is used to realize the persistent storage of the application configuration data, and can be Gitlab, Mysql, MongoDb and other types of databases. In short, as long as the unified management of the configuration data can be realized, the specific type of the configuration code repository is not limited in the present application.

[0053] Step S220: obtain the configuration file reading type of the to-be-configured application corresponding to the application configuration request, and determine the configuration file reading location corresponding to the configuration file reading type.

[0054] Specifically, if the obtained configuration file reading type of the to-be-configured application corresponding to the application configuration request is a local reading type, the configuration file reading location corresponding to the configuration file reading type is determined to be consistent with the configuration code repository. If the obtained configuration file reading type of the to-be-configured application corresponding to the application configuration request is a server reading type, the configuration file reading location corresponding to the configuration file reading type is determined to be inconsistent with the configuration code repository, and the configuration file reading location is located in the application server of the to-be-configured application. If the obtained configuration file reading type of the to-be-configured application corresponding to the application configuration request is a source code reading type, the configuration file reading location corresponding to the configuration file reading type is determined to be inconsistent with the configuration code repository, and the configuration file reading location is located in the source code of the to-be-configured application. In short, since different types of applications read configuration files in different ways, the configuration file reading type of the to-be-configured application needs to be determined according to the type of the to-be-configured application, and then the configuration file reading location corresponding to the configuration file reading type is determined.

[0055] In an implementation, the user needs to input the reading type identification information when sending the application configuration request. Accordingly, the configuration management database obtains the reading type identification information contained in the application configuration request, and determines the configuration file reading position corresponding to the configuration file reading type according to the reading position information contained in the reading type identification information. For example, if the configuration file reading type is the server reading type, the storage position of the configuration file in the server needs to be further contained in the reading type identification information; for another example, if the configuration file reading type is the source code reading type, the corresponding position of the configuration file in the source code needs to be further contained in the reading type identification information.

[0056] In yet another implementation, the application identification of each application and the corresponding application basic information of each application are stored in the configuration management database in advance, wherein the application basic information contains the configuration file reading type, the configuration file reading address, the application deployment mode and other information of the application. Accordingly, the application identification of the application to be configured contained in the application configuration request is obtained, and the configuration file reading type corresponding to the application identification and the configuration file reading position corresponding to the configuration file reading type are determined according to the pre-configured application basic information.

[0057] Step S230: determining whether the configuration file reading position is consistent with the configuration code repository.

[0058] Specifically, if the configuration file reading position is located in the configuration code repository, it means that they are consistent; otherwise, it means that they are inconsistent.

[0059] Step S240: in the case that the configuration file reading position is inconsistent with the configuration code repository, synchronizing the application configuration data from the configuration code repository to the configuration file reading position.

[0060] In an implementation, in the case that the configuration file reading position is inconsistent with the configuration code repository, if there is a configuration data synchronization event, the application configuration data is synchronized from the configuration code repository to the configuration file reading position, so as to load the application configuration data from the configuration file reading position when the application to be configured starts.

[0061] Among them, the case that the configuration file reading position is inconsistent with the configuration code repository mainly includes two kinds, which will be introduced as follows:

[0062] (1) For the case that the configuration file reading position is located in the application server of the application to be configured:

[0063] Since the configuration file reading position is located in the application server of the application to be configured, the application to be configured needs to read the configuration file from the application server during the application deployment process. The configuration data synchronization event refers to the received application deployment notification message sent by the application deployment system. Accordingly, in this step, the application configuration data needs to be synchronized from the configuration code repository to the area corresponding to the configuration file reading position in the application server according to the application server corresponding to the application to be configured.

[0064] In an implementation manner, the synchronization of the application configuration data is performed in the following manner:

[0065] Firstly, the application identifier of the application to be deployed included in the application deployment notification message is obtained. The application deployment system is used to implement the packaging, compiling, deployment and other operations of the application. In this embodiment, the application deployment system can be a continuous integration (Continuous Integration) / continuous delivery (Continuous Delivery) / continuous deployment (Continuous Deployment) system, referred to as CICD system. The application deployment notification message is used to notify the configuration management database that the deployment operation of the application to be configured is about to be performed. As can be seen, the sending time of the application deployment notification message is after the application packaging operation is performed and before the application deployment operation is performed.

[0066] Then, the application configuration data to be synchronized is obtained from the configuration code repository according to the application identifier of the application to be deployed. Since the configuration code repository stores the configuration data of each application, the application configuration data to be synchronized needs to be filtered according to the application identifier. As can be seen, the application configuration data to be synchronized refers to the configuration data corresponding to the application matching the application identifier of the application to be deployed. In addition, further, since the application configuration data to be synchronized can include multiple configuration data records, when it is determined in step S230 that the configuration file reading position is inconsistent with the configuration code repository, the unsynchronized identifier can be set for the configuration data record stored in the configuration code repository this time, and accordingly, when the application configuration data to be synchronized is obtained, the configuration data record with the unsynchronized identifier set is filtered from the configuration data corresponding to the application matching the application identifier of the application to be deployed as the above-mentioned application configuration data to be synchronized.

[0067] Finally, the application configuration data to be synchronized is sent to the agent module, so as to synchronize the application configuration data to be synchronized to the configuration file reading position in the application server by the agent module. The agent module can be a single server or a virtual module or an entity device arranged in the application server, in general, the agent module aims to implement operations on the application server. In addition, after the synchronization is successful, a synchronization success message is returned to the application deployment system, so that the application deployment system performs an application deployment operation in response to the synchronization success message.

[0068] In this way, since the configuration file stored in the application server accessed during the application deployment process has been updated in advance, the reliable execution of the application deployment operation can be ensured.

[0069] As can be seen, in the case where the configuration file reading type of the application to be deployed is a server reading type, the embodiment updates the configuration file stored in the application server before the application deployment system performs the application deployment operation. The setting of the update timing is determined based on the configuration file loading characteristics of the application to be deployed. In this way, the correctness of the application deployment operation can be ensured. If the update timing is too early, the application deployment may change after the configuration file in the application server is updated; if the update timing is too late, the configuration file relied on by the application deployment operation has not been updated, thereby affecting the reliability of the deployment operation.

[0070] In addition, in actual cases, the application deployment system can be configured in advance to send an application deployment notification message to the configuration management database in the case where it is judged that the configuration file reading type of the application to be deployed is a server reading type. In this way, the application deployment system judges the configuration file reading type of the application to be deployed, and triggers the corresponding notification message at the corresponding update timing.

[0071] In other implementation manners, in order to simplify the execution logic of the application deployment system and reduce the burden of the application deployment system, the operation of judging the configuration file reading type of the application to be deployed can be implemented by the configuration management database. In this implementation manner, no matter what type of application to be deployed, the application deployment system will trigger an application deployment notification message before the application to be deployed performs a deployment operation. Correspondingly, after obtaining the deployment server identifier and the application identifier of the application to be deployed included in the application deployment notification message, the configuration management database further judges whether the configuration file reading type of the application to be deployed is a server reading type according to the application identifier of the application to be deployed. Correspondingly, in the case where it is judged that the configuration file reading type of the application to be deployed is a server reading type, the application configuration data to be synchronized is obtained from the configuration code repository. If it is judged that the configuration file reading type of the application to be deployed is not a server reading type, the subsequent operation is not performed.

[0072] In summary, in the case that the configuration file reading position is located in the application server of the application to be configured, the configuration data synchronization event refers to receiving the application deployment notification message sent by the application deployment system.

[0073] (2) In the case that the configuration file reading position is located in the source code of the application to be configured:

[0074] Since the configuration file reading position is located in the source code of the application to be configured, the application to be configured needs to read the configuration file from the application source code during the application startup process. The configuration data synchronization event refers to the received application packaging notification message sent by the application deployment system; accordingly, in this step, the application configuration data needs to be synchronized from the configuration code repository to the source code.

[0075] In an implementation manner, the synchronization of the application configuration data is performed in the following manner:

[0076] Firstly, the application identifier of the application to be deployed included in the application packaging notification message is obtained. The application packaging notification message is used to notify the configuration management database that the packaging operation of the application to be configured is about to be performed. It can be seen that the sending time of the application packaging notification message is before the application packaging operation is performed.

[0077] Then, the application configuration data to be synchronized is obtained from the configuration code repository according to the application identifier of the application to be deployed. Since the configuration code repository stores the configuration data of each application, the application configuration data to be synchronized needs to be filtered according to the application identifier. It can be seen that the application configuration data to be synchronized refers to the configuration data corresponding to the application matching the application identifier of the application to be deployed. In addition, further, since the application configuration data to be synchronized can include multiple configuration data records, when it is determined in step S230 that the configuration file reading position is inconsistent with the configuration code repository, the unsynchronized identifier can be set for the configuration data records stored in the configuration code repository this time, and accordingly, when the application configuration data to be synchronized is obtained, the configuration data records with the unsynchronized identifier set are filtered from the configuration data corresponding to the application matching the application identifier of the application to be deployed as the above-mentioned application configuration data to be synchronized.

[0078] Finally, the source code of the application to be configured is modified according to the application configuration data to be synchronized, so as to synchronize the application configuration data to be synchronized to the configuration file reading position, and a source code modification success message is returned to the application deployment system, so that the application deployment system performs the application packaging operation in response to the source code modification success message.

[0079] In this way, since the configuration file stored in the application source code to be accessed in the application packaging process has been updated in advance, the reliable execution of the application packaging operation can be ensured.

[0080] In summary, in the case where the configuration file reading position is located in the source code of the application to be configured, the configuration data synchronization event refers to receiving the application packaging notification message sent by the application deployment system. As can be seen, in the case where the configuration file reading type of the application to be deployed is the source code reading type, the embodiment updates the configuration file stored in the application server before the application deployment system performs the application packaging operation. The setting of the update timing is determined based on the configuration file loading characteristics of this type of application to be deployed. In this way, the correctness of the application packaging operation can be ensured. If the update timing is too early, the configuration file in the application server may be updated, and the application packaging situation may change again; if the update timing is too late, the configuration file relied on by the application packaging operation has not been updated, thereby affecting the reliability of the packaging operation.

[0081] In addition, in actual cases, the application deployment system can be configured in advance to send the application packaging notification message to the configuration management database in the case where it is judged that the configuration file reading type of the application to be deployed is the source code reading type. In this way, the application deployment system judges the configuration file reading type of the application to be deployed, and triggers the corresponding notification message at the corresponding update timing.

[0082] In other implementation manners, in order to simplify the execution logic of the application deployment system and reduce the burden of the application deployment system, the operation of judging the configuration file reading type of the application to be deployed can be implemented by the configuration management database. In this implementation manner, no matter what type of application to be configured, the application deployment system will trigger the application packaging notification message before the application to be deployed performs the packaging operation. Correspondingly, after the configuration management database obtains the application identifier of the application to be deployed included in the application packaging notification message, it further judges whether the configuration file reading type of the application to be deployed is the source code reading type according to the application identifier of the application to be deployed. Correspondingly, in the case where it is judged that the configuration file reading type of the application to be deployed is the source code reading type, the application configuration data to be synchronized is obtained from the configuration code repository.

[0083] Therefore, in the above two implementation manners, when the application configuration data to be synchronized is obtained from the configuration code repository, the application configuration data corresponding to the application identifier can be queried from the configuration code repository, and if the queried application configuration data is set with the unsynchronized mark, the queried application configuration data is determined as the application configuration data to be synchronized. Moreover, after the queried application configuration data is determined as the application configuration data to be synchronized, the unsynchronized mark corresponding to the application configuration data to be synchronized in the configuration code repository is further deleted. In this way, the reliable synchronization of the configuration file can be ensured.

[0084] In addition, in order to avoid errors caused by an exception in the configuration data update, when the application to be configured is started and the application configuration data is loaded from the configuration file reading position, it is further determined whether the application configuration data stored in the configuration management database is consistent with the application configuration data stored in the configuration code repository. If yes, the application configuration data is loaded from the configuration file reading position. If no, a configuration exception prompt message is generated. If an exception occurs in the update process of the application configuration data, the application configuration data stored in the configuration management database is inconsistent with the application configuration data stored in the configuration code repository. Therefore, by adding the determination step in the application startup link, errors can be avoided and the system stability can be improved.

[0085] In summary, in the present embodiment, the application configuration data is uniformly managed by the configuration management database, and the configuration file reading type of the application to be configured and the corresponding configuration file reading position can be determined. Moreover, in the case where the configuration file reading position is inconsistent with the configuration code repository, the application configuration data is automatically synchronized to the configuration file reading position. Therefore, various types of applications can be flexibly adapted, and the unified management of the configuration data of various applications can be implemented. Compared with the traditional mail method, the present method uniformly manages by the configuration management database, reduces the error rate, and simplifies the complexity of configuration management. The present method can select different configuration file update methods for different types of applications, and can be linked with external systems such as application deployment systems, thereby improving the comprehensiveness of configuration file management and avoiding abnormal problems caused by asynchronization between systems.

[0086] In order to facilitate understanding, the specific implementation details of the present embodiment are described in detail below with reference to a specific example.

[0087] The traditional mail-based profile updating method has at least the following defects: first, the mail-based method lacks operation specification, the timeliness of interaction through mail is too low, manual adjustment of content is required, there is no rule checking link, and errors are easy to occur. In addition, the verification specification of configuration change operation is lacking, and the review mechanism is not connected. Moreover, the operation permission can only be limited through Gitlab, the permission control granularity is too large, and the permission cannot be subdivided from the perspective of user role. Moreover, Gitlab is only used for file storage, and cannot check the data format content in the file, and cannot avoid the corresponding low-level problems.

[0088] Figure 3 An architecture diagram of a management system of application configuration data is shown. As shown in Figure 3 , the system includes a configuration management database 31, a configuration code repository 32, an application server 33, a proxy module 34, and an application deployment system 35. As shown in Figure 3 , the configuration management database 31 is connected to the configuration code repository 32, and the configuration management database 31 is connected to the application server 33 through the proxy module 34. Moreover, the configuration management database 31 is further connected to the application deployment system 35.

[0089] Specifically, the R&D user logs in to the configuration management database 31 through his own account and updates the configuration file of the specified application. After the configuration management database 31 receives the application configuration request triggered by the R&D user, the corresponding application configuration data is stored in the configuration management database. In addition, in the application online process, the configuration management personnel is displayed the application configuration update recorded in the configuration management database, and the system can automatically display the differences before and after the update for the configuration management personnel to realize information comparison and verification. In the case of verification, the configuration management personnel triggers a synchronization instruction, thereby synchronizing the corresponding application configuration data to the configuration code repository. In addition, the process management system can also verify the application configuration data in the configuration management database and the configuration code repository before the application goes online to determine whether it is correct.

[0090] In addition, the configuration management database will further determine whether the application configuration data needs to be synchronized from the configuration code repository to the configuration file reading position according to the configuration file reading type of the application to be configured. Moreover, in the synchronization process, different synchronization methods can be flexibly selected according to the type of the application to be configured.

[0091] Among them, the configuration file reading type of the application to be configured includes the following three types:

[0092] The first configuration file reading type is a local reading type, that is, the application directly reads from a configuration code repository such as Gitlab, and the application mainly includes a java application implemented using springcloud. For this type of application, the processing logic is as follows: the user submits the configuration file, and the administrator confirms the configuration and submits. The configuration management database directly writes the content to Gitlab, and the corresponding configuration file is stored in Gitlab. The application directly reads the data in Gitlab when starting.

[0093] The second configuration file reading type is a server reading type, that is, the application reads the configuration file placed in the corresponding directory of the server, and the application includes a java application implemented using springboot or python. For this type of application, the processing logic is as follows: the user submits the configuration data on the CMDB, and needs to fill in the location of the configuration file on the server, and the administrator confirms the configuration and submits. The configuration management database directly writes the content to Gitlab. During the application deployment process, the application deployment system will notify the CMDB of the deployment server corresponding to the application, and write the corresponding configuration through the proxy module. When the application starts, the configuration in the corresponding path can be read. For example, after the CMDB receives the request server IP address, the configuration file is delivered to the proxy module, and the proxy module writes the configuration file to the corresponding path according to the received data and the deployment mode of the application. The deployment mode of the application can be further divided into the following two types: one is directly deployed on the server (such as a physical machine or a virtual machine), and the other is directly deployed in a container. For different deployment modes, the proxy module can directly operate, only the operation mode is different. For example, if the application is directly deployed on the server, the proxy module operates at the system level, and synchronizes the application configuration data from the configuration code repository to the application server by triggering a system operation command. For example, if the application is deployed in a container, the proxy module uses a container operation command to perform file writing, updating and other operations to synchronize the application configuration data from the configuration code repository to the container included in the application server.

[0094] The third configuration file reading type is a source code reading type, that is, the application reads the configuration file in the source code, such as a Golang application, an R language, and the like. The configuration file in the source code further includes the following two manners: one manner is to be packaged in a jar package, such as a Java application; and the other manner is to be directly placed in a binary file, such as an application written by other languages. For this kind of application, the processing logic is as follows: the user submits the configuration, and needs to fill in the corresponding code root directory position. The administrator confirms the configuration and submits. Before the application is packaged, the CMDB is notified to pull the corresponding configuration of the specified application, and write into the corresponding code compilation branch, so that the internal configuration used after packaging is the replaced file. When the application starts, the corresponding configuration can be read. For example, before the CICD is built, the CMDB is notified. The CMDB writes the configuration file into the source code of the corresponding editing branch in the Gitlab. After the CICD receives the success result, it can be directly packaged, and the configuration file is written.

[0095] In summary, the example can at least achieve the following beneficial effects:

[0096] Firstly, the management of the configuration file is more standardized, the unified operation page is in the CMDB, and the unified configuration is stored in the Gitlab. Secondly, the permission control is more flexible: the configuration management is handled by the R&D personnel, the corresponding configuration personnel is responsible for auditing and submitting into effect, and the CMDB can control the permission at the project level / application level / configuration file type, so as to achieve a finer granularity. In addition, the system can be connected with the process system, the application deployment system and the like, the verification of the configuration is increased, the problems such as the configuration not being changed after the application is put into operation are avoided, the operation of the configuration is simplified, and the configuration change record is provided. Moreover, all the configurations have operation records, which is convenient for auditing. Even if the configuration adjustment has a problem, the influence range can be quickly rolled back to the minimum.

[0097] It can be understood that the above-mentioned various method embodiments mentioned in the present application can be combined with each other to form combined embodiments without deviating from the principle logic. Limited by the length, the present application will not be described again. Those skilled in the art can understand that the specific execution order of each step in the above-mentioned method should be determined according to its function and possible internal logic.

[0098] In addition, the present application also provides an application configuration data management device, an electronic equipment and a computer readable storage medium, which can be used to realize any one of the application configuration data management methods provided by the present application. The corresponding technical solutions and descriptions are referred to the corresponding description in the method part, and will not be described again.

[0099] Figure 4FIG. 1 is a structural schematic diagram of an application configuration data management apparatus 40 provided by an embodiment of the present application.

[0100] Referring to Figure 4 An application configuration data management apparatus 40 provided by an embodiment of the present application comprises:

[0101] A generating module 41, adapted to generate application configuration data corresponding to a received application configuration request, and store the application configuration data to a configuration code repository.

[0102] A determining module 42, adapted to acquire a configuration file reading type of a to-be-configured application corresponding to the application configuration request, and determine a configuration file reading location corresponding to the configuration file reading type.

[0103] A synchronizing module 43, adapted to, in a case where the configuration file reading location is inconsistent with the configuration code repository, if there is a configuration data synchronization event, synchronize the application configuration data from the configuration code repository to the configuration file reading location, so as to load the application configuration data from the configuration file reading location when the to-be-configured application starts.

[0104] Optionally, when determining the configuration file reading location corresponding to the configuration file reading type, the determining module 42 comprises at least one of the following: if the acquired configuration file reading type of the to-be-configured application corresponding to the application configuration request is a local reading type, it is determined that the configuration file reading location corresponding to the configuration file reading type is consistent with the configuration code repository; if the acquired configuration file reading type of the to-be-configured application corresponding to the application configuration request is a server reading type, it is determined that the configuration file reading location corresponding to the configuration file reading type is inconsistent with the configuration code repository, and the configuration file reading location is located in an application server of the to-be-configured application; if the acquired configuration file reading type of the to-be-configured application corresponding to the application configuration request is a source code reading type, it is determined that the configuration file reading location corresponding to the configuration file reading type is inconsistent with the configuration code repository, and the configuration file reading location is located in source code of the to-be-configured application.

[0105] Optionally, in the case that the configuration file reading position is located in the application server of the application to be configured, the configuration data synchronization event refers to receiving an application deployment notification message sent by an application deployment system, and the synchronization module 43 performs the following steps when synchronizing the application configuration data from the configuration code repository to the configuration file reading position: obtaining the application identifier of the application to be deployed included in the application deployment notification message; obtaining the application configuration data to be synchronized from the configuration code repository according to the application identifier of the application to be deployed; sending the application configuration data to be synchronized to the proxy module to synchronize the application configuration data to be synchronized to the configuration file reading position by the proxy module; and returning a synchronization success message to the application deployment system, so that the application deployment system performs an application deployment operation in response to the synchronization success message.

[0106] Optionally, the synchronization module 43 is further configured to: determine whether the configuration file reading type of the application to be deployed is a server reading type according to the application identifier of the application to be deployed; and obtain the application configuration data to be synchronized from the configuration code repository in the case that the configuration file reading type of the application to be deployed is determined to be the server reading type.

[0107] Optionally, in the case that the configuration file reading position is located in the source code of the application to be configured, the configuration data synchronization event refers to receiving an application packaging notification message sent by an application deployment system, and the synchronization module 43 performs the following steps when synchronizing the application configuration data from the configuration code repository to the configuration file reading position: obtaining the application identifier of the application to be deployed included in the application packaging notification message; obtaining the application configuration data to be synchronized from the configuration code repository according to the application identifier of the application to be deployed; modifying the source code of the application to be configured according to the application configuration data to be synchronized to synchronize the application configuration data to be synchronized to the configuration file reading position, and returning a source code modification success message to the application deployment system, so that the application deployment system performs an application packaging operation in response to the source code modification success message.

[0108] Optionally, the synchronization module 43 is further configured to: determine whether the configuration file reading type of the application to be deployed is a source code reading type according to the application identifier of the application to be deployed; and obtain the application configuration data to be synchronized from the configuration code repository in the case that the configuration file reading type of the application to be deployed is determined to be the source code reading type.

[0109] Optionally, the synchronization module 43 is further configured to: query the application configuration data corresponding to the application identifier from the configuration code repository, and determine the queried application configuration data as the application configuration data to be synchronized if the queried application configuration data is marked with the unsynchronized mark. Optionally, after determining the queried application configuration data as the application configuration data to be synchronized, the synchronization module 43 is further configured to: delete the unsynchronized mark of the application configuration data corresponding to the application identifier in the configuration code repository after synchronizing the application configuration data to be synchronized from the configuration code repository to the configuration file reading position.

[0110] Optionally, the determination module 43 is specifically configured to: obtain the reading type identifier information contained in the application configuration request, and determine the configuration file reading position corresponding to the configuration file reading type according to the reading position information contained in the reading type identifier information; or obtain the application identifier of the application to be configured contained in the application configuration request, and determine the configuration file reading type corresponding to the application identifier and the configuration file reading position corresponding to the configuration file reading type according to the preconfigured application basic information.

[0111] Optionally, the generation module 41 is specifically configured to: parse the application configuration request, obtain the account identifier information and the configuration object contained in the application configuration request, determine whether the account permission corresponding to the account identifier information matches the object type of the configuration object, generate the application configuration data corresponding to the application configuration request and store the application configuration data in the configuration management database if the account permission corresponding to the account identifier information matches the object type of the configuration object, wherein the account permission includes at least one of the project permission of the configuration object corresponding to the project type, the application permission of the configuration object corresponding to the application type, and the file permission of the configuration object corresponding to the file type.

[0112] The method can uniformly manage the application configuration data through the configuration management database, and can determine the configuration file reading type of the application to be configured and the corresponding configuration file reading position, and further automatically synchronize the application configuration data to the configuration file reading position in the case that the configuration file reading position is inconsistent with the configuration code repository, so that various types of applications can be flexibly adapted, and the unified management of the configuration data of various types of applications can be implemented. Compared with the traditional email method, the method can uniformly manage through the configuration management database, reduce the error rate, and simplify the complexity of configuration management.

[0113] Figure 5 A block diagram of an electronic device 50 is provided for the embodiments of the present application.

[0114] Reference is made to Figure 5The embodiment of the present application provides an electronic device 50, the electronic device 50 comprises: at least one processor 501, at least one memory 502 and one or more I / O interfaces 503 connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs executable by the at least one processor 501, and the one or more computer programs are executed by the at least one processor 501 to implement the above-mentioned application configuration data management method.

[0115] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor / processing core to implement the above-mentioned application configuration data management method. The computer readable storage medium can be a volatile or non-volatile computer readable storage medium.

[0116] The embodiment of the present application further provides a computer program product, including computer readable code or a non-volatile computer readable storage medium carrying computer readable code, when the computer readable code is run in a processor of an electronic device, the processor in the electronic device executes the above-mentioned application configuration data management method.

[0117] Those skilled in the art can understand that all or some steps in the above disclosed method, functions of modules / units in the system and the device can be implemented as software, firmware, hardware or their combination.

[0118] Suitable combinations. In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Certain physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer readable storage medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media).

[0119] As those skilled in the art will appreciate, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable program instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, as those skilled in the art will appreciate, communication media typically embodies computer readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. As used herein, the term "exemplary" means serving as an example, instance, or illustration. Any implementation described herein as exemplary is not necessarily to be construed as preferred or advantageous over other implementations.

[0120] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0121] Computer readable program instructions for carrying out operations of the present application can be assembly instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present application.

[0122] The computer program product described herein can be embodied in a specific manner by hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium. In another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), and the like.

[0123] The various aspects of the present application are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer readable program instructions.

[0124] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include a non-transitory computer readable storage medium that can be a computer- readable storage medium having no data storage cycles that change state. The instructions can be executed by one or more processors of a computer, other programmable data processing apparatus, or other devices to produce a computer-implemented process such that the instructions which execute via the one or more processors of the computer or other programmable data processing devices create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0125] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0126] The flow and block diagrams in the drawings show architectural, functional, and operational representations of possible implementations of systems, methods, and computer program products according to the present disclosure. In this regard, each block in the flow and block diagrams can represent a module, a segment, or a portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may

[0127] Example embodiments have been disclosed herein and, although specific terms are employed, they are used in a generic and descriptive sense only and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with a particular embodiment can be used in conjunction with other embodiments unless otherwise explicitly stated. Accordingly, it will be understood that various changes in form and details can be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A method for managing application configuration data, characterized in that, Applied to configuration management databases, the method includes: In response to a received application configuration request, generate application configuration data corresponding to the application configuration request, and store the application configuration data in the configuration code repository; Obtain the configuration file read type of the application to be configured corresponding to the application configuration request, and determine the configuration file read location corresponding to the configuration file read type, wherein the configuration file read type is used to indicate where the application to be configured needs to load the configuration file from when it starts up; If the configuration file reading location is inconsistent with the configuration code repository, and a configuration data synchronization event exists, the application configuration data will be synchronized from the configuration code repository to the configuration file reading location so that the application configuration data will be loaded from the configuration file reading location when the application to be configured starts.

2. The method according to claim 1, characterized in that, Determining the configuration file read location corresponding to the configuration file read type includes at least one of the following: If the configuration file read type is local read type, then the configuration file read location corresponding to the configuration file read type is determined to be consistent with the configuration code repository; If the configuration file read type is server read type, then it is determined that the configuration file read location corresponding to the configuration file read type is inconsistent with the configuration code repository, and the configuration file read location is located in the application server of the application to be configured; If the configuration file reading type is the source code reading type, then it is determined that the configuration file reading location corresponding to the configuration file reading type is inconsistent with the configuration code repository, and the configuration file reading location is located in the source code of the application to be configured.

3. The method according to claim 2, characterized in that, When the configuration file read location is located on the application server of the application to be configured, the configuration data synchronization event refers to receiving an application deployment notification message sent by the application deployment system. Synchronizing the application configuration data from the configuration code repository to the configuration file read location includes: Obtain the application identifier of the application to be deployed contained in the application deployment notification message; Based on the application identifier of the application to be deployed, obtain the application configuration data to be synchronized from the configuration code repository; The application configuration data to be synchronized is sent to the proxy module, so that the proxy module can synchronize the application configuration data to the configuration file reading location in the application server.

4. The method according to claim 3, characterized in that, After obtaining the application identifier of the application to be deployed contained in the application deployment notification message, the method further includes: Based on the application identifier of the application to be deployed, determine whether the configuration file read type of the application to be deployed is a server read type; The step of obtaining the application configuration data to be synchronized from the configuration code repository based on the application identifier of the application to be deployed includes: If it is determined that the configuration file read type of the application to be deployed is a server read type, the application configuration data to be synchronized is obtained from the configuration code repository.

5. The method according to claim 2, characterized in that, When the configuration file reading location is located in the source code of the application to be configured, the configuration data synchronization event refers to receiving an application packaging notification message sent by the application deployment system. The step of synchronizing the application configuration data from the configuration code repository to the configuration file reading location includes: Obtain the application identifier of the application to be deployed contained in the application packaging notification message; Based on the application identifier of the application to be deployed, obtain the application configuration data to be synchronized from the configuration code repository; Modify the source code of the application to be configured according to the application configuration data to be synchronized, so as to synchronize the application configuration data to the configuration file reading location.

6. The method according to claim 5, characterized in that, After obtaining the application identifier of the application to be deployed contained in the application packaging notification message, the method further includes: Based on the application identifier of the application to be deployed, determine whether the configuration file reading type of the application to be deployed is the source code reading type; The step of obtaining the application configuration data to be synchronized from the configuration code repository based on the application identifier of the application to be deployed includes: If it is determined that the configuration file reading type of the application to be deployed is the source code reading type, the application configuration data to be synchronized is obtained from the configuration code repository.

7. The method according to any one of claims 3-6, characterized in that, The step of obtaining the application configuration data to be synchronized from the configuration code repository includes: Retrieve application configuration data corresponding to the application identifier from the configuration code repository; If the queried application configuration data has an unsynchronized flag, then the queried application configuration data will be identified as the application configuration data to be synchronized.

8. The method according to claim 7, characterized in that, After determining the queried application configuration data as the application configuration data to be synchronized, the method further includes: The unsynchronized tags corresponding to the application configuration data corresponding to the application identifier in the configuration code repository are deleted.

9. The method according to claim 2, characterized in that, The step of obtaining the configuration file read type of the application to be configured corresponding to the application configuration request, and determining the configuration file read location corresponding to the configuration file read type, includes: Obtain the read type identifier information contained in the application configuration request; and determine the configuration file read location corresponding to the configuration file read type based on the read location information contained in the read type identifier information. or, Obtain the application identifier of the application to be configured contained in the application configuration request, and determine the configuration file reading type corresponding to the application identifier and the configuration file reading location corresponding to the configuration file reading type based on the pre-configured application basic information.

10. The method according to claim 1, characterized in that, The step of generating application configuration data corresponding to the received application configuration request includes: Parse the application configuration request to obtain the account identification information and configuration object contained in the application configuration request; If the account permissions corresponding to the account identifier information match the object type of the configuration object, then application configuration data corresponding to the application configuration request is generated, and the application configuration data is stored in the configuration management database; wherein, the account permissions include any one or more of the following: project permissions corresponding to the configuration object of the project type, application permissions corresponding to the configuration object of the application type, and file permissions corresponding to the configuration object of the file type.

11. The method according to claim 10, characterized in that, The step of loading the application configuration data from the configuration file reading location when the application to be configured starts includes: Determine whether the application configuration data stored in the configuration management database is consistent with the application configuration data stored in the configuration code repository; If they match, the application configuration data is loaded from the location specified in the configuration file. If there is a discrepancy, a configuration error message will be generated.

12. A management device for application configuration data, characterized in that, include: The generation module is adapted to respond to a received application configuration request, generate application configuration data corresponding to the application configuration request, and store the application configuration data in the configuration code repository; The determination module is adapted to obtain the configuration file read type of the application to be configured corresponding to the application configuration request, and determine the configuration file read location corresponding to the configuration file read type, wherein the configuration file read type is used to indicate where the application to be configured needs to load the configuration file from when it starts up; The synchronization module is adapted to synchronize the application configuration data from the configuration code repository to the configuration file reading location if a configuration data synchronization event occurs, in case the configuration file reading location is inconsistent with the configuration code repository, so as to load the application configuration data from the configuration file reading location when the application to be configured starts.

13. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by a processor, implements the method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Model management method and device, equipment and storage medium

    CN112925555A

  • Configuration file synchronization method and device, computer equipment and storage medium

    CN114385759A