CN115756443B - 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 PDFInfo
- Publication number
- CN115756443B CN115756443B CN202211542488.1A CN202211542488A CN115756443B CN 115756443 B CN115756443 B CN 115756443B CN 202211542488 A CN202211542488 A CN 202211542488A CN 115756443 B CN115756443 B CN 115756443B
- 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.)
- Active
Links
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Stored Programmes (AREA)
Abstract
The application provides a script generation method, a script generation device, electronic equipment and a readable storage medium, wherein at least two first data layers involved in a script to be generated are determined in response to a script generation request, 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 are determined; determining a first data stream number when data is transmitted between at least two first data layers; determining a template subdivision identifier of a target script template according to which a script to be generated is generated based on a first algorithm class and a first data stream number; responding to data configuration operation, and completing the configuration of a first data stream number, a template subdivision identifier, a first algorithm type and a target data table in a configuration interface; and responding to the script generation instruction, and generating a script to be generated. Thus, when the 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
Technical Field
The present application relates to the field of script generation technologies, and in particular, to a script generation method, a device, an electronic apparatus, and a readable storage medium.
Background
In the computer field, a script is an executable file written in a specific descriptive language according to a certain format. When executing a script, a computer performs a series of operations that may involve other applications such as word processing, spreadsheets, and data management.
Currently, when a script file development requirement exists, a developer needs to write a script file by using a good script language according to script development experience after knowing basic configuration information of the script file; because the level of the developer is uneven, the writing quality of the script file cannot be ensured, and the later script maintenance is difficult and the maintenance difficulty is high due to the different development languages which are good for the developer when developing the program.
Disclosure of Invention
In view of the above, an object of the present application is to provide a method, an apparatus, an electronic device, and a readable storage medium for generating a script to be generated required by a development requirement without writing the script by a developer through a pre-configured target script template when the development requirement of the script is met, which is helpful for reducing the development difficulty and the 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 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;
determining a first data stream number when data is transmitted between the at least two first data layers;
determining a template subdivision identifier of a target script template according to which the script to be generated is generated based on the first algorithm class and the first data stream number;
responding to data configuration operation, and completing the 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 used for generating the script to be generated in a configuration interface;
and generating the script to be generated in response to a script generation instruction.
In one possible implementation manner, the determining a class of data flow direction when transmitting data 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; 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 configured candidate data streams by utilizing 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 class 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 configured candidate script templates based on the first algorithm class and the first data stream number;
and determining the template subdivision identification of the target script template by utilizing the script number of the target script template.
In one possible implementation, the data layer is configured by:
responding to the 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 each item of layer attribute information in the layer attribute configuration window to obtain a configured data layer.
In one possible implementation, the candidate data stream is configured by:
Responding to the data stream newly-added instruction, and displaying a stream attribute configuration window in a graphical user interface;
and responding to a second attribute configuration operation, and configuring each item of stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
In one possible implementation, 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 for realizing data transmission between the at least two second data layers;
setting a script number for the candidate script template to be configured in response to a number configuration operation;
in response to identifying a configuration operation, associating a script number of the candidate script template to be configured with a target subdivision identifier of a target database for storing the candidate script template to be configured;
acquiring template contents preset by the candidate script template to be configured;
and responding to a template generation operation, setting a script number and the target subdivision identification based on the second data stream number, the second algorithm class, the candidate script template to be configured, and generating the candidate script template.
In one possible implementation manner, the script generation method further includes:
and responding to the script downloading instruction, and downloading the target script indicated to be downloaded by the script downloading instruction to the client.
The embodiment of the application also provides a script generating device, which comprises:
the information determining module is used for 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;
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 type and the first data stream number;
the information configuration module is used for responding to data configuration operation and completing the configuration of the first data stream number, the template subdivision identification of the target script template, the first algorithm type and the target data table which are used 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 implementation manner, the number determining module, when used for determining a first data stream number when transmitting data between the at least two first data layers, is configured to:
determining a source data layer and a target data layer from the at least two first data layers; 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 configured candidate data streams by utilizing a data stream implementation mode between the source data layer and the target data layer.
In a possible implementation manner, the identification determining module is configured, when determining, based on the first algorithm class and the first data stream number, a template subdivision identification of a target script template according to which the script to be generated is generated, to:
determining a target script template according to which the script to be generated is generated by searching configured candidate script templates based on the first algorithm class and the first data stream number;
And determining the template subdivision identification of the target script template by utilizing the script number of the target script template.
In a possible implementation manner, the script generating apparatus further includes a data layer configuration module, where the data layer configuration module is configured to:
responding to the 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 each item of layer attribute information 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, where the data stream configuration module is configured to:
responding to the data stream newly-added instruction, and displaying a stream attribute configuration window in a graphical user interface;
and responding to a second attribute configuration operation, and configuring each item of 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 comprises a template configuration module, wherein the template configuration module is used for:
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 for realizing data transmission between the at least two second data layers;
Setting a script number for the candidate script template to be configured in response to a number configuration operation;
in response to identifying a configuration operation, associating a script number of the candidate script template to be configured with a target subdivision identifier of a target database for storing the candidate script template to be configured;
acquiring template contents preset by the candidate script template to be configured;
and responding to a template generation operation, setting a script number and the target subdivision identification based on the second data stream number, the second algorithm class, the candidate script template to be configured, and generating the candidate script template.
In one possible implementation manner, the script generating device further comprises a script downloading module, wherein the script downloading module is used for:
and responding to the script downloading instruction, and downloading the target script indicated to be downloaded by the script downloading instruction to the client.
The embodiment of the application also provides electronic equipment, which comprises: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the script generating method as described above.
The embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the script generating method as described above.
The embodiment of the application provides a script generation method, a script generation device, electronic equipment and a readable storage medium, wherein at least two first data layers with data transmission requirements related to a script to be generated are determined in response to a script generation request, 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 identifier of a target script template according to which the script to be generated is generated based on the first algorithm class and the first data stream number; responding to data configuration operation, and completing the 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 used for generating the script to be generated in a configuration interface; and generating the script to be generated in response to a script generation instruction. Therefore, when the script development requirement exists, the script to be generated required by the development requirement can be generated through the pre-configured target script template under the condition that the script writing is not required by a developer, and the development difficulty and the development cost of the developer are reduced.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a script generation method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a configuration interface according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a configuration process of a candidate script template according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a script generating apparatus according to an embodiment of the present application;
FIG. 5 is a second schematic 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
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments of the present application, every other embodiment obtained by a person skilled in the art without making any inventive effort falls within the scope of protection of the present application.
According to research, at present, when the development requirement of the script file is met, a developer needs to write the script file by using a good script language according to script development experience after knowing basic configuration information of the script file; because the level of the developer is uneven, the writing quality of the script file cannot be ensured, and the later script maintenance is difficult and the maintenance difficulty is high due to the different development languages which are good for the developer when developing the program.
Based on the above, the embodiment of the application provides a script generation method, which can utilize the configured target script template to realize the creation of the script to be generated, so that fewer developers write the script, the development efficiency of the script file is improved, and the development difficulty of the script file is reduced.
Referring to fig. 1, fig. 1 is a flowchart of a script generation method according to an embodiment of the present application. As shown in fig. 1, a script generating method provided by 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.
And S103, determining a template subdivision identifier of a target script template according to which the script to be generated is generated based on the first algorithm class 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 type and the target data table which are used for generating the script to be generated in a configuration interface.
S105, responding to a script generation instruction, and generating the script to be generated.
When a script development requirement exists, the script generation method provided by the embodiment of the application responds to a script generation request, and determines at least two first data layers with transmission requirements related to a to-be-generated script, a target data table for executing transmission completed by the to-be-generated script and a first algorithm type used for realizing a transmission function of the to-be-generated script; determining a first data stream number adopted when data are transmitted between two first data layers; meanwhile, determining a template subdivision identifier of a target script template according to which a script to be generated needs to be generated according to a first algorithm class and a first data stream number; the configuration of a first data stream number, a template subdivision identifier of a target script template, a first algorithm type and a target data table is completed through data configuration operation, and a script to be generated required by development requirements is automatically generated; therefore, in the development process, the developer does not need to write the script every time, so that the development efficiency of the script is improved, and the operation difficulty of the developer is reduced.
Script, which can be understood as a section of executable program written according to a certain format; by executing the executable program, the corresponding script function is realized, for example, the transmission of data on different data layers can be realized by executing the script; alternatively, statistics of specific data may be implemented by executing scripts, etc., which are specifically needed according to development requirements, and are not limited herein.
Here, no matter what the function implemented by the script is, the transmission of data between different data layers is required to complete the corresponding function, so that at least two first data layers with data transmission requirements need to be determined in the development process of the script.
In the process of realizing data transmission, the transmission of the target data table to be transmitted between at least two first data layers is realized by means of different algorithms.
In step S101, when the developer has a script development requirement, a script generation request may be issued; and responding to a script generation request issued by a developer, determining at least two first data layers with data transmission requirements, which are related to a to-be-generated script to be developed by the developer, a target data table for realizing transmission by executing the to-be-generated script, and a first algorithm type for realizing transmission of the target data table.
Here, for at least two first data layers, a certain data transmission direction is provided when data transmission is performed; that is, when data is transmitted between at least two first data layers, the data should be numbered 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 mart layer, an integration model layer, a technical buffer layer, a near source model layer, an ODS common processing layer and the like.
Here, the first algorithm refers to an ETL (Extract-Transform-Load) algorithm for realizing 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-cut full-insert algorithm, an incremental full-add algorithm, an incremental accumulation 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 Upsert algorithm, an add algorithm, and the like.
In step S102, a first data stream number is determined which can indicate the transmission direction that the target data table has when transmitting between 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 first data stream numbers of the at least two first data layers by querying configured candidate data streams by utilizing a data stream implementation mode between the source data layer and the target data layer.
In the step, a source data layer for transmitting a target data table and a target data layer for receiving the target data table are determined 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.
And determining a first data stream number when data is transmitted between at least two first data layers by querying configured candidate data streams based on a data stream implementation mode of transmitting a target data table between a source data layer and a target data layer.
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 defined; correspondingly, on the premise that the data layers with data transmission requirements and the corresponding data stream numbers among the data layers are defined, the data stream implementation mode for transmitting data among the data layers can be determined;
for example, (1) first data stream number: f21101, (2) at least two first data layers are a technology buffer layer (source data layer) and a near source model layer (target data layer), respectively, and (3) a data flow implementation manner between the at least two first data layers: packaging SQL script by Perl; the three have a corresponding relation; then, in the explicit "data flow implementation: SQL script wrapped by Perl "," source data layer: technology 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 at least two first data layers can be reversely obtained by the reverse thrust method, wherein the first data stream number is F21101.
Because different data stream implementation manners can be adopted between the same source data layer and the same target data layer, when at least two first data layers are the same (the source data layer is the same as the target data layer), the first data stream numbers corresponding to the at least two first data layers are different due to the different data stream implementation manners; correspondingly, when at least two first data layers are the same (the source data layer is the same as the target data layer), the corresponding first data stream numbers are different, so that the data stream implementation manners corresponding to the at least two first data layers are different.
In step S103, determining a template subdivision identifier of a target script template according to which the script to be generated is generated, by using a first algorithm type used by the script to be generated to complete transmission of the target data table and a first data stream number of a data stream between at least two first data layers; here, the target subdivision identifier indicates a storage position of the target script template in the database, and on the premise that the target subdivision identifier is defined, the target script template can be obtained according to the target subdivision identifier.
The target script template has a unique script number, and when the target script template is stored, the script number and the template subdivision identifier of the storage position can be bound, so that the template subdivision identifier of the target script template can be defined on the premise of defining 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 configured candidate script templates based on the first algorithm class and the first data stream number; and determining the template subdivision identification of the target script template by utilizing the script number of the target script template.
In this step, the configured candidate script templates may be searched for using the first algorithm class of the algorithm used to realize the transmission of the target data table between the at least two first data layers, and the first data stream number of the data stream that is present between the at least two first data layers;
and determining the candidate script templates of the first data stream between at least two first data layers as target script templates on which the script to be generated needs to be generated, wherein the candidate script templates are configured to not only realize the transmission algorithm indicated by the first algorithm type, but also be suitable for the candidate script templates of the first data stream between at least two first data layers.
Here, the algorithm can be unique in each candidate script template, and the data stream to which each candidate script target is applied 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 class corresponding to the algorithm and the first data stream numbers of the data streams of at least two first data layers.
Because the script number of the target script template is unique, the script number has a binding relationship with the template subdivision identifier of the target script target storage position; therefore, on the premise of determining the target script template according to which the script to be generated is generated, the template subdivision identifier 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 which the template subdivision identifier is explicitly determined in the process of generating the script to be generated.
Under the condition that a developer definitely determines a template subdivision identifier of a target script template according to which the to-be-generated script is generated by a first data stream number of a data stream of the to-be-generated script, and a first algorithm type for realizing 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 to-be-generated script 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 identifier, the first algorithm class 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 diagram of a configuration interface according to an embodiment of the application. 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 flow 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 the script generation instruction issued by the service personnel, a script to be generated having a requirement is generated based on the configured first data stream number, the template subdivision identifier, the first algorithm class and the target data table.
In order to facilitate the service personnel to view the generated script to be generated, the possibility of downloading the script to be generated can be provided for the service personnel.
In one embodiment, the script generation method further includes: and responding to the script downloading instruction, and downloading the target script indicated to be downloaded by the script downloading instruction to the client.
In the step, a target script indicated to be downloaded by a script downloading instruction is downloaded to a client used by a business person in response to the script downloading instruction issued by the business person, so that the business person can conveniently view the target script.
Here, the service person may issue a script download instruction through a script download control displayed in the interface.
The business personnel can also configure the required data layers according to the self requirements so as to be used when generating the script.
In one embodiment, the data layer is configured by: responding to the 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 each item of layer attribute information in the layer attribute configuration window to obtain a configured data layer.
In the step, in response to a data layer newly-added instruction applied by the service personnel, a layer attribute configuration window for configuring the data layer is displayed for the service personnel in the graphical user interface, and the service personnel can complete the configuration of the data layer in the layer attribute configuration window.
And responding to a first attribute configuration operation applied by a service personnel in the layer attribute configuration window, completing the configuration of each item of layer attribute information in the layer attribute configuration window one by one, and obtaining 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, a realization flag, custom naming, a subsystem identification name, a generated script source classification and the like.
Likewise, the business personnel can configure the required data flow according to the own requirements so as to be used when generating the script.
In one embodiment, the candidate data stream is configured by: responding to the data stream newly-added instruction, and displaying a stream attribute configuration window in a graphical user interface; and responding to a second attribute configuration operation, and configuring each item of stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
In the step, in response to a data stream newly-added instruction applied by the service personnel, a stream attribute configuration window for configuring the candidate data stream is displayed for the service personnel in the graphical user interface, and the service personnel 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 stream attribute configuration window, completing the configuration of each item of stream attribute information in the stream attribute configuration window one by one, and obtaining configured candidate data streams.
The stream attribute information comprises information such as a data stream number, a data stream category, a data stream source, a data stream target, a data stream implementation mode, a generation script source category, a data stream description and the like.
Likewise, business personnel can configure the required candidate script templates according to their own needs for use in generating scripts.
In one implementation, referring to fig. 3, 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, the candidate script templates are configured by:
s301, 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 for realizing data transmission between the at least two second data layers in response to a template configuration operation.
In the step, in response to template configuration operation applied by a developer, a second data stream number of a data stream between at least two second data layers which needs to be realized when a candidate script template to be configured is executed, and a second algorithm type adopted for realizing data transmission between the at least two second data layers are determined.
S302, setting script numbers for the candidate script templates to be configured in response to the number configuration operation.
In the step, unique script codes are set for candidate script templates to be configured in response to serial number configuration operation of 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 clarified in the process of generating the script to be generated, when configuring the candidate script template, 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 call of the corresponding target script template can be realized according to the script number.
S304, acquiring template contents preset by the candidate script templates 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 a template generation operation, setting a script number and the target subdivision identification based on the second data stream number, the second algorithm category, the candidate script template to be configured, and generating the candidate script template.
In the step, in response to template generation operation applied by a developer, the candidate script template is generated based on the configured second data stream number, the second algorithm type, the candidate script template to be configured, the set script number and the target subdivision identifier.
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-cut full-insert algorithm, an incremental full-add algorithm, an incremental accumulation 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 Upsert algorithm, an add algorithm, and the like.
The method for generating the script, provided by the embodiment of the application, responds to a script generation request, determines at least two first data layers with data transmission requirements related to a script to be generated, realizes a target data table for transmission by executing the script to be generated, and transmits a first algorithm type used by 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 identifier of a target script template according to which the script to be generated is generated based on the first algorithm class and the first data stream number; responding to data configuration operation, and completing the 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 used for generating the script to be generated in a configuration interface; and generating the script to be generated in response to a script generation instruction. Therefore, when the script development requirement exists, the script to be generated required by the development requirement can be generated through the pre-configured target script template under the condition that the script writing is not required by a developer, 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 second 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:
an information determining module 410, configured to determine, in response to a script generation request, at least two first data layers with data transmission requirements related to a script to be generated, a target data table for implementing transmission by executing the script to be generated, and a first algorithm class 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 class 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;
an information configuration module 440, configured to complete the configuration of the first data stream number, the template subdivision identifier of the target script template, the first algorithm class, and the target data table for generating the script to be generated in a configuration interface in response to a data configuration operation;
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; 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 configured candidate data streams by utilizing 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 class 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 configured candidate script templates based on the first algorithm class and the first data stream number;
And determining the template subdivision identification of the target script template by utilizing the script number of the target script template.
Further, as shown in fig. 5, the script generating apparatus 400 further includes a data layer configuration module 460, where the data layer configuration module 460 is configured to:
responding to the 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 each item of layer attribute information 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 the data stream newly-added instruction, and displaying a stream attribute configuration window in a graphical user interface;
and responding to a second attribute configuration operation, and configuring each item of 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 configuration module 480, where the template configuration 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 for realizing data transmission between the at least two second data layers;
Setting a script number for the candidate script template to be configured in response to a number configuration operation;
in response to identifying a configuration operation, associating a script number of the candidate script template to be configured with a target subdivision identifier of a target database for storing the candidate script template to be configured;
acquiring template contents preset by the candidate script template to be configured;
and responding to a template generation operation, setting a script number and the target subdivision identification based on the second data stream number, the second algorithm class, the candidate script template to be configured, and generating the candidate script template.
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 the script downloading instruction, and downloading the target script indicated to be downloaded by the script downloading instruction to the client.
The script generation device provided by the embodiment of the application responds to a script generation request, determines at least two first data layers with data transmission requirements related to a script to be generated, realizes a target data table for transmission by executing the script to be generated, and transmits a first algorithm type used by 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 identifier of a target script template according to which the script to be generated is generated based on the first algorithm class and the first data stream number; responding to data configuration operation, and completing the 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 used for generating the script to be generated in a configuration interface; and generating the script to be generated in response to a script generation instruction. Therefore, when the script development requirement exists, the script to be generated required by the development requirement can be generated through the pre-configured target script template under the condition that the script writing is not required by a developer, 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 application. 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 is running, 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 generating method in the method embodiment shown in fig. 1 can be executed, and the specific data flow implementation can be referred to the method embodiment and will not be described herein.
The embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor may perform the steps of the script generating method in the method embodiment shown in fig. 1, and a specific implementation manner of the data flow may refer to the method embodiment and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform 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 (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
Claims (9)
1. A script generation method, characterized in that the script generation method comprises:
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;
determining a first data stream number when data is transmitted between the at least two first data layers;
determining a template subdivision identifier of a target script template according to which the script to be generated is generated based on the first algorithm class and the first data stream number;
responding to data configuration operation, and completing the 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 used for generating the script to be generated in a configuration interface;
responding to a script generation instruction, and generating the script to be generated;
wherein determining the first data stream number when transmitting data 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; 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 configured candidate data streams by utilizing a data stream implementation mode between the source data layer and the target data layer.
2. The script generation method according to claim 1, wherein the determining, based on the first algorithm class and the first data stream number, a template subdivision identifier of a target script template from 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 configured candidate script templates based on the first algorithm class and the first data stream number;
and determining the template subdivision identification of the target script template by utilizing the script number of the target script template.
3. The script generation method according to claim 1, wherein the data layer is configured by:
responding to the 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 each item of layer attribute information in the layer attribute configuration window to obtain a configured data layer.
4. The script generation method of claim 1, wherein the candidate data stream is configured by:
responding to the data stream newly-added instruction, and displaying a stream attribute configuration window in a graphical user interface;
And responding to a second attribute configuration operation, and configuring each item of stream attribute information in the stream attribute configuration window to obtain configured candidate data streams.
5. The script generation method of claim 2, 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 for realizing data transmission between the at least two second data layers;
setting a script number for the candidate script template to be configured in response to a number configuration operation;
in response to identifying a configuration operation, associating a script number of the candidate script template to be configured with a target subdivision identifier of a target database for storing the candidate script template to be configured;
acquiring template contents preset by the candidate script template to be configured;
and responding to a template generation operation, setting a script number and the target subdivision identification based on the second data stream number, the second algorithm class, the candidate script template to be configured, and generating the candidate script template.
6. The script generation method according to claim 1, wherein the script generation method further comprises:
and responding to the script downloading instruction, and downloading the target script indicated to be downloaded by the script downloading instruction to the client.
7. A script generating apparatus, characterized in that the script generating apparatus comprises:
the information determining module is used for 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;
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 type and the first data stream number;
the information configuration module is used for responding to data configuration operation and completing the configuration of the first data stream number, the template subdivision identification of the target script template, the first algorithm type and the target data table which are used for generating the script to be generated in a configuration interface;
The script generation module is used for responding to a script generation instruction and generating the script to be generated;
wherein the number determining module is configured to, when determining a first data stream number when transmitting data between the at least two first data layers, determine:
determining a source data layer and a target data layer from the at least two first data layers; 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 configured candidate data streams by utilizing a data stream implementation mode between the source data layer and the target data layer.
8. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating via said bus when the electronic device is running, said machine readable instructions when executed by said processor performing the steps of the script generating method according to any of claims 1 to 6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the script generating method of any of claims 1 to 6.
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 CN115756443A (en) | 2023-03-07 |
CN115756443B true 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 (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10394815B2 (en) * | 2016-10-20 | 2019-08-27 | Microsoft Technology Licensing, Llc | Join with predictive granularity modification by example |
US11354101B2 (en) * | 2020-09-18 | 2022-06-07 | Arganteal, Corp. | Automation and orchestration platform for software development and deployment |
-
2022
- 2022-12-02 CN CN202211542488.1A patent/CN115756443B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
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 |
---|---|
CN115756443A (en) | 2023-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3399721B1 (en) | Interface data displaying method and device | |
EP3408745B1 (en) | Automatically updating a hybrid application | |
CN110597595B (en) | Method for providing multi-language information, method for configuring multi-language information, device, equipment and medium | |
US10740114B2 (en) | Component invoking method and apparatus, and component data processing method and apparatus | |
JP2019530921A (en) | Method and system for server-side rendering of native content for presentation | |
CN108399072A (en) | Five application page update method and device | |
US12032863B2 (en) | Creation of component templates and removal of dead content therefrom | |
US20180349004A1 (en) | Methods for extracting and adapting information to generate custom widgets and devices thereof | |
CN112860777B (en) | Data processing method, device and equipment | |
CN111797351A (en) | Page data management method and device, electronic equipment and medium | |
CN107102908A (en) | Data verification method, data fault tolerance method and device | |
CN107203372A (en) | Control shows method and device | |
CN105074652B (en) | For remotely providing the method and computer system of application function to printer | |
CN111367607A (en) | Dynamic electronic contract generating and signing system and implementation method thereof | |
CN115756443B (en) | Script generation method and device, electronic equipment and readable storage medium | |
CN116431200A (en) | Configuration method, device, equipment and storage medium for application data configuration information | |
CN112114931B (en) | Deep learning program configuration method and device, electronic equipment and storage medium | |
CN101676905A (en) | Layout for modifying resource contents based on customized rules | |
CN109522211B (en) | Interface parameter transmission method and device, electronic equipment and storage medium | |
CN112632973A (en) | Text processing method, device, equipment and storage medium | |
CN112291329B (en) | Information display method, device and equipment | |
CN114217899B (en) | Data persistence method, device, electronic equipment and storage medium | |
US11599398B2 (en) | Method for combining unified matters in personal workspace and system using the same | |
CN118193333B (en) | Android platform automobile diagnosis report generation method, equipment and medium | |
WO2023190763A1 (en) | Information processing system, server, information processing method, and program |
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 |