CN115421701A - Method and system for generating cypher statement based on model - Google Patents

Method and system for generating cypher statement based on model Download PDF

Info

Publication number
CN115421701A
CN115421701A CN202211384171.XA CN202211384171A CN115421701A CN 115421701 A CN115421701 A CN 115421701A CN 202211384171 A CN202211384171 A CN 202211384171A CN 115421701 A CN115421701 A CN 115421701A
Authority
CN
China
Prior art keywords
model
relation
syntax tree
abstract syntax
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211384171.XA
Other languages
Chinese (zh)
Other versions
CN115421701B (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.)
Beijing Deepexi Technology Co Ltd
Original Assignee
Beijing Deepexi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Deepexi Technology Co Ltd filed Critical Beijing Deepexi Technology Co Ltd
Priority to CN202211384171.XA priority Critical patent/CN115421701B/en
Publication of CN115421701A publication Critical patent/CN115421701A/en
Application granted granted Critical
Publication of CN115421701B publication Critical patent/CN115421701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention provides a method and a system for generating cypher sentences based on models. The method comprises the following steps: constructing a complete model relation structure by combining the main body model with the model instance; analyzing and extracting a logic relation corresponding to the model relation structure by using a syntax tree analyzer on a keyword object contained in the model relation structure; analyzing the keyword object and the logical relation by using the syntax tree analyzer, and generating an abstract syntax tree; and generating the cypher statement by utilizing the abstract syntax tree. The system comprises a model relation building module, a logic relation obtaining module, an abstract syntax tree generating module and a statement generating module which correspond to the steps of the method.

Description

Method and system for generating cypher statement based on model
Technical Field
The invention provides a method and a system for generating cypher sentences based on models, and belongs to the technical field of electronic information.
Background
In the process of developing the graph data, a series of cypher sentences are written aiming at the business logic, wherein the flows of creating relations, modifying node modification relations, inquiring relations and the like are involved, a large number of cypher execution sentences need to be repeatedly written manually when a plurality of business scenes exist, the writing mode of the code sentences is not attractive enough, the code readability is poor, and errors are easy to occur.
Disclosure of Invention
The invention provides a method and a system for generating cypher sentences based on a model, which are used for solving the problem that the mode of generating cypher sentences by natural language is not suitable for code compiling of specific service scenes because the cypher sentences generated by the mode of generating the natural language by users only support query types and do not support generation of creation, modification and deletion of type sentences, and the adopted technical scheme is as follows:
a method of generating cypher statements based on a model, the method comprising:
constructing a complete model relation structure by combining the main body model with the model instance;
analyzing and extracting a logic relation corresponding to the model relation structure by using a syntax tree analyzer for the keyword objects contained in the model relation structure;
analyzing the keyword object and the logical relation by using the syntax tree analyzer, and generating an abstract syntax tree;
and generating the cypher statement by utilizing the abstract syntax tree.
Further, a complete model relation structure is constructed by combining the subject model and the model instance, and the method comprises the following steps:
constructing a model instance according to an application scene, wherein an execution statement generation mode of a cypher execution statement required by CRUD is arranged in the model instance;
assembling a keyword object for the model instance;
and constructing the model relation structure by using the model instance and the corresponding keyword object.
Further, parsing the key object and logical relationship using the syntax tree parser and generating an abstract syntax tree, comprising:
step 1, recursively traversing the model relation structure;
step 2, extracting key word objects contained in the model relation structure, and constructing connection information of the abstract syntax tree by using the key word objects;
step 3, extracting the connection information of the abstract syntax tree;
step 4, constructing and abstracting syntax structure by using the connection information of the abstracting syntax tree; wherein each piece of connection information corresponds to an abstract syntax structure;
step 5, judging whether all traversals of the model relation structure are completed in real time; if the model relation structure is not completely traversed, repeatedly executing the contents of the step 1 to the step 4 until the model relation structure is completely traversed; if the model relation structure is completely traversed, executing the content of the step 6;
and step 6, aggregating all abstract syntax structures constructed by the connection information, and outputting an abstract syntax tree corresponding to the model relation structure.
Further, the extracting of the keyword object included in the model relationship structure and the constructing of the connection information of the abstract syntax tree by using the keyword object in step 2 includes:
extracting keyword objects contained in the model relation structure;
constructing left model relation information of the abstract syntax tree by using the keyword object;
and constructing the right model relation information of the abstract syntax tree by utilizing the keyword object.
Further, the extracting of the connection information of the abstract syntax tree in step 3 includes:
extracting left model relation information in the connection information to obtain left model relation information;
and extracting the right model relation information in the connection information to obtain the right model relation information.
A system for generating cypher statements based on a model, the system comprising:
the model relation construction module is used for constructing a complete model relation structure by combining the main body model with the model instance;
the logic relation acquisition module is used for analyzing and extracting the logic relation corresponding to the model relation structure by utilizing a syntax tree analyzer on the keyword object contained in the model relation structure;
the abstract syntax tree generating module is used for analyzing the keyword objects and the logical relations by using the syntax tree analyzer and generating an abstract syntax tree;
and the statement generating module is used for generating the cypher statement by utilizing the abstract syntax tree.
Further, the model relationship building module comprises:
the model instance building module is used for building a model instance according to an application scene, wherein an execution statement generating mode of a cypher execution statement required by CRUD is arranged in the model instance;
a keyword assembling module for assembling a keyword object for the model instance;
and the construction module is used for constructing the model relation structure by utilizing the model instance and the corresponding keyword object.
Further, the abstract syntax tree generating module includes:
a recursive traversal module for recursively traversing the model relationship structure;
a keyword extraction module, configured to extract a keyword object included in the model relationship structure, and construct connection information of the abstract syntax tree using the keyword object;
the connection relation extraction module is used for extracting connection information of the abstract syntax tree;
the grammar structure construction module is used for constructing and abstracting grammar structures by utilizing the connection information of the abstract grammar tree; wherein each connection information corresponds to an abstract syntax structure;
the real-time judgment module is used for judging whether the complete traversal of the model relation structure is finished in real time; if the model relation structure is not completely traversed, circularly and repeatedly starting the recursive traversal module, the keyword extraction module, the connection relation extraction module and the grammar structure to sequentially run until the model relation structure is completely traversed; if the model relation structure is completely traversed, starting an aggregation module to operate;
and the aggregation module is used for aggregating all the abstract syntax structures constructed by the connection information and outputting the abstract syntax tree corresponding to the model relation structure.
Further, the keyword extraction module comprises:
the extraction module is used for extracting the keyword objects contained in the model relation structure;
the left model relation information construction module is used for constructing left model relation information of the abstract syntax tree by utilizing the keyword object;
and the right model relation information construction module is used for constructing the right model relation information of the abstract syntax tree by utilizing the keyword object.
Further, the connection relation extraction module includes:
the left side information relation extraction module is used for extracting left side model relation information in the connection information to obtain left side model relation information;
and the right information relation extraction module is used for extracting the right model relation information in the connection information to obtain the right model relation information.
The invention has the beneficial effects that:
aiming at cypher statement generator logic, the method and the system for generating cypher statements based on the model adopt the combination of an abstract syntax tree parser and an abstract syntax tree cypher statement generator and execute logic to generate final executable cypher statements; the method and the system for generating cypher sentences based on the model can unify the code style, improve the code readability and the overall code compiling efficiency by automatically generating the executable cypher sentences, greatly reduce the error probability, and improve the code compiling quality and the code running success rate. Meanwhile, the method and the system only need to pay attention to the application service scene, a main body model is selected according to the application service scene, a model is combined with a model instance to construct a complete model relation structure corresponding to the application scene, cypher sentences are automatically generated after the CRUD sentences are configured by the model, the development efficiency is greatly improved, reusability of generating execution sentences based on the model is higher, the development difficulty is reduced, the first-pass code compiling of the cypher sentences can be realized without knowing specific rules of the cypher sentences, and the executability and convenience of the development and compiling of the cypher sentences are improved.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a first schematic diagram of the method of the present invention;
FIG. 3 is a second schematic diagram of the method of the present invention;
FIG. 4 is a system schematic block diagram of the system of the present invention;
fig. 5 is a corresponding integrated block diagram of the system of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it should be understood that they are presented herein only to illustrate and explain the present invention and not to limit the present invention.
Example 1
The embodiment of the invention provides a method for generating cypher sentences based on models, which comprises the following steps of:
s1, constructing a complete model relation structure by combining a main body model and a model instance;
s2, analyzing and extracting a logic relation corresponding to the model relation structure by using a syntax tree analyzer through a keyword object contained in the model relation structure;
s3, analyzing the keyword object and the logic relation by using the syntax tree analyzer, and generating an abstract syntax tree;
and S4, generating cypher sentences by using the abstract syntax tree.
Specifically, the constructing of the complete model relationship structure by using the subject model and the model instance in S1 includes:
s101, constructing a model instance according to an application scene, wherein an execution statement generation mode of a cypher execution statement required for generating CRUD is arranged in the model instance;
s102, assembling a keyword object aiming at the model instance;
s103, the model relation structure is built by utilizing the model instance and the corresponding keyword object.
As shown in fig. 3, S3: analyzing the keyword object and the logic relation by using the syntax tree analyzer and generating an abstract syntax tree, wherein the abstract syntax tree comprises the following steps:
step 1, recursively traversing the model relation structure;
step 2, extracting key word objects contained in the model relation structure, and constructing connection information of the abstract syntax tree by using the key word objects; the specific implementation process of the step 2 is as follows:
step 201, extracting a keyword object contained in the model relation structure;
step 202, constructing left model relation information of the abstract syntax tree by using the keyword object;
and 203, constructing the right model relation information of the abstract syntax tree by using the keyword object.
Step 3, extracting the connection information of the abstract syntax tree; the specific implementation process of step 3 is as follows:
step 301, extracting left model relation information in the connection information to obtain left model relation information;
step 302, extracting the right model relation information in the connection information to obtain the right model relation information.
Step 4, constructing and abstracting a syntax structure by using the connection information of the abstracting syntax tree; wherein each connection information corresponds to an abstract syntax structure;
step 5, judging whether all traversals of the model relation structure are finished in real time; if the model relation structure is not completely traversed, repeatedly executing the contents of the step 1 to the step 4 until the model relation structure is completely traversed; if the model relation structure is completely traversed, executing the content of the step 6; and when the detection result exceeding the traversal monitoring duration is that the model relation structure is not completely traversed, executing abnormal alarm, wherein the traversal monitoring duration is obtained through the following formula:
Figure 563665DEST_PATH_IMAGE001
wherein the content of the first and second substances,Trepresenting the traversal monitoring time;T 0 represents a preset standard value of the monitoring time length,T 0 the actual structural complexity of the model relationship structure may be set, for example,T 0 can be set to be but is not limited to 1h, 3h or 24h;nthe number of completed traversals;T n representing the time length consumed by the last time of all traversals corresponding to the current traversal process;T n and the time length consumed by the last two adjacent complete traversals corresponding to the current traversal process is represented. The traversal duration obtained by the formula can be adjusted in real time according to the construction condition of the actual model and the all traversal conditions of the actual model while effectively improving the matching between the traversal monitoring duration setting and the structural relationship of the actual model and the all actual traversal conditions of the actual model, so that the self-adaptive adjustability of the traversal monitoring duration setting is effectively improved, and the problem that the execution of the method is abnormal and cannot be monitored in time due to the uniform and unchangeable monitoring duration is prevented. Meanwhile, the timeliness of abnormity discovery can be effectively improved through the self-adaptively adjusted traversing monitoring time setting mode.
And step 6, aggregating all abstract syntax structures constructed by the connection information, and outputting an abstract syntax tree corresponding to the model relation structure.
In the method for generating cypher statements based on the model provided by the embodiment, the logic of the cypher statement generator is combined with the execution logic by adopting the abstract syntax tree parser and the abstract syntax tree cypher statement generator to generate the final executable cypher statement; in the execution process, the cypher statement parser is written by JAVA codes, a model instance corresponding to a main body is added, and a complete model relation structure is constructed by establishing the model instance and assembling a keyword object; finally, by calling the built-in method of the model, for example: a cypher execution statement required to generate the corresponding CRUD is obtained by calling getSelectCypher ().
Meanwhile, the method for generating cypher sentences based on the model provided by the embodiment can unify the code style, improve the code readability and the overall code compiling efficiency by automatically generating the executable cypher sentences, greatly reduce the error probability, and improve the code compiling quality and the code running success rate. Meanwhile, the method provided by the embodiment only needs to pay attention to the application service scene, a main body model is selected according to the application service scene and combined with a model instance to construct a complete model relation structure corresponding to the application scene, cypher sentences are automatically generated after the CRUD sentences are configured by the model, the development efficiency is greatly improved, the reusability of the execution sentences generated by using a model-based mode is higher, the development difficulty is reduced, the first-pass code compiling of the cypher sentences can be realized without knowing the specific rules of the cypher sentences, and the executability and the convenience of the development and the compiling of the cypher sentences are improved.
Example 2
The embodiment of the invention provides a system for generating cypher sentences based on models, and as shown in figure 4, the system comprises:
the model relation construction module is used for constructing a complete model relation structure by combining the main body model with the model instance;
the logic relation acquisition module is used for analyzing and extracting the logic relation corresponding to the model relation structure by utilizing a syntax tree analyzer on the keyword object contained in the model relation structure;
the abstract syntax tree generating module is used for analyzing the keyword objects and the logical relations by using the syntax tree analyzer and generating an abstract syntax tree;
and the statement generating module is used for generating the cypher statement by utilizing the abstract syntax tree.
Wherein, the operation process of the system comprises the following steps:
step 1, constructing a complete model relation structure by combining a main body model and a model instance through a model relation construction module;
step 2, analyzing and extracting a logic relation corresponding to the model relation structure by a syntax tree analyzer through a logic relation acquisition module by using a keyword object contained in the model relation structure;
step 3, analyzing the keyword object and the logical relation by using the syntax tree analyzer through an abstract syntax tree generating module, and generating an abstract syntax tree;
and 4, generating a cypher statement by using the abstract syntax tree through a statement generating module.
Wherein the model relationship building module comprises:
the model instance building module is used for building a model instance according to an application scene, wherein an execution statement generating mode of a cypher execution statement required by CRUD is arranged in the model instance;
a keyword assembling module for assembling a keyword object for the model instance;
and the construction module is used for constructing the model relation structure by utilizing the model instance and the corresponding keyword object.
Specifically, the operation process of the model relationship building module includes:
step 101, constructing a model instance according to an application scene through a model instance construction module, wherein an execution statement generation mode of a cypher execution statement required by CRUD is arranged in the model instance;
102, assembling a keyword object aiming at the model instance by using a keyword assembling module;
and 103, constructing the model relation structure by utilizing the model instance and the corresponding keyword object through a construction module.
Wherein the abstract syntax tree generating module comprises:
a recursive traversal module for recursively traversing the model relationship structure;
a keyword extraction module, configured to extract a keyword object included in the model relationship structure, and construct connection information of the abstract syntax tree using the keyword object; specifically, the keyword extraction module includes: the extraction module is used for extracting the keyword objects contained in the model relation structure; the left model relation information construction module is used for constructing left model relation information of the abstract syntax tree by utilizing the keyword object; and the right model relation information construction module is used for constructing the right model relation information of the abstract syntax tree by utilizing the keyword object.
The connection relation extraction module is used for extracting connection information of the abstract syntax tree; specifically, the connection relationship extraction module includes: the left information relation extraction module is used for extracting left model relation information in the connection information to obtain left model relation information; and the right information relation extraction module is used for extracting the right model relation information in the connection information to obtain the right model relation information.
The grammar structure construction module is used for constructing and abstracting grammar structures by utilizing the connection information of the abstract grammar tree; wherein each connection information corresponds to an abstract syntax structure;
the real-time judgment module is used for judging whether the complete traversal of the model relation structure is finished in real time; if the model relation structure is not completely traversed, circularly and repeatedly starting the recursive traversal module, the keyword extraction module, the connection relation extraction module and the grammar structure to sequentially run until the model relation structure is completely traversed; if the model relation structure is completely traversed, starting an aggregation module to operate;
and the aggregation module is used for aggregating all the abstract syntax structures constructed by the connection information and outputting the abstract syntax tree corresponding to the model relation structure.
Specifically, the operation process of the abstract syntax tree generating module includes:
step 301, utilizing a recursive traversal module to recursively traverse the model relation structure;
step 302, extracting a keyword object contained in the model relation structure through a keyword extraction module, and constructing connection information of the abstract syntax tree by using the keyword object;
step 303, extracting the connection information of the abstract syntax tree by using a connection relation extraction module;
step 304, constructing and abstracting a syntax structure by using the connection information of the abstract syntax tree through a syntax structure constructing module; wherein each piece of connection information corresponds to an abstract syntax structure;
305, utilizing a real-time judging module to judge whether all traversals of the model relation structure are completed in real time; if the model relation structure is not completely traversed, the corresponding contents from the step 301 to the step 304 are executed repeatedly in a circulating way until the model relation structure is completely traversed; if the model relation structure is completely traversed, executing the content of the step 306;
and step 306, starting an aggregation module, aggregating all the abstract syntax structures constructed by the connection information by adopting the aggregation module, and outputting the abstract syntax tree corresponding to the model relation structure.
As shown in fig. 5, the corresponding integration modules of the system of this embodiment, that is, the syntax generation executor includes a syntax tree parser, a Cypher statement generator, and a validity check module, and the Cypher statement generator integrates a model relationship construction module, a logical relationship acquisition module, an abstract syntax tree generation module, and a statement generation module. And the legality checking module is used for checking whether the finally generated executable cypher statement has legality.
In the method for generating cypher statements based on the model provided by the embodiment, the logic of a cypher statement generator is realized by combining an abstract syntax tree parser and the abstract syntax tree cypher statement generator with execution logic to generate final executable cypher statements; in the execution process, the cypher statement parser is written by JAVA codes, a model instance corresponding to a main body is added, and a complete model relation structure is constructed by establishing the model instance and assembling a keyword object; finally, by calling the built-in method of the model, for example: a cypher execution statement required to generate the corresponding CRUD is obtained by calling getSelectCypher ().
Meanwhile, the method for generating cypher sentences based on the model provided by the embodiment can unify the code style, improve the code readability and the overall code compiling efficiency by automatically generating the executable cypher sentences, greatly reduce the error probability, and improve the code compiling quality and the code running success rate. Meanwhile, the method provided by the embodiment only needs to pay attention to an application service scene, a main body model is selected according to the application service scene and is combined with a model instance to construct a complete model relation structure corresponding to the application scene, cypher sentences are automatically generated after the CRUD sentences are configured by the model, development efficiency is greatly improved, reusability of the execution sentences generated by using a model-based mode is higher, development difficulty is reduced, code compiling of the cypher sentences can be realized without knowing specific rules of the cypher sentences, and performability and convenience of cypher sentence developing and compiling are improved.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for generating a cypher statement based on a model, the method comprising:
constructing a complete model relation structure by combining the main body model with the model instance;
analyzing and extracting a logic relation corresponding to the model relation structure by using a syntax tree analyzer for the keyword objects contained in the model relation structure;
analyzing the keyword object and the logical relation by using the syntax tree analyzer, and generating an abstract syntax tree;
and generating the cypher statement by utilizing the abstract syntax tree.
2. The method of claim 1, wherein constructing a complete model relationship structure using the subject model in combination with the model instance comprises:
constructing a model instance according to the application scene, wherein an execution statement generation mode of a cypher execution statement required by CRUD is arranged in the model instance;
assembling a keyword object for the model instance;
and constructing the model relation structure by utilizing the model instance and the corresponding keyword object.
3. The method of claim 1, wherein parsing the key objects and logical relationships using the syntax tree parser and generating an abstract syntax tree comprises:
step 1, recursively traversing the model relation structure;
step 2, extracting key word objects contained in the model relation structure, and constructing connection information of the abstract syntax tree by using the key word objects;
step 3, extracting the connection information of the abstract syntax tree;
step 4, constructing and abstracting a syntax structure by using the connection information of the abstracting syntax tree; wherein each connection information corresponds to an abstract syntax structure;
step 5, judging whether all traversals of the model relation structure are finished in real time; if the model relation structure is not completely traversed, repeatedly executing the contents of the step 1 to the step 4 until the model relation structure is completely traversed; if the model relation structure is completely traversed, executing the content of the step 6;
and step 6, aggregating all abstract syntax structures constructed by the connection information, and outputting an abstract syntax tree corresponding to the model relation structure.
4. The method according to claim 3, wherein said extracting the key object included in the model relationship structure and using the key object to construct the connection information of the abstract syntax tree in step 2 comprises:
extracting keyword objects contained in the model relation structure;
constructing left model relation information of the abstract syntax tree by using the keyword object;
and constructing the right model relation information of the abstract syntax tree by using the keyword object.
5. The method according to claim 3, wherein the extracting of the connection information of the abstract syntax tree in step 3 comprises:
extracting left model relation information in the connection information to obtain left model relation information;
and extracting the right model relation information in the connection information to obtain the right model relation information.
6. A system for generating cypher statements based on a model, the system comprising:
the model relation construction module is used for constructing a complete model relation structure by combining the main body model with the model instance;
the logic relation acquisition module is used for analyzing and extracting the logic relation corresponding to the model relation structure by utilizing a syntax tree analyzer on the keyword object contained in the model relation structure;
the abstract syntax tree generating module is used for analyzing the keyword objects and the logical relations by using the syntax tree analyzer and generating an abstract syntax tree;
and the statement generating module is used for generating the cypher statement by utilizing the abstract syntax tree.
7. The system of claim 6, wherein the model relationship building module comprises:
the model instance building module is used for building a model instance according to an application scene, wherein an execution statement generating mode of a cypher execution statement required by CRUD is arranged in the model instance;
a keyword assembling module for assembling a keyword object for the model instance;
and the construction module is used for constructing the model relation structure by utilizing the model instance and the corresponding keyword object.
8. The system according to claim 6, wherein said abstract syntax tree generating module comprises:
a recursive traversal module for recursively traversing the model relationship structure;
a keyword extraction module, configured to extract a keyword object included in the model relationship structure, and construct connection information of the abstract syntax tree using the keyword object;
the connection relation extraction module is used for extracting connection information of the abstract syntax tree;
the grammar structure construction module is used for constructing and abstracting grammar structures by utilizing the connection information of the abstract grammar tree; wherein each piece of connection information corresponds to an abstract syntax structure;
the real-time judgment module is used for judging whether the complete traversal of the model relation structure is finished in real time; if the model relation structure is not completely traversed, circularly and repeatedly starting the recursive traversal module, the keyword extraction module, the connection relation extraction module and the grammar structure to sequentially run until the model relation structure is completely traversed; if the model relation structure is completely traversed, starting an aggregation module to operate;
and the aggregation module is used for aggregating all the abstract syntax structures constructed by the connection information and outputting the abstract syntax tree corresponding to the model relation structure.
9. The system of claim 8, wherein the keyword extraction module comprises:
the extraction module is used for extracting the keyword objects contained in the model relation structure;
the left model relation information construction module is used for constructing left model relation information of the abstract syntax tree by utilizing the keyword object;
and the right model relation information construction module is used for constructing the right model relation information of the abstract syntax tree by utilizing the keyword object.
10. The system according to claim 8, wherein the connection relation extracting module comprises:
the left side information relation extraction module is used for extracting left side model relation information in the connection information to obtain left side model relation information;
and the right information relation extraction module is used for extracting the right model relation information in the connection information to obtain the right model relation information.
CN202211384171.XA 2022-11-07 2022-11-07 Method and system for generating cypher statement based on model Active CN115421701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211384171.XA CN115421701B (en) 2022-11-07 2022-11-07 Method and system for generating cypher statement based on model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211384171.XA CN115421701B (en) 2022-11-07 2022-11-07 Method and system for generating cypher statement based on model

Publications (2)

Publication Number Publication Date
CN115421701A true CN115421701A (en) 2022-12-02
CN115421701B CN115421701B (en) 2023-01-10

Family

ID=84207876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211384171.XA Active CN115421701B (en) 2022-11-07 2022-11-07 Method and system for generating cypher statement based on model

Country Status (1)

Country Link
CN (1) CN115421701B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034361A (en) * 2007-01-18 2007-09-12 浙江大学 Method for generating compiler optimized code based on instruction cost
US20190227774A1 (en) * 2018-01-21 2019-07-25 Microsoft Technology Licensing, Llc. Code completion with machine learning
CN111723104A (en) * 2019-03-22 2020-09-29 阿里巴巴集团控股有限公司 Method, device and system for syntax analysis in data processing system
CN111813926A (en) * 2019-11-13 2020-10-23 中国传媒大学 Operation method and system for database Neo4J interactive visualization
CN114817298A (en) * 2022-05-12 2022-07-29 平安科技(深圳)有限公司 Method, device and equipment for extracting field-level data blood margin and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034361A (en) * 2007-01-18 2007-09-12 浙江大学 Method for generating compiler optimized code based on instruction cost
US20190227774A1 (en) * 2018-01-21 2019-07-25 Microsoft Technology Licensing, Llc. Code completion with machine learning
CN111723104A (en) * 2019-03-22 2020-09-29 阿里巴巴集团控股有限公司 Method, device and system for syntax analysis in data processing system
CN111813926A (en) * 2019-11-13 2020-10-23 中国传媒大学 Operation method and system for database Neo4J interactive visualization
CN114817298A (en) * 2022-05-12 2022-07-29 平安科技(深圳)有限公司 Method, device and equipment for extracting field-level data blood margin and storage medium

Also Published As

Publication number Publication date
CN115421701B (en) 2023-01-10

Similar Documents

Publication Publication Date Title
US9710243B2 (en) Parser that uses a reflection technique to build a program semantic tree
CN110502227B (en) Code complement method and device, storage medium and electronic equipment
CN109739494B (en) Tree-LSTM-based API (application program interface) use code generation type recommendation method
CN114077534B (en) Test case generation method, device and computer readable storage medium
CN107330014B (en) Data table creating method and device
CN108256870A (en) Description information and update, data processing method and device are generated based on topological structure
CN116483850A (en) Data processing method, device, equipment and medium
CN112395339B (en) Intersystem data admission verification method, device, computer equipment and storage medium
CN115421701B (en) Method and system for generating cypher statement based on model
US8607201B2 (en) Augmenting visualization of a call stack
CN115904480A (en) Code reconstruction method and device, electronic equipment and storage medium
CN115438341A (en) Method and device for extracting code loop counter, storage medium and electronic equipment
CN115935943A (en) Analysis framework supporting natural language structure calculation
CN112130849B (en) Code automatic generation method and device
CN114816356A (en) System and method for generating HTTP request code based on interface document
CN114510497A (en) Variable processing method, device and equipment and readable storage medium
CN112579065A (en) Method and system for generating cross-platform code for graphic configuration picture
Moser et al. Towards attribute grammar mining by symbolic execution
CN114385388B (en) Algorithm processing method and device, electronic equipment and storage medium
CN112799638B (en) Non-invasive rapid development method, platform, terminal and storage medium
CN117171189A (en) Data processing method, device and equipment
CN115408698A (en) Rust vulnerability detection method based on rust-IR2Graph and RGNN
CN106855842A (en) A kind of Program Static Analysis method based on regular expression
Pan et al. A Parsing-Based Approach for Constructing Executable EFSM
CN117591095A (en) Code generation method based on expression AST analysis and configurable template

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