CN115756443A - Script generation method and device, electronic equipment and readable storage medium - Google Patents

Script generation method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115756443A
CN115756443A CN202211542488.1A CN202211542488A CN115756443A CN 115756443 A CN115756443 A CN 115756443A CN 202211542488 A CN202211542488 A CN 202211542488A CN 115756443 A CN115756443 A CN 115756443A
Authority
CN
China
Prior art keywords
script
data
template
target
generated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211542488.1A
Other languages
Chinese (zh)
Other versions
CN115756443B (en
Inventor
杨华
金可栋
王秋凤
张经天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202211542488.1A priority Critical patent/CN115756443B/en
Publication of CN115756443A publication Critical patent/CN115756443A/en
Application granted granted Critical
Publication of CN115756443B publication Critical patent/CN115756443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a script generation method, a script generation device, electronic equipment and a readable storage medium, wherein a script generation request is responded, at least two first data layers involved by a script to be generated are determined, a target data table transmitted by executing the script to be generated and a first algorithm type used for transmitting the target data table are realized; determining a first data stream number when data is transmitted between at least two first data layers; determining a template subdivision identification of a target script template according to which a script to be generated is generated based on the first algorithm category and the first data stream number; responding to data configuration operation, and completing configuration of a first data stream number, a template subdivision identification, a first algorithm category and a target data table in a configuration interface; and responding to the script generation instruction to generate a script to be generated. Therefore, when a script development requirement exists, the script to be generated required by the development requirement can be generated through the configured target script template under the condition that a developer does not need to write the script.

Description

Script generation method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of script generation technologies, and in particular, to a script generation method and apparatus, an electronic device, and a readable storage medium.
Background
In the field of computers, a script is an executable file written according to a certain format using a specific descriptive language. When a computer executes a script, it performs a series of operations that may involve other applications such as word processing, spreadsheets, and data management programs.
At present, when a script file development requirement exists, developers need to compile the script file by using an adept script language according to script development experience after knowing basic configuration information of the script file; due to the fact that the levels of developers are uneven, the compiling quality of script files cannot be guaranteed, and due to the fact that the developers are different in development languages which are good at developing programs, later-stage script maintenance is difficult and high in maintenance difficulty.
Disclosure of Invention
In view of the above, an object of the present application is to provide a script generation method, an apparatus, an electronic device, and a readable storage medium, which can generate a script to be generated according to a pre-configured target script template without requiring a developer to write a script when the script development requirement is met, and which are helpful to reduce development difficulty and development cost of the developer.
The embodiment of the application provides a script generation method, which comprises the following steps:
responding to a script generation request, determining at least two first data layers which are related to a script to be generated and have data transmission requirements, a target data table which is transmitted by executing the script to be generated, and a first algorithm type used for transmitting the target data table;
determining a first data stream number when data is transmitted between the at least two first data layers;
determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm type and the first data stream number;
responding to data configuration operation, and completing configuration of the first data stream number for generating the script to be generated, the template subdivision identification of the target script template, the first algorithm category and the target data table in a configuration interface;
and responding to a script generation instruction, and generating the script to be generated.
In a possible embodiment, the determining the class of the data flow when data is transmitted between the at least two first data layers includes:
determining a source data layer and a target data layer from the at least two first data layers; wherein, the source data layer is used for sending the target data table; the target data layer is used for receiving the target data table;
and determining the first data stream numbers of the at least two first data layers by querying configured candidate data streams by using a data stream implementation mode between the source data layer and the target data layer.
In a possible implementation manner, the determining, based on the first algorithm category and the first data stream number, a template subdivision identifier of a target script template according to which the script to be generated is generated includes:
determining a target script template according to which the script to be generated is generated by searching the configured candidate script template based on the first algorithm type and the first data stream number;
and determining the template subdivision identification of the target script template by using the script number of the target script template.
In one possible embodiment, the data layer is configured by:
responding to a data layer newly-adding instruction, and displaying a layer attribute configuration window in a graphical user interface;
and responding to the first attribute configuration operation, configuring the attribute information of each layer in the layer attribute configuration window to obtain a configured data layer.
In one possible embodiment, the candidate data stream is configured by:
responding to a data stream adding instruction, and displaying a stream attribute configuration window in a graphical user interface;
and responding to the second attribute configuration operation, and configuring various items of stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
In one possible embodiment, the candidate script templates are configured by:
responding to a template configuration operation, determining a second data stream number between at least two second data layers related to a candidate script template to be configured, and a second algorithm type adopted by the candidate script template to be configured to realize data transmission between the at least two second data layers;
responding to the number configuration operation, and setting script numbers for the candidate script templates to be configured;
responding to the identification configuration operation, and associating the script number of the candidate script template to be configured with a target subdivision identification of a target database for storing the candidate script template to be configured;
acquiring preset template contents of the candidate script template to be configured;
and responding to a template generation operation, and generating the candidate script template based on the second data stream number, the second algorithm type, the candidate script template setting script number to be configured and the target subdivision identification.
In a possible implementation manner, the script generation method further includes:
and responding to a script downloading instruction, and downloading the target script which is downloaded and indicated by the script downloading instruction to the client.
An embodiment of the present application further provides a script generating apparatus, where the script generating apparatus includes:
the information determining module is used for responding to a script generating request, determining at least two first data layers which are related to a script to be generated and have data transmission requirements, realizing a target data table for transmission by executing the script to be generated, and transmitting a first algorithm type used by the target data table;
a number determining module, configured to determine a first data stream number when data is transmitted between the at least two first data layers;
the identification determining module is used for determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm category and the first data stream number;
the information configuration module is used for responding to data configuration operation and completing configuration of the first data stream number, the template subdivision identification of the target script template, the first algorithm category and the target data table for generating the script to be generated in a configuration interface;
and the script generation module is used for responding to a script generation instruction and generating the script to be generated.
In a possible embodiment, when the number determining module is configured to determine a first data stream number when transmitting data between the at least two first data layers, the number determining module is configured to:
determining a source data layer and a target data layer from the at least two first data layers; wherein, the source data layer is used for sending the target data table; the target data layer is used for receiving the target data table;
and determining the first data stream numbers of the at least two first data layers by querying configured candidate data streams by using a data stream implementation mode between the source data layer and the target data layer.
In a possible implementation manner, when the identifier determining module is configured to determine, based on the first algorithm category and the first data stream number, a template subdivision identifier of a target script template according to which the script to be generated is generated, the identifier determining module is configured to:
determining a target script template according to which the script to be generated is generated by searching the configured candidate script template based on the first algorithm type and the first data stream number;
and determining the template subdivision identification of the target script template by using the script number of the target script template.
In a possible implementation manner, the script generating apparatus further includes a data layer configuration module, and the data layer configuration module is configured to:
responding to a data layer newly-adding instruction, and displaying a layer attribute configuration window in a graphical user interface;
and responding to the first attribute configuration operation, configuring the attribute information of each layer in the layer attribute configuration window to obtain a configured data layer.
In a possible implementation manner, the script generating apparatus further includes a data stream configuration module, and the data stream configuration module is configured to:
responding to a data stream adding instruction, and displaying a stream attribute configuration window in a graphical user interface;
and responding to the second attribute configuration operation, configuring various stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
In a possible implementation manner, the script generating apparatus further includes a template configuration module, and the template configuration module is configured to:
responding to a template configuration operation, determining a second data stream number between at least two second data layers related to a candidate script template to be configured, and a second algorithm type adopted by the candidate script template to be configured to realize data transmission between the at least two second data layers;
responding to the number configuration operation, and setting script numbers for the candidate script templates to be configured;
responding to the identification configuration operation, and associating the script number of the candidate script template to be configured with a target subdivision identification of a target database for storing the candidate script template to be configured;
acquiring preset template contents of the candidate script template to be configured;
and responding to a template generation operation, and generating the candidate script template based on the second data stream number, the second algorithm type, the candidate script template setting script number to be configured and the target subdivision identification.
In a possible implementation manner, the script generating apparatus further includes a script downloading module, and the script downloading module is configured to:
and responding to a script downloading instruction, and downloading the target script which is downloaded and indicated by the script downloading instruction to the client.
An embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the script generation method as described above.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the script generation method as described above.
In response to a script generation request, determining at least two first data layers with data transmission requirements related to a script to be generated, a target data table for realizing transmission by executing the script to be generated, and a first algorithm type used for transmitting the target data table; determining a first data stream number when data is transmitted between the at least two first data layers; determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm category and the first data stream number; responding to data configuration operation, and completing configuration of the first data stream number for generating the script to be generated, the template subdivision identification of the target script template, the first algorithm category and the target data table in a configuration interface; and responding to a script generation instruction, and generating the script to be generated. Therefore, when the script development requirement exists, the script to be generated required by the development requirement can be generated through the preset target script template under the condition that a developer does not need to write the script, and the development difficulty and the development cost of the developer are reduced.
In order to make the aforementioned objects, features and advantages of the present application comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart of a script generation method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a configuration interface provided in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a configuration process of a candidate script template according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a script generating apparatus according to an embodiment of the present application;
fig. 5 is a second schematic structural diagram of a script generating apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
Research shows that at present, when a script file development requirement exists, developers need to compile the script file by using an adept script language according to script development experience after knowing basic configuration information of the script file; due to the fact that the levels of developers are uneven, the compiling quality of script files cannot be guaranteed, and due to the fact that the developers are different in development languages which are good at developing programs, later-stage script maintenance is difficult and high in maintenance difficulty.
Based on this, the embodiment of the application provides a script generation method, which can utilize a configured target script template to realize creation of a script to be generated, so that the script writing process of developers is reduced, the development efficiency of script files is improved, and the development difficulty of the script files is reduced.
Referring to fig. 1, fig. 1 is a flowchart of a script generation method according to an embodiment of the present disclosure. As shown in fig. 1, a script generation method provided in an embodiment of the present application includes:
s101, responding to a script generation request, determining at least two first data layers with data transmission requirements related to a script to be generated, realizing a target data table for transmission by executing the script to be generated, and transmitting a first algorithm type used by the target data table.
S102, determining a first data stream number when data is transmitted between the at least two first data layers.
S103, determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm category and the first data stream number.
S104, responding to data configuration operation, and completing configuration of the first data stream number, the template subdivision identification of the target script template, the first algorithm category and the target data table for generating the script to be generated in a configuration interface.
And S105, responding to the script generation instruction, and generating the script to be generated.
According to the script generation method provided by the embodiment of the application, when a script development requirement exists, at least two first data layers with transmission requirements related to a script to be generated, a target data table for executing transmission completed by the script to be generated and a first algorithm type used for realizing a transmission function of the script to be generated are determined in response to a script generation request; determining a first data stream number adopted when data are transmitted between two first data layers; meanwhile, determining a template subdivision identification of a target script template according to which a script to be generated needs to be generated according to the first algorithm type and the first data stream number; the configuration of the first data stream number, the template subdivision identification of the target script template, the first algorithm category and the target data table is completed through data configuration operation, and the script to be generated required by development requirements is automatically generated; therefore, the developer does not need to write the script every time in the development process, so that the development efficiency of the script is improved, and the operation difficulty of the developer is reduced.
A script, which can be understood as an executable program written according to a certain format; corresponding script functions are realized by executing the executable program, for example, transmission of data on different data layers can be realized by executing the script; or, statistics of specific data may be implemented by executing a script, and the like, which is determined according to development requirements and is not limited herein.
Here, no matter what the function realized by the script is, data transmission needs to be performed between different data layers to complete the corresponding function, and therefore, at least two first data layers having data transmission requirements need to be determined in the process of performing development of the script.
In the process of realizing data transmission, the target data table to be transmitted needs to be transmitted between at least two first data layers by means of different algorithms.
In step S101, when a developer has a script development requirement, a script generation request may be issued; the method comprises the steps of responding to a script generation request issued by a developer, determining at least two first data layers which are related to a script to be generated and are developed by the developer and have data transmission requirements, a target data table for realizing transmission by executing the script to be generated and a first algorithm type for realizing transmission of the target data table.
Here, for at least two first data layers, there is a certain data transmission direction when data transmission is performed; that is, when data is transmitted between at least two first data layers, the data is coded according to the first data stream; therefore, when generating the script to be generated, the first data stream number between at least two first data layers needs to be further determined.
The data layer comprises a common processing layer, an application market layer, an integral model layer, a technical buffer layer, a near-source model layer, an ODS common processing layer and the like.
Here, the first algorithm is an ETL (Extract-Transform-Load) algorithm for implementing data transmission of the target data table between at least two first data layers, and the first algorithm type is a unique type code corresponding to the first algorithm; the first algorithm may include ETL algorithms such as a full-delete full-insert algorithm, an incremental-accumulate algorithm, a full-history zipper algorithm, an incremental zipper algorithm, an add-delete zipper algorithm, a full-increment-delete zipper algorithm, a self-zipper algorithm, an upstrt algorithm, and an apend algorithm.
In step S102, a first data stream number is determined which is capable of indicating a transmission direction that the target data table has when transmitted between the at least two first data layers.
In one embodiment, step S102 includes: determining a source data layer and a target data layer from the at least two first data layers; and determining the first data stream numbers of the at least two first data layers by querying configured candidate data streams by using a data stream implementation mode between the source data layer and the target data layer.
Determining a source data layer for sending a target data table and a target data layer for receiving the target data table from at least two first data layers; that is, the target data table needs to be transferred from the source data layer to the target data layer.
Based on a data stream implementation mode for target data table transmission between a source data layer and a target data layer, a first data stream number when data is transmitted between at least two first data layers is determined by inquiring configured candidate data streams.
The corresponding relation among the data layers, the data stream numbers and the data stream implementation modes is preset, and the data stream numbers corresponding to the data layers can be determined on the premise that the data layers with data transmission requirements and the data stream implementation modes for transmitting data among the data layers are clear; correspondingly, on the premise of defining data layers with data transmission requirements and corresponding data stream numbers between the data layers, a data stream implementation mode for transmitting data between the data layers can also be determined;
for example, (1) first data stream number: f21101, (2) at least two first data layers are respectively a technical buffer layer (source data layer) and a near source model layer (target data layer), and (3) a data flow implementation mode between the at least two first data layers: packaging SQL script by Perl; the three have corresponding relation; then, when the "dataflow implementation is explicit: SQL script by Perl package "," source data layer: technical buffer layer "and" target data layer: on the premise of the near-source model layer ', the first data stream number of the data streams related to the at least two first data layers is obtained by reverse estimation and is ' F21101 '.
Because different data stream implementation manners can be adopted between the same source data layer and the same target data layer, under the condition that at least two first data layers are the same (the source data layer and the target data layer are the same), the first data streams corresponding to the at least two first data layers have different numbers due to the different data stream implementation manners; correspondingly, under the condition that at least two first data layers are the same (a source data layer is the same as a target data layer), the corresponding first data streams have different numbers, so that the data streams corresponding to the at least two first data layers have different implementation manners.
In step S103, a script to be generated is used to complete a first algorithm type used for transmitting the target data table and a first data stream number of a data stream between at least two first data layers, and a template subdivision identifier of a target script template according to which the script to be generated is determined; the target subdivision identification indicates the storage position of the target script template in the database, and the target script template can be acquired according to the target subdivision identification on the premise that the target subdivision identification is clear.
The target script template has a unique script number, and when the target script template is stored, the script number can be bound with the template subdivision identification of the storage position, so that the template subdivision identification of the target script template can be clarified on the premise of clarifying the script number of the target script template.
In one embodiment, step S103 includes: determining a target script template according to which the script to be generated is generated by searching a configured candidate script template based on the first algorithm type and the first data stream number; and determining the template subdivision identification of the target script template by using the script number of the target script template.
In this step, the configured candidate script template may be searched by using a first algorithm category of an algorithm used for implementing transmission of the target data table between the at least two first data layers and a first data stream number of a data stream existing between the at least two first data layers;
and determining the candidate script templates which can realize the transmission algorithm indicated by the first algorithm type and are suitable for the first data stream between at least two first data layers in the configured candidate script templates as the target script templates required by the generation of the scripts to be generated.
Here, each candidate script template can implement a unique algorithm, and the data stream to which each candidate script object applies is unique, so that the target script template according to which the script to be generated is generated can be determined by using the unique first algorithm type corresponding to the algorithm and the first data stream numbers of the data streams of the at least two first data layers.
The script number of the target script template is unique, and the script number and the template subdivision identification of the target storage position of the target script have a binding relationship; therefore, on the premise of determining the target script template according to which the script to be generated is generated, the template subdivision identification of the target script template can be further determined according to the script number of the target script template, so that the storage position of the target script template according to the template subdivision identification is determined in the process of generating the script to be generated.
Under the condition that a developer defines a template subdivision identification of a target script template according to which a script to be generated is generated by a first data stream number of a data stream of the script to be generated, and realizes a first algorithm type of transmission of a target data table between at least two first data layers, the developer can configure the information so as to automatically generate the script to be generated through a used system.
In step S104, in response to the data configuration operation applied by the developer, the configuration of the first data stream number, the template subdivision identification, the first algorithm category, and the target data table is implemented in the configuration interface according to the data configuration operation of the developer.
Referring to fig. 2, fig. 2 is a schematic view of a configuration interface according to an embodiment of the present disclosure. As shown in fig. 2, a data flow configuration item 2b, a template subdivision identification configuration item 2c, an algorithm category configuration item 2d, and a data table selection item 2e are displayed in the configuration interface 2 a; the service personnel can complete the selection of the data stream configuration item 2b, the template subdivision identification configuration item 2c, the algorithm category configuration item 2d and the target data table selection item 2e through data configuration operation.
In step S105, in response to a script generation instruction issued by a service person, a script to be generated with requirements is generated based on the configured first data stream number, the template subdivision identifier, the first algorithm type, and the target data table.
In order to facilitate the business personnel to check the generated script to be generated, the possibility of downloading the script to be generated can be provided for the business personnel.
In one embodiment, the script generation method further includes: and responding to a script downloading instruction, and downloading the target script which is downloaded and indicated by the script downloading instruction to the client.
In the step, in response to a script downloading instruction issued by a service person, a target script downloaded by the script downloading instruction is downloaded to a client used by the service person, so that the service person can conveniently check the target script.
Here, the service personnel can issue a script downloading instruction through a script downloading control displayed in the interface.
The service personnel can also configure required data layers according to self requirements so as to be used when generating the script.
In one embodiment, the data layer is configured by: responding to a data layer newly-added instruction, and displaying a layer attribute configuration window in a graphical user interface; and responding to the first attribute configuration operation, configuring the attribute information of each layer in the layer attribute configuration window to obtain a configured data layer.
In the step, in response to a data layer addition instruction applied by a service person, a layer attribute configuration window for configuring a data layer is displayed for the service person in a graphical user interface, and the service person can complete configuration of the data layer in the layer attribute configuration window.
And responding to a first attribute configuration operation applied by business personnel in the layer attribute configuration window, and completing configuration of each layer attribute information in the layer attribute configuration window one by one to obtain a configured data layer.
The layer attribute information comprises information such as a data layer identification name, a data layer English name, a data layer Chinese name, whether a mark is realized or not, a user-defined name, a subsystem identification name, a source classification of a generated script and the like.
Similarly, the service personnel can configure the required data stream according to the self requirement so as to be used when generating the script.
In one embodiment, the candidate data streams are configured by: responding to a data stream addition instruction, and displaying a stream attribute configuration window in a graphical user interface; and responding to the second attribute configuration operation, configuring various stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
In the step, in response to a data stream addition instruction applied by a service person, a stream attribute configuration window for configuring the candidate data stream is displayed for the service person in the graphical user interface, and the service person can complete the configuration of the candidate data stream in the stream attribute configuration window.
And responding to a second attribute configuration operation applied by service personnel in the flow attribute configuration window, and completing the configuration of each item of flow attribute information in the flow attribute configuration window one by one to obtain the configured candidate data flow.
The stream attribute information includes information such as a data stream number, a data stream type, a data stream source, a data stream target, a data stream implementation mode, a generation script source classification, and a data stream description.
Similarly, the service personnel can configure the required candidate script template according to the self requirement so as to be used when generating the script.
In an embodiment, please refer to fig. 3, wherein fig. 3 is a schematic diagram illustrating a configuration process of a candidate script template according to an embodiment of the present application. As shown in FIG. 3, candidate script templates are configured by:
s301, responding to the template configuration operation, determining a second data stream number between at least two second data layers related to the candidate script template to be configured, and a second algorithm type adopted by the candidate script template to be configured to realize data transmission between the at least two second data layers.
In this step, in response to a template configuration operation applied by a developer, a second data stream number of a data stream that is required to be provided between at least two second data layers for implementing data transmission when the candidate script template to be configured is executed, and a second algorithm type that is adopted to implement data transmission between at least two second data layers are determined.
S302, responding to the number configuration operation, and setting script numbers for the candidate script templates to be configured.
In the step, a unique script code is set for the candidate script template to be configured in response to the number configuration operation of the service personnel.
S303, responding to the identification configuration operation, and associating the script number of the candidate script template to be configured with the target subdivision identification of the target database for storing the candidate script template to be configured.
In this step, since the storage location of the corresponding target script template needs to be determined in the process of generating the script to be generated, when the candidate script template is configured, the target subdivision identifier of the target database storing the candidate script template is associated with the script number of the candidate script template to be configured, so that in the process of generating the script, the corresponding target script template can be called according to the script number.
S304, obtaining the preset template content of the candidate script template to be configured.
In the step, the template content preset by the candidate script template is preset by a developer in a programming mode, and at the moment, the template content preset by the candidate script template to be configured can be directly obtained.
S305, responding to the template generation operation, and generating the candidate script template based on the second data stream number, the second algorithm type, the candidate script template setting script number to be configured and the target subdivision identification.
In the step, in response to a template generation operation applied by a developer, a script number and a target subdivision identifier are set based on a second data stream number which is configured, a second algorithm type, a candidate script template to be configured, and the candidate script template is generated.
Here, the second algorithm is an ETL (Extract-Transform-Load) algorithm for implementing data transmission of the target data table between at least two second data layers, and the second algorithm class is a unique class code corresponding to the second algorithm; the second algorithm may include ETL algorithms such as a full-delete full-insert algorithm, an incremental-accumulate algorithm, a full-history zipper algorithm, an incremental zipper algorithm, an add-delete zipper algorithm, a full-quantity add-delete zipper algorithm, a self-zipper algorithm, an upstrt algorithm, and an apend algorithm.
The script generation method provided by the embodiment of the application responds to a script generation request, determines at least two first data layers which are related to a script to be generated and have data transmission requirements, a target data table which realizes transmission by executing the script to be generated, and a first algorithm type used for transmitting the target data table; determining a first data stream number when data is transmitted between the at least two first data layers; determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm category and the first data stream number; responding to data configuration operation, and completing configuration of the first data stream number for generating the script to be generated, the template subdivision identification of the target script template, the first algorithm category and the target data table in a configuration interface; and responding to a script generation instruction, and generating the script to be generated. Therefore, when the script development requirement exists, the script to be generated required by the development requirement can be generated through the target script template which is configured in advance under the condition that a developer does not need to write the script, and the development difficulty and the development cost of the developer are reduced.
Referring to fig. 4 and 5, fig. 4 is a schematic structural diagram of a script generating device according to an embodiment of the present application, and fig. 5 is a schematic structural diagram of a script generating device according to an embodiment of the present application. As shown in fig. 4, the script generating apparatus 400 includes:
the information determining module 410 is configured to determine, in response to a script generation request, at least two first data layers having data transmission requirements and related to a script to be generated, a target data table for realizing transmission by executing the script to be generated, and a first algorithm type used for transmitting the target data table;
a number determining module 420, configured to determine a first data stream number when data is transmitted between the at least two first data layers;
the identifier determining module 430 is configured to determine, based on the first algorithm type and the first data stream number, a template subdivision identifier of a target script template according to which the script to be generated is generated;
the information configuration module 440 is configured to complete, in response to a data configuration operation, configuration of the first data stream number, the template subdivision identifier of the target script template, the first algorithm type, and the target data table for generating the script to be generated in a configuration interface;
the script generating module 450 is configured to generate the script to be generated in response to a script generating instruction.
Further, when the number determining module 420 is configured to determine a first data stream number when data is transmitted between the at least two first data layers, the number determining module 420 is configured to:
determining a source data layer and a target data layer from the at least two first data layers; wherein, the source data layer is used for sending the target data table; the target data layer is used for receiving the target data table;
and determining the first data stream numbers of the at least two first data layers by querying configured candidate data streams by using a data stream implementation mode between the source data layer and the target data layer.
Further, when the identifier determining module 430 is configured to determine, based on the first algorithm category and the first data stream number, a template subdivision identifier of a target script template according to which the script to be generated is generated, the identifier determining module 430 is configured to:
determining a target script template according to which the script to be generated is generated by searching the configured candidate script template based on the first algorithm type and the first data stream number;
and determining the template subdivision identification of the target script template by using the script number of the target script template.
Further, as shown in fig. 5, the script generating apparatus 400 further includes a data layer configuring module 460, where the data layer configuring module 460 is configured to:
responding to a data layer newly-adding instruction, and displaying a layer attribute configuration window in a graphical user interface;
and responding to the first attribute configuration operation, configuring the attribute information of each layer in the layer attribute configuration window to obtain a configured data layer.
Further, as shown in fig. 5, the script generating apparatus 400 further includes a data stream configuration module 470, where the data stream configuration module 470 is configured to:
responding to a data stream adding instruction, and displaying a stream attribute configuration window in a graphical user interface;
and responding to the second attribute configuration operation, configuring various stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
Further, as shown in fig. 5, the script generating apparatus 400 further includes a template configuring module 480, where the template configuring module 480 is configured to:
responding to a template configuration operation, determining a second data stream number between at least two second data layers related to a candidate script template to be configured, and a second algorithm type adopted by the candidate script template to be configured to realize data transmission between the at least two second data layers;
responding to the number configuration operation, and setting script numbers for the candidate script templates to be configured;
responding to the identification configuration operation, and associating the script number of the candidate script template to be configured with a target subdivision identification of a target database for storing the candidate script template to be configured;
acquiring preset template contents of the candidate script template to be configured;
and responding to the template generation operation, and generating the candidate script template based on the second data stream number, the second algorithm type, the candidate script template setting script number to be configured and the target subdivision identification.
Further, as shown in fig. 5, the script generating apparatus 400 further includes a script downloading module 490, where the script downloading module 490 is configured to:
and responding to a script downloading instruction, and downloading the target script which is downloaded and indicated by the script downloading instruction to the client.
The script generating device provided by the embodiment of the application responds to a script generating request, determines at least two first data layers which are related to a script to be generated and have data transmission requirements, a target data table which realizes transmission by executing the script to be generated, and a first algorithm type used for transmitting the target data table; determining a first data stream number when data is transmitted between the at least two first data layers; determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm type and the first data stream number; responding to data configuration operation, and completing configuration of the first data stream number for generating the script to be generated, the template subdivision identification of the target script template, the first algorithm type and the target data table in a configuration interface; and responding to a script generation instruction, and generating the script to be generated. Therefore, when the script development requirement exists, the script to be generated required by the development requirement can be generated through the target script template which is configured in advance under the condition that a developer does not need to write the script, and the development difficulty and the development cost of the developer are reduced.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 600 includes a processor 610, a memory 620, and a bus 630.
The memory 620 stores machine-readable instructions executable by the processor 610, when the electronic device 600 runs, the processor 610 communicates with the memory 620 through the bus 630, and when the machine-readable instructions are executed by the processor 610, the steps of the script generation method in the method embodiment shown in fig. 1 may be performed, and a specific data flow implementation manner may refer to the method embodiment, which is not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the script generation method in the method embodiment shown in fig. 1 may be executed, and specific data stream implementation manners may refer to the method embodiment, and are not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in software functional units and sold or used as a stand-alone product, may be stored in a non-transitory computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A script generation method, comprising:
responding to a script generation request, determining at least two first data layers which are related to a script to be generated and have data transmission requirements, a target data table which is transmitted by executing the script to be generated, and a first algorithm type used for transmitting the target data table;
determining a first data stream number when data is transmitted between the at least two first data layers;
determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm type and the first data stream number;
responding to data configuration operation, and completing configuration of the first data stream number for generating the script to be generated, the template subdivision identification of the target script template, the first algorithm category and the target data table in a configuration interface;
and responding to a script generation instruction, and generating the script to be generated.
2. The method for generating a script according to claim 1, wherein the determining the first data stream number when transmitting data between the at least two first data layers comprises:
determining a source data layer and a target data layer from the at least two first data layers; wherein, the source data layer is used for sending the target data table; the target data layer is used for receiving the target data table;
and determining first data stream numbers of the at least two first data layers by querying the configured candidate data streams by using a data stream implementation mode between the source data layer and the target data layer.
3. The script generation method according to claim 1, wherein the determining, based on the first algorithm type and the first data stream number, a template subdivision identifier of a target script template according to which the script to be generated is generated comprises:
determining a target script template according to which the script to be generated is generated by searching a configured candidate script template based on the first algorithm type and the first data stream number;
and determining the template subdivision identification of the target script template by using the script number of the target script template.
4. The script generation method of claim 1, wherein the data layer is configured by:
responding to a data layer newly-added instruction, and displaying a layer attribute configuration window in a graphical user interface;
and responding to the first attribute configuration operation, configuring the attribute information of each layer in the layer attribute configuration window to obtain a configured data layer.
5. The script generation method of claim 2, wherein the candidate data streams are configured by:
responding to a data stream addition instruction, and displaying a stream attribute configuration window in a graphical user interface;
and responding to the second attribute configuration operation, configuring various stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
6. The script generation method of claim 3, wherein the candidate script templates are configured by:
responding to a template configuration operation, determining a second data stream number between at least two second data layers related to a candidate script template to be configured, and a second algorithm type adopted by the candidate script template to be configured to realize data transmission between the at least two second data layers;
responding to the number configuration operation, and setting script numbers for the candidate script templates to be configured;
responding to the identification configuration operation, and associating the script number of the candidate script template to be configured with a target subdivision identification of a target database for storing the candidate script template to be configured;
acquiring preset template contents of the candidate script template to be configured;
and responding to a template generation operation, and generating the candidate script template based on the second data stream number, the second algorithm type, the candidate script template setting script number to be configured and the target subdivision identification.
7. The script generation method of claim 1, further comprising:
and responding to a script downloading instruction, and downloading the target script which is downloaded and indicated by the script downloading instruction to the client.
8. A script generation apparatus, characterized in that the script generation apparatus comprises:
the information determining module is used for responding to a script generating request, determining at least two first data layers which are related to a script to be generated and have data transmission requirements, realizing a target data table for transmission by executing the script to be generated and a first algorithm type used for transmitting the target data table;
a number determining module, configured to determine a first data stream number when data is transmitted between the at least two first data layers;
the identification determining module is used for determining a template subdivision identification of a target script template according to which the script to be generated is generated based on the first algorithm category and the first data stream number;
the information configuration module is used for responding to data configuration operation and completing configuration of the first data stream number, the template subdivision identification of the target script template, the first algorithm category and the target data table for generating the script to be generated in a configuration interface;
and the script generating module is used for responding to a script generating instruction and generating the script to be generated.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is running, the machine-readable instructions, when executed by the processor, performing the steps of the script generation method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the script generation method as defined in any one of claims 1 to 7.
CN202211542488.1A 2022-12-02 2022-12-02 Script generation method and device, electronic equipment and readable storage medium Active CN115756443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211542488.1A CN115756443B (en) 2022-12-02 2022-12-02 Script generation method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211542488.1A CN115756443B (en) 2022-12-02 2022-12-02 Script generation method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115756443A true CN115756443A (en) 2023-03-07
CN115756443B CN115756443B (en) 2023-08-25

Family

ID=85342945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211542488.1A Active CN115756443B (en) 2022-12-02 2022-12-02 Script generation method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115756443B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180113906A1 (en) * 2016-10-20 2018-04-26 Microsoft Technology Licensing, Llc Join with predictive granularity modification by example
CN109783509A (en) * 2019-01-04 2019-05-21 中国银行股份有限公司 SQL scenario generation method and device
CN112433705A (en) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 Script generation method and device, electronic equipment and storage medium
CN113221525A (en) * 2021-02-26 2021-08-06 平安普惠企业管理有限公司 Data processing method and device, electronic equipment and storage medium
CN114025027A (en) * 2021-11-02 2022-02-08 浙江三维万易联科技有限公司 Data transmission script running method and device, storage medium and electronic device
US11275570B1 (en) * 2021-01-18 2022-03-15 Arganteal, Corp. Automation and orchestration platform for software development and deployment
US20220091826A1 (en) * 2020-09-18 2022-03-24 Arganteal, Corp. Automation and orchestration platform for software development and deployment
CN114281694A (en) * 2021-12-24 2022-04-05 浙江太美医疗科技股份有限公司 ETL framework-based data warehouse operation scheduling method, system and computer readable medium
CN115309811A (en) * 2022-08-30 2022-11-08 中国银行股份有限公司 ETL script generation method, device, storage medium and equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180113906A1 (en) * 2016-10-20 2018-04-26 Microsoft Technology Licensing, Llc Join with predictive granularity modification by example
CN109783509A (en) * 2019-01-04 2019-05-21 中国银行股份有限公司 SQL scenario generation method and device
US20220091826A1 (en) * 2020-09-18 2022-03-24 Arganteal, Corp. Automation and orchestration platform for software development and deployment
CN112433705A (en) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 Script generation method and device, electronic equipment and storage medium
US11275570B1 (en) * 2021-01-18 2022-03-15 Arganteal, Corp. Automation and orchestration platform for software development and deployment
CN113221525A (en) * 2021-02-26 2021-08-06 平安普惠企业管理有限公司 Data processing method and device, electronic equipment and storage medium
CN114025027A (en) * 2021-11-02 2022-02-08 浙江三维万易联科技有限公司 Data transmission script running method and device, storage medium and electronic device
CN114281694A (en) * 2021-12-24 2022-04-05 浙江太美医疗科技股份有限公司 ETL framework-based data warehouse operation scheduling method, system and computer readable medium
CN115309811A (en) * 2022-08-30 2022-11-08 中国银行股份有限公司 ETL script generation method, device, storage medium and equipment

Also Published As

Publication number Publication date
CN115756443B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
EP3399721B1 (en) Interface data displaying method and device
US10740114B2 (en) Component invoking method and apparatus, and component data processing method and apparatus
CN107967159B (en) Method for configuring file application and server
CN105511873B (en) User interface control display method and device
CN108399072B (en) Application page updating method and device
US9934007B2 (en) Method for operating tool in working environment and machine using such method
CN108287708B (en) Data processing method and device, server and computer readable storage medium
CN109657177A (en) The generation method of the page, device, storage medium and computer equipment after upgrading
CN111930489B (en) Task scheduling method, device, equipment and storage medium
CN111414350A (en) Service generation method and device
CN110727429A (en) Front-end page generation method, device and equipment
CN111125064A (en) Method and device for generating database mode definition statement
CN113094776B (en) Method and system for constructing visual component model data and electronic equipment
US11604662B2 (en) System and method for accelerating modernization of user interfaces in a computing environment
CN110688145A (en) Android MVP code automatic generation method, device, medium and electronic equipment
CN116301951B (en) Micro-service application installation upgrading method and device based on kubernetes
US10956659B1 (en) System for generating templates from webpages
CN112631563A (en) System development method and device based on framework, computer equipment and storage medium
CN116431200A (en) Configuration method, device, equipment and storage medium for application data configuration information
CN115756443A (en) Script generation method and device, electronic equipment and readable storage medium
CN109032582A (en) A kind of method and device generating server O&M script
CN114090242A (en) Model training method, device, equipment, storage medium and program product
CN112114931B (en) Deep learning program configuration method and device, electronic equipment and storage medium
CN113312900A (en) Data verification method and device
CN113010129A (en) Virtual studio full-flow multi-terminal blackboard writing extraction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant