Environment variable loading method, equipment, software, storage medium and program product

By obtaining and generating preset configuration files and automatically loading environment variables, the problem of low efficiency in environmental variable configuration in the existing technology is solved, and efficient environment variable loading and management is achieved.

CN119149122APending Publication Date: 2024-12-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411061606.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, the configuration efficiency of environment variables is low, and manual input and manual generation of configuration files are required, resulting in low loading efficiency of environment variables.

Method used

By obtaining preset configuration files, displaying and generating target environment variables and their values ​​in response to the selection operation of the target running environment, it automatically loads into the application, reducing the need for manual input and generation of configuration files.

Benefits of technology

It improves the configuration and loading efficiency of environment variables, realizes automated management, reduces maintenance difficulty and error risks, and improves development efficiency and management convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149122A_ABST
    Figure CN119149122A_ABST
Patent Text Reader

Abstract

The invention discloses an environment variable loading method, equipment, software, a storage medium and a program product, and the method comprises the steps: obtaining a preset configuration file which comprises environment variables for M operation environments and values corresponding to the environment variables; in response to a selection operation on a target operation environment in the preset configuration file, displaying an environment variable of the target operation environment; in response to a trigger operation on a target environment variable in the environment variables of the target operation environment, generating a target configuration file according to the target environment variable and the value thereof; and loading the target environment variable and the value thereof into a target application program according to the target configuration file. According to the embodiment of the invention, the loading efficiency of the environment variables can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an environment variable loading method, device, software, storage medium and program product. Background Art

[0002] Environment variables are some parameters that specify the running environment of an application. Before using environment variables, you need to load them into the application. Currently, you can hard-code environment variables into the application during the code development phase of the application, or manually enter environment variables, manually generate a configuration file based on the input environment variables, and load environment variables into the application based on the configuration file. Summary of the invention

[0003] In response to the above technical problems, the embodiments of the present application provide an environment variable loading method, device, software, storage medium and program product, which can improve the loading efficiency of environment variables.

[0004] In a first aspect, an embodiment of the present application provides an environment variable loading method, comprising:

[0005] Obtain a preset configuration file, the preset configuration file including environment variables for M operating environments and values ​​corresponding to the environment variables;

[0006] In response to a selection operation of a target operating environment in the preset configuration file, displaying environment variables of the target operating environment;

[0007] In response to a triggering operation on a target environment variable in the environment variables of the target operating environment, a target configuration file is generated according to the target environment variable and its value;

[0008] According to the target configuration file, the target environment variables and their values ​​are loaded into the target application.

[0009] In a second aspect, an embodiment of the present application provides an environment variable loading device, comprising:

[0010] An acquisition module is used to acquire a preset configuration file, wherein the preset configuration file includes environment variables for M operating environments and values ​​corresponding to the environment variables;

[0011] A display module, configured to display environment variables of the target operating environment in response to a selection operation of the target operating environment in the preset configuration file;

[0012] A generating module, configured to generate a target configuration file of a target application program according to the target environment variables and their values ​​in response to a triggering operation on a target environment variable in the environment variables of the target operating environment;

[0013] The loading module is used to load the above target environment variables and their values ​​into the target application according to the above target configuration file.

[0014] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute the steps of any one of the environment variable loading methods provided in the embodiments of the present application.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any one of the environment variable loading methods provided in the embodiment of the present application.

[0016] In a fifth aspect, an embodiment of the present application further provides a computer software, the computer software including a computer program, and when the computer program is executed by a processor, the steps in any one of the environment variable loading methods provided in the embodiment of the present application are implemented.

[0017] In a sixth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of any one of the environment variable loading methods provided in the embodiments of the present application.

[0018] By adopting the solution of the embodiment of the present application, a preset configuration file is obtained, and the preset configuration file includes environment variables for M operating environments and the corresponding values ​​of the environment variables. In response to the selection operation of the target operating environment in the preset configuration file, the environment variables of the target operating environment are displayed. In response to the triggering operation of the target environment variables in the environment variables of the target operating environment, a target configuration file for the target application is generated according to the target environment variables and their values. According to the target configuration file, the target environment variables and their values ​​are loaded into the target application, thereby realizing the generation of the target configuration file for the target application through the pre-set preset configuration file, eliminating the need to manually enter the environment variables and manually generate the configuration file each time the environment variables are configured, thereby improving the configuration efficiency of the environment variables, thereby improving the loading efficiency of the environment variables. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 It is a schematic diagram of the application environment of the environment variable loading method provided in the embodiment of the present application;

[0021] Figure 2 This is a flow chart of an embodiment of the method for loading environment variables provided in the embodiments of the present application;

[0022] Figure 3 It is a schematic diagram of the front end and the back end provided in the embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of a process for generating a target configuration file provided in an embodiment of the present application;

[0024] Figure 5 is a schematic diagram of a process for displaying recommended values ​​provided in an embodiment of the present application;

[0025] Figure 6 is a schematic diagram of a configuration interface provided in an embodiment of the present application;

[0026] Figure 7 is a flowchart of a method for updating target environment variables provided in an embodiment of the present application;

[0027] Figure 8 It is a flowchart of a method for managing target environment variables provided in an embodiment of the present application;

[0028] Fig. 9 is a schematic diagram of the structure of the environment variable loading device provided in an embodiment of the present application;

[0029] Fig.10 It is a schematic diagram of the internal structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0031] In order to better understand the environment variable loading method, device, equipment, storage medium and program product provided in the embodiments of the present application, the application environment applicable to the embodiments of the present application is first described below.

[0032] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram showing an application environment of the method for loading environment variables provided by an embodiment of the present application. As an implementation mode, the method for loading environment variables provided by an embodiment of the present application can be applied to an electronic device. The electronic device can be Figure 1 The terminal device 120 shown in the figure can be connected to the server 110 through a network. The network is used to provide a medium for a communication link between the server 110 and the terminal device 120. The network can include various connection types, such as wired communication links, wireless communication links, etc., which are not limited in the embodiments of the present application. Optionally, in other embodiments, the electronic device can also be a smart phone, a laptop computer, etc.

[0033] It should be understood that Figure 1 The server 110, network and terminal device 120 are merely illustrative. Depending on the implementation requirements, there may be any number of servers, networks and terminal devices. For example, the server 110 may be a physical server or a server cluster composed of multiple servers, and the terminal device 120 may be a mobile phone, a tablet, a desktop computer, a laptop computer, and the like. It is understood that the embodiments of the present application may also allow multiple terminal devices 120 to access the server 110 at the same time.

[0034] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.

[0035] In the related art, environment variables can be hard-coded into the application during the code development phase of the application, or the environment variables can be manually input, a configuration file can be manually generated based on the input environment variables, and the environment variables can be loaded into the application based on the configuration file.

[0036] However, the way of hard-coding environment variables into the application program requires changing the code of the application program each time the environment variables are changed, which reduces the efficiency of the configuration of the environment variables. The way of manually generating a configuration file based on the input environment variables and loading the environment variables into the application program based on the configuration file reduces the efficiency of the configuration of the environment variables. Therefore, in the related art, the configuration of environment variables has a technical problem of low efficiency.

[0037] In an embodiment of the present application, a preset configuration file is obtained, the preset configuration file includes environment variables for M operating environments and values ​​corresponding to the environment variables, and in response to a selection operation on the target operating environment in the preset configuration file, the environment variables of the target operating environment are displayed. In response to a trigger operation on the target environment variables in the environment variables of the target operating environment, a target configuration file for the target application is generated according to the target environment variables and their values. According to the target configuration file, the target environment variables and their values ​​are loaded into the target application, thereby achieving generation of the target configuration file for the target application through the pre-set preset configuration file, eliminating the need to manually input the environment variables and manually generate the configuration file each time the environment variables are configured, thereby improving the configuration efficiency of the environment variables, thereby improving the loading efficiency of the environment variables.

[0038] This application embodiment uses the front end as the execution subject to illustrate the method of loading environment variables. Please refer to Figure 2 The specific process of the environment variable loading method can be as follows: Step 201 to Step 204, wherein:

[0039] Step 201, obtaining a preset configuration file, the preset configuration file including environment variables for M operating environments and values ​​corresponding to the environment variables.

[0040] Wherein, M is an integer equal to or greater than 1. The preset configuration file is a configuration file pre-set in the backend. The backend can provide a creation interface (for example, Figure 3 As shown), a template is created through a creation interface. The template includes environment variables, values ​​corresponding to the environment variables, description information of the environment variables, and usage rules of the environment variables in different operating environments. A preset configuration file is generated based on the template, so that the same template can be used in different operating environments, and the environment variables of different operating environments can be customized according to the requirements of different operating environments.

[0041] The operating environment refers to the collection of software and hardware resources required for the application to run. For example, the operating environment can include the development environment, test environment, and production environment.

[0042] Environment variables are some parameters of the operating environment of the specified application. The environment variables in the preset configuration file can be set according to the actual situation. For example, the environment variables in the preset configuration file can be API_URL=XXXXXX and const API_URL=XXXX===XXXX, which is not limited in this embodiment of the present application.

[0043] The preset configuration file includes environment variables of M operating environments and values ​​corresponding to the environment variables, which can be understood as setting environment variables for each operating environment and values ​​corresponding to the environment variables in the preset configuration file.

[0044] For example, when the operating environment includes a development environment, a test environment, and a production environment, the preset configuration file may include environment variables of the development environment and their corresponding values, environment variables of the test environment and their corresponding values, and environment variables of the production environment and their corresponding values.

[0045] It should be noted that different operating environments may include the same environment variables or different environment variables. When different operating environments include the same environment variables, the same environment variables may be stored separately as a set in a preset configuration file. In this case, no matter which operating environment is selected, the environment variables in the set will be displayed, reducing the file size of the preset configuration file.

[0046] In some embodiments, the front end may obtain the preset configuration file from the local, or the front end may obtain the preset configuration file from the back end. After the front end obtains the preset configuration file from the back end, the preset configuration file may be stored locally so that the preset configuration file may be obtained from the local next time. Storing the preset configuration file locally may ensure that if the back end service fails, is unstable, or has a network delay, the configuration of the environment variables will not be affected.

[0047] When the front end obtains the preset configuration file from the back end, it can be Figure 3 shown.

[0048] In some embodiments, the front end may obtain a preset configuration file in response to a configuration instruction. The configuration instruction may be a configuration instruction for a target application, or the configuration instruction may not be a configuration instruction for a target application. When the configuration instruction is not a configuration instruction for a target application, the target application may be selected in a subsequent operation.

[0049] In some embodiments, the value of the environment variable in the preset configuration file can be called the default value of the environment variable. The method for the back end to obtain the default value of the environment variable can be set according to the actual situation. For example, the back end can display a visual interface through the configuration center, and obtain the input information through the visual interface. The input information is the default value of the environment variable. Alternatively, the back end can also use the value of the environment variable in the already set configuration file as the default value of the environment variable, or alternatively, the default value of the environment variable can be obtained through the command line. The embodiments of the present application are not limited here.

[0050] In some embodiments, different versions of environment variables and their corresponding values ​​can also be set for an operating environment in a preset configuration file so that users can view and switch different versions of environment variables to ensure stability and traceability during the development process.

[0051] In some embodiments, obtaining a preset configuration file includes:

[0052] In response to a configuration instruction for the target application, sending the configuration instruction to the backend;

[0053] Receives the preset configuration file returned by the backend based on the configuration instructions.

[0054] Since the backend may modify the preset configuration file, compared with the method of obtaining the preset configuration file locally, in an embodiment of the present application, in response to the configuration instruction of the target application, the configuration instruction is sent to the backend, and the preset configuration file returned by the backend based on the configuration instruction is received. This can make the preset configuration file the latest preset configuration file, further improving the real-time and accuracy of generating the target configuration file of the target application according to the preset configuration file.

[0055] In some embodiments, when a preset configuration file is stored locally, after updating the preset configuration file, the backend may send the updated content of the preset configuration file to the frontend so that the frontend updates the local preset configuration file based on the updated content.

[0056] Step 202: In response to a selection operation of a target operating environment in a preset configuration file, display environment variables of the target operating environment.

[0057] Among them, the front end can display the preset configuration file through the configuration interface. Displaying the preset configuration file can be understood as displaying each operating environment in the preset configuration file. After the front end displays the operating environment of the preset configuration file, the user can select the operating environment, and the front end responds to the selection operation of the target operating environment and displays the environment variables of the target operating environment.

[0058] It should be noted that, in response to the selection operation, the front end can display the values ​​corresponding to the environment variables of the target operating environment while displaying the environment variables of the target operating environment.

[0059] In some embodiments, when the configuration instruction is not a configuration instruction for a target application, the preset configuration file may also include a target location for obtaining an identifier of the target application, and the target application is determined by inputting the identifier at the target location.

[0060] Step 203, in response to a triggering operation on a target environment variable in the environment variables of the target operating environment, a target configuration file is generated according to the target environment variable and its value.

[0061] The target environment variable may include at least one. The type of trigger operation may be set according to actual conditions, for example, the trigger operation may include a first selection operation, or the trigger operation may include a first selection operation and a modification operation, which is not limited in the present embodiment.

[0062] When the trigger operation includes the first selection operation, the value corresponding to the target environment variable may be the value corresponding to the target environment variable in the preset configuration file. At this time, the user may not modify the value of the target environment variable.

[0063] When the first trigger operation includes a first selection operation and a modification operation, refer to Figure 4 In response to a triggering operation on a target environment variable in an environment variable of a target operating environment, a process of generating a target configuration file according to the target environment variable and its value may include:

[0064] Step 2031, in response to a first selection operation on a target environment variable in the environment variables of the target operating environment, displaying a value corresponding to the target environment variable;

[0065] Step 2032: In response to the modification operation on the value, obtain the modified value corresponding to the target environment variable;

[0066] Step 2033: Generate a target configuration file based on the target environment variables and their modified values.

[0067] The modification operation may be an input operation, and the front end may obtain an input value through the input operation, and set the input value as a modified value corresponding to the target environment variable.

[0068] In an embodiment of the present application, in response to a first selection operation on a target environment variable in the environment variables of the target operating environment, a value corresponding to the target environment variable is displayed, and in response to a modification operation on the value, a modified value corresponding to the target environment variable is obtained, and a target configuration file for the target application is generated based on the target environment variable and its modified value, so that the user can modify the value of the target environment variable according to actual needs, so as to generate a target configuration file based on the modified value.

[0069] In some embodiments, reference Figure 5 In response to a first selection operation on a target environment variable in the environment variables of the target operating environment, a value corresponding to the target environment variable is displayed, including:

[0070] Step 20311: in response to a first selection operation on a target environment variable in the environment variables of the target operating environment, obtaining a recommended value for the target environment variable from the backend;

[0071] Step 20312: Display the value corresponding to the target environment variable and the recommended value, where the recommended value is used to recommend that the value corresponding to the target environment variable be modified to the recommended value.

[0072] Among them, the recommended value refers to the value set by other front-ends for the target environment variables in the target operating environment. After setting the value set for the target environment variables in the target operating environment, the other front-ends can send the value set for the target environment variables in the target operating environment to the back-end, and then the back-end displays the value set by other front-ends for the target environment variables in the target operating environment as the recommended value, so that the user can modify the value corresponding to the target environment variable based on the recommended value, thereby improving the efficiency of modifying the value corresponding to the target environment variable.

[0073] The method of displaying the recommended value can be set according to the time situation. For example, the target window can be displayed at the target distance of the target environment variable, and the recommended value can be displayed on the target window. Alternatively, the target window can be displayed in the center of the configuration interface. The embodiments of the present application are not limited here.

[0074] For example, when displaying a target window at a target distance of a target environment variable, the target window can be displayed as follows: Figure 6 shown.

[0075] Step 204: based on the target configuration file, load the target environment variables and their values ​​into the target application.

[0076] Among them, after generating the target configuration file, the front end can parse the target configuration file to obtain the target environment variables and their values, and then load the target environment variables and their values ​​into the target application, so that the target application runs in the target operating environment based on the target environment variables and their values.

[0077] In an embodiment of the present application, a preset configuration file is set, which includes environment variables for M operating environments and the values ​​corresponding to the environment variables. A target configuration file is generated based on the preset configuration file, so that the user does not need to manually input the environment variables first and then manually generate the configuration file based on the input environment variables, thereby realizing automatic management of environment variables without manual management of environment variables.

[0078] In some embodiments, reference Figure 7 , after generating the target configuration file, also include:

[0079] Step 701: receiving an update instruction for a target environment variable;

[0080] Step 702: Obtain the measurement indicator parameters of the target environment variables from the target configuration file according to the update instruction;

[0081] Step 703: Determine update indication parameters of target environment variables according to the measurement indicator parameters;

[0082] Step 704: Update the target environment variables in the target configuration file according to the update indication parameters to obtain an updated configuration file;

[0083] Step 705: Load the updated target environment variables into the target application according to the updated configuration file.

[0084] The update instruction may be an update instruction generated based on an operation on the front end, or the update instruction may be an update instruction sent by the back end. When the update instruction is an update instruction sent by the back end, the front end may receive the update instruction by monitoring a specific interface or subscribing to a specific message topic.

[0085] Optionally, the update instruction may include the update content of the target environment variable, or the update instruction may not include the update content of the target environment variable. When the update instruction does not include the update content of the target environment variable, after receiving the update instruction, the front end may send an environment variable acquisition request to the back end through a REST API or GraphQL method, and receive the latest target environment variable returned by the back end in JSON format based on the environment variable acquisition request, and the latest target environment variable includes the update content.

[0086] The measurement indicator parameter refers to the parameter used to measure the update indication parameter, which can be set according to actual conditions. For example, the measurement indicator parameter may include at least one of the scope of influence of the target environment variable in the target application and the criticality of the update content of the target environment variable. The embodiments of the present application are not limited here.

[0087] When the measurement indicator parameters can include the impact scope of the target environment variable in the target application and the criticality of the update content of the target environment variable, it is ensured that the impact of the update is fully considered to determine the success and stability of the update.

[0088] The update indication parameter refers to a parameter used to indicate how to update the target environment variable, which can be set according to actual conditions. For example, the update indication parameter includes update importance and / or update urgency, which is not limited in the embodiments of the present application.

[0089] The front end can obtain the measurement standard, and then determine the update indication parameter of the target environment variable according to the measurement indicator parameter through the measurement standard. Among them, the measurement standard can be set based on factors such as business needs, system security and system stability, so that the update indication parameter determined according to the measurement standard is more accurate.

[0090] After determining the update indication parameters, the front end updates the target environment variables in the target configuration file according to the update indication parameters to obtain the updated configuration file.

[0091] In an embodiment of the present application, an update instruction for a target environment variable is received, and according to the update instruction, a measurement indicator parameter of the target environment variable is obtained from a target configuration file, and according to the measurement indicator parameter, an update indication parameter of the target environment variable is determined, and according to the update indication parameter, the target environment variable in the target configuration file is updated to obtain an updated configuration file, and according to the updated configuration file, the updated target environment variable is loaded into a target application, so that not only the environment variables can be automatically updated, thereby reducing the difficulty of maintaining environment variables and the risk of errors, and improving development efficiency and the convenience of environment variable management, but also the user can dynamically set the measurement indicator parameter in the target configuration file according to their needs, so as to determine the update importance and / or update urgency of the target environment variable according to the measurement indicator parameter, thereby realizing dynamic adjustment of the update importance and / or update urgency of the environment variable, and improving the flexibility of updating the environment variables.

[0092] In some embodiments, the update indication parameter includes update importance and / or update urgency. According to the update indication parameter, the target environment variable in the target configuration file is updated to obtain an updated configuration file, including:

[0093] Determine the update priority of the target environment variables in the target configuration file according to the update importance and / or the update urgency;

[0094] Determine an update strategy for a target environment variable in a target configuration file according to the update importance and / or the update urgency;

[0095] According to the update priority and update strategy, the target environment variables in the target configuration file are updated to obtain an updated configuration file.

[0096] Among them, when the update importance is higher, the update priority is higher, and when the update importance is lower, the update priority is lower. When the update urgency is higher, the update priority is higher, and when the update urgency is lower, the update priority is lower. Different update policies are set for different update importances and update urgency. The content of the update policy can be set according to actual conditions. For example, the update policy includes update mode, time arrangement, rollback mode and other contents. The update mode includes hot update mode and restart update mode, which is not limited in the embodiments of the present application.

[0097] When the update strategy includes a time schedule, the relationship between the time schedule and the update priority is: the target environment variables with a higher update priority are updated first within the time period corresponding to the time schedule.

[0098] In an embodiment of the present application, the update priority and / or update strategy are dynamically adjusted according to the update importance and / or update urgency. According to the update priority and / or update strategy, the target environment variables in the target configuration file are updated to obtain an updated configuration file, thereby improving the flexibility of the update and improving the stability, security and reliability of the system.

[0099] In some embodiments, when the update indication parameter includes the update importance, the target environment variable in the target configuration file is updated according to the update indication parameter to obtain an updated configuration file, including:

[0100] Determine the update strategy of the target environment variables in the target configuration file according to the update importance;

[0101] According to the update strategy, the target environment variables in the target configuration file are updated to obtain an updated configuration file.

[0102] In some embodiments, when the update indication parameter includes update urgency, the target environment variable in the target configuration file is updated according to the update indication parameter to obtain an updated configuration file, including:

[0103] According to the update urgency, determine the update priority of the target environment variables in the target configuration file;

[0104] According to the update priority, the target environment variables in the target configuration file are updated to obtain an updated configuration file.

[0105] In some embodiments, when the update indication parameter includes update urgency and update importance, the target environment variable in the target configuration file is updated according to the update indication parameter to obtain an updated configuration file, including:

[0106] Determine the update strategy of the target environment variables in the target configuration file according to the update importance;

[0107] According to the update urgency, determine the update priority of the target environment variables in the target configuration file;

[0108] According to the update priority and update strategy, the target environment variables in the target configuration file are updated to obtain an updated configuration file.

[0109] In some embodiments, the update strategy includes a rollback mode. After the target environment variables in the target configuration file are updated according to the update strategy, the embodiment of the present application further includes:

[0110] If an update failure is detected, it is determined whether there is an environment variable associated with the target environment variable in the target configuration file;

[0111] If there is no associated environment variable, the target environment variable is rolled back according to the rollback method.

[0112] If there are associated environment variables, then the update status of the associated environment variables is detected;

[0113] When it is detected that the update status of the associated environment variable is the update completion status, the target environment variable in the target configuration file is updated again according to the update strategy.

[0114] Among them, if the update failure is detected and there is no rollback method, it means that after the target environment variable is updated, no rollback processing is required. At this time, the update failure prompt operation can be performed to prompt the user that the target environment variable update failed.

[0115] The associated environment variable refers to the environment variable on which the target environment variable depends. The value of the associated environment variable is the value of the target environment variable. When the associated environment variable is not updated or the update fails, the update of the target environment variable will fail. Therefore, in an embodiment of the present application, if an update failure is detected, it is determined whether there is an environment variable associated with the target environment variable in the target configuration file. If there is no associated environment variable, the target environment variable is rolled back according to the rollback method. If there is an associated environment variable, the update status of the associated environment variable is detected. When it is detected that the update status of the associated environment variable is the update completion status, the target environment variable in the target configuration file is updated again according to the update strategy, thereby ensuring the success and stability of the update of the target environment variable and ensuring the operation of the target application.

[0116] In some embodiments, according to the updated configuration file, the update method for loading the updated target environment variables into the target application can be a hot update method and a restart update method. When the update method is a hot update method, the embodiment of the present application also includes:

[0117] Register an update function at a location in the target application that references the target environment variable, where the update function includes a hook function or a callback function;

[0118] When the target application is detected to be started, the name of the target configuration file is registered in the update function;

[0119] Load the updated target environment variables into the target application based on the updated configuration file, including:

[0120] After detecting that the target configuration file is updated to the updated configuration file, the update function is triggered, and the updated target environment variables are loaded into the target application according to the updated configuration file.

[0121] A background task, a scheduled task or a listener may be established to detect whether the target configuration file is updated.

[0122] Optionally, objects and resources can also be registered in the update function, so that after detecting that the target configuration file is updated to the updated configuration file, the update function can be triggered to reinitialize objects and reload resources, etc. The reinitialization of objects or reloading of resources may involve specific logic and business requirements of the target application. These specific logics may include the following aspects: object management, resource loading, business logic update, error handling and rollback, etc.

[0123] In an embodiment of the present application, an update function is registered at the location where the target environment variable is referenced in the target application, and the update function includes a hook function or a callback function. When it is detected that the target application is started, the name of the target configuration file is registered in the update function. After it is detected that the target configuration file is updated to an updated configuration file, the update function is triggered. According to the updated configuration file, the updated target environment variable is loaded into the target application, thereby realizing a hot update of the environment variable, so that the environment variable can be updated without restarting the target application, thereby reducing the response time of the environment variable update and improving the flexibility and maintainability of the system.

[0124] In some embodiments, after generating the target configuration file according to the target environment variables and their values, the embodiment of the present application further includes:

[0125] Encrypt the target environment variables and their values ​​to obtain candidate encryption information;

[0126] Slice the candidate encrypted information to obtain at least two candidate encrypted information slices;

[0127] Encrypting at least two candidate encrypted information fragments to obtain at least two encrypted information;

[0128] storing at least two encrypted information locally and / or in a server;

[0129] After the target environment variables and their values ​​are loaded into the target application according to the target configuration file, it also includes:

[0130] If a reload instruction of a target environment variable is received, at least two encrypted information are obtained from the local computer and / or the server;

[0131] Decrypt at least two encrypted messages to obtain target environment variables and their values;

[0132] Load the target environment variables and their values ​​into the target application.

[0133] The server may be a backend, or may be another distributed node. The method for encrypting the target environment variable and its value and the method for encrypting the at least two candidate encrypted information fragments may be the same or different.

[0134] The method for performing encryption processing can be set according to actual conditions. For example, the method for performing encryption processing can be an AES symmetric encryption algorithm or a DES symmetric encryption algorithm, which is not limited in the embodiments of the present application.

[0135] The method of slicing the candidate encryption information can be set according to the actual situation. For example, the candidate encryption information can be sliced ​​according to a preset slice size, or the candidate encryption information can be sliced ​​according to a preset number of slices. The embodiments of the present application are not limited here.

[0136] After the candidate encrypted information is sliced ​​to obtain at least two candidate encrypted information slices, each candidate encrypted information slice can be named for subsequent management and retrieval. The candidate encrypted information slices can be named using numbers or other identifiers to ensure the uniqueness and identifiability of the candidate encrypted information slices.

[0137] When the at least two encrypted information are stored locally, the at least two encrypted information can be stored in the target configuration file or other storage locations in the local area. When the at least two encrypted information are stored in a server and the server is a distributed node, the fault tolerance and availability of the encrypted information can be increased.

[0138] After the at least two encrypted information are stored locally and / or in a server, only authorized users can access the at least two encrypted information.

[0139] In an embodiment of the present application, the target environment variable and its value are encrypted to obtain candidate encryption information, the candidate encryption information is sliced ​​to obtain at least two candidate encryption information slices, the at least two candidate encryption information slices are encrypted to obtain at least two encrypted information, and the at least two encrypted information are stored locally and / or on a server. If a reload instruction for the target environment variable is received, at least two encrypted information are obtained from the local and / or server, the at least two encrypted information are decrypted to obtain the target environment variable and its value, and the target environment variable and its value are loaded into a target application, thereby implementing multi-layer encryption of the target environment variable and its value, so that even if part of the encrypted information is leaked, the environment variable cannot be restored, thereby improving the security and stability of the environment variable.

[0140] In some embodiments, the back end displays a creation interface on the terminal, creates environment variables, corresponding values ​​of the environment variables, description information of the environment variables, and usage rules of the environment variables in different operating environments through the creation interface, and encrypts the environment variables, corresponding values ​​of the environment variables, description information of the environment variables, and usage rules of the environment variables in different operating environments to obtain encrypted environment variable information, and sends the encrypted environment variable information to the back end. The back end creates a template based on the encrypted environment variable information, and creates a preset configuration file based on the template.

[0141] Among them, the process of encryption processing on the terminal can refer to the encryption process of the target environment variable, and the embodiment of the present application is not limited here.

[0142] In some embodiments, after the preset configuration file is set at the back end, when the access instruction and / or modification instruction of the environment variable in the preset configuration file is obtained in response to the user's operation, the user can be authorized and verified. After the authorization verification process is passed, the environment variable can be accessed and / or modified according to the access instruction and / or modification instruction, so that only authorized users can access and modify the environment variable configuration, thereby ensuring the security and consistency of the environment variable. In addition, the information of the user who accesses and / or modifies the environment variable can also be recorded, so that the user can view and track the access history and modification history of the environment variable at any time, timely discover abnormal access and / or modification, and ensure the traceability and security of the access and / or modification of the environment variable.

[0143] In some embodiments, the back end or front end can also detect access and / or modification behaviors to environment variables in real time. If abnormal access and / or modification behaviors are detected, an alarm is issued, which helps to identify and respond to security risks in a timely manner and ensure the safe operation of the system.

[0144] In some embodiments, the back end may also include a developer interface so that other development platforms can access the back end through the developer interface to implement custom functions and extensions, or so that other development platforms can develop third-party plug-ins through the developer interface so as to integrate third-party plug-ins into the back end. Third-party plug-ins can, for example, be environment variable verification plug-ins and environment variable conversion plug-ins, etc. Third-party plug-ins can be integrated into the back end in the form of npm packages to implement an open and shared environment variable management system, providing developers with richer and more diverse solutions.

[0145] For example, the development interface may include a routing interface, an event interface, a component interface, a permission control interface, and a data interface. The routing interface allows developers to register custom routes to extend the pages and functions of the platform where the backend is located. The event interface allows developers to register event listeners to execute custom logic when specific events occur. The component interface allows developers to register custom page components to extend the interface and interaction of the platform where the backend is located. The permission control interface allows developers to define their own permission rules and policies to achieve permission control over plug-in functions. The data interface allows developers to access the data and resources of the platform so that the plug-in can obtain and process relevant data.

[0146] These interfaces allow developers to create various types of plug-ins, such as:

[0147] Create page plug-ins through the routing interface, and customize pages and routes through page plug-ins to expand the page functions of the platform where the backend is located.

[0148] Create an event plugin through the event interface and register an event listener through the event plugin to execute custom logic when a specific event occurs.

[0149] Create component plug-ins through component interfaces, and register custom page components through component plug-ins to expand the interface and interaction of the platform where the backend is located.

[0150] Create a permission plug-in through the permission control interface, and customize the permission rules and policies of the permission plug-in to implement permission control of the plug-in functions.

[0151] These plugins can be installed, enabled, and configured through the plugin management interface provided by the backend. Once installed and enabled, the backend will perform plugin registration related operations at the appropriate time. For example:

[0152] When a user visits a specific page, the backend will load the corresponding page plug-in according to the registered routing information. When a specific event occurs, the backend will execute the registered event listener and execute the corresponding custom logic. When the user operates the interface, the backend will render the corresponding page component according to the registered component information. When permission verification is required, the backend will call the registered permission rules and policies to determine whether the user has the permission to perform the corresponding operation.

[0153] In the embodiments of the present application, developer interfaces and plug-in support are provided so that developers can expand and customize environment variable management functions according to their own needs to meet flexible needs in different scenarios, such as custom encryption algorithms, access control rules, etc., thereby enhancing the flexibility and automation capabilities of environment variable management.

[0154] For example, Figure 8 As shown, the terminal creates environment variables, corresponding values ​​of the environment variables, description information of the environment variables, and usage rules of the environment variables in different operating environments through a creation interface, and encrypts the environment variables, corresponding values ​​of the environment variables, description information of the environment variables, and usage rules of the environment variables in different operating environments to obtain encrypted environment variable information, and sends the encrypted environment variable information to the back end. The back end creates a template based on the encrypted environment variable information, creates a preset configuration file based on the template, integrates a third-party plug-in on the back end, and the front end presets the configuration file from the back end through the API interface, so as to generate the target configuration file using the preset configuration file.

[0155] In some embodiments, the backend can be integrated with DevOps tools, such as CI tools or CD tools. Through DevOps tools, the management of environment variables in the embodiments of the present application can be realized, and the management of environment variables includes, for example, the process of generating a preset configuration file, the process of updating the environment variables in the preset configuration file, the process of generating a target configuration file according to the preset configuration file, the process of loading the target environment variables into the target application according to the target configuration file, and the process of updating the target environment variables. Among them, the backend integrates DevOps tools, which can realize automated processes and automated deployment, so that environment variables can be automatically managed and deployed, so that developers can automatically deploy and manage environment variables in the code submission or deployment process without manual intervention, which greatly improves the efficiency of deployment and management.

[0156] In some embodiments, the environment variable loading method provided in the embodiments of the present application can be encapsulated as an environment variable management tool. The environment variable management tool includes an encrypted storage function for environment variables, an environment variable setting function, an environment variable deployment function, an environment variable update function, and a developer interface to ensure the safe, flexible, and automated management of environment variables, and provide developers with a more comprehensive, efficient, secure, and flexible environment variable management experience.

[0157] By adopting the solution of the embodiment of the present application, a preset configuration file is obtained, and the preset configuration file includes environment variables for M operating environments and the corresponding values ​​of the environment variables. In response to the selection operation of the target operating environment in the preset configuration file, the environment variables of the target operating environment are displayed. In response to the triggering operation of the target environment variables in the environment variables of the target operating environment, a target configuration file for the target application is generated according to the target environment variables and their values. According to the target configuration file, the target environment variables and their values ​​are loaded into the target application, thereby realizing the generation of the target configuration file for the target application through the pre-set preset configuration file, eliminating the need to manually enter the environment variables and manually generate the configuration file each time the environment variables are configured, thereby improving the configuration efficiency of the environment variables, thereby improving the loading efficiency of the environment variables.

[0158] It should be understood that, although each step in the flowcharts involved in the above-mentioned embodiments is 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 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.

[0159] Based on the same inventive concept, the embodiment of the present application also provides an environment variable loading device for implementing the environment variable loading method involved above, and an environment variable loading device for implementing the environment variable loading method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more environment variable loading devices and environment variable loading devices provided below can refer to the above limitations on the environment variable loading method and environment variable loading method, and the specific limitations will not be repeated here.

[0160] This embodiment also provides an environment variable loading device, which can be integrated into a terminal device. Fig. 9 As shown, the environment variable loading device 900 may include:

[0161] The acquisition module 901 is used to acquire a preset configuration file, where the preset configuration file includes environment variables for M operating environments and values ​​corresponding to the environment variables.

[0162] The display module 902 is used to display the environment variables of the target operating environment in response to the selection operation of the target operating environment in the preset configuration file.

[0163] The generating module 903 is used to generate a target configuration file according to the target environment variable and its value in response to a triggering operation on a target environment variable in the environment variable of the target operating environment.

[0164] The loading module 904 is used to load the target environment variables and their values ​​into the target application based on the target configuration file.

[0165] The above-mentioned environment variable loading device obtains a preset configuration file, which includes environment variables for M operating environments and values ​​corresponding to the environment variables. In response to a selection operation on the target operating environment in the preset configuration file, the environment variables of the target operating environment are displayed. In response to a trigger operation on the target environment variables in the environment variables of the target operating environment, a target configuration file for the target application is generated according to the target environment variables and their values. According to the target configuration file, the target environment variables and their values ​​are loaded into the target application, thereby generating a target configuration file for the target application through a preset configuration file, eliminating the need to manually input the environment variables and manually generate the configuration file each time the environment variables are configured, thereby improving the configuration efficiency of the environment variables, thereby improving the loading efficiency of the environment variables.

[0166] In some embodiments, the trigger operation includes a first selection operation and a modification operation, and the generation module 903 is specifically used to perform:

[0167] In response to a first selection operation on a target environment variable in the environment variables of the target operating environment, displaying a value corresponding to the target environment variable;

[0168] In response to the modification operation on the value, obtaining the modified value corresponding to the target environment variable;

[0169] Generate a target configuration file based on the target environment variables and their modified values.

[0170] In some embodiments, the generation module 903 is specifically used to perform:

[0171] In response to a first selection operation on a target environment variable in the environment variables of the target operating environment, obtaining a recommended value for the target environment variable from a backend;

[0172] Displays the values ​​and recommended values ​​corresponding to the target environment variables. The recommended values ​​are used to recommend that the values ​​corresponding to the target environment variables be modified to the recommended values.

[0173] In some embodiments, the environment variable loading device further includes an update module, and the update module is used to execute:

[0174] Receive update instructions for target environment variables;

[0175] According to the update instruction, obtain the measurement indicator parameters of the target environment variables from the target configuration file;

[0176] Determine update indication parameters of target environment variables according to measurement indicator parameters;

[0177] According to the update indication parameter, the target environment variable in the target configuration file is updated to obtain an updated configuration file;

[0178] Load the updated target environment variables into the target application according to the updated configuration file.

[0179] In some embodiments, the update indication parameter includes an update importance, and the update module is configured to execute:

[0180] Determine the update strategy of the target environment variables in the target configuration file according to the update importance;

[0181] According to the update strategy, the target environment variables in the target configuration file are updated to obtain an updated configuration file.

[0182] In some embodiments, the update indication parameter includes an update urgency, and the update module is configured to execute:

[0183] According to the update urgency, determine the update priority of the target environment variables in the target configuration file;

[0184] According to the update priority, the target environment variables in the target configuration file are updated to obtain an updated configuration file.

[0185] In some embodiments, the update strategy includes a rollback method, and the update module is further configured to perform:

[0186] If an update failure is detected, it is determined whether there is an environment variable associated with the target environment variable in the target configuration file;

[0187] If there is no associated environment variable, the target environment variable is rolled back according to the rollback method;

[0188] If there are associated environment variables, then the update status of the associated environment variables is detected;

[0189] When it is detected that the update status of the associated environment variable is the update completion status, the target environment variable in the target configuration file is updated again according to the update strategy.

[0190] In some embodiments, the environment variable loading device further includes an encryption module, and the encryption module is used to execute:

[0191] Encrypt the target environment variables and their values ​​to obtain candidate encryption information;

[0192] Slice the candidate encrypted information to obtain at least two candidate encrypted information slices;

[0193] Encrypting at least two candidate encrypted information fragments to obtain at least two encrypted information;

[0194] storing at least two encrypted information locally and / or in a server;

[0195] After the target environment variables and their values ​​are loaded into the target application according to the target configuration file, the loading module 904 is further used to execute:

[0196] If a reload instruction of a target environment variable is received, at least two encrypted information are obtained from the local computer and / or the server;

[0197] Decrypt at least two encrypted messages to obtain target environment variables and their values;

[0198] Load the target environment variables and their values ​​into the target application.

[0199] Based on the same inventive concept, the embodiment of the present application also provides a computer device, which may be a server or a terminal device, and includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned environment variable loading method when executing the computer program. Thereby, various functions are realized, for example:

[0200] Obtain a preset configuration file, the preset configuration file including environment variables for M operating environments and values ​​corresponding to the environment variables;

[0201] In response to a selection operation of a target operating environment in a preset configuration file, displaying environment variables of the target operating environment;

[0202] In response to a triggering operation on a target environment variable in the environment variables of the target operating environment, generating a target configuration file according to the target environment variable and its value;

[0203] Based on the target configuration file, the target environment variables and their values ​​are loaded into the target application.

[0204] By obtaining a preset configuration file, the preset configuration file includes environment variables for M operating environments and values ​​corresponding to the environment variables, in response to a selection operation on the target operating environment in the preset configuration file, the environment variables of the target operating environment are displayed, in response to a trigger operation on the target environment variables in the environment variables of the target operating environment, a target configuration file for the target application is generated according to the target environment variables and their values, and according to the target configuration file, the target environment variables and their values ​​are loaded into the target application, thereby achieving generation of the target configuration file for the target application through the preset preset configuration file, eliminating the need to manually input the environment variables and manually generate the configuration file each time the environment variables are configured, thereby improving the configuration efficiency of the environment variables, thereby improving the loading efficiency of the environment variables.

[0205] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0206] In one embodiment, the computer device is a terminal device, for example, its internal structure diagram can be as follows: Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via 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 and a computer program. 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 in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an environment variable loading method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0207] Those skilled in the art will understand that Fig.10 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.

[0208] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0209] Since the computer program stored in the computer-readable storage medium can execute any one of the environment variable loading methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the environment variable loading methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0210] Based on the same inventive concept, the embodiment of the present application further provides a computer program product or a computer program, which includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations in the above embodiments.

[0211] It should be noted that the object data (including but not limited to user device information, user personal information, etc.) and conversation data 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 need to comply with relevant laws, regulations and standards of relevant countries and regions. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method 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.

[0212] Any reference to the memory, database or other media used in the embodiments provided in the present application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (Re RAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0213] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. 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 is not limited thereto.

[0214] In the above-mentioned embodiments of the environment variable loading device, computer-readable storage medium, computer software, computer equipment, and computer program product, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described environment variable loading device, computer-readable storage medium, computer program product, computer equipment and its corresponding units can refer to the description of the environment variable loading method in the above embodiment, and will not be repeated here.

[0215] The technical features of the above embodiments may be arbitrarily combined. 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.

[0216] The above is a detailed introduction to an environment variable loading method, computer software, computer equipment, computer-readable storage medium and computer program product provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for loading environment variables, characterized in that: The method comprises: Obtain a preset configuration file, wherein the preset configuration file includes environment variables for M operating environments and values ​​corresponding to the environment variables; In response to a selection operation of a target operating environment in the preset configuration file, displaying environment variables of the selected target operating environment; In response to a triggering operation on a target environment variable in the environment variables of the target operating environment, generating a target configuration file according to the target environment variable and its value; Based on the target configuration file, the target environment variables and their values ​​are loaded into the target application.

2. The method for loading environment variables according to claim 1, wherein: The trigger operation includes a first selection operation and a modification operation, and the response to the trigger operation on the target environment variable in the environment variable of the target operating environment, generating a target configuration file according to the target environment variable and its value, includes: In response to a first selection operation on a target environment variable among the environment variables of the target operating environment, displaying a value corresponding to the target environment variable; In response to a modification operation on the value, obtaining a modified value corresponding to the target environment variable; The target configuration file is generated according to the target environment variable and its modified value.

3. The method for loading environment variables according to claim 2, characterized in that: The step of displaying a value corresponding to the target environment variable in response to a first selection operation on the target environment variable in the environment variables of the target operating environment includes: In response to a first selection operation on a target environment variable in the environment variables of the target operating environment, obtaining a recommended value for the target environment variable from a backend; The value corresponding to the target environment variable and the recommended value are displayed, where the recommended value is used to recommend that the value corresponding to the target environment variable be modified to the recommended value.

4. The method for loading environment variables according to claim 1, wherein: The method further comprises: Receiving an update instruction for the target environment variable; According to the update instruction, obtaining the measurement indicator parameter of the target environment variable from the target configuration file; Determining, according to the measurement indicator parameter, an update indication parameter of the target environment variable; According to the update indication parameter, the target environment variable in the target configuration file is updated to obtain an updated configuration file; According to the updated configuration file, the updated target environment variables are loaded into the target application.

5. The method for loading environment variables according to claim 4, characterized in that: The update indication parameter includes an update importance; and updating the target environment variable in the target configuration file according to the update indication parameter to obtain an updated configuration file includes: Determining an update strategy for the target environment variable in the target configuration file according to the update importance; According to the update strategy, the target environment variables in the target configuration file are updated to obtain an updated configuration file.

6. The method for loading environment variables according to claim 5, characterized in that: The update indication parameter includes an update urgency; and the target environment variable in the target configuration file is updated according to the update indication parameter to obtain an updated configuration file, including: Determining the update priority of the target environment variable in the target configuration file according to the update urgency; According to the update priority, the target environment variable in the target configuration file is updated to obtain an updated configuration file.

7. The method for loading environment variables according to claim 5, characterized in that: The update strategy includes a rollback mode; after updating the target environment variable in the target configuration file according to the update strategy, the method further includes: If an update failure is detected, determining whether there is an environment variable associated with the target environment variable in the target configuration file; If there is no associated environment variable, rolling back the target environment variable according to the rollback method; If there are associated environment variables, then the update status of the associated environment variables is detected; When it is detected that the update status of the associated environment variable is the update completion status, the target environment variable in the target configuration file is updated again according to the update strategy.

8. The method for loading environment variables according to claim 1, wherein: After generating the target configuration file according to the target environment variable and its value, the method further includes: Encrypting the target environment variable and its value to obtain candidate encryption information; Slice the candidate encrypted information to obtain at least two candidate encrypted information slices; Encrypting the at least two candidate encrypted information fragments to obtain at least two pieces of encrypted information; storing the at least two encrypted information locally and / or in a server; After the target environment variables and their values ​​are loaded into the target application according to the target configuration file, the method further includes: If a reload instruction of the target environment variable is received, obtaining the at least two encrypted information from the local and / or server; Decrypting the at least two encrypted information to obtain the target environment variable and its value; The target environment variables and their values ​​are loaded into the target application.

9. A computer device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the environment variable loading method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the environment variable loading method according to any one of claims 1 to 8.

11. A computer software, characterized in that: The computer software includes a computer program, and the computer program is executed by a processor to perform the steps of the environment variable loading method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program or an instruction, wherein when the computer program or the instruction is executed by a processor, the steps of the environment variable loading method according to any one of claims 1 to 8 are implemented.