Configuration file modification method and device, electronic equipment and computer readable medium
By receiving server file information and determining target server and component information, and using pre-stored file loading method groups to modify configuration files, the problems of poor real-time and high resource consumption of configuration file modification in the prior art are solved, and flexibility and Improved universality.
Patent Information
- Application Number
- CN202411255541.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-24
AI Technical Summary
The prior art has problems such as poor real-time, high resource consumption, flexibility and insufficient general usage when modifying configuration files. In particular, the latest configuration file information cannot be obtained in real time and the Agent program is required for issuance operations.
By receiving server file information, determining the target server and configuration component information, using the pre-stored file loading method group to determine the target file loading method, and updating the configuration modification information entered by the user, directly sending the updated component information to the target server , avoiding the deployment and maintenance of Agent programs.
Improve the real-time and flexibility of configuration file modification, reduce resource consumption, and realize the modification and deployment of configuration files without the need for the Agent program.
Smart Images

Figure CN119179512A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a configuration file modification method, device, electronic device, and computer-readable medium. Background Art
[0002] Usually a software system has several components, and each component has one or more configuration files. These configuration files are often in various formats (such as json / properties / yaml / xml) and contain a lot of content. When deploying a software system, in order to simplify the operation, a visual program is usually provided to simplify the configuration maintenance process. The usual method is: the program directly reads the configuration from the key-value pairs stored locally in the configuration management program. Then, modify the preset specific configuration items. Then, rely on fixed template files to render and generate configuration files. Finally, the distribution operation is implemented through the Agent program pre-installed on the server.
[0003] However, when the configuration file information is modified in the above manner, the following technical problems often occur:
[0004] First, the configuration file information obtained is not the latest value, and if the actual configuration file of the component on the server has been modified, this additional modification will be lost, resulting in poor real-time performance of configuration file modification. In addition, during the distribution process, the Agent program pre-installed on the server is required to implement the distribution operation, resulting in more resources spent on the deployment and maintenance of the pre-installed Agent program.
[0005] Second, when modifying the configuration file, only the preset specific configuration items can be modified, resulting in poor flexibility in modifying the configuration file. Also, when modifying configuration files of the same format, there is no way to load files in a unified format, resulting in poor versatility in modifying the configuration file.
[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0007] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0008] Some embodiments of the present disclosure provide a configuration file information modification method, an apparatus, an electronic device, and a computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0009] In a first aspect, some embodiments of the present disclosure provide a method for modifying configuration file information, the method comprising: receiving server file information, wherein the server file information comprises server information and configuration component information; determining a target server based on the server information; determining target component information corresponding to the configuration component information based on the configuration component information and the target server; determining a target file loading method based on the target component information and a pre-stored file loading method group; displaying the target component information; in response to detecting configuration modification information input by a target user, performing the following steps: in response to determining that the configuration modification information satisfies a first configuration condition, updating the target component information based on the configuration modification information; and sending the updated target component information to the target server.
[0010] In a second aspect, some embodiments of the present disclosure provide a configuration file information modification device, the device comprising: a receiving unit, configured to receive server file information, wherein the server file information comprises server information and configuration component information; a first determination unit, configured to determine a target server based on the server information; a second determination unit, configured to determine target component information corresponding to the configuration component information based on the configuration component information and the target server; a third determination unit, configured to determine a target file loading method based on the target component information and a pre-stored file loading method group; a display unit, configured to display the target component information; an execution unit, configured to, in response to detecting configuration modification information input by a target user, perform the following steps: in response to determining that the configuration modification information satisfies a first configuration condition, update the target component information based on the configuration modification information; and send the updated target component information to the target server.
[0011] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0012] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0013] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the configuration file information modification method of some embodiments of the present disclosure, the real-time performance of configuration file modification can be improved and resource consumption can be reduced. Specifically, the reason for the poor flexibility of configuration file modification and the high resource consumption is that the obtained configuration file information is not the latest value, and if the actual configuration file of the component on the server has been modified, this part of the additional modification will be lost, resulting in poor real-time performance of configuration file modification. And in the process of issuing, the Agent program pre-installed on the server is required to implement the issuing operation, resulting in more resources spent on the deployment and maintenance of the pre-installed Agent program. Based on this, the configuration file information modification method of some embodiments of the present disclosure first receives server file information, wherein the server file information includes server information and configuration component information. Thus, the server information and configuration component information that need to be deployed for the configuration file can be obtained. Then, based on the server information, the target server is determined. Thus, the target server corresponding to the server information can be determined. Then, based on the configuration component information and the target server, the target component information corresponding to the configuration component information is determined. Thus, the latest target component information can be determined. Secondly, based on the target component information and the pre-stored file loading mode group, the target file loading mode is determined. Thus, the target file loading mode can be obtained. Then, the target component information is displayed. Thus, the target group set information can be displayed. Then, in response to detecting the configuration modification information input by the target user, the following steps are performed: in response to determining that the configuration modification information meets the first configuration condition, the target component information is updated based on the configuration modification information. Thus, the target component information can be modified. Finally, the updated target component information is sent to the target server. Thus, the modified target component information can be sent to the target server for deployment, without the need for a pre-installed Agent program for deployment. Also, because the target server is first obtained, and then the configuration component information corresponding to the target server is obtained and modified, the value in the actual configuration file can be obtained, thereby improving the real-time nature of the configuration file modification. Also, because the modified target component information is directly sent to the target server, the configuration file can be modified without the need for an Agent program, thereby reducing the resources spent on deployment and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0015] Figure 1 A flowchart of some embodiments of a method for modifying profile information according to the present disclosure is shown;
[0016] Figure 2 is a schematic diagram of the structure of some embodiments of the configuration file information modification device according to the present disclosure;
[0017] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0019] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0020] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0024] Figure 1 The process 100 of some embodiments of the configuration file information modification method according to the present disclosure is shown. The configuration file information modification method comprises the following steps:
[0025] Step 101, receiving server file information.
[0026] In some embodiments, the execution subject (e.g., a computing device) of the configuration file information modification method may receive server file information. The execution subject may be a server for modifying and managing configuration file information. The server file information may be a model information representing the model information and the model information of the configuration component related to the server. The server file information may include server information and configuration component information. The server information may be text information of the server model or text information of the server address. For example, the server information may be "XXXServer XXXXHVX", "XXXServer XXXX" or "127.XX1", "10.XX255". The configuration component information may be the model information or name information of the configuration component. The configuration component may be a software component or a hardware component that provides a specific service. The software component may include, but is not limited to, a database service component, a file storage service component, and a network service component. The hardware component may be a hardware device or module. For example, the hardware component may include, but is not limited to, a network switch and a storage device.
[0027] Step 102: Determine the target server based on the server information.
[0028] In some embodiments, the execution subject may determine a target server based on the server information, wherein the target server may be a server that modifies the configuration file.
[0029] In some optional implementations of some embodiments, the execution subject may determine the target server based on the server information through the following steps:
[0030] The first step is to determine the server node information corresponding to the server information based on the pre-stored server node information group and the server information. Each server node information in the server node information group may be a server IP address corresponding to the server information. In practice, the execution subject may find the server node information corresponding to the server information from the pre-stored server node information group based on the server information. For example, when the server information is text information of "10.XX255", the server node information may be an IP address of "10.XX255".
[0031] The second step is to determine the server corresponding to the server node information as the target server. The target server may be the server corresponding to the server IP address and the text information related to the server. The text information related to the server may be the server model code of the target server.
[0032] The third step is to perform communication control deployment on the target server. In practice, the execution subject can communicate and control the target server through the SSH (Secure Shell) protocol.
[0033] Step 103: Based on the configuration component information and the target server, determine the target component information corresponding to the configuration component information.
[0034] In some embodiments, the above-mentioned execution subject may determine the target component information corresponding to the above-mentioned configuration component information based on the above-mentioned configuration component information and the above-mentioned target server. Among them, the above-mentioned target component information may be component-related information corresponding to the above-mentioned target server. The above-mentioned target component information may include component format information. The above-mentioned component format information may be the format of the configuration file included in the component information. For example, when the format of the configuration file is in the "JSON" format, the above-mentioned component format information may be "JSON". When the format of the configuration file is in the "logstash" format, the above-mentioned component format information may be "logstash". In practice, the above-mentioned execution subject may determine the component information corresponding to the above-mentioned configuration component information in the target server as the target component information. Specifically, when the above-mentioned configuration component information is "Elastic Stack", the above-mentioned execution subject may find the component information "Logstash component" corresponding to "Elastic Stack" in the target server and determine it as the target component information.
[0035] Step 104: Determine the target file loading method based on the target component information and the pre-stored file loading method group.
[0036] In some embodiments, the execution subject may determine the target file loading method based on the target component information and the pre-stored file loading method group. Among them, each file loading method in the file loading method group may be information used to characterize the file format and the file loading method. The file loading method may include file format loading method information and file format information. The file format loading method information may be file loading method information. The file format loading method information may be determined by a technician, for example, the file format loading method information may be but not limited to "regular expression", JsonPath, XPath. The file format information may be file format information. The target file loading method may be a file loading method corresponding to the target component information.
[0037] In some optional implementations of some embodiments, the execution subject may determine the target file loading mode based on the target component information and a pre-stored file loading mode group through the following steps:
[0038] In the first step, in response to determining that the component format information included in the target component information and the file loading mode group meet the preset file format condition, the following steps are performed:
[0039] In the first sub-step, the file loading method corresponding to the component format information included in the target component information in the file loading method group is determined as the target file loading method. The preset file format condition may be that there is a file loading method that is the same as the component format information among the file loading methods included in the file loading method group. In practice, the execution subject may compare the component format information with the file format information included in each file loading method in the file loading method group, and determine the file loading method corresponding to the file format information that is the same as the file format information as the target file loading method.
[0040] The second sub-step is to display the target file loading method. In practice, the execution subject may display the target file loading method through a display window. The display window may be a window displayed on a display screen.
[0041] In the second step, in response to determining that the component format information included in the target component information and the file loading mode group do not meet the preset file format condition, the following steps are performed:
[0042] In the first sub-step, the preset file loading added prompt information and the above-mentioned file loading method group are integrated and processed to obtain failure prompt information. Among them, the preset file loading added prompt information can be prompt information used to characterize the failure of the file loading method search. For example, the preset file loading added prompt information can be "No file loading method found, please enter a temporary file loading method." In practice, the above-mentioned execution entity can combine the preset file loading added prompt information and the above-mentioned file loading method group into a failure prompt information.
[0043] The second sub-step is to display the failure prompt information. In practice, the execution subject may display the failure prompt information through a display window.
[0044] In a third sub-step, in response to detecting the temporary file loading mode input by the target user, the temporary file loading mode is determined as the target file loading mode. The target user may be a technician who performs configuration file modification. The temporary file loading mode may be information for characterizing the file format and the file loading mode. The temporary file loading mode may include file format loading mode information and file format information. The file format loading mode information may be file loading mode information. The file format information may be file format information.
[0045] In some optional implementations of some embodiments, the above file loading mode group may be generated by the following steps:
[0046] The first step is to establish an initial file loading mode group. The initial file loading mode group may be information used to characterize the file format and the file loading mode. When the above steps are performed for the first time, the initial file loading mode group may be empty.
[0047] In the second step, in response to detecting the file format information input by the target user, the following adding loop steps are performed:
[0048] In the first sub-step, the file format information is determined as the file format information to be processed. The file format information may be format information for characterizing a configuration file. The file format information may be, but is not limited to, XML, JSON, YAML, Logstash, or Redis.
[0049] The second sub-step is, in response to determining that the to-be-processed file format information and the initial file loading mode group meet the preset file loading conditions, executing the following steps:
[0050] Sub-step one is to integrate the first preset format information and the file loading method corresponding to the above-mentioned file format information to be processed in the initial file loading method group to obtain existing file loading prompt information. Among them, the above-mentioned preset file loading condition can be that there is a file format information that is the same as the file format information to be processed among the various file format information included in the initial file loading method group. The above-mentioned first preset format information can be information used to characterize the found file loading method. For example, the above-mentioned first preset format information can be "file loading method has been found". In practice, the above-mentioned execution entity can combine the above-mentioned first preset format information and the file loading method of the above-mentioned file format information to be processed into existing file loading prompt information.
[0051] Sub-step 2: Displaying the existing file loading prompt information. In practice, the execution subject may display the existing file loading prompt information through a display window.
[0052] The third sub-step is, in response to determining that the to-be-processed file format information and the initial file loading mode group do not satisfy the preset file loading condition, executing the following steps:
[0053] Sub-step 1: Display the second preset format information. The second preset format information may be information used to indicate that the file loading method is not found. For example, the second preset format information may be "File loading method not found, please enter the file loading method". In practice, the execution subject may display the second preset format information through a display window.
[0054] Sub-step two, in response to detecting the file format loading method information input by the target user, the above-mentioned file format loading method information and the above-mentioned file format information are integrated and processed to obtain the file loading method. Among them, the above-mentioned file format loading method information can be the loading method information corresponding to the format used to characterize the configuration file. For example, when the above-mentioned file format information to be processed is "logstash", the above-mentioned file format loading method information can be "parse and replace using a preset regular expression". The above-mentioned preset regular expression can be a regular expression used to parse and replace logstash files. In practice, the above-mentioned execution entity can combine the above-mentioned file format loading method information and the above-mentioned file format information into a file loading method.
[0055] Sub-step three: adding the obtained file loading method to the initial file loading method group to update the initial file loading method group. In practice, the execution subject may add the file loading method to the initial file loading method group.
[0056] The fourth sub-step is to display the preset loop information. The preset loop information may be information used to indicate whether to perform the loop step again. For example, the preset loop information may be "whether to perform the adding operation again (YES / NO)". In practice, the execution subject may display the preset loop information through a display window.
[0057] The fifth sub-step is, in response to detecting the loop information input by the target user, executing the following steps:
[0058] Sub-step 1, in response to determining that the above loop information satisfies the preset loop condition, the above adding loop step is performed again using the updated initial file loading mode group. The above loop information can be information used to indicate whether to perform a loop operation. For example, the above loop information can be "YES" or "NO". The above preset loop condition can be that the loop information is "YES".
[0059] Sub-step 2: in response to determining that the loop information does not satisfy the preset loop condition, determining the updated initial file loading mode group as the file loading mode group, and sending the file loading mode group to a data storage server. The data storage server may be a server for storing and managing configuration file information.
[0060] The above technical solution and its related contents, as an inventive point of an embodiment of the present disclosure, solve the second technical problem mentioned in the background technology: "In the process of modifying the configuration file, only the preset specific configuration items can be modified, resulting in poor flexibility in modifying the configuration file. And when modifying the configuration file of the same format, there is no file loading method that can unify the format, resulting in poor versatility in modifying the configuration file." The factors that lead to poor flexibility in modifying the configuration file and poor versatility in modifying the configuration file are often as follows: In the process of modifying the configuration file, only the preset specific configuration items can be modified, resulting in poor flexibility in modifying the configuration file. And when modifying the configuration file of the same format, there is no file loading method that can unify the format, resulting in poor versatility in modifying the configuration file. If the above factors are solved, the effect of improving the flexibility of modifying the configuration file can be improved, and the versatility of modifying the configuration file can be improved. In order to achieve this effect, the present disclosure first establishes an initial file loading method group. Thus, the name of the initial file loading method group can be obtained. Then, in response to detecting the file format information input by the target user, the following adding loop step is performed: the above file format information is determined as the file format information to be processed. Then, in response to determining that the above-mentioned file format information to be processed and the above-mentioned initial file loading method group meet the preset file loading conditions, the following steps are performed: the first preset format information and the file loading method corresponding to the above-mentioned file format information to be processed in the initial file loading method group are integrated and processed to obtain the existing file loading prompt information. Thus, it can be obtained whether there is a file loading method corresponding to the file format information in the initial file loading method group. Secondly, the above-mentioned existing file loading prompt information is displayed. Thus, the file loading prompt information can be displayed to illustrate that the corresponding file loading method is found. Then, in response to determining that the above-mentioned file format information to be processed and the above-mentioned initial file loading method group do not meet the above-mentioned preset file loading conditions, the following steps are performed: the second preset format information is displayed. Thus, it can be explained that there is no file loading method corresponding to the above-mentioned file format information to be processed in the initial file loading method group. Then, in response to detecting the file format loading method information input by the target user, the above-mentioned file format loading method information and the above-mentioned file format information are integrated and processed to obtain the file loading method. Thus, the file format loading method information input by the target user can be obtained. Secondly, the obtained file loading method is added to the initial file loading method group to update the initial file loading method group. Then, the preset loop information is displayed. Thus, the preset loop information can be displayed to ask the target user whether to perform the loop step again. Then, in response to detecting the loop information input by the target user, the following steps are performed: in response to determining that the above loop information meets the preset loop condition, the above adding loop step is performed again using the updated initial file loading method group.Thus, the above-mentioned adding cycle step can be performed again. Finally, in response to determining that the above-mentioned cycle information does not meet the above-mentioned preset cycle condition, the updated initial file loading mode group is determined as the file loading mode group, and the above-mentioned file loading mode group is sent to the data storage server. Thus, the file loading mode group can be obtained, and the above-mentioned file loading mode group is stored in the data storage server. Also because each file format information obtains the corresponding file loading mode. Therefore, the flexibility of modifying the configuration file can be improved. Also because the file loading mode group is used to perform subsequent configuration file modification operations, the versatility of modifying the configuration file can be improved.
[0061] Step 105: Display the target component information.
[0062] In some embodiments, the execution entity may display the target component information. In practice, the execution entity may display the target component information through a display window.
[0063] Step 106, in response to detecting the configuration modification information input by the target user, executing the following steps:
[0064] Step 1061: In response to determining that the configuration modification information satisfies the first configuration condition, update the target component information based on the configuration modification information.
[0065] In some embodiments, the execution subject may update the target component information based on the configuration modification information in response to determining that the configuration modification information satisfies the first configuration condition. The configuration modification information may be format information and content information for modifying the configuration file. The configuration modification information may include a configuration modification type and configuration modification content information. The configuration modification type may be a "configuration file" type or a "configuration item" type. The configuration modification content information may be information that needs to be modified in the configuration file. The first configuration condition may be that the configuration modification type included in the configuration modification information is "configuration file".
[0066] In some optional implementations of some embodiments, the execution subject may update the target component information based on the configuration modification information through the following steps:
[0067] The first step is to generate the component information to be modified based on the above-mentioned target file loading method and the above-mentioned configuration modification information. Among them, the above-mentioned component information to be modified can be used to characterize the information that needs to be modified in the configuration file corresponding to the component. In practice, the above-mentioned execution subject can determine the configuration modification content information included in the configuration modification information as the component information to be modified. For example, when the configuration modification type included in the configuration modification information is "configuration file", the above-mentioned execution subject can determine the configuration modification content information as the component information to be modified.
[0068] The second step is to display the component information to be modified. In practice, the execution subject may display the component information to be modified through a display window.
[0069] The third step is to determine the component information to be modified as the target component information to update the target component information.
[0070] Optionally, after step 1061, the execution entity may further perform the following steps:
[0071] In the first step, in response to determining that the configuration modification information satisfies the second configuration condition, the following steps are performed:
[0072] The first sub-step is to generate a configuration item key-value pair group based on the above-mentioned target component information and the above-mentioned target file loading method. Among them, the above-mentioned second configuration condition can be that the configuration modification type included in the configuration modification information is "configuration item". Each configuration item key-value pair in the above-mentioned configuration item key-value pair group can be a key-value pair used to characterize the configuration item in the configuration file. In practice, the above-mentioned execution subject can extract the target component information according to the file format loading method information included in the target file loading method to obtain the configuration item key-value pair group. For example, when the above-mentioned file format loading method information is "regular expression", the above-mentioned execution subject can extract and process the target component information according to the content information in the "regular expression" to obtain the configuration item key-value pair group.
[0073] The second sub-step is to modify the configuration item key-value pair group based on the configuration modification information to update the configuration item key-value pair group. In practice, first, the execution subject can modify the configuration item key-value pair group according to the configuration modification information to obtain the modified configuration item key-value pair group. For example, when one of the configuration item key-value pairs in the configuration item key-value pair group is "bootstrap_servers=V1" and the configuration item modification information is "change the configuration value of bootstrap_servers to V1a", the modified configuration item key-value pair is "bootstrap_servers=V1a".
[0074] The third sub-step is to display the updated configuration item key-value pair group. In practice, the above execution subject may display the updated configuration item key-value pair group through a display window.
[0075] The fourth sub-step is to generate modified target component information based on the updated configuration item key-value pair and the target component information to update the target component information. In practice, the execution subject may replace the configuration item key-value pair obtained in the target component information with the updated configuration item key-value pair to update the target component information.
[0076] Step 1062, sending the updated target component information to the target server.
[0077] In some embodiments, the execution entity may send the updated target component information to the target server.
[0078] Optionally, after step 1062, the execution entity may further perform the following steps:
[0079] The first step is to send the preset configuration modification request information to the target server. The configuration modification request information may be a request information for the target server to perform a configuration file modification operation. In practice, the execution subject may send the configuration modification request information to the target server via the SSH protocol.
[0080] The second step is to display the preset configuration modification completion information. The preset configuration modification completion information may be information used to indicate that the configuration file modification is complete. For example, the preset configuration modification completion information may be "configuration modification completed". In practice, the execution subject may display the preset configuration modification completion information through a display window.
[0081] The third step is to store the target component information in a data storage server, wherein the data storage server may be a server for storing and managing configuration file information.
[0082] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the configuration file information modification method of some embodiments of the present disclosure, the real-time performance of configuration file modification can be improved and resource consumption can be reduced. Specifically, the reason for the poor flexibility of configuration file modification and the high resource consumption is that the obtained configuration file information is not the latest value, and if the actual configuration file of the component on the server has been modified, this part of the additional modification will be lost, resulting in poor real-time performance of configuration file modification. And in the process of issuing, the Agent program pre-installed on the server is required to implement the issuing operation, resulting in more resources spent on the deployment and maintenance of the pre-installed Agent program. Based on this, the configuration file information modification method of some embodiments of the present disclosure first receives server file information, wherein the server file information includes server information and configuration component information. Thus, the server information and configuration component information that need to be deployed for the configuration file can be obtained. Then, based on the server information, the target server is determined. Thus, the target server corresponding to the server information can be determined. Then, based on the configuration component information and the target server, the target component information corresponding to the configuration component information is determined. Thus, the latest target component information can be determined. Secondly, based on the target component information and the pre-stored file loading mode group, the target file loading mode is determined. Thus, the target file loading mode can be obtained. Then, the target component information is displayed. Thus, the target group set information can be displayed. Then, in response to detecting the configuration modification information input by the target user, the following steps are performed: in response to determining that the configuration modification information satisfies the first configuration condition, the target component information is updated based on the configuration modification information. Thus, the target component information can be modified. Finally, the updated target component information is sent to the target server. Thus, the modified target component information can be sent to the target server for deployment without the need for a pre-installed Agent program. Also, because the target server is first obtained, and then the configuration component information corresponding to the target server is obtained to modify it, the value in the actual configuration file can be obtained, thereby improving the real-time nature of the configuration file modification. Also, because the modified target component information is directly sent to the target server, the configuration file can be modified without the need for an Agent program, thereby reducing the resources spent on deployment and maintenance.
[0083] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a configuration file information modification device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0084] like Figure 2As shown, the configuration file information modification device 200 of some embodiments includes: a receiving unit 201, a first determining unit 202, a second determining unit 203, a third determining unit 204, a display unit 205 and an execution unit 206. The receiving unit 201 is configured to receive server file information, wherein the server file information includes server information and configuration component information; the first determining unit 202 is configured to determine a target server based on the server information; the second determining unit 203 is configured to determine target component information corresponding to the configuration component information based on the configuration component information and the target server; the third determining unit 204 is configured to determine a target file loading mode based on the target component information and a pre-stored file loading mode group; the display unit 205 is configured to display the target component information; the execution unit 206 is configured to perform the following steps in response to detecting the configuration modification information input by the target user: in response to determining that the configuration modification information satisfies the first configuration condition, update the target component information based on the configuration modification information; and send the updated target component information to the target server.
[0085] It is understood that the units described in the device 200 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units included therein, and will not be described in detail here.
[0086] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0087] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0088] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0089] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0090] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0091] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0092] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives server file information, wherein the server file information includes server information and configuration component information; determines the target server based on the server information; determines the target component information corresponding to the configuration component information based on the configuration component information and the target server; determines the target file loading method based on the target component information and a pre-stored file loading method group; displays the target component information; and in response to detecting the configuration modification information input by the target user, performs the following steps: in response to determining that the configuration modification information satisfies the first configuration condition, updates the target component information based on the configuration modification information; and sends the updated target component information to the target server.
[0093] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0094] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0095] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a receiving unit, a first determining unit, a second determining unit, a third determining unit, a display unit, and an execution unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the receiving unit may also be described as a "unit for receiving server file information".
[0096] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0097] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for modifying configuration file information, comprising: Receiving server file information, wherein the server file information includes server information and configuration component information; Based on the server information, determining a target server; Based on the configuration component information and the target server, determining target component information corresponding to the configuration component information; Determine a target file loading method based on the target component information and a pre-stored file loading method group; Displaying the target component information; In response to detecting the configuration modification information input by the target user, the following steps are performed: In response to determining that the configuration modification information satisfies a first configuration condition, updating the target component information based on the configuration modification information; The updated target component information is sent to the target server.
2. The method according to claim 1, wherein: The determining the target server based on the server information includes: Determining server node information corresponding to the server information based on a pre-stored server node information group and the server information; Determine the server corresponding to the server node information as the target server; Communication control deployment is performed on the target server.
3. The method according to claim 1, wherein: The target component information includes component format information; and determining the target file loading mode based on the target component information and a pre-stored file loading mode group includes: In response to determining that the component format information included in the target component information and the file loading mode group meet the preset file format condition, the following steps are performed: Determine the file loading mode in the file loading mode group corresponding to the component format information included in the target component information as the target file loading mode; Displaying the target file loading method; In response to determining that the component format information included in the target component information and the file loading mode group do not satisfy the preset file format condition, performing the following steps: Integrate the preset file loading adding prompt information and the file loading mode group to obtain failure prompt information; Displaying the failure prompt information; In response to detecting a temporary file loading mode input by a target user, the temporary file loading mode is determined as a target file loading mode.
4. The method according to claim 1, wherein: The updating process of the target component information based on the configuration modification information includes: Generate component information to be modified based on the target file loading method and the configuration modification information; Displaying the component information to be modified; The component information to be modified is determined as the target component information, so as to update the target component information.
5. The method according to claim 1, wherein: After updating the target component information based on the configuration modification information in response to determining that the configuration modification information satisfies the first configuration condition, the method further includes: In response to determining that the configuration modification information satisfies the second configuration condition, performing the following steps: Generate a configuration item key-value pair based on the target component information and the target file loading method; Based on the configuration modification information, modify the configuration item key-value pair group to update the configuration item key-value pair group; Display the updated configuration item key-value pair group; Based on the updated configuration item key-value pair and the target component information, the modified target component information is generated to update the target component information.
6. The method according to claim 1, wherein: After sending the updated target component information to the target server, the method further includes: Sending preset configuration modification request information to the target server; Display the information about the completion of the preset configuration modification; The target component information is stored in a data storage server.
7. A configuration file information modification device, comprising: A receiving unit, configured to receive server file information, wherein the server file information includes server information and configuration component information; A first determining unit is configured to determine a target server based on the server information; A second determining unit is configured to determine target component information corresponding to the configuration component information based on the configuration component information and the target server; A third determining unit is configured to determine a target file loading mode based on the target component information and a pre-stored file loading mode group; A display unit, configured to display the target component information; The execution unit is configured to execute the following steps in response to detecting configuration modification information input by a target user: in response to determining that the configuration modification information satisfies a first configuration condition, update the target component information based on the configuration modification information; and send the updated target component information to the target server.
8. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
