Data-driven interface generation method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202410175591.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2044-02-07
AI Technical Summary
[0005]有鉴于此,本发明提供了一种数据驱动界面生成方法、装置、电子设备及存储介质,以解决大量参数在云平台的部署和运维的问题
[0059] The classification module is used to classify the target parameters according to the data structure and generate multiple target parameter classes;
Smart Images

Figure CN117931922B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to a data-driven interface generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, most mainstream cloud platforms in the industry have their own operation and maintenance tools. Some of these tools are offered to users in an open manner, allowing users to choose which ones to use, while others require dedicated operation and maintenance personnel. Regardless of the form of the operation and maintenance tool, its basic presentation involves executing operation and maintenance scripts or commands at the cloud platform's underlying layer, with the front-end page providing the operation entry point and collecting the operation results.
[0003] In traditional operations and maintenance (O&M) methods, platform deployment and maintenance are all performed via command lines. This requires highly specialized O&M personnel with extensive knowledge of the numerous parameters and configuration options. However, in practice, each platform requires dedicated deployment and O&M personnel. With a large number of parameters, a single O&M personnel cannot handle the deployment work, and some configurations require communication with the platform developers to determine how to configure them. This is extremely inconvenient and difficult to use for a large cloud management platform.
[0004] How to solve the deployment and maintenance of a large number of parameters on the cloud platform has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the present invention provides a data-driven interface generation method, apparatus, electronic device and storage medium to solve the problem of deployment and maintenance of a large number of parameters on a cloud platform.
[0006] In a first aspect, the present invention provides a data-driven interface generation method, the method comprising:
[0007] Obtain the corresponding deployment parameters for the operating system;
[0008] Each deployment parameter is identified, and its basic characteristics are determined. These basic characteristics include the parameter's basic attributes, deployment characteristics, and UI characteristics.
[0009] Based on each deployment parameter and its corresponding basic characteristics, a data structure is generated, and a parameter database is constructed.
[0010] Based on the data structure, the deployment parameters in the parameter database are filtered to determine the target parameters used to generate the data-driven interface;
[0011] Based on the data structure, the target parameters are classified to generate multiple target parameter classes;
[0012] Based on various target parameter classes, a data-driven interface is generated to enable target users to complete parameter deployment and maintenance.
[0013] The data-driven interface generation method provided in this application obtains the corresponding deployment parameters of the operating system, then identifies each deployment parameter, determines its basic characteristics, and ensures the accuracy of the determined basic characteristics. Based on each deployment parameter and its corresponding basic characteristics, a data structure is generated, and a parameter database is constructed. This allows for understanding the deployment parameters based on the data structure and also enables the correction of each deployment parameter based on the parameter database, eliminating the need for users to search for the location of each deployment parameter in the deployment file, thus improving the efficiency of parameter correction. Based on the data structure, the deployment parameters in the parameter database are filtered to determine the target parameters used to generate the data-driven interface, ensuring the accuracy of the determined target parameters. This eliminates the need to generate the data-driven interface based on all deployment parameters, thereby improving the efficiency of data-driven interface generation. Then, based on the data structure, each target parameter is classified to generate multiple target parameter classes, ensuring the accuracy of the generated target parameter classes. Based on each target parameter class, a data-driven interface is generated, ensuring that the generated data-driven interface is clear, visually appealing, and easy for operators to deploy and maintain parameters. The above method enables operators to deploy and maintain parameters based on a data-driven interface. Therefore, operators do not need to deploy and maintain numerous parameters via command line, thus solving the problem of how to deploy and maintain a large number of parameters on the cloud platform.
[0014] In one optional implementation, obtaining the corresponding deployment parameters of the operating system includes:
[0015] Obtain the deployment documentation corresponding to the operating system;
[0016] Read the deployment document and obtain the first parameter included in the deployment document;
[0017] Obtain the deployment script corresponding to the operating system;
[0018] Compare each of the first parameters with the deployment script;
[0019] Based on the comparison results, determine all the second parameters except for the first parameter from the deployment script;
[0020] Deployment parameters are generated based on each of the first and second parameters.
[0021] The data-driven interface generation method provided in this application embodiment obtains the deployment document corresponding to the operating system; reads the deployment document to obtain the first parameters included in the deployment document, ensuring the accuracy of the obtained first parameters; obtains the deployment script corresponding to the operating system; compares each first parameter with the deployment script; based on the comparison result, determines each second parameter other than the first parameter from the deployment script, ensuring the accuracy of the determined second parameters; and generates deployment parameters based on each first parameter and each second parameter, ensuring the completeness of the determined deployment parameters and avoiding the inability to deploy and maintain parameters due to missing deployment parameters, thereby establishing a deployment platform corresponding to the electronic device.
[0022] In one optional implementation, the parameter deployment characteristics include the environment type to which the parameter belongs, the file to which the parameter belongs, and the parameter display status; based on the data structure, the deployment parameters in the parameter database are filtered to determine the target parameters used to generate the data-driven interface, including:
[0023] Get the current operating system environment;
[0024] Based on the current environment, determine the environment type, file, and display status of the target parameters that need to be deployed in the current environment;
[0025] Based on the environment type, file, and display status of the target parameters, the deployment parameters in the parameter database are filtered to determine the target parameters used to generate the interface.
[0026] The data-driven interface generation method provided in this application obtains the current environment of the operating system; based on the current environment, it determines the environment type, file, and display status of the parameters corresponding to the target parameters to be deployed in the current environment; this ensures the accuracy of the determined environment type, file, and display status of the parameters corresponding to the target parameters to be deployed in the current environment. Based on the environment type, file, and display status of the target parameters, the method filters each deployment parameter in the parameter database to determine the target parameters used to generate the interface, ensuring the accuracy of the determined target parameters used to generate the interface, thereby ensuring that the determined target parameters are suitable for the current environment.
[0027] In one optional implementation, the parameter deployment characteristics include the environment type to which the parameter belongs, the file to which the parameter belongs, and the parameter display status; based on the data structure, each target parameter is classified, including:
[0028] The target parameters are categorized based on their environment type, file, and display status.
[0029] Target parameters belonging to the same deployment logic are grouped into one category, generating multiple target parameter classes. The same deployment logic is used to characterize the target parameter's environment type, file, and display status.
[0030] The data-driven interface generation method provided in this application classifies target parameters according to the environment type, file, and display status of the parameters; target parameters belonging to the same deployment logic are grouped into one category, generating multiple target parameter classes, thus ensuring the accuracy of target parameter classification.
[0031] In one optional implementation, a data-driven interface is generated based on various target parameter classes, including:
[0032] For each target parameter class, the format of each target parameter in the target parameter class is converted to generate target format parameters;
[0033] Obtain the UI features corresponding to each target parameter;
[0034] Based on the target format parameters and parameter UI features, generate the target script corresponding to each target parameter;
[0035] Based on the UI characteristics of the parameters, the target interface elements corresponding to each target script are obtained from the preset element library; the preset element library is generated based on the UI characteristics of each deployment parameter.
[0036] Combine each target script with the target interface elements to generate each element to be displayed;
[0037] A data-driven interface is generated based on each element to be displayed.
[0038] The data-driven interface generation method provided in this application, for each target parameter class, performs format conversion on each target parameter in the target parameter class to generate target format parameters, ensuring the accuracy of the generated target format parameters. It obtains the parameter UI features corresponding to each target parameter; based on the target format parameters and parameter UI features, it generates target scripts corresponding to each target parameter, ensuring the accuracy of the generated target scripts. According to the parameter UI characteristics, it obtains the target interface elements corresponding to each target script from a preset element library, ensuring the correspondence between the obtained target interface elements and the target scripts. It combines each target script with the target interface elements to generate each element to be displayed, ensuring the accuracy of the generated elements to be displayed. Based on each element to be displayed, it generates a data-driven interface, ensuring the accuracy of the generated data-driven interface. The above method enables operators to deploy and maintain parameters based on the data-driven interface. Therefore, it eliminates the need for operators to deploy and maintain numerous parameters via command line, solving the problem of how to deploy and maintain a large number of parameters on a cloud platform.
[0039] In one alternative implementation, a data-driven interface is generated based on each element to be displayed, including:
[0040] Based on the UI characteristics of each element to be displayed, the elements to be displayed are categorized.
[0041] Grouping elements of the same type to be displayed onto the same page or the same step within the same page;
[0042] For each page or step, obtain the parameter sequence number of the target parameter corresponding to each element to be displayed on the same page or in the same step;
[0043] Arrange the elements to be displayed according to the parameter sequence number of the target parameters corresponding to each element;
[0044] Get the default or actual values of the target parameters for each element to be displayed;
[0045] The default or actual value is combined with the element to be displayed to generate a data-driven interface.
[0046] The data-driven interface generation method provided in this application classifies each element to be displayed according to its UI characteristics, ensuring the accuracy of the classification. Elements of the same type are grouped into the same page or the same step within the same page. For each page or step, the parameter sequence number of the target parameter corresponding to each element to be displayed within the same page or step is obtained. The elements to be displayed are arranged according to their parameter sequence numbers, ensuring the accuracy of the arrangement. The default value or actual value of the target parameter corresponding to each element to be displayed is obtained. The default value or actual value is combined with the element to be displayed to generate the data-driven interface. This ensures the accuracy of the generated data-driven interface, which is well-organized, visually appealing, and facilitates parameter deployment and maintenance by operators.
[0047] In one alternative implementation, the method further includes:
[0048] Receive deployment commands and / or operation and maintenance commands input by the target user based on the data-driven interface; the deployment command includes at least one parameter to be deployed and the deployment target value corresponding to each parameter to be deployed; the operation and maintenance command includes at least one parameter to be operated and the operation and maintenance target value corresponding to each parameter to be operated and maintained.
[0049] Based on the basic characteristics of each parameter to be deployed and / or each parameter to be maintained, determine the deployment environment, deployment file, and location in the deployment file for each parameter to be deployed and / or each parameter to be maintained.
[0050] Based on the deployment environment, deployment file, and position in the deployment file corresponding to each parameter to be deployed and / or each parameter to be maintained, modify the current value of each parameter to be deployed to the target deployment value and / or modify the current value of each parameter to be maintained to the target maintenance value in the deployment file.
[0051] Based on the modified parameters to be deployed and / or parameters to be maintained, generate deployment scripts and / or maintenance scripts.
[0052] Based on the deployment script and / or operation and maintenance script, complete the deployment command and / or operation and maintenance command.
[0053] The data-driven interface generation method provided in this application receives deployment commands and / or operation and maintenance commands input by a target user based on a data-driven interface. Based on the basic characteristics corresponding to each parameter to be deployed and / or each parameter to be operated and maintained, the method determines the deployment environment, deployment file, and its position within the deployment file for each parameter to be deployed and / or each parameter to be operated and maintained, ensuring the accuracy of the determined deployment environment, deployment file, and position within the deployment file. Based on the deployment environment, deployment file, and position within the deployment file for each parameter to be deployed and / or each parameter to be operated and maintained, the method modifies the current value of each parameter to be deployed to the target deployment value and / or modifies the current value of each parameter to be operated and maintained to the target operation and maintenance value within the deployment file, ensuring the accuracy of the modification of each parameter to be deployed and / or each parameter to be operated and maintained. Based on the modified parameters to be deployed and / or each parameter to be operated and maintained, a deployment script and / or an operation and maintenance script are generated, ensuring the accuracy of the generated deployment script and / or operation and maintenance script. Based on the deployment script and / or operation and maintenance script, the deployment command and / or operation and maintenance command are completed. The above method enables operators to deploy and maintain parameters based on a data-driven interface. Therefore, operators do not need to deploy and maintain numerous parameters via command line, thus solving the problem of how to deploy and maintain a large number of parameters on the cloud platform.
[0054] In a second aspect, the present invention provides a data-driven interface generation apparatus, the apparatus comprising:
[0055] The acquisition module is used to obtain the corresponding deployment parameters of the operating system;
[0056] The first determination module is used to identify each deployment parameter and determine the basic characteristics of each deployment parameter; the basic characteristics include the parameter's basic attributes, parameter deployment characteristics, and parameter UI characteristics;
[0057] The first generation module is used to generate data structures and build a parameter database based on each deployment parameter and the basic characteristics corresponding to each deployment parameter.
[0058] The filtering module is used to filter the deployment parameters in the parameter database according to the data structure to determine the target parameters used to generate the data-driven interface.
[0059] The classification module is used to classify the target parameters according to the data structure and generate multiple target parameter classes;
[0060] The second generation module is used to generate a data-driven interface based on various target parameter classes, so that target users can complete parameter deployment and parameter maintenance based on the data-driven interface.
[0061] The data-driven interface generation apparatus provided in this application obtains the corresponding deployment parameters of the operating system, then identifies each deployment parameter, determines its basic characteristics, and ensures the accuracy of the determined basic characteristics. Based on each deployment parameter and its corresponding basic characteristics, a data structure is generated, and a parameter database is constructed. This allows for understanding the deployment parameters based on the data structure and also enables the correction of each deployment parameter based on the parameter database, eliminating the need for users to search for the location of each deployment parameter in the deployment file, thus improving the efficiency of parameter correction. Based on the data structure, the deployment parameters in the parameter database are filtered to determine the target parameters used to generate the data-driven interface, ensuring the accuracy of the determined target parameters. This eliminates the need to generate the data-driven interface based on all deployment parameters, thereby improving the efficiency of data-driven interface generation. Then, based on the data structure, each target parameter is classified to generate multiple target parameter classes, ensuring the accuracy of the generated target parameter classes. Based on each target parameter class, a data-driven interface is generated, ensuring that the generated data-driven interface is clear, visually appealing, and easy for operators to deploy and maintain parameters. The aforementioned device enables operators to deploy and maintain parameters based on a data-driven interface. Therefore, it eliminates the need for operators to deploy and maintain numerous parameters via command lines, thus solving the problem of how to deploy and maintain a large number of parameters on a cloud platform.
[0062] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the data-driven interface generation method described in the first aspect or any corresponding embodiment thereof.
[0063] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the data-driven interface generation method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0064] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0065] Figure 1 This is a flowchart illustrating a data-driven interface generation method according to an embodiment of the present invention;
[0066] Figure 2 This is a schematic diagram illustrating the basic features of deployment parameters according to an embodiment of the present invention;
[0067] Figure 3 This is a flowchart illustrating another data-driven interface generation method according to an embodiment of the present invention;
[0068] Figure 4 This is a flowchart illustrating another data-driven interface generation method according to an embodiment of the present invention;
[0069] Figure 5 This is a schematic diagram of a preset element library according to an embodiment of the present invention;
[0070] Figure 6 This is a flowchart illustrating another data-driven interface generation method according to an embodiment of the present invention;
[0071] Figure 7 This is a schematic diagram of the deployment platform architecture according to an embodiment of the present invention;
[0072] Figure 8 This is a flowchart illustrating another data-driven interface generation method according to an embodiment of the present invention;
[0073] Figure 9 This is a structural block diagram of a data-driven interface generation device according to an embodiment of the present invention;
[0074] Figure 10 This is a structural block diagram of a data-driven interface generation device according to an embodiment of the present invention;
[0075] Figure 11 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0077] The Yunhai OS deployment platform is used to deploy and maintain various Yunhai OS operating systems. Operation and maintenance tools are the most fundamental tools in a cloud platform. The deployment and operation of a cloud platform cannot function without the support of these tools.
[0078] Currently, mainstream cloud platforms in the industry, such as QingCloud, Alibaba Cloud, and Huawei Cloud, all have their own operation and maintenance (O&M) tools. Some of these tools are offered to users in an open manner, allowing users to choose which to use, while others require dedicated O&M personnel. Regardless of the form, the basic approach to O&M tools is to execute O&M scripts or commands at the cloud platform's underlying layer, with the front-end page providing the operation entry point and collecting operation results. O&M tools that only display in a low-level command-line window are difficult to apply and use. The command-line window format is limited to professional O&M personnel and cannot be widely adopted. Once a problem occurs, the O&M time and cost will increase significantly. From the perspective of cloud platform fault recovery, the average fault response time for O&M tools relying solely on command-line windows will be very high, which is detrimental to the system and also affects user experience.
[0079] Yunhai OS is a cloud platform operating system that includes a virtualization management platform, a container platform, and a cloud management platform. Each platform has its own deployment tools, and these tools support different deployment methods and processes. Based on the deployment scripts for each of Yunhai OS's various deployment platforms, we developed a Yunhai OS deployment platform. This platform supports deployment on all Yunhai OS platforms, including the InCloud OS cloud operating system, container platform operating system, and virtualization platform operating system. The platform aims to support the installation and configuration of all cloud operating systems.
[0080] In traditional operations and maintenance (O&M) methods, platform deployment and maintenance are all performed via command lines. This requires highly specialized O&M personnel with extensive knowledge of the numerous parameters and configuration options. However, in practice, each platform requires dedicated deployment and O&M personnel. For example, virtualization platforms can have over 300 deployment parameters, and even the simplest container platform requires over 100 configuration parameters. Furthermore, user environments and host configurations vary, necessitating constant parameter adjustments to ensure platform compatibility. Faced with such a vast number of parameters, a single O&M personnel cannot handle the deployment work; some configurations require communication with the platform developers to determine how to configure them. This is extremely inconvenient and difficult to use for a large cloud management platform.
[0081] Currently, based on deployment and operation needs, we have developed a deployment platform. The deployment platform is primarily a collection of deployment tools and operation / maintenance tools. It guides users through the deployment and operation of various platforms within the Yunhai OS, starting from the user interface. However, due to the large number of parameters on each platform and their varying formats (e.g., some parameters require input boxes, some are text boxes, some are dropdown selections, some are radio buttons, some are switches, etc.), implementing such numerous interface elements and content through pure front-end coding is impractical and cannot manage such a large number of parameters. Even with hard coding, modifying a parameter later would be extremely cumbersome, and once the deployment platform is in use, the code cannot be changed. Therefore, relying solely on interface coding cannot adapt to parameter changes. However, deployment scripts and their configuration parameters frequently change, requiring the deployment platform to adapt to these changes.
[0082] How to solve the deployment and maintenance of a large number of parameters on the cloud platform has become an urgent problem to be solved.
[0083] It should be noted that the data-driven interface generation method provided in this application embodiment can be executed by a data-driven interface generation device. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. The electronic device can be a server or a terminal. In this application embodiment, the server can be a single server or a server cluster composed of multiple servers. The terminal in this application embodiment can be a smartphone, personal computer, tablet computer, wearable device, or other intelligent hardware device such as an intelligent robot. The following method embodiments will use an electronic device as an example for explanation.
[0084] According to an embodiment of the present invention, a data-driven interface generation method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0085] This embodiment provides a data-driven interface generation method. Figure 1 This is a flowchart of a data-driven interface generation method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0086] Step S101: Obtain the corresponding deployment parameters for the operating system.
[0087] Specifically, the electronic device can receive the corresponding deployment parameters of the operating system input by the user, or it can receive the corresponding deployment parameters of the operating system sent by other devices. The electronic device can also read files in the operating system to obtain the corresponding deployment parameters of the operating system. This application embodiment does not specifically limit the method by which the electronic device obtains the corresponding deployment parameters of the operating system.
[0088] This step will be explained in detail below.
[0089] Step S102: Identify each deployment parameter and determine the basic characteristics of each deployment parameter.
[0090] The basic features include basic parameter attributes, parameter deployment characteristics, and parameter UI characteristics.
[0091] The parameters include basic attributes such as the parameter key, default value, and description, which describe the parameter's function. Deployment characteristics include the parameter type (related to the deployment environment, which includes operational environments, virtualization environments, and container environments; therefore, parameter types include operational, virtualization, and container types), visibility, and the file to which the parameter belongs. Since the parameter is ultimately used for deployment, it must have deployment characteristics, which must be set. Other deployment characteristics can also be added. UI characteristics include the parameter's UI type, UI display value, and UI behavior. For example,... Figure 2 The diagram shown illustrates the basic characteristics of deployment parameters.
[0092] Specifically, the electronic device can identify each deployment parameter, determine its basic attributes, and then, based on the deployment environment, deployment file, and availability, determine the deployment characteristics of each parameter. Next, it determines the UI characteristics based on the parameter type. For example, some deployment parameters require input fields, some require text fields, some require dropdown selections, some require radio buttons, and some require switches.
[0093] Step S103: Based on each deployment parameter and the basic characteristics corresponding to each deployment parameter, generate a data structure and build a parameter database.
[0094] Specifically, after determining the basic characteristics of the deployment parameters, the electronic device can generate a data structure based on each deployment parameter and its corresponding basic characteristics.
[0095] Some deployment parameters have a parent-child structure, meaning that a single deployment parameter may have multiple levels of sub-deployment parameters. The data structure can characterize the basic features of each deployment parameter and the deployment relationships between them.
[0096] To facilitate the management of various deployment parameters, electronic devices can also build a parameter database based on each deployment parameter and its corresponding basic characteristics.
[0097] Therefore, when a target user needs to update a deployment parameter, the electronic device only needs to look up the deployment parameter to be updated in the parameter database according to the user's instruction, and then update the deployment parameter accordingly. Thus, the user does not need to first find the location of the deployment parameter to be updated in the deployment file and then update it via command line. It should be noted that when there are many deployment parameters in the deployment file, it can be quite difficult for the user to find the location of the deployment parameter to be updated within the deployment file.
[0098] Step S104: Based on the data structure, filter the deployment parameters in the parameter database to determine the target parameters used to generate the data-driven interface.
[0099] Specifically, after generating the data structure corresponding to each deployment parameter, the electronic device can filter the deployment parameters in the parameter database based on the data structure and the current environment of the operating system to determine the target parameters used to generate the data-driven interface.
[0100] This step will be explained in detail below.
[0101] Step S105: Based on the data structure, classify each target parameter to generate multiple target parameter classes.
[0102] Specifically, after generating the data structure corresponding to each deployment parameter and determining the target parameter from each deployment parameter, the electronic device can classify each target parameter according to the parameter deployment characteristics corresponding to each target parameter, and generate multiple target parameter classes.
[0103] This step will be explained in detail below.
[0104] Step S106: Generate a data-driven interface based on various target parameter classes, so that target users can complete parameter deployment and parameter maintenance based on the data-driven interface.
[0105] Specifically, electronic devices can determine the target interface elements corresponding to each target parameter in each of the classified target parameter classes based on the UI features corresponding to the target parameters in each target parameter class, and then merge the target parameters with the target interface elements to generate a data-driven interface.
[0106] This step will be explained in detail below.
[0107] The data-driven interface generation method provided in this embodiment obtains the corresponding deployment parameters of the operating system, then identifies each deployment parameter and determines its basic characteristics, ensuring the accuracy of the determined basic characteristics. Based on each deployment parameter and its corresponding basic characteristics, a data structure is generated and a parameter database is constructed. This allows for understanding the deployment parameters based on the data structure and also enables the correction of each deployment parameter based on the parameter database, eliminating the need for users to search for the location of each deployment parameter in the deployment file, thus improving the efficiency of deployment parameter correction. Based on the data structure, the deployment parameters in the parameter database are filtered to determine the target parameters used to generate the data-driven interface, ensuring the accuracy of the determined target parameters. This eliminates the need to generate the data-driven interface based on all deployment parameters, thereby improving the efficiency of data-driven interface generation. Then, based on the data structure, each target parameter is classified to generate multiple target parameter classes, ensuring the accuracy of the generated multiple target parameter classes. Based on each type of target parameter class, a data-driven interface is generated, ensuring that the generated data-driven interface is clear, visually appealing, and easy for operators to deploy and maintain parameters based on the data-driven interface. The method described above enables operators to deploy and maintain parameters via a data-driven interface. Therefore, it eliminates the need for operators to deploy and maintain numerous parameters via command line, solving the problem of deploying and maintaining a large number of parameters on a cloud platform. This method significantly improves page generation efficiency, prevents code modifications due to parameter changes, and eliminates the need to change the interface code for parameter changes or additions; it only requires data-driven re-implementation. This greatly improves operational efficiency and enhances the usability of the deployment platform.
[0108] This embodiment provides a data-driven interface generation method. Figure 3 This is a flowchart of a data-driven interface generation method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0109] Step S201: Obtain the corresponding deployment parameters for the operating system.
[0110] Specifically, step S201 includes:
[0111] Step S2011: Obtain the deployment document corresponding to the operating system.
[0112] Specifically, the electronic device can receive the deployment document corresponding to the operating system input by the user, or it can receive the deployment document corresponding to the operating system sent by other devices. The electronic device can also search for the deployment document corresponding to the operating system in the operating system. This application embodiment does not specifically limit the method by which the electronic device obtains the deployment document corresponding to the operating system.
[0113] The deployment documents can be deployment documents for various platforms, including container platforms, virtualization platforms, and cloud management platforms.
[0114] Step S2012: Read the deployment document and obtain the first parameters included in the deployment document.
[0115] Specifically, the electronic device reads the deployment document and obtains the first parameters included in the deployment document.
[0116] Step S2013: Obtain the deployment script corresponding to the operating system.
[0117] Specifically, the electronic device can receive the deployment script corresponding to the operating system input by the user, or it can receive the deployment script corresponding to the operating system sent by other devices. The electronic device can also search for the deployment script corresponding to the operating system in the operating system. The embodiments of this application do not specifically limit the method by which the electronic device obtains the deployment script corresponding to the operating system.
[0118] Step S2014: Compare each first parameter with the deployment script.
[0119] Specifically, the electronic device identifies the deployment script and determines the third parameters included in the deployment script. The electronic device then compares each third parameter with each first parameter.
[0120] Step S2015: Based on the comparison results, determine each of the second parameters other than the first parameter from the deployment script.
[0121] Specifically, based on the comparison results, the electronic device determines each of the second parameters other than the first parameter from each of the third parameters corresponding to the deployment script.
[0122] Step S2016: Generate deployment parameters based on each first parameter and each second parameter.
[0123] Specifically, the electronic device determines the first parameter and the second parameter as deployment parameters.
[0124] Step S202 involves identifying each deployment parameter and determining its basic characteristics. Among these,
[0125] The basic features include basic parameter attributes, parameter deployment characteristics, and parameter UI characteristics.
[0126] For details on this step, please refer to [link / reference]. Figure 1 The details of step S102 will not be elaborated here.
[0127] Step S203: Based on each deployment parameter and the basic characteristics corresponding to each deployment parameter, generate a data structure and build a parameter database.
[0128] For details on this step, please refer to [link / reference]. Figure 1 The details of step S103 will not be elaborated here.
[0129] Step S204: Based on the data structure, filter the deployment parameters in the parameter database to determine the target parameters used to generate the data-driven interface.
[0130] Specifically, the parameter deployment characteristics include the environment type to which the parameter belongs, the file to which the parameter belongs, and the parameter display status. Step S204 above includes:
[0131] Step S2041: Obtain the current environment of the operating system.
[0132] Specifically, electronic devices can receive the current environment of the operating system input by the user, and can also identify the operating system to determine its current environment.
[0133] This application does not specifically limit the method by which an electronic device obtains the current environment of the operating system.
[0134] The current environment can be any of the following: operation and management environment, virtualization environment, or container environment.
[0135] Step S2042: Based on the current environment, determine the environment type, file, and display status of the target parameters to be deployed in the current environment.
[0136] Specifically, electronic devices can determine the environment type, file, and display status of the target parameters that need to be deployed in the current environment based on the current environment.
[0137] Step S2043: Based on the environment type, file, and display status of the target parameters, filter the deployment parameters in the parameter database to determine the target parameters used to generate the interface.
[0138] Specifically, the electronic device filters the deployment parameters in the parameter database based on the environment type, file, and display status of the parameter corresponding to the target parameter, and determines the target parameter used to generate the interface.
[0139] Step S205: Based on the data structure, classify each target parameter to generate multiple target parameter classes.
[0140] For details on this step, please refer to [link / reference]. Figure 1 The description of step S105 in the embodiment will not be repeated here.
[0141] Step S206: Generate a data-driven interface based on various target parameter classes, so that target users can complete parameter deployment and parameter maintenance based on the data-driven interface.
[0142] For details on this step, please refer to [link / reference]. Figure 1 The description of step S106 in the embodiment will not be repeated here.
[0143] The data-driven interface generation method provided in this application embodiment obtains the deployment document corresponding to the operating system; reads the deployment document to obtain the first parameters included in the deployment document, ensuring the accuracy of the obtained first parameters; obtains the deployment script corresponding to the operating system; compares each first parameter with the deployment script; based on the comparison result, determines each second parameter other than the first parameter from the deployment script, ensuring the accuracy of the determined second parameters; and generates deployment parameters based on each first parameter and each second parameter, ensuring the completeness of the determined deployment parameters and avoiding the inability to deploy and maintain parameters due to missing deployment parameters, thereby establishing a deployment platform corresponding to the electronic device.
[0144] Furthermore, the system obtains the current operating system environment; based on this environment, it determines the environment type, file, and display status of the target parameters to be deployed in the current environment; this ensures the accuracy of the determined environment type, file, and display status of the target parameters. Based on the environment type, file, and display status of the target parameters, the system filters the deployment parameters in the parameter database to determine the target parameters used to generate the interface, ensuring the accuracy of the determined target parameters and thus guaranteeing that the determined target parameters are suitable for the current environment.
[0145] This embodiment provides a data-driven interface generation method. Figure 4 This is a flowchart of a data-driven interface generation method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:
[0146] Step S301: Obtain the corresponding deployment parameters for the operating system.
[0147] For details on this step, please refer to [link / reference]. Figure 3 The description of step S201 in the embodiment will not be repeated here.
[0148] Step S302 involves identifying each deployment parameter and determining its basic characteristics. Among these,
[0149] The basic features include basic parameter attributes, parameter deployment characteristics, and parameter UI characteristics.
[0150] For details on this step, please refer to [link / reference]. Figure 3 The description of step S202 in the embodiment will not be repeated here.
[0151] Step S303: Based on each deployment parameter and the basic characteristics corresponding to each deployment parameter, generate a data structure and build a parameter database.
[0152] For details on this step, please refer to [link / reference]. Figure 3 The description of step S203 in the embodiment will not be repeated here.
[0153] Step S304: Based on the data structure, filter the deployment parameters in the parameter database to determine the target parameters used to generate the data-driven interface.
[0154] For details on this step, please refer to [link / reference]. Figure 3 The description of step S204 in the embodiment will not be repeated here.
[0155] Step S305: Based on the data structure, classify each target parameter to generate multiple target parameter classes.
[0156] Specifically, step S305 above may include the following:
[0157] Step S3051: Classify each target parameter according to the environment type, file, and display status of the parameter.
[0158] Specifically, electronic devices can classify target parameters based on the environment type to which the parameter belongs, the file to which the parameter belongs, and the display status of the parameter.
[0159] Step S3052: Group target parameters belonging to the same deployment logic into one category and generate multiple target parameter classes.
[0160] The same deployment logic is used to characterize that the target parameter belongs to the same environment type, the parameter file, and the parameter display status.
[0161] Specifically, Electronic Device Nine can group target parameters belonging to the same deployment logic into one category, generating multiple target parameter classes.
[0162] Step S306: Generate a data-driven interface based on various target parameter classes, so that target users can complete parameter deployment and parameter maintenance based on the data-driven interface.
[0163] Specifically, step S306 above may include the following steps:
[0164] Step S3061: For each target parameter class, perform format conversion on each target parameter in the target parameter class to generate target format parameters.
[0165] Specifically, for each target parameter class, the electronic device can perform format conversion on each target parameter in the target parameter class to generate target format parameters.
[0166] For example, an electronic device can perform format conversion on each target parameter in the target parameter class to generate target JSON format parameters.
[0167] Step S3062: Obtain the parameter UI features corresponding to each target parameter.
[0168] Specifically, electronic devices can determine the UI features corresponding to each target parameter based on the data structure corresponding to each target parameter.
[0169] Step S3063: Based on the target format parameters and parameter UI features, generate the target script corresponding to each target parameter.
[0170] Specifically, the electronic device generates target scripts corresponding to each target parameter based on the target format parameters and parameter UI features.
[0171] For example, the electronic device generates the target script corresponding to the target parameter by combining the target JSON format parameter corresponding to the target parameter with the parameter UI feature corresponding to the target parameter.
[0172] Step S3064: Based on the parameter UI characteristics, retrieve the target interface elements corresponding to each target script from the preset element library.
[0173] The preset element library is generated based on the UI characteristics corresponding to each deployment parameter.
[0174] Specifically, the electronic device can generate multiple interface elements based on the UI characteristics corresponding to each deployment parameter, and then generate a preset element library based on each interface element. The electronic device can also receive preset element libraries sent by other devices, and can also receive preset element libraries input by the user. This application embodiment does not specifically limit the method by which the electronic device obtains the preset element library.
[0175] An exemplary diagram illustrating the preset element library generation process, such as... Figure 5 As shown. Each element in the preset element library contains a display structure, such as an input box, dropdown list, selection button, add button, delete button, etc. Each element defines its own display style, can accept serialized parameter input, and supports element categorization and accepting behavioral methods from data.
[0176] The basic idea behind the preset element library is that each element in the library is customizable. It can be assembled into any type of element library based on data requirements, and further subdivided based on different element behaviors. For example, while UI standards only provide standard buttons, electronic devices can customize buttons such as add, delete, remove, and cancel. Thus, by specifying the corresponding element type in the serialization parameters, the corresponding element can be found, and then the default or actual value corresponding to the target parameter can be assigned to the element to generate the corresponding interface.
[0177] Specifically, electronic devices can obtain the target interface elements corresponding to each target script from a preset element library based on the parameter UI characteristics.
[0178] For example, the parameter UI feature indicates that the target parameter requires an input box. Therefore, the electronic device obtains the input box corresponding to each target script from the preset element library.
[0179] Step S3065: Combine each target script with the target interface elements to generate each element to be displayed.
[0180] Specifically, the electronic device combines the target script with the target interface elements to generate the elements to be displayed.
[0181] Step S3066: Generate a data-driven interface based on each element to be displayed.
[0182] Specifically, step S3066 above may include the following steps:
[0183] Step a1: Classify each element to be displayed according to its corresponding UI characteristics.
[0184] Specifically, electronic devices can categorize elements to be displayed based on the UI characteristics of each element.
[0185] For example, elements of type input box to be displayed are grouped into one category, and elements of type text box to be displayed are grouped into another category.
[0186] Step a2 involves grouping elements of the same type to be displayed onto the same page or within the same page, following the same steps.
[0187] Specifically, electronic devices will group elements of the same type to be displayed onto the same page or within the same page in the same step.
[0188] Step a3: For each page or step, obtain the parameter sequence number of the target parameter corresponding to each element to be displayed on the same page or in the same step.
[0189] Specifically, for each page or step, obtain the parameter sequence number of the target parameter corresponding to each element to be displayed on the same page or in the same step.
[0190] The parameter sequence number can be used to indicate the order of the target parameters. For example, the sequence number could be 1, 2, 3, 4, ...
[0191] Step a4: Arrange the elements to be displayed according to the parameter sequence number of the target parameter corresponding to each element.
[0192] Specifically, the electronic device can arrange the elements to be displayed according to the parameter sequence number of the target parameter corresponding to each element.
[0193] Step a5: Obtain the default or actual values of the target parameters for each element to be displayed.
[0194] Specifically, electronic devices can look up the default or actual values of the target parameters corresponding to each element to be displayed in the parameter database.
[0195] Step a6: Combine the default value or the actual value with the element to be displayed to generate a data-driven interface.
[0196] Specifically, electronic devices can display default values or actual values in the elements to be displayed, thereby generating a data-driven interface.
[0197] For example, such as Figure 6 As shown in the diagram, the electronic device obtains deployment parameters and then compares them with the corresponding deployment files in the deployment environment through a parameter filter based on filtering conditions. Based on the comparison results, deployment parameters that do not match the deployment files are filtered out, thus obtaining the target parameters. Next, the electronic device performs parameter serialization processing on the target parameters. Specifically, it converts the target parameters into target JSON format parameters and then performs data structuring processing based on the basic characteristics of the target parameters to generate the corresponding data structure. Based on the target JSON format parameters and the corresponding data structure, a target script is generated. Based on the target script and target interface elements, the target parameters are displayed on the UI interface.
[0198] Step S307: Receive deployment commands and / or operation and maintenance commands input by the target user based on the data-driven interface.
[0199] The deployment command includes at least one parameter to be deployed and the deployment target value corresponding to each parameter; the operation and maintenance command includes at least one parameter to be operated and maintained and the operation and maintenance target value corresponding to each parameter.
[0200] Specifically, electronic devices can receive deployment commands and / or maintenance commands input by target users based on a data-driven interface.
[0201] Step S308: Based on the basic characteristics of each parameter to be deployed and / or each parameter to be maintained, determine the deployment environment, deployment file, and location in the deployment file corresponding to each parameter to be deployed and / or each parameter to be maintained.
[0202] Specifically, the electronic device determines the deployment environment, deployment file, and location in the deployment file for each parameter to be deployed and / or each parameter to be maintained, based on the parameter deployment characteristics in the basic characteristics corresponding to each parameter to be deployed and / or each parameter to be maintained.
[0203] Step S309: Based on the deployment environment, deployment file, and position of each parameter to be deployed and / or each parameter to be maintained, modify the current value of each parameter to be deployed to the target deployment value and / or modify the current value of each parameter to be maintained to the target maintenance value in the deployment file.
[0204] Specifically, the electronic device modifies the current value of each parameter to be deployed to the target deployment value and / or the current value of each parameter to be maintained to the target maintenance value in the deployment file, based on the deployment environment, deployment file, and position of each parameter to be deployed and / or each parameter to be maintained.
[0205] Step S310: Based on the modified parameters to be deployed and / or parameters to be maintained, generate deployment scripts and / or maintenance scripts.
[0206] Specifically, the electronic device generates deployment scripts and / or maintenance scripts based on the modified parameters to be deployed and / or parameters to be maintained, as well as other deployment parameters related to the parameters to be deployed and / or parameters to be maintained.
[0207] Step S311: Based on the deployment script and / or operation and maintenance script, complete the deployment command and / or operation and maintenance command.
[0208] Specifically, the electronic device executes deployment commands and / or operation and maintenance commands based on the deployment script and / or operation and maintenance script.
[0209] For example, such as Figure 7As shown, the deployment platform includes a UI interface, a logic control layer (CloudWare), a script layer, and a database. Target users can issue deployment and operation commands to the logic control layer through the UI. The logic control layer processes these commands, generates deployment scripts and / or operation scripts, and sends them to the script layer. Finally, the various deployment scripts and / or operation scripts are executed on the host to complete the deployment and operation. The script layer only defines the parameter keys; the values corresponding to these keys are passed through the interface. By writing the values of the parameters configured through the interface to the corresponding keys, a complete script can be formed, thus enabling deployment and operation control.
[0210] It should be noted that, in this context, the script layer refers to the deployment script module, which in the context of the cloud platform refers to the Cloudship project, a deployment tool composed of shell scripts and Ansible commands.
[0211] The data-driven interface generation method provided in this embodiment classifies target parameters according to their environment type, file, and display status. Target parameters belonging to the same deployment logic are grouped into one category, generating multiple target parameter classes to ensure accuracy in classification. For each target parameter class, the format of each target parameter is converted to generate target format parameters, ensuring accuracy in the generated target format parameters. The UI features corresponding to each target parameter are obtained; based on the target format parameters and parameter UI features, target scripts corresponding to each target parameter are generated, ensuring accuracy in the generated target scripts. Based on the parameter UI characteristics, target interface elements corresponding to each target script are obtained from a preset element library, ensuring the correspondence between the obtained target interface elements and target scripts. Each target script and target interface element are combined to generate elements to be displayed, ensuring accuracy in the generated elements to be displayed. Based on the element UI characteristics corresponding to each element to be displayed, each element to be displayed is classified, ensuring accuracy in the classification of elements to be displayed. The method categorizes elements of the same type to be displayed into the same page or the same step within the same page. For each page or step, it obtains the parameter sequence number of the target parameter corresponding to each element to be displayed within the same page or step. Based on the parameter sequence number of the target parameter corresponding to each element to be displayed, the elements are arranged to ensure accuracy. The method also obtains the default or actual value of the target parameter corresponding to each element to be displayed. The default or actual value is then combined with the element to be displayed to generate a data-driven interface. This ensures the accuracy, clarity, and good visibility of the generated data-driven interface, facilitating parameter deployment and maintenance by operators. This method enables operators to deploy and maintain parameters based on the data-driven interface, eliminating the need for operators to deploy and maintain numerous parameters via command line, thus solving the problem of deploying and maintaining a large number of parameters on a cloud platform.
[0212] Furthermore, after generating the data-driven interface, it receives deployment commands and / or operation and maintenance commands input by the target user through the data-driven interface. Based on the basic characteristics corresponding to each parameter to be deployed and / or each parameter to be operated and maintained, it determines the deployment environment, deployment file, and its location within the deployment file for each parameter to be deployed and / or each parameter to be operated and maintained, ensuring the accuracy of the determined deployment environment, deployment file, and location within the deployment file. Based on the deployment environment, deployment file, and location within the deployment file for each parameter to be deployed and / or each parameter to be operated and maintained, it modifies the current value of each parameter to be deployed to the target deployment value and / or modifies the current value of each parameter to be operated and maintained to the target operation and maintenance value within the deployment file, ensuring the accuracy of the modifications made to each parameter to be deployed and / or each parameter to be operated and maintained. Based on the modified parameters to be deployed and / or each parameter to be operated and maintained, it generates deployment scripts and / or operation and maintenance scripts, ensuring the accuracy of the generated deployment scripts and / or operation and maintenance scripts. Based on the deployment scripts and / or operation and maintenance scripts, it completes the deployment commands and / or operation and maintenance commands. The above method enables operators to deploy and maintain parameters based on a data-driven interface. Therefore, operators do not need to deploy and maintain numerous parameters via command line, thus solving the problem of how to deploy and maintain a large number of parameters on the cloud platform.
[0213] To better illustrate the data-driven interface generation method provided in the embodiments of this application, such as Figure 8 As shown in the figure, this application embodiment provides a flowchart of a data-driven interface generation method.
[0214] First, data structure generation involves assigning additional attributes to deployment parameters. These can include basic attributes (parameter key, default value, description, parameter sequence), parameter deployment characteristics (parameter environment, parameter file, parameter visibility, etc.), and parameter UI characteristics (element type, optional values, element behavior, element style, etc.; for example, element type: select (dropdown); optional values: icks, icos, icmp; element behavior: onSelect function (if needed); element style: CSS style). Adding, deleting, and modifying deployment parameters is supported. That is, for an added deployment parameter key, other attributes of the key can be modified, but the key itself cannot be modified. The data structure is a fundamental component of the data-driven interface.
[0215] The "key" in the deployment parameter settings refers to the key used to set the deployment parameters. The database defines default values for these keys, but these default values are not universal. Most deployment parameters, such as VIP and registry, need to be reset; using default values would cause conflicts. Therefore, the values sent from the UI layer are the actual values used to create the environment; the database only provides a reference value. For example, `keep_alive_vip:127.0.0.1`, where `keep_alive_vip` is the VIP key for the environment, and `127.0.0.1` is an example value that must be changed to the actual IP address.
[0216] Secondly, deployment parameter filtering and serialization are crucial. The number of deployment parameters is enormous, currently around 1000 basic deployment parameters. Different environments have different deployment parameters; each newly created environment generates different deployment parameters. For example, a virtualization environment has 400-500 basic deployment parameters, and after creating multiple virtualization environments, the number of deployment parameters in the parameter library can reach several thousand. Therefore, it is necessary to filter deployment parameters. The filtering criteria generally include environment type, the file to which the deployment parameter belongs, the category to which the deployment parameter belongs, and the display status of the deployment parameter. Since deployment parameters have a parent-child structure—that is, a single deployment parameter may have multiple levels of sub-deployment parameters—it is necessary to serialize the filtered parameters, i.e., organize them into a standard serialization structure, improve the parent-child structure, and remove redundant deployment parameters. The serialized deployment parameter structure can then be directly provided to the interface.
[0217] Secondly, an interface element library needs to be established. Data cannot be directly displayed on the interface; it needs to find corresponding elements, assign values to those elements, and then arrange and combine the elements before finally generating the interface. The element library needs to be established within the interface. Based on the data structure analysis, we will group the interface elements that may be used into individual elements. For example, based on input boxes, we can create several input box elements, which can include various custom attributes, such as regular expressions, tooltips, or search functionality. Buttons can be made into elements with different functions, such as add and delete buttons. These elements can accept data input, support default values, categories, and custom positions.
[0218] Finally, the interface is automatically generated based on the elements. Since each element has attributes, they can be categorized, with each type on a separate page or step. Then, on interfaces of the same type, they are arranged according to element order, and the corresponding content is displayed based on the element's UI characteristics. Finally, default values or actual values are injected into the elements, thus forming individual interfaces. Once the element library is determined, no further interface coding is needed; only the interface data needs to be provided to generate the interface.
[0219] After the above steps, the interface of the deployment platform is realized. Only data needs to be written at the underlying level to automatically generate the corresponding interface, reducing the cost of the interface, providing a more flexible interface display, and the data-driven approach can ensure that any interface can be generated on site, allowing for more flexible organization of interface content.
[0220] This embodiment also provides a data-driven interface generation apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0221] This embodiment provides a data-driven interface generation device, such as... Figure 9 As shown, it includes:
[0222] Module 401 is used to obtain the corresponding deployment parameters of the operating system;
[0223] The first determining module 402 is used to identify each deployment parameter and determine the basic characteristics of each deployment parameter; the basic characteristics include the parameter's basic attributes, parameter deployment characteristics, and parameter UI characteristics;
[0224] The first generation module 403 is used to generate a data structure and build a parameter database based on each deployment parameter and the basic characteristics corresponding to each deployment parameter.
[0225] The filtering module 404 is used to filter the deployment parameters in the parameter database according to the data structure to determine the target parameters used to generate the data-driven interface.
[0226] The classification module 405 is used to classify each target parameter according to the data structure and generate multiple target parameter classes;
[0227] The second generation module 406 is used to generate a data-driven interface based on various target parameter classes, so that target users can complete parameter deployment and parameter maintenance based on the data-driven interface.
[0228] In some optional implementations, the acquisition module 401 is specifically used to acquire the deployment document corresponding to the operating system; read the deployment document to acquire each of the first parameters included in the deployment document; acquire the deployment script corresponding to the operating system; compare each of the first parameters with the deployment script; determine each of the second parameters other than the first parameters from the deployment script based on the comparison results; and generate deployment parameters based on each of the first parameters and each of the second parameters.
[0229] In some optional implementations, the parameter deployment characteristics include the parameter's environment type, the parameter's file, and the parameter's display status; the filtering module 404 is specifically used to obtain the current environment of the operating system; based on the current environment, determine the parameter's environment type, the parameter's file, and the parameter's display status corresponding to the target parameter to be deployed in the current environment; based on the parameter's environment type, the parameter's file, and the parameter's display status corresponding to the target parameter, filter each deployment parameter in the parameter database to determine the target parameter used to generate the interface.
[0230] In some optional implementations, the parameter deployment characteristics include the environment type to which the parameter belongs, the file to which the parameter belongs, and the display status of the parameter; the classification module 405 is specifically used to classify each target parameter according to the environment type to which the parameter belongs, the file to which the parameter belongs, and the display status of the parameter; target parameters belonging to the same deployment logic are grouped into one category, generating multiple target parameter classes, and the same deployment logic is used to characterize that the environment type to which the target parameter belongs, the file to which the parameter belongs, and the display status of the parameter are all the same.
[0231] In some optional implementations, the second generation module 406 is specifically used to: convert the format of each target parameter in each target parameter class to generate target format parameters; obtain the parameter UI features corresponding to each target parameter; generate target scripts corresponding to each target parameter based on the target format parameters and parameter UI features; obtain target interface elements corresponding to each target script from a preset element library according to the parameter UI characteristics; the preset element library is generated based on the parameter UI characteristics corresponding to each deployment parameter; combine each target script with the target interface elements to generate each element to be displayed; and generate a data-driven interface based on each element to be displayed.
[0232] In some optional implementations, the second generation module 406 is specifically used to classify each element to be displayed according to the element UI characteristics corresponding to each element to be displayed; to group elements of the same type to be displayed into the same page or the same step within the same page; to obtain the parameter sequence number of the target parameter corresponding to each element to be displayed in the same page or the same step for each page or step; to arrange each element to be displayed according to the parameter sequence number of the target parameter corresponding to each element to be displayed; to obtain the default value or the actual value of the target parameter corresponding to each element to be displayed; and to combine the default value or the actual value with the element to be displayed to generate a data-driven interface.
[0233] In some alternative implementations, such as Figure 10 As shown, the aforementioned data-driven interface generation device further includes:
[0234] The receiving module 407 is used to receive deployment commands and / or operation and maintenance commands input by the target user based on the data-driven interface; the deployment command includes at least one parameter to be deployed and the deployment target value corresponding to each parameter to be deployed; the operation and maintenance command includes at least one parameter to be operated and maintained and the operation and maintenance target value corresponding to each parameter to be operated and maintained.
[0235] The second determining module 408 is used to determine the deployment environment, deployment file, and position in the deployment file corresponding to each parameter to be deployed and / or each parameter to be maintained, based on the basic characteristics of each parameter to be deployed and / or each parameter to be maintained.
[0236] Modify module 409, which is used to modify the current value of each parameter to be deployed to the target deployment value and / or modify the current value of each parameter to be maintained to the target maintenance value in the deployment file according to the deployment environment, deployment file and position of each parameter to be deployed and / or the deployment environment, deployment file and position of each parameter to be maintained;
[0237] The third generation module 410 is used to generate deployment scripts and / or maintenance scripts based on the modified parameters to be deployed and / or parameters to be maintained.
[0238] Module 411 is used to complete deployment commands and / or operation and maintenance commands based on deployment scripts and / or operation and maintenance scripts.
[0239] This invention also provides an electronic device having the above-described features. Figure 9 or Figure 10 The data-driven interface generation device shown.
[0240] Please see Figure 11 , Figure 11 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 11 As shown, the electronic device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise as required. The processors can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 11 Take a processor 10 as an example.
[0241] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0242] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0243] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device as displayed on a mini-program landing page. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0244] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0245] The electronic device also includes a communication interface 30 for communicating with other devices or communication networks.
[0246] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0247] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A data-driven interface generation method, characterized in that, The method includes: Obtain the corresponding deployment parameters for the operating system; Each of the deployment parameters is identified, and the basic characteristics of each deployment parameter are determined; the basic characteristics include basic parameter attributes, parameter deployment characteristics, and parameter UI characteristics. Based on the deployment parameters and the basic features corresponding to each deployment parameter, a data structure is generated and a parameter database is constructed. Based on the data structure, the deployment parameters in the parameter database are filtered to determine the target parameters used to generate the data-driven interface; Based on the data structure, the target parameters are classified to generate multiple target parameter classes; Based on the various target parameter classes, the data-driven interface is generated so that target users can complete parameter deployment and parameter maintenance based on the data-driven interface; The system receives deployment commands and / or operation and maintenance commands input by the target user based on the data-driven interface; the deployment command includes at least one parameter to be deployed and a deployment target value corresponding to each parameter to be deployed; the operation and maintenance command includes at least one parameter to be operated and maintenance and an operation and maintenance target value corresponding to each parameter to be operated and maintenance. Based on the basic characteristics corresponding to each of the parameters to be deployed and / or the parameters to be maintained, determine the deployment environment, deployment file, and location in the deployment file corresponding to each of the parameters to be deployed and / or the parameters to be maintained; Based on the deployment environment, deployment file, and position of each parameter to be deployed and / or the corresponding deployment environment and deployment file of each parameter to be maintained, the current value of each parameter to be deployed is modified to the deployment target value and / or the current value of each parameter to be maintained is modified to the maintenance target value in the deployment file. Based on the modified parameters to be deployed and / or parameters to be maintained, generate deployment scripts and / or maintenance scripts; The deployment command and / or the operation and maintenance command are completed according to the deployment script and / or the operation and maintenance script.
2. The method according to claim 1, characterized in that, The step of obtaining the corresponding deployment parameters of the operating system includes: Obtain the deployment document corresponding to the operating system; Read the deployment document and obtain the first parameters included in the deployment document; Obtain the deployment script corresponding to the operating system; Compare each of the first parameters with the deployment script; Based on the comparison results, each of the second parameters other than the first parameter is determined from the deployment script; The deployment parameters are generated based on each of the first parameters and each of the second parameters.
3. The method according to claim 1, characterized in that, The parameter deployment characteristics include the environment type to which the parameter belongs, the file to which the parameter belongs, and the parameter display status; the step of filtering each deployment parameter in the parameter database according to the data structure to determine the target parameters for generating the data-driven interface includes: Obtain the current environment of the operating system; Based on the current environment, determine the environment type, file, and display status of the target parameters that need to be deployed in the current environment; Based on the environment type, file, and display status of the parameter corresponding to the target parameter, the deployment parameters in the parameter database are filtered to determine the target parameter used to generate the interface.
4. The method according to claim 1, characterized in that, The parameter deployment characteristics include the environment type to which the parameter belongs, the file to which the parameter belongs, and the parameter display status; the classification of each target parameter according to the data structure includes: The target parameters are classified according to the environment type to which the parameter belongs, the file to which the parameter belongs, and the display status of the parameter; The target parameters belonging to the same deployment logic are grouped into one category, generating multiple target parameter classes. The same deployment logic is used to indicate that the target parameters have the same environment type, file, and display status.
5. The method according to claim 1, characterized in that, The step of generating the data-driven interface based on the various target parameter classes includes: For each of the target parameter classes, the format of each target parameter in the target parameter class is converted to generate target format parameters; Obtain the parameter UI features corresponding to each of the target parameters; Based on the target format parameters and the parameter UI features, generate the target script corresponding to each target parameter; Based on the UI characteristics of the parameters, the target interface elements corresponding to each target script are obtained from the preset element library; the preset element library is generated based on the UI characteristics of each deployment parameter. The target scripts are combined with the target interface elements to generate the elements to be displayed. The data-driven interface is generated based on each of the elements to be displayed.
6. The method according to claim 5, characterized in that, The process of generating the data-driven interface based on each of the elements to be displayed includes: Based on the UI characteristics of each element to be displayed, the elements to be displayed are classified. The same step involves grouping all elements of the same type to be displayed onto the same page or within the same page. For each page or each step, obtain the parameter sequence number of the target parameter corresponding to each element to be displayed on the same page or in the same step; Arrange the elements to be displayed according to the parameter sequence number of the target parameter corresponding to each element to be displayed; Obtain the default value or actual value of the target parameter corresponding to each of the elements to be displayed; The default value or the actual value is combined with the element to be displayed to generate the data-driven interface.
7. A data-driven interface generation device, characterized in that, The device includes: The acquisition module is used to obtain the corresponding deployment parameters of the operating system; The first determining module is used to identify each of the deployment parameters and determine the basic characteristics of each deployment parameter; the basic characteristics include basic parameter attributes, parameter deployment characteristics, and parameter UI characteristics; The first generation module is used to generate a data structure and construct a parameter database based on each of the deployment parameters and the basic features corresponding to each of the deployment parameters. The filtering module is used to filter each deployment parameter in the parameter database according to the data structure to determine the target parameters used to generate the data-driven interface. The classification module is used to classify each of the target parameters according to the data structure and generate multiple target parameter classes; The second generation module is used to generate the data-driven interface according to the various target parameter classes, so that the target user can complete parameter deployment and parameter operation and maintenance based on the data-driven interface; and to receive deployment commands and / or operation and maintenance commands input by the target user based on the data-driven interface; the deployment command includes at least one parameter to be deployed and a deployment target value corresponding to each parameter to be deployed; the operation and maintenance command includes at least one parameter to be maintained and a maintenance target value corresponding to each parameter to be maintained. Based on the basic characteristics corresponding to each of the parameters to be deployed and / or the parameters to be maintained, determine the deployment environment, deployment file, and location in the deployment file corresponding to each of the parameters to be deployed and / or the parameters to be maintained; Based on the deployment environment, deployment file, and position of each parameter to be deployed and / or the corresponding deployment environment and deployment file of each parameter to be maintained, the current value of each parameter to be deployed is modified to the deployment target value and / or the current value of each parameter to be maintained is modified to the maintenance target value in the deployment file. Based on the modified parameters to be deployed and / or parameters to be maintained, generate deployment scripts and / or maintenance scripts; The deployment command and / or the operation and maintenance command are completed according to the deployment script and / or the operation and maintenance script.
8. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data-driven interface generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the data-driven interface generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Terminal parameter configuration server and automatic generating method of software interface thereof
CN101673199A
Automatic deploying system and automatic deploying method of application system
CN102915248A