Application configuration method and device and computer equipment
By using the temporary protocol folder to update the target protocol folder in data network communication, the problem of modifying configuration files during loading is solved, resulting in load errors, and efficient and accurate configuration updates are achieved.
Patent Information
- Application Number
- CN202411778200.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-11
AI Technical Summary
In the field of data network communication, if configuration files are modified during loading, it is easy to lead to loading errors. Existing solutions avoid errors by blocking the modification of configuration files, but this will lead to a significant reduction in configuration efficiency.
By obtaining configuration modification information, the target protocol folder is updated using the temporary protocol folder, the updated target protocol folder is formed, and sent to the application node to ensure that the application node is loaded according to the latest configuration information.
It realizes refined management and accurate updates of target protocol files, avoids errors caused by directly modifying target protocol files, and improves the accuracy and reliability of configuration updates.
Smart Images

Figure CN119603141A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data network communication technology, and in particular to an application configuration method, device and computer equipment. Background Art
[0002] In the field of data network communications, application configuration usually takes effect by modifying the configuration file and then executing a command to load the configuration.
[0003] However, if the configuration file is modified during configuration loading, loading errors often occur. To solve the above configuration loading error problem, the existing conventional solution is to block the modification of the configuration file during the application configuration loading process, so as to avoid configuration loading errors caused by simultaneous application configuration loading and configuration file modification, but this solution will greatly reduce configuration efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide an application configuration method, device and computer equipment that can solve the above-mentioned technical problems.
[0005] In a first aspect, the present application provides an application configuration method. The method comprises:
[0006] Based on the temporary protocol folder of the acquired configuration modification information, the target protocol folder is updated to obtain an updated target protocol folder;
[0007] The updated target protocol folder is sent to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
[0008] In one embodiment, the temporary protocol folder based on the acquired configuration modification information updates the target protocol folder to obtain an updated target protocol folder, including:
[0009] Modify the configuration file in the temporary protocol folder according to the configuration modification information to obtain a modified temporary configuration file;
[0010] The target configuration file in the target protocol folder is updated according to the modified temporary configuration file to obtain an updated target protocol file.
[0011] In one embodiment, the configuration file in the temporary protocol folder is modified according to the configuration modification information to obtain a modified temporary configuration file, including:
[0012] Perform a validity check on the configuration modification information and obtain the check result;
[0013] The cache file in the temporary protocol folder is updated according to the configuration modification information to obtain an updated cache file;
[0014] When the inspection result indicates that the configuration file is legal, the configuration file in the temporary protocol folder is modified according to the updated cache file and the configuration modification information to obtain a modified temporary configuration file.
[0015] In one embodiment, the method further comprises:
[0016] Obtain the file update time of the updated target protocol folder, send the file update time to the application node so that the application node can compare the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, execute the application configuration loading process according to the updated target protocol folder to obtain the application configuration loading result.
[0017] In a second aspect, the present application also provides an application configuration method. The method includes:
[0018] Obtaining an updated target protocol folder sent by the server; the updated target protocol folder is obtained by updating the target protocol folder based on the temporary protocol folder of the configuration modification information obtained by the server;
[0019] The application configuration loading process is performed according to the updated target protocol folder to obtain the application configuration loading result.
[0020] In one embodiment, the method further comprises:
[0021] When the application configuration loading result indicates successful loading, the backup configuration file in the backup folder is updated according to the updated target protocol folder to obtain an updated backup folder.
[0022] In one embodiment, the above-mentioned application configuration loading process is performed according to the updated target protocol folder to obtain the application configuration loading result, including:
[0023] Get the file update time of the updated target protocol folder sent by the server;
[0024] A comparison is performed based on the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, application configuration loading is performed based on the updated target protocol folder to obtain an application configuration loading result.
[0025] In a third aspect, the present application also provides an application configuration device. The device includes:
[0026] A file update module, used to update the target protocol folder based on the temporary protocol folder of the acquired configuration modification information to obtain an updated target protocol folder;
[0027] The folder sending module is used to send the updated target protocol folder to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
[0028] In a fourth aspect, the present application also provides an application configuration device. The device includes:
[0029] The folder acquisition module is used to acquire the updated target protocol folder sent by the server; the updated target protocol folder is obtained by updating the target protocol folder based on the temporary protocol folder of the configuration modification information acquired by the server;
[0030] The configuration loading module is used to perform application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
[0031] In a fifth aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned first and second aspects of the method when executing the computer program.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the above-mentioned methods in the first aspect and the second aspect are implemented.
[0033] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned first and second aspects of the method are implemented.
[0034] The above-mentioned application configuration method, device and computer equipment update the target protocol folder based on the temporary protocol folder of the acquired configuration modification information to obtain an updated target protocol folder, and then send the updated target protocol folder to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result. The present application realizes the refined management and precise update of the target protocol file by updating the target protocol folder based on the configuration modification information and the temporary protocol folder. The temporary protocol folder can effectively record and process various types of information in the configuration modification process, ensuring that the various configuration parameters are accurately modified when the target protocol folder is updated, avoiding the confusion and errors that may be caused by directly modifying the target protocol file, thereby greatly improving the accuracy and reliability of the configuration update. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 An application environment diagram of an application configuration method in an embodiment;
[0036] Figure 2 A schematic diagram of a flow chart of an application configuration method in an embodiment;
[0037] Figure 3 A schematic diagram of a process for obtaining an updated target protocol folder in one embodiment;
[0038] Figure 4 A schematic diagram of a process of obtaining a modified temporary configuration file in one embodiment;
[0039] Figure 5 A flowchart of an application configuration method in another embodiment;
[0040] Figure 6 A schematic diagram of a process for obtaining an application configuration loading result in an embodiment;
[0041] Figure 7 A structural block diagram of an application configuration device in an embodiment;
[0042] Figure 8 A structural block diagram of an application configuration device in another embodiment;
[0043] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] First of all, before specifically introducing the technical solution of the embodiments of the present application, the technical background based on the embodiments of the present application is introduced.
[0046] For the application configuration to take effect, you need to modify the configuration file and then execute the command to load the configuration. If the configuration file is modified during configuration loading, a loading error may occur. If the modification of the configuration file is blocked during configuration loading, the processing efficiency of the configuration modification request will be reduced.
[0047] Some applications (such as nginx) load configuration files by reloading them into the memory of the application process to make them effective. If there are many configuration files, or a configuration file contains a lot of configuration information, it will take a long time to load. If you modify the configuration file at this time, configuration loading errors may occur. For example, when loading a configuration file that is being modified, problems such as pread() returned only 0 bytes instead of 1195 may occur, or problems such as No such file or directory may occur after deleting a configuration file.
[0048] To solve the above configuration loading error problem, an existing solution is to block the modification of the configuration file during the application configuration loading process, thereby avoiding configuration loading errors caused by simultaneous application configuration loading and configuration file modification.
[0049] However, this solution will lead to a decrease in configuration efficiency, especially when the configuration request needs to wait until the configuration file is modified before sending a response, which is likely to cause a timeout in the request processing. As a result, there is a high probability that a series of dependent configuration delivery blocking or abnormal problems caused by configuration timeout will occur. For example, configuration request 2 depends on the success of configuration request 1, so if request 1 times out or fails, request 2 cannot be delivered or cannot succeed. Therefore, it is not advisable to use blocking waiting to solve the loading error problem caused by simultaneous configuration loading and configuration file modification in scenarios where configuration modifications are frequent and the number of configuration files is large.
[0050] Based on this, the present application provides an application configuration method, apparatus and computer device, aiming to solve the above technical problems.
[0051] The application configuration method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the application node 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 updates the target protocol folder based on the temporary protocol folder of the acquired configuration modification information, obtains the updated target protocol folder, and then sends the updated target protocol folder to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result. Among them, the application node 102 can be but is not limited to various personal computers, laptops, smart phones and tablets, and the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0052] In one embodiment, Figure 2 As shown, an application configuration method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0053] S201, based on the temporary protocol folder of the acquired configuration modification information, update the target protocol folder to obtain an updated target protocol folder.
[0054] Configuration modification information is a specific instruction or data content used to indicate changes to the existing configuration of an application. It can include various types of information such as adding new configuration parameters, modifying the values of existing parameters, and deleting certain unnecessary configuration items. It is the original basis for driving application configuration updates, and its source may be manual operations by system administrators, the execution of automated scripts, or other triggers related to changes in business requirements.
[0055] The temporary protocol folder http_latest is a folder specially set up on the server side for temporarily storing and processing configuration modification related information and files. It acts as an intermediate transition area. Before updating the target protocol folder, the configuration modification information is first integrated, verified, and preliminarily interacted with the existing configuration files here to ensure that the subsequent update operation of the target protocol folder is more accurate and orderly. At the same time, it is easy to trace related information during the entire configuration update process, which is convenient for troubleshooting and version management.
[0056] The target protocol folder http is a folder that stores the core protocol files and related configuration files that the application relies on for actual operation. These files contain various parameter settings, rule definitions, and specifications for interaction with other system components required during the startup and operation of the application, and are the basic configuration basis for the normal operation of the application. To update the target protocol folder is to accurately implement the configuration parameter changes on the related files in this folder according to the configuration modification information, so that the application can run according to the new configuration requirements.
[0057] The server of the embodiment of the present application first receives configuration modification information, which may be transmitted in a specific data format (such as JSON, XML, etc.). The configuration management module on the server side will parse the received configuration modification information and decompose it into specific configuration instructions and parameter values. For example, if the configuration modification information is to change the database connection port of the application from 3306 to 3307, the parsing operation will clearly extract the instruction "modify the database connection port" and the new port value "3307". At the same time, the server will initialize the temporary protocol folder (if it has not been created yet) to ensure that it has the appropriate directory structure and access rights. Different subfolders or file areas may be divided into the temporary protocol folder to store different types of configuration modification related information, such as configuration instruction record files, difference files compared with existing configuration files, verification result files, etc.
[0058] Extract the existing configuration files related to this configuration modification from the target protocol folder. Taking database connection configuration as an example, the configuration files containing database connection parameters (such as application.properties, etc.) will be found from the target protocol folder.
[0059] Compare the extracted existing configuration files with the relevant information in the temporary protocol folder. The specific comparison method can be to compare the text content line by line, or to compare the name and type of the configuration parameter. Through the comparison, the specific location and content that need to be modified in the existing configuration file are determined, such as the specific location of the line where the database connection port is located in the existing configuration file, and the current port value is 3306.
[0060] According to the comparison results and the parsed configuration modification information, the update operation is performed on the corresponding configuration file in the target protocol folder. Taking the modification of the database connection port as an example, the database connection port value will be changed from 3306 to 3307 in the configuration file containing the database connection parameters found. During the update process, it is ensured that the modification operation follows the format requirements of the configuration file itself. For example, for some configuration files, the parameter values may be required to be connected with an equal sign. When updating, it is necessary to ensure that the new port value is also filled in according to the correct format. In addition to modifying specific parameter values, it may also involve adjustments to other related contents in the configuration file. For example, if the database connection port is modified, it may also be necessary to check and update other parameters related to the database connection, such as the connection timeout, to ensure the integrity and rationality of the entire database connection configuration. After completing all necessary update operations, the updated target protocol folder is obtained, and the relevant configuration files in it have accurately reflected the requirements of the configuration modification information.
[0061] Another implementation method: After receiving the configuration modification information, the server of the embodiment of the present application first stores it in a specific "pending configuration information file" in the temporary protocol folder. At the same time, other related auxiliary files in the temporary protocol folder (such as historical configuration modification record files, configuration parameter reference template files, etc.) are loaded and preprocessed. The preprocessing operation may include indexing and updating the historical record file to quickly query similar configuration modifications in the past; parsing the reference template file to extract information such as the standard parameter format and value range that can be used as a reference for this modification.
[0062] S202, sending the updated target protocol folder to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain an application configuration loading result.
[0063] In the embodiment of the present application, after obtaining the updated target protocol folder, the server first packages it. The entire target protocol folder can be packaged in a common compression format (such as ZIP, TAR, etc.) to facilitate transmission and reduce the amount of data transmitted over the network. During the packaging process, necessary file header information, such as folder name, version number, generation time, etc., will be added so that the application node can accurately identify and receive it.
[0064] At the same time, according to the list of application nodes (the server usually maintains a list of known application nodes), determine which application nodes the packaged target protocol folder needs to be sent to. For each application node, obtain its network address (such as IP address or domain name) and receiving port information to prepare for subsequent transmission operations.
[0065] Use appropriate network transmission protocols (such as TCP / IP) to send the packaged updated target protocol folder to each application node. During the transmission process, the transmission status will be monitored in real time, such as the progress of the transmission and whether there is data loss. If data loss or other abnormal conditions are found during the transmission process, they will be processed according to the pre-set retransmission strategy (such as prompting manual intervention after a certain number of automatic retransmissions) to ensure that the updated target protocol folder can be completely and accurately transmitted to each application node.
[0066] After receiving the packaged file from the server, the application node first decompresses it and restores the packaged file to the updated target protocol folder. The decompression operation will perform the corresponding decompression algorithm operation according to the compression format used when packaging, ensuring that the decompressed file is consistent with the original file sent by the server in terms of content and format.
[0067] After the decompression is completed, the application node will perform a preliminary check on the decompressed target protocol folder, such as checking whether the number of files in the folder is consistent with expectations, whether the file names and formats are correct, etc., to ensure that the received files are complete and correct.
[0068] The application node starts loading the application configuration according to the new configuration file content in the unzipped target protocol folder. First, it reads each new configuration file and parses the parameter information therein. For example, for a new configuration file containing database connection parameters, it will parse out the database connection port, user name, password and other parameter values.
[0069] Then, the parsed parameter values are applied to the corresponding application modules, such as applying the database connection port value to the database connection module, and applying the user name and password to the database authentication module. During the application process, necessary initialization and startup preparation work will be performed, such as initializing the database connection object, starting related services, etc., to ensure that the application can run normally under the new configuration state.
[0070] Finally, the application configuration loading result is obtained based on the execution of the application configuration loading process. If all parameters can be successfully applied and the application can be started and run normally, the application configuration loading result is "successful"; if any abnormal situation occurs during the loading process, such as a parameter cannot be applied, the service startup fails, etc., the application configuration loading result is "failed", and the specific reason for the failure will be recorded for subsequent feedback to the server or troubleshooting.
[0071] Another implementation method: When the server wants to send the updated target protocol folder to the application node, if the application system is distributed and adopts a specific distributed transmission mechanism (such as distributed file transmission based on Zookeeper, etc.), then the server must first interact with the distributed transmission system, register the transmission task, and provide relevant information of the updated target protocol folder (such as folder name, version number, content summary, etc.) and the list of application nodes to be sent to.
[0072] The above-mentioned application configuration method updates the target protocol folder based on the temporary protocol folder of the obtained configuration modification information to obtain an updated target protocol folder, and then sends the updated target protocol folder to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result. The present application realizes the refined management and precise update of the target protocol file by updating the target protocol folder based on the configuration modification information and the temporary protocol folder. The temporary protocol folder can effectively record and process various types of information in the configuration modification process, ensuring that the various configuration parameters are accurately modified when the target protocol folder is updated, avoiding the confusion and errors that may be caused by directly modifying the target protocol file, thereby greatly improving the accuracy and reliability of the configuration update.
[0073] In an exemplary embodiment, based on the above embodiment, see Figure 3 The embodiment of the present application relates to a process of updating a target protocol folder based on a temporary protocol folder of acquired configuration modification information to obtain an updated target protocol folder, including the following steps:
[0074] S301, modifying the configuration file in the temporary protocol folder according to the configuration modification information to obtain a modified temporary configuration file.
[0075] In the embodiment of the present application, first, after receiving the configuration modification information, the system will parse it. At the same time, the original configuration file related to the configuration modification is located in the temporary protocol folder. Taking the database connection configuration as an example, the configuration file containing the database connection parameters will be found in the temporary protocol folder. All contents are extracted from the located original configuration file, and it is read and stored in text form or according to a specific data structure for subsequent comparison operations.
[0076] Compare the extracted original configuration file content with the configuration modification information. The specific comparison method can be to compare the text content line by line, or to perform targeted comparison based on the name and type of the configuration parameter. Through the comparison, determine the specific location and content that needs to be modified in the original configuration file. According to the comparison results and the parsed configuration modification information, perform modification operations on the original configuration file. In addition to modifying specific parameter values, it may also involve adjustments to other related content in the configuration file. For example, if the database connection port is modified, it may also be necessary to check and update other parameters related to the database connection, such as the connection timeout, to ensure the integrity and rationality of the entire database connection configuration. After completing all necessary modification operations, the modified temporary configuration file is obtained, in which the relevant configuration files have accurately reflected the requirements of the configuration modification information.
[0077] Another implementation method: the temporary protocol folder can be preprocessed and the configuration modification information can be verified, that is, after receiving the configuration modification information, it is first stored in a specific "pending configuration information file" in the temporary protocol folder. At the same time, other related auxiliary files in the temporary protocol folder (such as historical configuration modification record files, configuration parameter reference template files, etc.) are loaded and preprocessed. The preprocessing operation may include indexing and updating the historical record file to quickly query similar configuration modifications in the past; parsing the reference template file to extract information such as the standard parameter format and value range that can be used as a reference for this modification.
[0078] The configuration modification information is read from the "pending configuration information file" in the temporary protocol folder, and verified according to the reference template file obtained by preprocessing. The verification includes checking whether each parameter value in the configuration modification information is within a reasonable value range, and whether the logical relationship between the parameters conforms to the running logic of the application. For example, if the configuration modification information involves modifying the memory allocation parameters of the application, the newly proposed memory allocation parameter value will be checked according to the value range of the memory allocation parameter specified in the reference template file (such as a minimum of 1GB and a maximum of 16GB) to see if it is within this range, and also check whether the logical relationship with other related parameters (such as CPU core number allocation, etc.) is reasonable.
[0079] S302, updating the target configuration file in the target protocol folder according to the modified temporary configuration file to obtain an updated target protocol file.
[0080] The embodiment of the present application locates the target configuration file related to the configuration modification in the target protocol folder. The content of the modified temporary configuration file read is compared with the content of the target configuration file in the target protocol folder. The specific comparison method can be to compare the text content line by line, or to perform targeted comparison according to the name and type of the configuration parameter. Through the comparison, the specific location and content that need to be modified in the target configuration file in the target protocol folder are determined. According to the comparison results, the update operation steps for the target configuration file in the target protocol folder are planned. According to the planned update operation steps, the update operation is performed on the target configuration file in the target protocol folder. During the update process, it is necessary to pay attention to the format requirements of the configuration file itself to ensure that the modified file is in the format and standardized. After completing all necessary update operations, the updated target protocol file is obtained, in which the relevant configuration files have accurately reflected the requirements of the configuration modification information.
[0081] The embodiment of the present application forms a hierarchical processing mechanism by first modifying the configuration file in the temporary protocol folder according to the configuration modification information to obtain the modified temporary configuration file, and then updating the target configuration file in the target protocol folder based on this, which allows each configuration parameter modification to be checked and verified twice (once in the temporary protocol folder and once in the target protocol folder), effectively avoiding errors that may be caused by directly updating the target protocol folder, greatly improving the accuracy of configuration updates, and ensuring that the application can run according to the accurate new configuration.
[0082] In an exemplary embodiment, based on the above embodiment, see Figure 4 The embodiment of the present application relates to a process of modifying a configuration file in a temporary protocol folder according to configuration modification information to obtain a modified temporary configuration file, including the following steps:
[0083] S401, performing a validity check on the configuration modification information to obtain a check result.
[0084] In the embodiment of the present application, the server will load the preset configuration rule set from the configuration management module. These rule sets cover multiple aspects, including data type requirements of configuration parameters (such as integers, strings, Boolean values, etc.), value range restrictions (such as port numbers must be between 1-65535), logical relationships between parameters (such as how other parameters associated with a function should be set when it is enabled), and compatibility requirements with existing application architectures.
[0085] Next, traverse each parameter or instruction in the configuration modification information. For each parameter, first determine its corresponding check condition, which is determined based on the rule set parsed previously. For example, if you are modifying a port number parameter, you will find the check condition for the port number value range. Then, check the parameter according to the determined check condition.
[0086] When checking the logical relationship between parameters, the logical expressions parsed by the rule set are used to verify whether the relationship between the related parameters meets the requirements. For example, if a configuration modification information is to enable a certain advanced function and requires another related parameter to take a specific value, then the actual settings of the two parameters will be checked to see whether they meet this logical relationship.
[0087] After completing the parameter-by-parameter check of all parameters and instructions, a comprehensive judgment is made based on the results of each check. If all parameters and instructions pass their corresponding check conditions, the check result is "legal"; if any parameter or instruction fails the check, the check result is "illegal", and the name of the parameter that failed the check, the specific error cause (such as the value is out of range, the format does not meet the requirements, etc.) and other information will be recorded in detail for subsequent targeted correction processing.
[0088] S402: updating the cache file in the temporary protocol folder according to the configuration modification information to obtain an updated cache file.
[0089] The embodiment of the present application first reads the cache file from the temporary protocol folder. The cache file may be stored in a specific data format (such as JSON, XML, etc.), and after reading, it will be parsed according to the corresponding format and converted into an operable data structure, such as parsing the cache file in JSON format into a data structure such as a dictionary or list, so that the content can be easily accessed and modified later.
[0090] According to the configuration modification information, determine which parts of the cache file need to be updated. For example, if the configuration modification information modifies the database connection parameters of the application, then you need to find the parts related to the database connection in the cache file, which may be the area that stores the commonly used database connection port number, user name, password and other information. These are the points that need to be updated.
[0091] For some complex configuration modification information, you may need to consider multiple related factors to determine the update point. For example, if you modify the network configuration of an application, in addition to directly updating parameters such as the network IP address, you may also need to update the records of network-related performance indicators in the cache file, because these data may change due to changes in the network configuration.
[0092] For the determined update point, perform the update operation according to the requirements of the configuration modification information. Continuing with the modification of database connection parameters as an example, if the new database connection port number is 3307, then find the corresponding port number record area in the cache file and update its value to 3307. Similarly, for other parameters such as user name, password, etc., if there are changes, corresponding update operations are also performed.
[0093] During the update process, it is necessary to ensure that the updated cache file still maintains its original data structure and format requirements so that it can be used normally in the future. For example, if the cache file stores data according to a specific hierarchical structure, it is necessary to ensure that this hierarchical structure is not destroyed after the update.
[0094] After all update operations are completed, the updated content is reorganized according to the original format to generate an updated cache file. This updated cache file has accurately reflected the impact of the configuration modification information on the cache-related content, providing the latest reference information for subsequent configuration modification processing.
[0095] S403, when the inspection result indicates legality, modify the configuration file in the temporary protocol folder according to the updated cache file and the configuration modification information to obtain a modified temporary configuration file.
[0096] In the embodiment of the present application, when the check result is "legal", the updated cache file and the configuration modification information are first merged. The configuration file related to the configuration modification is located in the temporary protocol folder. The entire content of the located configuration file is read and stored in text form or according to a specific data structure for subsequent comparison and modification operations. The merged information set is compared with the content of the read configuration file.
[0097] According to the comparison results, plan the steps to modify the configuration file. For example, if you want to change the database connection port value from 3306 to 3307, you need to find the line where the database connection port is located in the configuration file, and then change its value from 3306 to 3307. Based on the modification of the database connection port, consider whether other parameters related to the database connection (such as connection timeout, etc.) need to be adjusted accordingly to ensure the integrity and rationality of the entire database connection configuration.
[0098] According to the planned modification steps, modify the configuration files in the temporary protocol folder. During the modification process, pay attention to the format requirements of the configuration files themselves to ensure that the modified files are still standardized in format. After completing all necessary modification operations, you will get the modified temporary configuration files, in which the relevant configuration files have accurately reflected the requirements of the configuration modification information.
[0099] The embodiment of the present application can screen out configuration modification information that does not comply with regulations by performing a legality check on the configuration modification information, thereby avoiding invalid modifications or erroneous modifications caused by erroneous configuration modification information. Then, if the check result is legal, the configuration file in the temporary protocol folder is modified based on the updated cache file and the configuration modification information. Since the cache file provides relevant reference information, the modification operation is more accurate, which effectively improves the accuracy of the configuration update and ensures that the application can run according to the accurate new configuration.
[0100] In an exemplary embodiment, based on the above embodiment, the method of the embodiment of the present application also includes: obtaining the file update time of the updated target protocol folder, sending the file update time to the application node so that the application node can perform a comparison process based on the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, execute the application configuration loading process based on the updated target protocol folder to obtain the application configuration loading result.
[0101] In the embodiment of the present application, after the update operation of the target protocol folder is completed on the server side and the updated target protocol folder is obtained, the server will immediately record the current system time as the file update time. The obtained file update time and the identification information related to the updated target protocol folder (such as folder name, version number, etc.) are packaged and processed to form a data packet containing the file update time and basic information of the target protocol folder.
[0102] At the same time, based on the list of application nodes (the server usually maintains a list of known application nodes), determine which application nodes this data packet needs to be sent to.
[0103] Use appropriate network transmission protocols (such as TCP / IP) to send packaged data packets to each application node. During the transmission process, the transmission status will be monitored in real time, such as the progress of the transmission and whether there is data loss. If data loss or other abnormal conditions are found during the transmission process, they will be processed according to the pre-set retransmission strategy (such as prompting manual intervention after a certain number of automatic retransmissions) to ensure that the data packet can be transmitted to each application node completely and accurately.
[0104] After receiving the data packet containing the file update time from the server, the application node will first unpack the data packet to extract the file update time and the relevant identification information of the target protocol folder. Then, the file update time will be parsed according to the time format of the local system so that it can be accurately compared with the locally recorded configuration loading time.
[0105] The application node will obtain the configuration loading time recorded by the previous successful completion of the application configuration loading process from the local storage.
[0106] Compare the parsed file update time with the obtained configuration loading time. If the file update time is greater than the configuration loading time, it means that the target protocol folder on the server has been updated, but the application node has not used the latest configuration information, so it is necessary to perform application configuration loading according to the updated target protocol folder.
[0107] The embodiment of the present application sends the file update time of the updated target protocol folder to the application node, and compares it with the configuration loading time pre-acquired by the application node. The application configuration loading process is performed only when the file update time is greater than the configuration loading time, which can ensure that the application node always uses the latest configuration information. This avoids the configuration inconsistency problem caused by the application node not obtaining the latest configuration in time, ensures the configuration uniformity and coordination of the entire application system on different nodes, and enables the application to run normally under a consistent configuration environment.
[0108] In an exemplary embodiment, Figure 5 As shown, an application configuration method is provided, which is applied to Figure 1 The application node in is taken as an example to illustrate, including the following steps:
[0109] S501, obtaining an updated target protocol folder sent by the server.
[0110] The updated target protocol folder is obtained by updating the target protocol folder based on the temporary protocol folder of the acquired configuration modification information.
[0111] In the embodiment of the present application, the application node first needs to establish a reliable network connection with the server. At the same time, the application node will set up a monitoring mechanism locally to continuously monitor the data packets from the server. When the server starts to send data related to the updated target protocol folder, the application node receives these data packets through the established network connection and monitoring mechanism. The received data packets may be compressed and packaged to reduce the amount of data transmitted over the network and improve transmission efficiency.
[0112] The application node will initially identify the received data packet and confirm whether it is the data related to the updated target protocol folder that it needs by checking the header information of the data packet (such as file identifier, version number, etc.). If the header information of the data packet is consistent with the expectation, then it can be determined that it is the target data to be received.
[0113] After confirming that the received data packet is the relevant data of the updated target protocol folder, the application node will decompress the data packet. The decompression operation will perform the corresponding decompression algorithm operation according to the compression format (such as ZIP, TAR, etc.) used when the data packet was sent, and restore the data packet to the original file structure and content of the updated target protocol folder.
[0114] During the decompression process, the decompressed file will be checked for integrity to ensure that the decompressed file is consistent with the original file sent by the server in terms of content and format. If any file is found to be damaged or missing, a resend request will be sent to the server, asking the server to resend the complete updated target protocol folder.
[0115] After the decompression is completed and the file integrity check passes, the application node will store the decompressed updated target protocol folder to the local specified storage location. This storage location can be a specific directory on the local hard disk or an area specifically set by the application to store configuration files.
[0116] After the storage is completed, the application node will perform some preparation work on the stored updated target protocol folder, such as checking whether the number of files in the folder is consistent with the expectation, whether the file name and format are correct, etc., to ensure that the received files are complete and correct, and prepare for the subsequent application configuration loading process.
[0117] S502: Perform application configuration loading processing according to the updated target protocol folder to obtain an application configuration loading result.
[0118] In the embodiment of the present application, the application node takes out each configuration file in the updated target protocol folder from the local storage location. After reading into the memory, the application node will perform a parsing operation on each configuration file. The parsing operation will extract the parameter information therein according to the format and content characteristics of the configuration file. For example, for a configuration file containing database connection parameters, the database connection port, user name, password and other parameter values will be parsed.
[0119] According to the parsed parameter values, the application node will apply these parameter values to the corresponding application modules. For example, the database connection port value is applied to the database connection module, and the user name and password are applied to the database authentication module. During the application process, necessary initialization and startup preparation work will be performed, such as initializing the database connection object and starting related services, to ensure that the application can run normally under the new configuration state.
[0120] After applying all parameter values to the corresponding application modules, the application node will verify the configuration of the entire application. The verification includes checking whether the interaction between the modules is normal, whether there are unconfigured parameters, etc. For example, check whether the database connection module can successfully connect to the database, whether the various functional modules of the application can be started normally, etc.
[0121] The result of application configuration loading is determined based on the result of the overall configuration verification. If the interaction between all modules is normal and there are no abnormal conditions such as unconfigured parameters, the result of application configuration loading is "successful"; if some abnormal conditions are found during the verification process, such as a parameter that cannot be applied or service startup failure, the result of application configuration loading is "failed" and the specific reason for the failure will be recorded for subsequent feedback to the server or troubleshooting.
[0122] In the embodiment of the present application, the server processes the configuration modification information and sends the updated target protocol folder to the application node, and then the application node performs application configuration loading processing according to the received updated target protocol folder, so that each application node in the entire application system can run according to the same latest configuration requirements. This avoids the configuration inconsistency problem caused by different application nodes using different configuration versions, ensures a unified operating environment for the application in the entire system, and improves the stability and reliability of the system.
[0123] In an exemplary embodiment, based on the above embodiment, the method of the embodiment of the present application also includes: when the application configuration loading result indicates successful loading, updating the backup configuration file in the backup folder according to the updated target protocol folder to obtain an updated backup folder.
[0124] The backup folder http_lkg is a folder specifically used to store backups of application configuration files. Its purpose is to obtain the previous valid configuration files from the backup folder for recovery when various situations occur (such as configuration loading failure, configuration file damage, etc.), so as to ensure that the application can continue to run normally or facilitate troubleshooting, etc. The backup configuration files in the backup folder are usually obtained by copying or backing up the configuration files of the application at a specific time point or when an event occurs (such as after the configuration is loaded successfully, regular backup, etc.).
[0125] In the embodiment of the present application, first, after completing the application configuration loading process, the application node will obtain the application configuration loading result. Then, the location of the backup folder is located in the local storage system. The backup folder usually has a pre-set storage path, such as a specific subdirectory "backup" under the installation directory of the application. The application node will find the backup folder according to this known path.
[0126] Read the contents of each configuration file from the updated target protocol folder, read and store it in text form or according to a specific data structure for subsequent comparison operations. At the same time, extract the corresponding backup configuration file from the backup folder, and read its content in an appropriate manner. Compare the contents of the configuration files in the updated target protocol folder with the contents of the backup configuration files in the backup folder line by line or perform targeted comparisons based on the names and types of configuration parameters. Through comparison, determine the specific location and content that needs to be updated in the backup configuration file.
[0127] According to the comparison results, update operations are performed on the backup configuration file in the backup folder. In addition to modifying specific parameter values, it may also involve adjusting other related contents in the backup configuration file. For example, if the configuration file in the updated target protocol folder also modifies related parameters such as the timeout period of the database connection, then the backup configuration file in the backup folder must also be modified accordingly to ensure that the entire backup configuration file is completely consistent with the configuration file content in the updated target protocol folder. After completing all necessary update operations, an updated backup folder is obtained, in which the backup configuration file has accurately reflected the configuration file content in the updated target protocol folder.
[0128] In the embodiment of the present application, when the application configuration loading result indicates successful loading, the backup configuration file in the backup folder is updated according to the updated target protocol folder to obtain an updated backup folder, so that the backup folder always maintains the latest valid configuration backup. During the subsequent application operation, if problems such as configuration loading failure and configuration file corruption occur, the latest valid configuration file can be quickly obtained from the updated backup folder for recovery operations, which greatly improves the recoverability of application configuration management and reduces the risk of the application not being able to run normally due to configuration problems.
[0129] In an exemplary embodiment, based on the above embodiment, see Figure 6 The embodiment of the present application relates to a process of performing application configuration loading processing according to an updated target protocol folder to obtain an application configuration loading result, including the following steps:
[0130] S601, obtaining the file update time of the updated target protocol folder sent by the server.
[0131] In the embodiment of the present application, the application node receives a data packet containing information related to the updated target protocol folder sent by the server through a network connection (such as a TCP / IP protocol connection) established with the server. The application node unpacks the received data packet and extracts the file update time and other relevant identification information (such as the folder name, version number, etc.) of the updated target protocol folder.
[0132] S602, performing a comparison process based on the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, executing application configuration loading processing based on the updated target protocol folder to obtain an application configuration loading result.
[0133] In the embodiment of the present application, the application node obtains the configuration loading time recorded by the previous successful completion of the application configuration loading process from the local storage. This storage location can be a local database, a configuration file, or a cache area specifically used to store such time information. For example, a table in the local database stores the time record of each successful application configuration loading, and the application node will query and obtain the last configuration loading time from here.
[0134] Compare the obtained file update time (converted to a format comparable to the local system) with the obtained configuration loading time. If the file update time is greater than the configuration loading time, it means that the target protocol folder on the server has been updated, but the application node has not yet used the latest configuration information, so it is necessary to perform application configuration loading processing based on the updated target protocol folder.
[0135] The application node starts loading the application configuration according to the contents of the new configuration file in the updated target protocol folder. First, it reads each new configuration file and parses the parameter information therein. For example, for a new configuration file containing database connection parameters, it parses out the database connection port, user name, password and other parameter values.
[0136] Then, the parsed parameter values are applied to the corresponding application modules, such as applying the database connection port value to the database connection module, and applying the user name and password to the database authentication module. During the application process, necessary initialization and startup preparation work will be performed, such as initializing the database connection object, starting related services, etc., to ensure that the application can run normally under the new configuration state.
[0137] Finally, the application configuration loading result is obtained based on the execution of the application configuration loading process. If all parameters can be successfully applied and the application can start and run normally, the application configuration loading result is "successful"; if any abnormal situation occurs during the loading process, such as a parameter cannot be applied, the service startup fails, etc., the application configuration loading result is "failed", and the detailed reason for the failure will be recorded for subsequent feedback to the server or troubleshooting.
[0138] The embodiment of the present application sends the file update time of the updated target protocol folder to the application node, and compares it with the configuration loading time pre-acquired by the application node. The application configuration loading process is performed only when the file update time is greater than the configuration loading time, which can ensure that the application node always uses the latest configuration information. This avoids the configuration inconsistency problem caused by the application node not obtaining the latest configuration in time, ensures the configuration uniformity and coordination of the entire application system on different nodes, and enables the application to run normally under a consistent configuration environment.
[0139] In an exemplary embodiment, based on the above embodiment, the method of the embodiment of the present application further includes the following steps:
[0140] Step 1: The server performs a validity check on the acquired configuration modification information to obtain a check result; updates the cache file in the temporary protocol folder according to the configuration modification information to obtain an updated cache file; if the check result indicates that the configuration file is legal, the configuration file in the temporary protocol folder is modified according to the updated cache file and the configuration modification information to obtain a modified temporary configuration file;
[0141] Step 2: The server updates the target configuration file in the target protocol folder according to the modified temporary configuration file to obtain an updated target protocol file; and sends the updated target protocol folder and the file update time of the updated target protocol folder to the application node;
[0142] Step 3: The application node obtains the updated target protocol folder and the file update time of the updated target protocol folder sent by the server; performs a comparison process based on the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, performs application configuration loading processing based on the updated target protocol folder to obtain the application configuration loading result;
[0143] Step 4: When the application configuration loading result indicates successful loading, the application node updates the backup configuration file in the backup folder according to the updated target protocol folder to obtain an updated backup folder.
[0144] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0145] Based on the same inventive concept, the embodiment of the present application also provides an application configuration device for implementing the above-mentioned application configuration method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more application configuration device embodiments provided below can refer to the limitations on the application configuration method above, and will not be repeated here.
[0146] In one embodiment, Figure 7 As shown, an application configuration device 700 is provided, comprising:
[0147] The file update module 701 is used to update the target protocol folder based on the temporary protocol folder of the acquired configuration modification information to obtain an updated target protocol folder;
[0148] The folder sending module 702 is used to send the updated target protocol folder to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
[0149] In one embodiment, the file update module includes:
[0150] A file modification unit, used to modify the configuration file in the temporary protocol folder according to the configuration modification information to obtain a modified temporary configuration file;
[0151] The file updating unit is used to update the target configuration file in the target protocol folder according to the modified temporary configuration file to obtain an updated target protocol file.
[0152] In one embodiment, the file modification unit includes:
[0153] The legality check subunit is used to perform a legality check on the configuration modification information and obtain a check result;
[0154] The cache update subunit is used to update the cache files in the temporary protocol folder according to the configuration modification information to obtain the updated cache files;
[0155] The configuration modification subunit is used to modify the configuration file in the temporary protocol folder according to the updated cache file and the configuration modification information to obtain a modified temporary configuration file when the inspection result indicates that the configuration file is legal.
[0156] In one embodiment, the above device further comprises:
[0157] The application loading module is used to obtain the file update time of the updated target protocol folder, send the file update time to the application node so that the application node can compare the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, execute the application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
[0158] In one embodiment, Figure 8 As shown, an application configuration device 800 is provided, comprising:
[0159] The folder acquisition module 801 is used to acquire the updated target protocol folder sent by the server; the updated target protocol folder is obtained by updating the target protocol folder based on the temporary protocol folder of the configuration modification information acquired by the server;
[0160] The configuration loading module 802 is used to perform application configuration loading processing according to the updated target protocol folder to obtain an application configuration loading result.
[0161] In one embodiment, the above device further comprises:
[0162] The backup file update module is used to update the backup configuration file in the backup folder according to the updated target protocol folder to obtain the updated backup folder when the application configuration loading result indicates successful loading.
[0163] In one embodiment, the configuration loading module includes:
[0164] A time acquisition unit, used to acquire the file update time of the updated target protocol folder sent by the server;
[0165] The time comparison unit is used to compare the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, execute the application configuration loading process according to the updated target protocol folder to obtain the application configuration loading result.
[0166] Each module in the above application configuration device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0167] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an application configuration method is implemented.
[0168] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0169] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0170] Based on the temporary protocol folder of the acquired configuration modification information, the target protocol folder is updated to obtain an updated target protocol folder;
[0171] The updated target protocol folder is sent to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
[0172] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0173] Modify the configuration file in the temporary protocol folder according to the configuration modification information to obtain a modified temporary configuration file;
[0174] The target configuration file in the target protocol folder is updated according to the modified temporary configuration file to obtain an updated target protocol file.
[0175] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0176] Perform a validity check on the configuration modification information and obtain the check result;
[0177] The cache file in the temporary protocol folder is updated according to the configuration modification information to obtain an updated cache file;
[0178] When the inspection result indicates that the configuration file is legal, the configuration file in the temporary protocol folder is modified according to the updated cache file and the configuration modification information to obtain a modified temporary configuration file.
[0179] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0180] Obtain the file update time of the updated target protocol folder, send the file update time to the application node so that the application node can compare the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, execute the application configuration loading process according to the updated target protocol folder to obtain the application configuration loading result.
[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0182] Obtaining an updated target protocol folder sent by the server; the updated target protocol folder is obtained by updating the target protocol folder based on the temporary protocol folder of the configuration modification information obtained by the server;
[0183] The application configuration loading process is performed according to the updated target protocol folder to obtain the application configuration loading result.
[0184] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0185] When the application configuration loading result indicates successful loading, the backup configuration file in the backup folder is updated according to the updated target protocol folder to obtain an updated backup folder.
[0186] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0187] Get the file update time of the updated target protocol folder sent by the server;
[0188] A comparison is performed based on the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, application configuration loading is performed based on the updated target protocol folder to obtain an application configuration loading result.
[0189] According to some embodiments of the present application, a computer program product is also provided, and when the computer program is executed by a processor, the above method can be implemented. The computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, part or all of the above method can be implemented in whole or in part according to the process or function described in the embodiment of the present application.
[0190] According to some embodiments of the present application, there is also provided a non-transitory computer-readable storage medium including instructions, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0191] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0192] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0193] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0194] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An application configuration method, characterized in that: The method comprises: Based on the temporary protocol folder of the acquired configuration modification information, the target protocol folder is updated to obtain an updated target protocol folder; The updated target protocol folder is sent to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain an application configuration loading result.
2. The method according to claim 1, characterized in that The temporary protocol folder based on the acquired configuration modification information updates the target protocol folder to obtain an updated target protocol folder, including: Modify the configuration file in the temporary protocol folder according to the configuration modification information to obtain a modified temporary configuration file; The target configuration file in the target protocol folder is updated according to the modified temporary configuration file to obtain the updated target protocol file.
3. The method according to claim 2, characterized in that The step of modifying the configuration file in the temporary protocol folder according to the configuration modification information to obtain a modified temporary configuration file includes: Performing a legality check on the configuration modification information to obtain a check result; Update the cache file in the temporary protocol folder according to the configuration modification information to obtain an updated cache file; When the inspection result indicates legality, the configuration file in the temporary protocol folder is modified according to the updated cache file and the configuration modification information to obtain the modified temporary configuration file.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Obtain the file update time of the updated target protocol folder, send the file update time to the application node so that the application node compares the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, execute the application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
5. An application configuration method, characterized in that: The method comprises: Obtaining an updated target protocol folder sent by the server; the updated target protocol folder is obtained by the server updating the target protocol folder based on the temporary protocol folder of the configuration modification information obtained; The application configuration loading process is performed according to the updated target protocol folder to obtain the application configuration loading result.
6. The method according to claim 5, characterized in that The method further comprises: In the case where the application configuration loading result indicates successful loading, the backup configuration file in the backup folder is updated according to the updated target protocol folder to obtain an updated backup folder.
7. The method according to claim 6, characterized in that The performing application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result includes: Get the file update time of the updated target protocol folder sent by the server; A comparison process is performed based on the file update time and the pre-acquired configuration loading time, and when the file update time is greater than the configuration loading time, the application configuration loading process is performed based on the updated target protocol folder to obtain an application configuration loading result.
8. An application configuration device, characterized in that: The device comprises: A file update module, used to update the target protocol folder based on the temporary protocol folder of the acquired configuration modification information to obtain an updated target protocol folder; The folder sending module is used to send the updated target protocol folder to the application node, so that the application node performs application configuration loading processing according to the updated target protocol folder to obtain the application configuration loading result.
9. An application configuration device, characterized in that: The device comprises: A folder acquisition module, used to acquire an updated target protocol folder sent by the server; the updated target protocol folder is obtained by updating the target protocol folder based on the temporary protocol folder of the configuration modification information acquired by the server; The configuration loading module is used to perform application configuration loading processing according to the updated target protocol folder to obtain an application configuration loading result.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Application configuration file updating method and apparatus
CN107368331A
Application program configuration method and device, server and storage medium
CN108037961A
Desktop program updating method and device
CN115981693A
Method and device for automatically acquiring configuration file of game, medium and equipment
CN117065359A
Hot update method and system based on protocol payment configuration file
CN117827311A