Business script rendering method and device, storage medium and electronic device
By determining the integration specifications and query parameter sets of the target product in the cloud delivery center, obtaining the associated script templates, and generating business scripts, the problem of low cloud product integration efficiency is solved, and the consistency of scripts and the improvement of integration efficiency are achieved.
Patent Information
- Application Number
- CN202311714471.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-12-14
AI Technical Summary
The integration efficiency of various cloud products in cloud delivery is not high, and there is a lack of a unified business script rendering process to unify the product integration specifications of various cloud products.
By responding to business script rendering requests, the integration specifications of each target product to be rendered are determined, the specification items and their parameter sets are queried in the database, the associated script template is obtained, and the parameter set is loaded into the script template to generate a business script to achieve the rendering of the integration specifications.
This ensures the consistency of rendered scripts and improves the integration efficiency of various Taichung products in cloud delivery.
Smart Images

Figure CN117873463B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of development and operation support technology, and in particular to a business script rendering method and device, a storage medium, and an electronic device. Background Art
[0002] The Cloud Delivery Platform is a platform that provides integrated integrated delivery, standardized integration work, and automated delivery and maintenance capabilities. It offers integrated delivery support capabilities, including project node management, cloud product integration and delivery specification management, script template management, standardized business script rendering, and offline toolkit generation. It is used in the construction of various cloud product infrastructures, improving integration and delivery efficiency and reducing rectification cycles.
[0003] The inventors discovered that various cloud products in cloud delivery platforms have different product integration specifications and high hardware integration complexity. Currently, there is no unified business script rendering process to uniformly handle the product integration specifications of each cloud product, resulting in low integration efficiency across cloud delivery platforms. Summary of the Invention
[0004] In view of the above problems, the present invention provides a business script rendering method and device, storage medium and electronic device that overcome the above problems or at least partially solve the above problems. The technical solution is as follows:
[0005] A business script rendering method, comprising:
[0006] In response to the business script rendering request, determining the integration specification of each target product to be rendered;
[0007] In the established database, query each specification item of each integration specification, and determine the parameter set corresponding to each specification item;
[0008] Obtaining a script template associated with each of the specification items; each of the script templates conforms to the template syntax specification of the template engine Jinjia2;
[0009] The parameter set corresponding to each of the specification items is loaded into the script template associated with the specification item, and the business script corresponding to each of the specification items is generated to achieve business script rendering of the integration specification.
[0010] In the above-mentioned business script rendering method, optionally, the database pre-stores the integration specification of each target product and the script template associated with each specification item of the integration specification.
[0011] In the above-mentioned business script rendering method, optionally, the process of storing each script template in the database includes:
[0012] Enter the template basic information of each script template, the template basic information including: template name, template version, template type and template description;
[0013] According to the template type of each script template, the script template content is entered for the script template to store the script template in the database.
[0014] In the above-mentioned business script rendering method, optionally, the process of storing the integration specification of each target product in the database includes:
[0015] Enter the basic specification information of the integration specification of each target product, the basic specification information including: specification name, specification description, specification type, specification source and specification version number;
[0016] Entering basic information of a specification item in each of the integration specifications, the basic information including: a specification item name and a specification item description;
[0017] Each of the specification items is configured, a corresponding script template is associated with each of the specification items, and corresponding script parameters are configured to store each of the integration specifications in the database.
[0018] In the above-mentioned business script rendering method, optionally, determining the parameter set corresponding to each of the specification items includes:
[0019] Calling the configured rendering module to query all static parameters and all dynamic parameters corresponding to each of the specification items;
[0020] Determining an associated host model in each of the dynamic parameters, and extracting host data corresponding to each of the dynamic parameters from the database according to a mapping relationship corresponding to the associated host model;
[0021] The static parameters, the dynamic parameters, and the host data corresponding to each dynamic parameter form the parameter set.
[0022] A business script rendering device, comprising:
[0023] a determining unit, configured to determine, in response to a business script rendering request, an integration specification for each target product to be rendered;
[0024] A query unit, configured to query each specification item of each integration specification in an established database, and determine a parameter set corresponding to each specification item;
[0025] An acquisition unit, configured to acquire a script template associated with each of the specification items; each of the script templates conforms to the template syntax specification of the template engine Jinjia2;
[0026] The rendering unit is used to load the parameter set corresponding to each of the specification items into the script template associated with the specification item, generate the business script corresponding to each of the specification items, and realize the business script rendering of the integration specification.
[0027] The above-mentioned business script rendering device may optionally further include:
[0028] The storing unit is used to store the integration specification of each target product and the script template associated with each specification item of the integration specification into the database.
[0029] In the above-mentioned business script rendering device, optionally, the query unit includes:
[0030] A calling subunit, configured to call a set rendering module to query all static parameters and all dynamic parameters corresponding to each of the specification items;
[0031] a determination subunit, configured to determine an associated host model in each of the dynamic parameters, and extract host data corresponding to each of the dynamic parameters from the database according to a mapping relationship corresponding to the associated host model;
[0032] The composition subunit is used to combine the static parameters, the dynamic parameters and the host data corresponding to each dynamic parameter into the parameter set.
[0033] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned business script rendering method.
[0034] An electronic device includes at least one processor, and at least one memory and bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the above-mentioned business script rendering method.
[0035] Compared with the prior art, the present invention has the following advantages: The present invention provides a business script rendering method and device, a storage medium and an electronic device, including: in response to a business script rendering request, determining the integration specification of each target product to be rendered; in an established database, querying each specification item of each integration specification, and determining the parameter set corresponding to each specification item; obtaining the script template associated with each specification item; each script template conforms to the template engine Jinjia2 template syntax specification; loading the parameter set corresponding to each specification item into the script template associated with the specification item, generating a business script corresponding to each specification item, so as to realize the business script rendering of the integration specification. The business script rendering method disclosed in the present invention adopts the corresponding integration specification and script template to perform the script rendering process in the process of script rendering the product integration specification, thereby ensuring the consistency of the rendered script and improving the integration efficiency of various products in the cloud delivery center.
[0036] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0038] Figure 1 A flowchart of a method for rendering a business script provided by an embodiment of the present invention;
[0039] Figure 2 An architectural diagram of a business script rendering method provided by an embodiment of the present invention;
[0040] Figure 3 Another method flow chart of a business script rendering method provided by an embodiment of the present invention;
[0041] Figure 4 A schematic structural diagram of a business script rendering device provided by an embodiment of the present invention;
[0042] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0044] refer to Figure 1 FIG2 shows a flow chart of a method for rendering a business script provided by an embodiment of the present invention. Figure 1 The method execution process shown is a feasible implementation scheme of the business script rendering method provided by an embodiment of the present invention. The business script rendering method can be applied to the processor in the cloud delivery center. The method may specifically include:
[0045] S101: In response to a business script rendering request, determining an integration specification for each target product to be rendered;
[0046] In the method provided in an embodiment of the present invention, when business script rendering is required for the integration specifications of various products in a cloud delivery platform, a business script rendering request is sent to a processor to determine the integration specifications of each target product to be rendered in the cloud delivery platform. The target product is a product integrated in the cloud delivery platform.
[0047] S102: In the established database, query each specification item of each integration specification, and determine a parameter set corresponding to each specification item;
[0048] In the method provided by the embodiment of the present invention, a database is pre-established, in which a host data list, an integration specification of each target product, and a script template associated with each specification item of the integration specification can be stored.
[0049] The integration specification consists of multiple specification items, and each specification item has a corresponding parameter set.
[0050] S103: Acquire a script template associated with each of the specification items; each of the script templates complies with the template syntax specification of the template engine Jinjia2;
[0051] In the method provided by the embodiment of the present invention, each specification item is associated with a script template, which is used to script the specification item, and each of the script templates complies with the template syntax specification of the template engine Jinjia2.
[0052] Jinja2 is a popular Python template engine that is often used to generate dynamic HTML pages, emails, and other text files. It provides a simple and flexible syntax for combining data and templates to generate output in a variety of formats.
[0053] S104: Loading the parameter set corresponding to each of the specification items into the script template associated with the specification item, generating a business script corresponding to each of the specification items, so as to achieve business script rendering of the integration specification.
[0054] In the method provided by the embodiment of the present invention, a parameter set corresponding to each specification item is loaded into a script template associated with the specification item, a corresponding business script is generated, and the rendering of the integration specification is achieved by running the business script.
[0055] The business script rendering method disclosed in the present invention adopts the corresponding integration specification and script template to perform the script rendering process during the script rendering of the product integration specification, thereby ensuring the consistency of the rendered script and improving the integration efficiency of various products in the cloud delivery center.
[0056] In the method provided by the embodiment of the present invention, the process of storing each script template in the database includes:
[0057] Enter the template basic information of each script template, the template basic information including: template name, template version, template type and template description;
[0058] According to the template type of each script template, the script template content is entered for the script template to store the script template in the database.
[0059] In the method provided by an embodiment of the present invention, in the process of storing the script template into the database, the basic template information of the script template, including the template name, etc., is first entered, and then further, the template content is entered for the script template according to the template type of the script template, and then the script template is stored in the database.
[0060] In the method provided by an embodiment of the present invention, the process of storing the integration specification of each target product in the database includes:
[0061] Enter the basic specification information of the integration specification of each target product, the basic specification information including: specification name, specification description, specification type, specification source and specification version number;
[0062] Entering basic information of a specification item in each of the integration specifications, the basic information including: a specification item name and a specification item description;
[0063] Each of the specification items is configured, a corresponding script template is associated with each of the specification items, and corresponding script parameters are configured to store each of the integration specifications in the database.
[0064] In the method provided by an embodiment of the present invention, when storing the integration specification in the database, the basic specification information of the integration specification is entered, and the basic information of the specification items is entered in the integration specification, and the parameters of the specification items are configured to realize the storage of the integration specification in the database.
[0065] In the method provided by an embodiment of the present invention, determining a parameter set corresponding to each of the specification items includes:
[0066] Calling the configured rendering module to query all static parameters and all dynamic parameters corresponding to each of the specification items;
[0067] Determining an associated host model in each of the dynamic parameters, and extracting host data corresponding to each of the dynamic parameters from the database according to a mapping relationship corresponding to the associated host model;
[0068] The static parameters, the dynamic parameters, and the host data corresponding to each dynamic parameter form the parameter set.
[0069] The following describes the execution process of the above business script rendering method in detail with reference to a specific example:
[0070] The business script rendering method provided by the embodiment of the present invention supports and adapts the integration specifications of different businesses of multiple products in the cloud hardware integration process, giving the cloud delivery middle platform the ability to standardize the integration configuration in the hardware integration stage, accelerating the integration delivery work and reducing the rectification rate.
[0071] In the actual implementation process, you can refer to Figure 2 The architecture diagram shown is Figure 2 An implementation platform for the business rendering method provided in an embodiment of the present invention specifically includes a database, a script template management module, a rendering module, and an integration specification management module. During the specific execution process: a host data list is entered into the database; a script template is entered and stored in the database through the script template management module; an integration specification is entered and stored in the database through the integration specification management module; the rendering module extracts and processes the host data according to the integration specification and saves it to a parameter set; the rendering module imports the script template, loads the temporary parameter set data, and generates the business script.
[0072] refer to Figure 3 A specific implementation process of the business script rendering method provided by an embodiment of the present invention specifically includes:
[0073] When integrating products into the cloud delivery platform, you can first enter the host data list into the database;
[0074] In the method provided by the embodiment of the present invention, the host data is the data source of the dynamic parameters in the script template.
[0075] Among them, combined Figure 2 The host data list in the host data list contains the basic information of the host server. The host data list includes but is not limited to: device code, logical code, device name, product, device type, device role, device manufacturer, device model, CPU type, CPU configuration, memory configuration, system disk, data disk, cache disk, SSH user name, SSH user password, BMC account, BMC account password, out-of-band IP, management network IP, storage network IP, computing network IP, disk partition, etc.
[0076] in:
[0077] BMC: (Baseboard Management Controller): An embedded system used to monitor server hardware status, manage system power, remotely control the server, and diagnose faults.
[0078] SSH (Secure Shell): A secure network protocol used to securely transmit data over an insecure network. It uses encryption technology to establish an encrypted channel between the client and server, providing confidentiality and integrity protection to prevent data from being eavesdropped, tampered with, or forged by unauthorized personnel.
[0079] In the method provided by the embodiment of the present invention, further, the script template is entered through the script template management module and stored in the database.
[0080] Specifically, through the script template management module, the script template that conforms to the Jinjia2 template syntax specification is entered, and the script rendering is dynamic through the Jinjia2 syntax.
[0081] The specific steps to complete the script entry are as follows:
[0082] Enter the basic template information of the script template. The basic template information includes but is not limited to: template name, version, template type, and template description.
[0083] Enter the script template content based on the template type. Template types include but are not limited to: KickStart, Shell, PXE, Ansible, and other templates.
[0084] Ansible templates must contain script structures and formats that conform to the Ansible Playbook specification.
[0085] Templates of other types (KickStart, Shell, and PXE) must comply with the corresponding script language specifications and Jinjia2 template syntax specifications. For example, Shell script templates must comply with the Shell script language and Jinjia2 template syntax specifications.
[0086] Furthermore, the integration specifications are entered through the integration specification management module and stored in the database.
[0087] In the method provided by the embodiments of the present invention, an integration specification is the specific integration standard that the integrator must complete during system integration. It contains multiple specification items, each of which represents an atomic specification requirement and a task item in the integration work. For example, a server integration specification for a certain version may include specification items such as server initialization configuration, server system installation, server network configuration, virtual machine creation, basic service deployment, and server acceptance inspection.
[0088] In the method provided in the embodiment of the present invention, the following steps are required to complete the entry of integrated specification information:
[0089] First, enter the basic information of the integration specification, which includes the following:
[0090] Specification name, specification description, specification type, specification source, and specification version number
[0091] Furthermore, in the integration specification, enter the basic information of the integration specification item. The basic information of the specification item includes the following: specification item name, specification item description
[0092] Furthermore, the specification items are configured. Each specification item is associated with a specific script template in the script management module and the script parameters are configured. The specification item completes the corresponding specification item requirements through each specific script.
[0093] In the method provided in the embodiment of the present invention, the configuration specification item needs to go through the following steps:
[0094] Configure one or more static parameters;
[0095] Static parameters include parameter names and values. Static parameters are simple key-value sets and are unrelated to business host data.
[0096] Configure one or more dynamic parameters;
[0097] Dynamic parameters include basic information and variable information. The basic information includes the following:
[0098] Parameter identification, association model, parameter description;
[0099] Variable information contains the following information:
[0100] Variable name, associated model field;
[0101] in:
[0102] Dynamic parameters are complex key-value sets, with values supporting a dictionary data structure. Each dynamic parameter is bound to a host model through an associated model. The variable name and associated model fields in the variable information represent the mapping relationship between the parameter and the database table model field. This mapping relationship allows subsequent rendering modules to extract the associated model data (such as host inventory data).
[0103] In the method provided by the embodiment of the present invention, the rendering module extracts and processes the host data according to the integration specification and saves it into a temporary parameter set;
[0104] The rendering module completes the extraction of host data through the following steps:
[0105] The rendering module queries all specification items from the database according to the integration specification and processes the specification items in a loop
[0106] The rendering module queries all static parameters according to the specification item configuration and assembles them into a KV dictionary structure.
[0107] The rendering module queries all dynamic parameters according to the specification item configuration.
[0108] The rendering module extracts relevant host data based on the associated host model and associated host model field mapping relationship in the dynamic parameters, and assembles them into a double-layer nested KV dictionary structure parameter based on the parameter identifier, variable name and host model field configuration in the dynamic parameters.
[0109] The rendering module merges static parameters and dynamic parameters and saves them into a temporary parameter set.
[0110] In the method provided by the embodiment of the present invention, the rendering module introduces a script template, loads temporary parameter set data, and generates a business script;
[0111] The rendering module completes the generation of the business script through the following steps.
[0112] Furthermore, the rendering module queries all specification items from the database according to the integration specification and processes the specification items in a loop; the rendering module queries all associated script templates according to the specification item configuration and processes and generates them in a loop; the rendering module integrates the temporary parameter set and the business script template to render the business script.
[0113] The rendering module generates rendered business scripts based on the script template type. KickStart, Shell, and PXE templates directly generate files with the corresponding suffixes (.ks, .sh, and .pxe). Ansible templates generate script compression packages based on the entered standard Ansible-Playbook format.
[0114] In the method provided by the embodiment of the present invention, a Jinjia2 script template can be entered in the script template management module. Through the script template management module, a script template containing Jinjia2 template syntax can be entered, and the Jinjia2 syntax can support dynamic script rendering.
[0115] In the method provided by the embodiments of the present invention, an integrated specification module is used to maintain the mapping relationship between script parameters and host data, as well as script association relationships. Parameters are stored in the form of key-value pairs. Static parameters are fixed key-value pairs, while dynamic parameters are associated with fields in the database host model table and are obtained in real time based on imported host data.
[0116] In the method provided by the embodiment of the present invention, the step rendering module queries the database according to the integrated specification version, extracts the host data for parsing and processing, and saves the processing results into a temporary parameter set.
[0117] The embodiment of the present invention also provides a business script rendering device corresponding to a business script rendering method, which is used to implement the application of the business script rendering method in practice. The structural diagram of the business script rendering device can be referred to Figure 4 , the business script rendering device includes:
[0118] A determining unit 201 is configured to determine, in response to a business script rendering request, an integration specification for each target product to be rendered;
[0119] A query unit 202 is configured to query each specification item of each integration specification in an established database and determine a parameter set corresponding to each specification item;
[0120] The acquiring unit 203 is configured to acquire a script template associated with each of the specification items; each of the script templates complies with the template syntax specification of the template engine Jinjia2;
[0121] The rendering unit 204 is configured to load the parameter set corresponding to each of the specification items into the script template associated with the specification item, and generate a business script corresponding to each of the specification items, so as to render the business script of the integration specification.
[0122] The business script rendering device disclosed in the present invention uses corresponding integration specifications and script templates to perform script rendering in the process of script rendering for product integration specifications, thereby ensuring the consistency of the rendered scripts and improving the integration efficiency of various products in the cloud delivery platform.
[0123] The service script rendering device provided by the embodiment of the present invention further includes:
[0124] The storing unit is used to store the integration specification of each target product and the script template associated with each specification item of the integration specification into the database.
[0125] In the business script rendering device provided by an embodiment of the present invention, the query unit includes:
[0126] A calling subunit, configured to call a set rendering module to query all static parameters and all dynamic parameters corresponding to each of the specification items;
[0127] a determination subunit, configured to determine an associated host model in each of the dynamic parameters, and extract host data corresponding to each of the dynamic parameters from the database according to a mapping relationship corresponding to the associated host model;
[0128] The composition subunit is used to combine the static parameters, the dynamic parameters and the host data corresponding to each dynamic parameter into the parameter set.
[0129] The business script rendering device provided by the embodiment of the present invention includes a processor and a memory. Each of the above units can be stored in the memory as a program unit, and the processor executes the above program units stored in the memory to implement corresponding functions.
[0130] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the business script rendering process can be dynamically executed by adjusting the kernel parameters.
[0131] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the business script rendering method is implemented.
[0132] An embodiment of the present invention provides a processor, which is used to run a program, wherein the business script rendering method is executed when the program is running.
[0133] like Figure 5As shown, an embodiment of the present invention provides an electronic device, comprising at least one processor 301, at least one memory 302 connected to the processor 301, and a bus 303. The processor 301 and the memory 302 communicate with each other via the bus 303. The processor 301 is configured to invoke program instructions stored in the memory 802 to execute the aforementioned business script rendering method. The device herein may be a server, a PC, a PAD, a mobile phone, or the like.
[0134] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program for initializing the following method steps, the method comprising:
[0135] In response to the business script rendering request, determining the integration specification of each target product to be rendered;
[0136] In the established database, query each specification item of each integration specification, and determine the parameter set corresponding to each specification item;
[0137] Obtaining a script template associated with each of the specification items; each of the script templates conforms to the template syntax specification of the template engine Jinjia2;
[0138] The parameter set corresponding to each of the specification items is loaded into the script template associated with the specification item, and the business script corresponding to each of the specification items is generated to achieve business script rendering of the integration specification.
[0139] In the above method, optionally, the database pre-stores the integration specification of each target product and the script template associated with each specification item of the integration specification.
[0140] In the above method, optionally, the process of storing each script template in the database includes:
[0141] Enter the template basic information of each script template, the template basic information including: template name, template version, template type and template description;
[0142] According to the template type of each script template, the script template content is entered for the script template to store the script template in the database.
[0143] In the above method, optionally, the process of storing the integration specification of each target product in the database includes:
[0144] Enter the basic specification information of the integration specification of each target product, the basic specification information including: specification name, specification description, specification type, specification source and specification version number;
[0145] Entering basic information of a specification item in each of the integration specifications, the basic information including: a specification item name and a specification item description;
[0146] Each of the specification items is configured, a corresponding script template is associated with each of the specification items, and corresponding script parameters are configured to store each of the integration specifications in the database.
[0147] In the above method, optionally, determining the parameter set corresponding to each of the specification items includes:
[0148] Calling the configured rendering module to query all static parameters and all dynamic parameters corresponding to each of the specification items;
[0149] Determining an associated host model in each of the dynamic parameters, and extracting host data corresponding to each of the dynamic parameters from the database according to a mapping relationship corresponding to the associated host model;
[0150] The static parameters, the dynamic parameters, and the host data corresponding to each dynamic parameter form the parameter set.
[0151] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0152] In a typical configuration, the device includes one or more processors (CPUs), memory, and a bus. The device may also include input / output interfaces, network interfaces, and the like.
[0153] Memory may include non-permanent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip. Memory is an example of a computer-readable medium.
[0154] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0155] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0156] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A business script rendering method, characterized in that: include: In response to the business script rendering request, determining the integration specification of each target product to be rendered; In the established database, query each specification item of each integration specification, and determine the parameter set corresponding to each specification item; Obtaining the script template associated with each of the specification items; Each of the script templates complies with the template engine Jinjia2 template syntax specification; Loading the parameter set corresponding to each of the specification items into the script template associated with the specification item, generating a business script corresponding to each of the specification items, so as to realize business script rendering of the integration specification; The database pre-stores the integration specification of each target product and the script template associated with each specification item of the integration specification.
2. The business script rendering method according to claim 1, characterized in that: The process of storing each script template in the database includes: Enter the template basic information of each script template, the template basic information including: template name, template version, template type and template description; According to the template type of each script template, the script template content is entered for the script template to store the script template in the database.
3. The business script rendering method according to claim 2, characterized in that: The process of storing the integration specification of each target product in the database includes: Enter the basic specification information of the integration specification of each target product, the basic specification information including: specification name, specification description, specification type, specification source and specification version number; Entering basic information of a specification item in each of the integration specifications, the basic information including: a specification item name and a specification item description; Each of the specification items is configured, a corresponding script template is associated with each of the specification items, and corresponding script parameters are configured to store each of the integration specifications in the database.
4. The business script rendering method according to claim 1, characterized in that: Determining a parameter set corresponding to each of the specification items includes: Calling the configured rendering module to query all static parameters and all dynamic parameters corresponding to each of the specification items; Determining an associated host model in each of the dynamic parameters, and extracting host data corresponding to each of the dynamic parameters from the database according to a mapping relationship corresponding to the associated host model; The static parameters, the dynamic parameters, and the host data corresponding to each dynamic parameter form the parameter set.
5. A business script rendering device, characterized in that: include: a determining unit, configured to determine, in response to a business script rendering request, an integration specification for each target product to be rendered; A query unit, configured to query each specification item of each integration specification in an established database, and determine a parameter set corresponding to each specification item; An acquiring unit, configured to acquire a script template associated with each of the specification items; Each of the script templates complies with the template engine Jinjia2 template syntax specification; A rendering unit, configured to load a parameter set corresponding to each of the specification items into a script template associated with the specification item, and generate a business script corresponding to each of the specification items, so as to render the business script of the integration specification; The storing unit is used to store the integration specification of each target product and the script template associated with each specification item of the integration specification into the database.
6. The business script rendering device according to claim 5, characterized in that: The query unit includes: A calling subunit, configured to call a set rendering module to query all static parameters and all dynamic parameters corresponding to each of the specification items; a determination subunit, configured to determine an associated host model in each of the dynamic parameters, and extract host data corresponding to each of the dynamic parameters from the database according to a mapping relationship corresponding to the associated host model; The composition subunit is used to combine the static parameters, the dynamic parameters and the host data corresponding to each dynamic parameter into the parameter set.
7. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the business script rendering method according to any one of claims 1 to 4.
8. An electronic device, characterized in that: It includes at least one processor, and at least one memory and bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the business script rendering method as described in any one of claims 1 to 4.