CN110109939B - Development method, device and storage medium based on structured query language SQL - Google Patents

Development method, device and storage medium based on structured query language SQL Download PDF

Info

Publication number
CN110109939B
CN110109939B CN201810011039.1A CN201810011039A CN110109939B CN 110109939 B CN110109939 B CN 110109939B CN 201810011039 A CN201810011039 A CN 201810011039A CN 110109939 B CN110109939 B CN 110109939B
Authority
CN
China
Prior art keywords
script
sql
logic
attribute
basic
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
Application number
CN201810011039.1A
Other languages
Chinese (zh)
Other versions
CN110109939A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201810011039.1A priority Critical patent/CN110109939B/en
Priority to PCT/CN2018/119907 priority patent/WO2019134480A1/en
Publication of CN110109939A publication Critical patent/CN110109939A/en
Application granted granted Critical
Publication of CN110109939B publication Critical patent/CN110109939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Abstract

The invention discloses a method, equipment and storage medium for developing SQL based on a structured query language. The method comprises the following steps: acquiring a plurality of SQL logic control scripts according to a preset development task; forming data analysis logic corresponding to the development task through the SQL logic control scripts; wherein each SQL logical control script has one or more of the following logical structures: a logical fragment, a referencing object property script, and an SQL logical control script that references a different from the SQL logical control script. The method effectively solves the problems of large SQL development workload, complex logic, difficult reading, difficult SQL maintenance and the like in data analysis, and effectively improves the data analysis development efficiency.

Description

Development method, device and storage medium based on structured query language SQL
Technical Field
The present invention relates to the field of computer program development, and in particular, to a method, apparatus, and storage medium for developing SQL based on a structured query language.
Background
Currently, large data analysis and mining of massive data is generally performed using SQL (Structured Query Language ). However, in the analysis and mining processes, the traditional SQL has the problems of large workload, complex logic, difficult reading, difficult SQL maintenance and the like, so that the development efficiency of data analysis mining is low.
Disclosure of Invention
In order to overcome the defects, the technical problem to be solved by the invention is to provide a development method, device and storage medium based on the structured query language SQL, which are used for at least reducing the difficulty of SQL development and maintenance.
In order to solve the technical problems, the development method based on the structured query language SQL in the invention comprises the following steps:
acquiring a plurality of SQL logic control scripts according to a preset development task;
forming data analysis logic corresponding to the development task through the SQL logic control scripts; wherein each SQL logical control script has one or more of the following logical structures: a logical fragment, a referencing object property script, and an SQL logical control script that references a different from the SQL logical control script.
To solve the above technical problem, the present invention provides a development device based on structured query language SQL, which is characterized in that the device includes a memory and a processor, the memory stores a development computer program based on structured query language SQL, and the processor executes the computer program to implement the steps of the method as described above.
To solve the above technical problem, a computer-readable storage medium according to the present invention is characterized in that the storage medium stores a development computer program based on structured query language SQL, which when executed by at least one processor, implements the steps of the method as described above.
The invention has the following beneficial effects:
according to the method, the device and the storage medium, the plurality of SQL logic control scripts are written according to the preset development task, and the data analysis logic corresponding to the development task is formed through the plurality of SQL logic control scripts, so that the data SQL performance attribute and the logic are separated, SQL objectification development in data analysis is realized, the problems of large SQL development workload, complex logic, difficult reading, SQL maintenance and the like in data analysis are solved, and the data analysis development efficiency is effectively improved.
Drawings
FIG. 1 is a flow chart of a method of developing structured query language SQL based in an embodiment of the invention;
FIG. 2 is a schematic diagram of the structure of an object property script in an embodiment of the present invention;
FIG. 3 is a schematic diagram of the structure of an SQL logical control script in an embodiment of the invention;
FIG. 4 is a flow chart illustrating the parsing of SQL logical control script in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of a development device based on structured query language SQL in an embodiment of the invention.
Detailed Description
In order to solve the problems in the prior art, the invention provides a method, equipment and a storage medium for developing SQL based on a structured query language, and the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
The embodiment of the invention provides a development method based on a structured query language SQL, as shown in fig. 1, comprising the following steps:
s11, acquiring a plurality of SQL logic control scripts according to a preset development task;
s12, forming data analysis logic corresponding to the development task through the SQL logic control scripts; wherein each SQL logical control script has one or more of the following logical structures: a logical fragment, a referencing object property script, and an SQL logical control script that references a different from the SQL logical control script.
A logical fragment in an embodiment of the present invention may be considered an independent code fragment (or independent code block).
In the embodiment of the invention, the quoting object attribute script and the quoting SQL logic control script can be realized through preset quoting keywords. For example, the reference key is include.
In the embodiment of the invention, the object attribute script can also be called an object script or an attribute script, and the SQL logic control script can also be called a control logic script or a logic script.
According to the embodiment of the invention, the plurality of SQL logic control scripts are written according to the preset development task, and the data analysis logic corresponding to the development task is formed through the plurality of SQL logic control scripts, so that the data SQL performance attribute and logic are separated, SQL objectification development in data analysis is realized, the problems of large SQL development workload, complex logic, difficult reading, difficult SQL maintenance and the like in data analysis are solved, and the data analysis development efficiency is effectively improved.
Optionally, in an embodiment of the present invention, the obtaining, according to a preset development task, a plurality of SQL logic control scripts includes:
extracting a plurality of object attribute scripts based on an object system;
and writing a plurality of SQL logic control scripts according to the business logic of the development task.
Wherein the object property script includes one or more of the following properties:
basic properties, composite properties, and collection properties.
The SQL logical control script comprises a basic logical control script, a compound logical control script and a multi-layer superposition logical control script.
Optionally, in an embodiment of the present invention, after the forming, by the plurality of SQL logic control scripts, data analysis logic corresponding to the development task includes:
and carrying out grammar analysis on each SQL logic control script to generate an SQL file corresponding to the development task.
In the embodiment of the invention, the expression attribute is defined according to an object system, and the object attribute is divided into a basic attribute, a set attribute, a composite attribute and the like; the attributes of a plurality of objects can be multiply superimposed and quoted, and business logic control is carried out through the SQL logic control script; and the SQL logic control script and the multi-superposition attribute script based on the object system can be analyzed to generate the target SQL, so that the SQL development and analysis based on the multi-superposition of the object system are realized.
Example two
The embodiment of the invention provides a development method based on a Structured Query Language (SQL), in particular to a multi-superposition SQL customization and analysis method based on an object system. Embodiments of the invention include
Embodiment one, the embodiment of the present invention will be described only in a point different from embodiment one.
The implementation of the embodiment of the invention can be realized in a program modularization mode; for example, an object-based system property script, a control logic script, an SSPC (SQL Script Parse Control, SQL script parsing control) parsing module is implemented.
The method in the embodiment of the invention comprises the following steps:
s21, extracting and packaging object attribute scripts based on an object system;
s22, writing a control logic script according to the specific service, referencing an object attribute script in the control logic script, and using the attribute in the object attribute script;
s23, analyzing a control logic script through an SSPC interface module by a data analysis and mining task (also called as a development task); after the SSPC module analyzes the logic script and the object script, outputting the target SQL to the data mining and analyzing task. And completing the whole flow of SQL parsing based on object attribute overlapping.
The embodiment of the invention extracts and encapsulates the object attribute script based on the object system; writing a control logic script according to a specific service, referencing an object attribute script in the control logic script, and using attributes in the object attribute script; the data analysis and mining task analyzes the control logic script through the SSPC interface module; after the SSPC module analyzes the logic script and the object script, outputting a target SQL to the data mining and analysis task, thereby completing all the SQL analysis processes based on the object attribute overlapping.
In detail, in the embodiment of the present invention, the module 1 is an object-based system attribute script: the object hierarchy based property script is an obj file. Extracting an object script based on the object system according to the cleaned target data, wherein the object script has one or more of the following three types of attributes: basic attributes, aggregate attributes, composite attributes.
Based on this, in the first embodiment, the extracting a plurality of object property scripts based on the object hierarchy may include:
generating a basic object attribute script corresponding to basic attributes based on the basic attributes of data;
generating a composite attribute script corresponding to the composite attribute based on the composite attribute formed by the composite or merging operation of the basic attribute;
and generating a set attribute script corresponding to the set attribute based on the set attribute formed by the set operation of the basic attribute, the set operation of the composite attribute or the set operation of the basic attribute and the composite attribute.
The basic attribute includes field information and/or processing information conforming to a preset processing rule. Such as basic table fields, simple preprocessing, etc. A composite attribute is a composite of some basic attributes, or a reference combination of multiple basic attributes. The set attribute contains operators or other multiple basic attributes, complex operations of complex attributes. One SQL object property script can be used by other object property scripts to rely on, and can also be used for a plurality of logic scripts to refer to.
In the embodiment of the present invention, the module 2 is a control logic script, and the SQL logic control script includes one or more of the following: basic logic control script, composite logic control script and multilayer superposition logic control script.
The control logic script is an SQL file, supports keywords such as include, for, if and SQL default keywords. And realizing a data analysis and mining processing framework through a control logic script. The control logic script references the object property script and invokes the object properties in the property script in the logic script, between which references can be superimposed. The logical script may also reference other logical scripts that are referenced in the logical segment according to the data analysis order.
Based on this, in the first embodiment, writing a plurality of SQL logic control scripts according to the business logic of the development task may include:
writing a logic segment according to the basic business logic;
generating a basic logic control script according to the logic fragments;
forming a logic structure with a logic fragment, a reference object attribute script and/or a reference basic logic control script according to the logic fragment, the object attribute script and the basic logic control script so as to generate a composite logic control script;
and forming a logic structure of the multi-layer reference relation according to the composite logic control script to generate a multi-layer superposition logic control script.
In the embodiment of the present invention, the module 3 is an SSPC parsing module: to parse the control logic script file and the object property script, an SSPC parsing module was developed. And the SQL logic control script is used for carrying out grammar analysis on each SQL logic control script and generating an SQL file corresponding to the development task. The module supports parsing control logic scripts and object property scripts. The parsing module supports interpretation of keywords such as include, for, if and SQL default keywords in the control logic script. And controlling code scanning in the logic script. Supporting basic replacement, superposition replacement and the like for scanned object attributes; and for object attribute script analysis, analysis of basic attributes, compound attributes and aggregate attributes is supported, and information in the compound attributes and the aggregate attributes can be finally analyzed into identifiable basic SQL grammar.
Example III
In the embodiment of the invention, a data analysis and mining task already exists, and a configuration module is provided to call an SSPC data analysis module, the data analysis task generates contracted standard format information and transmits the contracted standard format information to an SSPC data analysis module interface, and a contracted standard format file contains SQL logic script information and related parameter configuration file information.
The development method in the embodiment of the invention comprises the following steps:
step 101: based on the object system, the object attribute script is extracted, as shown in fig. 2, the object attribute script contains information such as basic attribute, composite attribute, aggregate attribute and the like, and the object attribute script file can refer to other attribute script files to achieve attribute encapsulation and inheritance. The logical script file may reference 0 to a plurality of property script files.
Step 102: according to the business logic, a logic control script is written, as shown in fig. 3, an object attribute script can be referenced in the logic control script, a logic script file can also reference other logic scripts in the middle of a logic processing process, and a whole data analysis logic is formed through a plurality of logic script files.
Step 103: the SSPC analysis module acquires the basic control logic script file, generates a unique KEY according to the rule, searches whether an analyzed target SQL file exists in the analysis module buffer according to the KEY value, and returns the target SQL file for data analysis tasks directly through the output module if the analyzed target SQL file exists. If the target SQL file is not found, the SQL control logic script is transferred to the SSPC analysis module grammar interpretation flow. And scanning the script line by line, encountering the include keyword, and carrying out recursion analysis on the script until the analysis of the outermost layer of script is completed.
Step 104: and the target SQL file output interface receives the target SQL file and outputs target SQL information to the data analysis task according to the agreed standard format for the data analysis task to use. That is, each SQL logical control script is parsed to generate an SQL file corresponding to the development task.
Wherein step 101 extracts an object property script description based on the object hierarchy: the attribute script file extracted based on the object system is an obj file, and step 101 includes the following steps:
step 1011: basic attributes are extracted. And extracting a basic object attribute script file based on the basic data information, wherein basic attributes are fields such as basic data information and some simple processing information.
Attribute 1{
Index 1, index 2.
}
Attribute 2{
Index weight 1, index weight 2.
}
Step 1012: and extracting composite attributes, and compositing the composite attributes based on the basic attributes in the basic object script. That is, after the basic attributes are associated based on the object system, a composite attribute script or a basic attribute merging operation, etc. are extracted.
Composite attribute 1{
a. Attribute 1+b Attribute 1
}
Composite attribute 2{
a. Attribute 2 unit all b, attribute 2
}
Step 1013: extracting the attribute of the set, namely extracting the basic attribute or the composite attribute in the basic object script and forming the attribute set operation. Including operators, logical operations, or other conditions. For example, include 'if', '>', '<', … …, etc.
Aggregate attribute 1{
IF (composite attribute 1> threshold 1
IF (composite attribute 2> threshold
In the embodiment of the invention, the attribute script based on the object system is a breakthrough in SQL design development, the attribute in the above object script appears and only appears once, the subsequent use is all based on the object script, and the characteristic can be utilized to realize the modification of one attribute and update of all SQL related to the attribute. The attribute script based on the object system has the following characteristics:
a attribute definition diversification: attributes are allowed to be created for any control logic script and may be defined not only as a single data column name, but also as a collection of multiple data columns, operators, and so forth.
b multiple control logic scripts use: the data information to be queried and the like are put into the attribute script, and any logic control script can be cited.
Wherein step 102 writes a control logic script description: based on the data analysis and mining business design, writing a control logic script file, wherein the control logic script file is an sql file, as shown in fig. 3, step 102 comprises the following steps:
step 1021: and generating a basic logic script file, and extracting the basic logic script file according to the basic service. This logical script file has only a single logical or simple service. The basic processing logic unit can operate independently and can be called by other control logic script files. One logical control file may be referenced by a plurality of other logical files.
Step 1022: and generating a composite logic script file, wherein the composite logic script file supports complex data analysis service, and can refer to an object attribute script file, can refer to other control logic files in the logic processing process, and can also have own logic fragments. The following is shown:
< include basic object a.obj >
< include composite object 1.Obj >
Logic segment 1
< include basic logic 1.Sql >
Logic segment 2
< include basic logic 2.Sql >
Logic segment 3
The composite logic script can be overlapped with the object attribute script, the logic control script obtains the result and the result is output by the combination of a plurality of attributes in the object attribute script, and the effect is that multiple attributes are overlapped. As shown below, query the quantity distribution situation of two attributes of first_delay, second_delay in each interval, wherein the basic attribute Column1 and the aggregate attribute Range1 reach the quantity distribution situation of statistical output basic attribute in each interval by overlapping references in the control logic script:
the logic control script superimposes the reference:
select
{operation:count;column:$a.Column1;range:$a.Range1[0];}as number1,
{operation:count;column:$a.Column1;range:$a.Range1[1];}as number2,
{operation:count;column:$a.Column1;range:$a.Range1[3];}as number3
from table
step 1023: and generating a multi-layer superposition logic script file, wherein the composite logic script file can be sequentially referenced by other logic files to form a multi-layer referenced logic relationship. Finally, the purpose of complex data analysis business logic is achieved.
Step 104, a flow of an sspc script parsing module, which parses each SQL logic control script to generate an SQL file corresponding to the development task, including:
for each SQL logical control script:
replacing a script referenced by a preset reference keyword in the SQL logic control script with information in the referenced script; the referenced scripts include a referenced object property script and a referenced SQL logical control script that is different from the SQL logical control script;
after the replacement is completed, the logic codes of the SQL logic control script are scanned line by line, grammar analysis is carried out, and an SQL file corresponding to the SQL logic control script is generated.
The replacing the script referenced by the preset reference keyword in the SQL logic control script with the information in the referenced script comprises the following steps:
scanning logic codes of the SQL logic control script line by line;
and recursively replacing the referenced script with information in the referenced script according to the preset reference key words in the SQL logic control script.
In detail, as shown in fig. 4, the method comprises the following steps:
step 401: and the SSPC analysis interface module receives the parameter information in the standard format and acquires the name of the control logic script file according to the standard format.
Step 402: and receiving the SQL control logic script file used by any task. The analysis module generates a unique KEY according to the control logic script file and rules, next searches whether a target SQL file which is already analyzed exists in the analysis module cache according to the KEY value, and if the target SQL file exists, the step 411 is directly skipped; if there is no target SQL file, go to step 403.
Step 403: the SSPC parse module parses the flow to read the logic script file and scan the logic script line by line, if the scan finds an include key, proceed to step 404, otherwise proceed to step 405.
Step 404: the object attribute file or logic script file information referenced by the include key is obtained, then the memory is read to see if it already exists, if so, step 410 is entered, and if not, step 409 is entered.
Step 405: and (3) a progressive scan control logic script, if a keyword for, if and the like needing code block processing is encountered, reading a code block contained in the keyword. If it is a normal code line, step 407 is entered.
Step 406: based on the identifier of the beginning and ending of the key, the entire code block is taken as an independent code segment, and the process proceeds to step 405 for further analysis line by line.
Step 407: after scanning the logic script line by line, the attribute information of the object script referenced by the logic script of the current line is met. Attribute information is recursively replaced. And replacing all the attribute information with the attribute content in the object attribute script.
Step 408: an object script file or control logic script file is scanned to the end of the file and all information is replaced. The file is cached in a memory for analysis and use by other logic scripts or for calling and outputting by an output module, so that the additional processing time of an analysis module is reduced
Step 409: and acquiring the included file according to the included keyword information, and reading the included file information. Returning to step 403. And carrying out recursion analysis on all the cited files. Until all include files are parsed and then placed in cache.
Step 410: the file pointed by the include key word can be obtained from the memory, and the information of the memory file is read to be directly replaced or referenced; the time consumption of the analysis module can be effectively reduced, and the efficiency is improved.
Step 411: after the scanning of the outermost logic script is completed, the whole SSPC analysis module interprets the flow and finishes processing. And transmitting the SQL information of the outmost logic script in the memory to an SSPC output module, and outputting the target SQL file to a data analysis task by the SSPC output module through a contracted standard format.
Thus, the multi-superposition SQL customization and analysis based on the object system are completed.
Example IV
An embodiment of the present invention provides a development device based on structured query language SQL, as shown in fig. 5, where the device includes a memory 50 and a processor 52, where the memory 50 stores a development computer program based on structured query language SQL, and the processor 52 executes the computer program to implement the steps of the method according to any one of the first to third embodiments.
In detail, the processor 52 executes the computer program to implement the steps of:
writing a plurality of SQL logic control scripts according to a preset development task;
forming data analysis logic corresponding to the development task through the SQL logic control scripts; wherein each SQL logical control script has one or more of the following logical structures: a logical fragment, a referencing object property script, and an SQL logical control script that references a different from the SQL logical control script.
Optionally, in an embodiment of the present invention, writing a plurality of SQL logic control scripts according to a preset development task includes:
extracting a plurality of object attribute scripts based on an object system;
and writing a plurality of SQL logic control scripts according to the business logic of the development task.
Optionally, in an embodiment of the present invention, the object attribute script includes one or more of the following attributes:
basic properties, composite properties, and collection properties.
Optionally, in an embodiment of the present invention, the extracting a plurality of object attribute scripts based on the object hierarchy includes:
generating a basic object attribute script corresponding to basic attributes based on the basic attributes of data;
generating a composite attribute script corresponding to the composite attribute based on the composite attribute formed by the composite or merging operation of the basic attribute;
and generating a set attribute script corresponding to the set attribute based on the set attribute formed by the set operation of the basic attribute, the set operation of the composite attribute or the set operation of the basic attribute and the composite attribute.
The basic attributes comprise field information and/or processing information conforming to preset processing rules.
Optionally, in an embodiment of the present invention, the SQL logic control script includes one or more of:
basic logic control script, composite logic control script and multilayer superposition logic control script.
Optionally, in an embodiment of the present invention, writing a plurality of SQL logic control scripts according to the business logic of the development task includes:
writing a logic segment according to the basic business logic;
generating a basic logic control script according to the logic fragments;
forming a logic structure with a logic fragment, a reference object attribute script and/or a reference basic logic control script according to the logic fragment, the object attribute script and the basic logic control script so as to generate a composite logic control script;
and forming a logic structure of the multi-layer reference relation according to the composite logic control script to generate a multi-layer superposition logic control script.
Wherein the basic business logic comprises single logic or logic conforming to a preset business rule.
Optionally, in an embodiment of the present invention, after the forming, by the plurality of SQL logic control scripts, data analysis logic corresponding to the development task includes:
and carrying out grammar analysis on each SQL logic control script to generate an SQL file corresponding to the development task.
Optionally, in an embodiment of the present invention, the parsing each SQL logic control script to generate an SQL file corresponding to the development task includes:
for each SQL logical control script:
replacing a script referenced by a preset reference keyword in the SQL logic control script with information in the referenced script; the referenced scripts include a referenced object property script and a referenced SQL logical control script that is different from the SQL logical control script;
after the replacement is completed, the logic codes of the SQL logic control script are scanned line by line, grammar analysis is carried out, and an SQL file corresponding to the SQL logic control script is generated.
Optionally, in an embodiment of the present invention, replacing a script referred to by a preset reference keyword in the SQL logic control script with information in the referred script includes:
scanning logic codes of the SQL logic control script line by line;
and recursively replacing the referenced script with information in the referenced script according to the preset reference key words in the SQL logic control script.
The embodiment of the invention can also refer to the first embodiment to the third embodiment, and has corresponding technical effects.
Example five
An embodiment of the present invention provides a computer-readable storage medium storing a development computer program based on structured query language SQL, which when executed by at least one processor, implements the steps of the method according to any one of embodiments one-three.
The embodiment of the invention can also refer to the first embodiment to the fourth embodiment, and has corresponding technical effects.
The computer readable storage medium in embodiments of the present invention may be RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. A storage medium may be coupled to the processor such that the processor can read information from, and write information to, the storage medium; or the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (9)

1. A method for developing Structured Query Language (SQL) based, the method comprising:
acquiring a plurality of SQL logic control scripts according to the business logic of a preset development task; wherein the SQL logical control script comprises one or more of the following: basic logic control script, composite logic control script and multilayer superposition logic control script;
forming data analysis logic corresponding to the development task through the SQL logic control scripts; wherein each SQL logical control script has one or more of the following logical structures: a logic fragment, a referencing object attribute script, and a SQL logical control script that references a different from the SQL logical control script;
carrying out grammar analysis on each SQL logic control script to generate an SQL file corresponding to the development task;
the method for obtaining the SQL logic control script according to the business logic of the preset development task comprises the following steps: extracting a plurality of object attribute scripts based on an object system; writing a logic segment according to the basic business logic; generating a basic logic control script according to the logic fragments; forming a logic structure with a logic fragment, a reference object attribute script and/or a reference basic logic control script according to the logic fragment, the object attribute script and the basic logic control script so as to generate a composite logic script; and forming a logic structure of the multi-layer reference relation according to the composite logic control script to generate a multi-layer superposition logic script.
2. The method of claim 1, wherein the object property script comprises one or more of the following properties:
basic properties, composite properties, and collection properties.
3. The method of claim 2, wherein the extracting a plurality of object property scripts based on the object hierarchy comprises:
generating a basic object attribute script corresponding to basic attributes based on the basic attributes of data;
generating a composite attribute script corresponding to the composite attribute based on the composite attribute formed by the composite or merging operation of the basic attribute;
and generating a set attribute script corresponding to the set attribute based on the set attribute formed by the set operation of the basic attribute, the set operation of the composite attribute or the set operation of the basic attribute and the composite attribute.
4. A method according to claim 3, wherein the basic attributes comprise field information and/or processing information conforming to preset processing rules.
5. The method of claim 1, wherein the basic business logic comprises a single logic or logic conforming to a preset business rule.
6. The method of claim 1, wherein parsing each SQL logic control script to generate an SQL file corresponding to the development task comprises:
for each SQL logical control script:
replacing a script referenced by a preset reference keyword in the SQL logic control script with information in the referenced script; the referenced scripts include a referenced object property script and a referenced SQL logical control script that is different from the SQL logical control script;
after the replacement is completed, the logic codes of the SQL logic control script are scanned line by line, grammar analysis is carried out, and an SQL file corresponding to the SQL logic control script is generated.
7. The method of claim 6, wherein replacing the script referenced by the preset reference key in the SQL logic control script with the information in the referenced script comprises:
scanning logic codes of the SQL logic control script line by line;
and recursively replacing the referenced script with information in the referenced script according to the preset reference key words in the SQL logic control script.
8. A structured query language SQL based development device, characterized in that the device comprises a memory storing a structured query language SQL based development computer program and a processor executing the computer program for carrying out the steps of the method according to any of claims 1-7.
9. A computer-readable storage medium, characterized in that the storage medium stores a development computer program based on the structured query language SQL, which computer program, when being executed by at least one processor, realizes the steps of the method according to any of claims 1-7.
CN201810011039.1A 2018-01-05 2018-01-05 Development method, device and storage medium based on structured query language SQL Active CN110109939B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810011039.1A CN110109939B (en) 2018-01-05 2018-01-05 Development method, device and storage medium based on structured query language SQL
PCT/CN2018/119907 WO2019134480A1 (en) 2018-01-05 2018-12-07 Development method and device based on structured query language (sql), and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810011039.1A CN110109939B (en) 2018-01-05 2018-01-05 Development method, device and storage medium based on structured query language SQL

Publications (2)

Publication Number Publication Date
CN110109939A CN110109939A (en) 2019-08-09
CN110109939B true CN110109939B (en) 2023-12-22

Family

ID=67144109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810011039.1A Active CN110109939B (en) 2018-01-05 2018-01-05 Development method, device and storage medium based on structured query language SQL

Country Status (2)

Country Link
CN (1) CN110109939B (en)
WO (1) WO2019134480A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455489A (en) * 2012-05-28 2013-12-18 阿里巴巴集团控股有限公司 Method and system for rapidly constructing key performance indicators (KPIs) of enterprises
CN104679903A (en) * 2015-03-20 2015-06-03 亚信科技(南京)有限公司 Method and device for operating data sheets
CN106126564A (en) * 2016-06-17 2016-11-16 浙江万朋教育科技股份有限公司 A kind of method rendered based on dynamic template language

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7308492B2 (en) * 2002-10-02 2007-12-11 Sony Corporation Method and apparatus for use in remote diagnostics
CN100437587C (en) * 2006-12-31 2008-11-26 华为技术有限公司 Service processing method and device based on data base
US8595231B2 (en) * 2007-04-26 2013-11-26 International Business Machines Corporation Ruleset generation for multiple entities with multiple data values per attribute
CN104123227A (en) * 2014-08-13 2014-10-29 广东电网公司信息中心 Method for automatically generating testing cases
CN106293664A (en) * 2015-05-27 2017-01-04 交通银行股份有限公司 Code generating method and device
CN106547877B (en) * 2016-10-26 2019-08-09 红有软件股份有限公司 Data element Smart Logo analytic method based on 6W service logic model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455489A (en) * 2012-05-28 2013-12-18 阿里巴巴集团控股有限公司 Method and system for rapidly constructing key performance indicators (KPIs) of enterprises
CN104679903A (en) * 2015-03-20 2015-06-03 亚信科技(南京)有限公司 Method and device for operating data sheets
CN106126564A (en) * 2016-06-17 2016-11-16 浙江万朋教育科技股份有限公司 A kind of method rendered based on dynamic template language

Also Published As

Publication number Publication date
CN110109939A (en) 2019-08-09
WO2019134480A1 (en) 2019-07-11

Similar Documents

Publication Publication Date Title
KR102237702B1 (en) Entity relationship data generating method, apparatus, equipment and storage medium
US10942943B2 (en) Dynamic field data translation to support high performance stream data processing
CA2562281C (en) Partial query caching
CN111813796B (en) Data column level blood margin processing system and method based on Hive data warehouse
KR102464248B1 (en) Method, apparatus, electronic device, and storage medium for extracting spo triples
CN103412924B (en) log multi-language query method and system
US8661022B2 (en) Database management method and system
JP6203374B2 (en) Web page style address integration
CN111008020B (en) Method for analyzing logic expression into general query statement
US20100030726A1 (en) Mechanism For Deferred Rewrite Of Multiple Xpath Evaluations Over Binary XML
CN104331438A (en) Method and device for selectively extracting content of novel webpage
CN102426612A (en) Condition object query method and system
KR102172138B1 (en) Distributed Computing Framework and Distributed Computing Method
CN114490723A (en) Unified retrieval method, device, electronic equipment and storage medium
CN116578585B (en) Data query method, device, electronic equipment and storage medium
CN104778232A (en) Searching result optimizing method and device based on long query
CN110109939B (en) Development method, device and storage medium based on structured query language SQL
CN112069305A (en) Data screening method and device and electronic equipment
CN112948419A (en) Query statement processing method and device
KR101225333B1 (en) System and method using tree pattern expression for extraction information from syntactically parsed text corpora
CN114003714B (en) Intelligent knowledge pushing method for document context sensing
WO2013010557A1 (en) Method and system for data mining a document.
CN116910085A (en) Data query method, device, equipment and storage medium
CN111159218A (en) Data processing method and device and readable storage medium
CN116662363A (en) Json general query method, json general query system, terminal equipment and storage medium

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