CN114297443B - Processing method, device, equipment and storage medium of graph data query statement - Google Patents

Processing method, device, equipment and storage medium of graph data query statement Download PDF

Info

Publication number
CN114297443B
CN114297443B CN202111641712.8A CN202111641712A CN114297443B CN 114297443 B CN114297443 B CN 114297443B CN 202111641712 A CN202111641712 A CN 202111641712A CN 114297443 B CN114297443 B CN 114297443B
Authority
CN
China
Prior art keywords
query statement
target query
semantic
graph
generation result
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
CN202111641712.8A
Other languages
Chinese (zh)
Other versions
CN114297443A (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.)
Winning Health Technology Group Co Ltd
Original Assignee
Winning Health Technology Group 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 Winning Health Technology Group Co Ltd filed Critical Winning Health Technology Group Co Ltd
Priority to CN202111641712.8A priority Critical patent/CN114297443B/en
Publication of CN114297443A publication Critical patent/CN114297443A/en
Application granted granted Critical
Publication of CN114297443B publication Critical patent/CN114297443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a processing method, a device, equipment and a storage medium of a graph data query statement, and relates to the technical field of medical treatment. The method comprises the following steps: responding to configuration operation of a query statement generation and analysis interface to obtain a configured first generation result, and displaying the first generation result in a first display mode interface corresponding to the query statement; generating a second generation result corresponding to the first generation result based on a mapping relation between a grammar structure of a pre-defined graph data search language and a tree structure of a semantic guide graph; and displaying the second generated result to a second display mode interface corresponding to the query statement. According to the scheme, a user unfamiliar with the graph data search language can analyze the semantic guide graph of the configured query statement based on the provided visual interface to generate the script code of the query statement or analyze the script code of the pre-written query statement to construct the semantic guide graph of the query statement, so that the response speed to the change of the service requirement is improved.

Description

Processing method, device, equipment and storage medium of graph data query statement
Technical Field
The present application relates to the field of medical technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a graph data query statement.
Background
In the medical technical field, the large-scale electronic medical record text needs to be searched and applied in different dimensions. Firstly, carrying out post-structuring processing and storage on the electronic medical record text as graph data through a natural language algorithm; then, the query is carried out through a query sentence of Graph Search language (GS for short), and a query result is obtained for application. Wherein, the query statement can be preset. When the query statement is set, the name, input and output requirements of the query statement can be determined by defining the name, output content and search conditions of the query statement. The output content and the search condition of the query sentence are based on the grammar and semantic structure requirements of the graph data search language, and a query sentence code written by a user is also called a query script.
Currently, in actual business, a large number of query scripts based on GS language need to be written to realize definition of different query sentences. The GS language is a domain-specific language (Domain Specific Language, simply called DSL), and can retrieve graph data and return results, and can flexibly write complex query conditions, define output conditions and normalize output results. The traditional method requires a developer of professional GS language to manually write the GS script according to the service requirement and store the written GS script so as to be applied during inquiry.
However, if the service requirement changes, the developer needs to spend more time to analyze and adjust the GS script of the original query statement again, so that the change of the service requirement cannot be responded quickly.
Disclosure of Invention
The application aims to provide a processing method, a device, equipment and a medium for a graph data query statement, aiming at the defects in the prior art, so that the response speed to the change of the service requirement can be improved when the service requirement is changed.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides a method for processing a query statement of graph data, including:
responding to configuration operation of a target query statement in a query statement generation and analysis interface, obtaining a configured first generation result, and displaying the first generation result in a first display mode interface corresponding to the target query statement; the first generation result is a semantic guide graph of the target query statement or script code of the target query statement;
generating a second generation result corresponding to the first generation result based on a mapping relation between a grammar structure of a pre-defined graph data search language and a tree structure of a semantic guide graph, wherein the second generation result is the semantic guide graph of the target query statement if the first generation result is the script code of the target query statement, and the second generation result is the script code of the target query statement if the first generation result is the semantic guide graph of the target query statement;
And displaying the second generated result to a second display mode interface corresponding to the target query statement.
Optionally, the responding to the configuration operation of the query statement generation and analysis interface on the target query statement, to obtain the configured first generation result includes:
determining attribute information of a semantic guide graph of the target query statement according to the identification of the target query statement; wherein the attribute information includes: a start node, an end node and an output result;
responding to the configuration operation executed based on the attribute information of the semantic guide map of the target query statement, obtaining the semantic guide map of the target query statement, and taking the semantic guide map of the target query statement as the first generation result.
Optionally, the obtaining the semantic map of the target query statement in response to the configuration operation performed based on the attribute information of the semantic map of the target query statement includes:
displaying the identification of the target query statement;
responding to the configuration operation aiming at the target query statement, and generating the semantic guide graph of the target query statement layer by layer based on the attribute information of the semantic guide graph of the target query statement.
Optionally, the generating the second generation result corresponding to the first generation result based on the mapping relationship between the syntax structure of the predefined graph data search language and the tree structure of the semantic graph includes:
traversing and analyzing the semantic guide graph of the target query statement by using a script engine component to obtain attribute information of the semantic guide graph of the target query statement;
generating script codes of the target query sentences according to attribute information of the semantic guide graphs of the target query sentences and mapping relations between the grammar structures of the graph data search language and the tree structures of the semantic guide graphs, and taking the script codes of the target query sentences as the second generation results.
Optionally, the responding to the configuration operation of the query statement generation and analysis interface on the target query statement to obtain the configured first generation result further includes:
responding to triggering operation of a control corresponding to the first display mode interface, acquiring a pre-written script code aiming at the target query statement, and taking the script code of the target query statement as the first generation result.
Optionally, the generating the second generation result corresponding to the first generation result based on the mapping relationship between the syntax structure of the predefined graph data search language and the tree structure of the semantic graph includes:
Analyzing the script code of the target query statement by using a graphic engine component to obtain information of each attribute in the script code;
and constructing a semantic guide graph of the target query statement according to the information of each attribute in the script code and the mapping relation between the grammar structure of the graph data search language and the tree structure of the semantic guide graph, and taking the semantic guide graph as the second generation result.
Optionally, before the configuring operation of the query statement generating and analyzing interface on the target query statement, the response further includes:
responding to touch operation of a query statement configuration control in a task management interface, and acquiring a configuration interface of the target query statement; the configuration interface of the target query statement comprises an identification control of each query statement and at least one display mode interface corresponding to each query statement.
In a second aspect, an embodiment of the present application further provides a device for processing a graph data query statement, where the device includes:
the response module is used for responding to the configuration operation of the query statement generation and analysis interface on the target query statement, obtaining a first configured generation result, and displaying the first generation result in a first display mode interface corresponding to the target query statement; the first generation result is a semantic guide graph of the target query statement or script code of the target query statement;
The generation module is used for generating a second generation result corresponding to the first generation result based on a mapping relation between a grammar structure of a predefined graph data search language and a tree structure of a semantic guide graph, wherein the second generation result is the semantic guide graph of the target query statement if the first generation result is the target query statement code, and the second generation result is the script code of the target query statement if the first generation result is the semantic guide graph of the target query statement;
and the display module is used for displaying the second generated result to a second display mode interface corresponding to the target query statement.
Optionally, the response module is further configured to:
determining attribute information of a semantic guide graph of the target query statement according to the identification of the target query statement; wherein the attribute information includes: a start node, an end node and an output result;
responding to the configuration operation executed based on the attribute information of the semantic guide map of the target query statement, obtaining the semantic guide map of the target query statement, and taking the semantic guide map of the target query statement as the first generation result.
Optionally, the response module is further configured to:
displaying the identification of the target query statement;
responding to the configuration operation aiming at the target query statement, and generating the semantic guide graph of the target query statement layer by layer based on the attribute information of the semantic guide graph of the target query statement.
Optionally, the generating module is further configured to:
traversing and analyzing the semantic guide graph of the target query statement by using a script engine component to obtain attribute information of the semantic guide graph of the target query statement;
generating script codes of the target query statement according to attribute information of the semantic guide graph of the target query statement and the mapping relation between the grammar structure of the graph data search language and the tree structure of the semantic guide graph, and taking the target query statement codes as the second generation result.
Optionally, the response module is further configured to:
responding to triggering operation of a control corresponding to the first display mode interface, acquiring a pre-written script code aiming at the target query statement, and taking the script code of the target query statement as the first generation result.
Optionally, the generating module is further configured to:
Analyzing the script code of the target query statement by using a graphic engine component to obtain information of each attribute in the script code;
and constructing a semantic guide graph of the target query statement according to the information of each attribute in the script code and the mapping relation between the grammar structure of the graph data search language and the tree structure of the semantic guide graph, and taking the semantic guide graph as the second generation result.
Optionally, the response module is further configured to:
responding to touch operation of a query statement configuration control in a task management interface, and acquiring a configuration interface of the target query statement; the configuration interface of each query statement comprises an identification control of each query statement and at least one display mode interface corresponding to each query statement.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over a bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the method as provided in the first aspect, and a bus.
In a fourth aspect, 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 method as provided in the first aspect.
The beneficial effects of the application are as follows:
the application provides a processing method, a device, equipment and a storage medium of a graph data query statement, wherein the method comprises the following steps: responding to configuration operation of the target query statement in the query statement generation and analysis interface, obtaining a configured first generation result, and displaying the first generation result in a first display mode interface corresponding to the target query statement; the first generation result is a semantic guide graph of the target query statement or script code of the target query statement; generating a second generation result corresponding to the first generation result based on a mapping relation between a grammar structure of a pre-defined graph data search language and a tree structure of a semantic guide graph, wherein the second generation result is the semantic guide graph of the target query statement if the first generation result is the script code of the target query statement, and the second generation result is the script code of the target query statement if the first generation result is the semantic guide graph of the target query statement; and displaying the second generated result to a second display mode interface corresponding to the target query statement. In the scheme, mainly for users unfamiliar with the GS language, the semantic guide graph of the target query statement after configuration can be traversed and analyzed based on the provided visual interface to generate the GS script code of the target query statement, or the GS script code of the target query statement written in advance can be analyzed to construct the semantic guide graph of the target query statement. Therefore, users who are not familiar with the GS language do not need to write the GS script code of the query statement, and can generate the GS script code of the query statement after configuring the semantic graph of the query statement through the visual interface, so that the writing difficulty of the GS script code is reduced, the writing efficiency of the query statement is improved, and the quick response to the change of the business requirement is improved; meanwhile, the complex GS script code of the query statement can be analyzed into a visualized semantic graph through the visual interface, so that a user can intuitively understand the meaning represented by the GS script code, the problem that the user needs to consume more time to analyze and adjust the GS script of the original query statement again is avoided, and the response speed to the change of the service requirement is improved.
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 schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for processing a query statement of graph data according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another method for processing a query statement of graph data according to an embodiment of the present application;
FIG. 5 is a second schematic diagram of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for processing a query statement of map data according to an embodiment of the present application;
FIG. 7 is a schematic diagram III of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 10 is a diagram showing a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 12 is a schematic diagram eight of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 13 is a diagram illustrating a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application;
FIG. 14 is a flowchart illustrating another method for processing a query statement of graph data according to an embodiment of the present application;
fig. 15 is a schematic diagram of a query statement configuration interface in a method for processing a query statement of graph data according to an embodiment of the present application;
FIG. 16 is a flowchart illustrating a method for processing a query statement of map data according to an embodiment of the present application;
FIG. 17 is a diagram of an eleventh query term configuration interface in a method for processing query terms of graph data according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a query sentence processing device in a graph data search language 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 with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. 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. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that the term "comprising" will be used in embodiments of the application to indicate the presence of the features stated hereafter, but not to exclude the addition of other features.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Furthermore, the terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
First, before developing a specific description of the technical solution provided by the present application, a brief description will be given of a related background related to the present application.
In the medical technical field, the large-scale electronic medical record text needs to be searched and applied in different dimensions. Firstly, carrying out post-structuring processing and storage on the electronic medical record text as graph data through a natural language algorithm; then, the query is carried out through the query statement of the graph data search language, and the query result is obtained for application.
Wherein, the 'query statement' can be preset. When the "query sentence" is set, the "query sentence" refers to the name, input and output requirements of the query sentence determined by defining the name, output content and search conditions of the query sentence. The output content and the search condition of the definition 'query sentence' are based on the grammar and semantic structure requirements of the graph data search language, and a query sentence code written by a user is also called a query script.
Currently, in actual business, a query script can be written by using a GS language (wherein the GS language is a domain-specific language, and can be used for retrieving graphs and data and returning results, so that complex query conditions, defining output conditions and normalizing output results can be flexibly written. Specifically, a large number of GS scripts are required to be written to define different query sentences, a developer of a professional GS language is required to manually write the GS script definition query sentences according to service requirements in the traditional method, and then the GS scripts of the query sentences are saved for application during query.
However, if the business requirement changes, the developer needs to spend more time to analyze and adjust the GS script of the original query sentence again, in a word, the user who is not familiar with the GS language is not helped, and even the developer who is familiar with the GS language writes the GS script and reads the GS script is time-consuming and labor-consuming, which is not intuitive enough, and further results in the failure to respond to the change of the business requirement quickly.
In order to solve the technical problems in the prior art, the application provides a processing method of a graph data query sentence, which mainly aims at users unfamiliar with GS language, can carry out traversal analysis on a semantic guide graph of a configured query sentence based on a provided visual interface to generate a GS script code of the query sentence or analyze a GS script code of a pre-written query sentence to construct the semantic guide graph of the query sentence. Therefore, users who are not familiar with the GS language do not need to write the GS script code of the query statement, and can generate the GS script code of the query statement after configuring the semantic graph of the query statement through the visual interface, so that the GS script writing difficulty is reduced, the writing efficiency of the query statement is improved, and the quick response to the change of the business requirement is improved; meanwhile, the complex GS script code of the query statement can be analyzed into a visualized semantic graph through the visual interface, so that a user can intuitively understand the meaning represented by the GS script code, the problem that the user needs to consume more time to analyze and adjust the GS script of the original query statement again is avoided, and the response speed to the change of the service requirement is improved.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application; the electronic device can be a processing device such as a computer or a server, and the like, so as to be used for realizing the processing method of the graph data query statement provided by the application. As shown in fig. 1, the electronic device includes: a processor 101, and a memory 102.
The processor 101 and the memory 102 are electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, electrical connection may be made through one or more communication buses or signal lines.
The processor 101 may be an integrated circuit chip with signal processing capability. The processor 101 may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), and the like. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 102 may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
It is to be understood that the configuration depicted in fig. 1 is merely illustrative, and that electronic device 100 may also include more or fewer components than those shown in fig. 1, or have a different configuration than that shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The memory 102 is used for storing a program, and the processor 101 calls the program stored in the memory 102 to execute the processing method of the graph data query statement provided in the following embodiment.
The processing method of the graph data query statement and the corresponding beneficial effects provided by the application are described below through a plurality of embodiments.
FIG. 2 is a flowchart illustrating a method for processing a query statement of graph data according to an embodiment of the present application; FIG. 3 is a schematic diagram of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application; FIG. 4 is a second schematic diagram of a query term configuration interface in a method for processing a query term of graph data according to an embodiment of the present application; alternatively, the execution subject of the method may be an electronic device such as a server, a computer, or the like, having a data processing function. It should be understood that, in other embodiments, the sequence of some steps in the processing method of the graph data query statement may be interchanged according to actual needs, or some steps may be omitted or deleted. As shown in fig. 2, the method includes:
S201, responding to configuration operation of the target query statement in the query statement generation and analysis interface, obtaining a first configured generation result, and displaying the first generation result in a first display mode interface corresponding to the target query statement.
The first generation result is a semantic guide graph of the target query statement or script code of the target query statement. Correspondingly, the first display mode interface is a graphical mode interface or a code mode interface.
Referring to fig. 3, the present application provides a visual query term configuration interface, in which the configured query term names are displayed in the left query term list and are displayed in pages. Clicking any one of the left query sentence lists can display the semantic graph of the query sentence in the right region interface, and clicking the graphic mode and the code mode can switch the display mode of the current query sentence.
For example, as shown in fig. 3, the name of the target query sentence "abnormal imaging performance_b & iv" in the left query sentence list may be clicked and selected, and the configuration operation of the user on the target query sentence "abnormal imaging performance_b & iv" in the query sentence configuration interface is responded, so as to obtain the configured first generated result, and the first generated result is displayed in the first display mode interface corresponding to the query sentence.
In the first case, in the query statement configuration interface, a configuration operation can be performed in response to a user according to configuration logic of a tree structure of a semantic guide of a target query statement, so as to obtain a visual semantic guide of the target query statement, the semantic guide of the target query statement is taken as a first generation result, and the semantic guide of the target query statement is displayed in a graphical mode interface corresponding to the target query statement.
In the second case, the user may obtain the script code of the target query statement in response to the triggering operation of the script code of the target query statement in the query statement configuration interface, obtain the script code of the target query statement, use the obtained script code of the target query statement as the first generation result, and display the "script code of the target query statement" in the code mode interface corresponding to the target query statement.
S202, generating a second generation result corresponding to the first generation result based on a mapping relation between a grammar structure of a predefined graph data search language and a tree structure of a semantic graph.
If the first generation result is the script code of the target query sentence, the second generation result is the semantic guide of the target query sentence, and if the first generation result is the semantic guide of the target query sentence, the second generation result is the script code of the target query sentence.
It should be understood that the "mapping relationship between the grammar structure of the GS language and the tree structure of the semantic guide" characterizes the correspondence between each object in the grammar structure of the GS language and each node in the tree structure of the semantic guide.
In this embodiment, the "semantic guide of the target query sentence" corresponding to the "script code of the target query sentence" or the "script code of the target query sentence" corresponding to the "semantic guide of the target query sentence" may be generated based on the mapping relationship between the syntax structure of the GS language and the tree structure of the semantic guide, which is defined in advance.
Therefore, users who are not familiar with the GS language do not need to write the GS script code of the query statement, after the semantic graph of the query statement is configured through the visual interface, the GS script code of the query statement can be generated based on the mapping relation between the pre-defined grammar structure of the GS language and the tree structure of the semantic graph, so that the GS script writing difficulty is reduced, the writing efficiency of the query statement is improved, and the quick response to the change of the service requirement is improved; meanwhile, based on the mapping relation between the pre-defined grammar structure of the GS language and the tree structure of the semantic guide, the complex GS script code related to the query statement is analyzed into a visual semantic guide, so that a user can intuitively understand the meaning represented by the GS script code, the problem that the user needs to consume more time to analyze and adjust the GS script of the original query statement again is avoided, and the response speed to service demand change is improved.
And S203, displaying a second generation result to a second display mode interface corresponding to the target query statement.
With continued reference to fig. 3, the second presentation mode interface corresponding to the target query statement may be a graphical mode interface or a code mode interface.
On the basis of the embodiment, the second generated result of the generated target query statement is displayed on the second display mode interface corresponding to the target query statement, so that visual display of the second generated result of the target query statement is realized, and a user can quickly read and analyze the second generated result from the second display mode interface.
In the first case, if the second generation result is the script code of the target query sentence, the script code of the target query sentence is displayed to the code mode interface.
And in the second case, if the second generation result is the semantic guide of the target query statement, displaying the semantic guide of the target query statement to a graphical mode interface.
In summary, an embodiment of the present application provides a method for processing a query statement of graph data, where the method includes: responding to configuration operation of the target query statement in the query statement generation and analysis interface, obtaining a configured first generation result, and displaying the first generation result in a first display mode interface corresponding to the target query statement; the first generation result is a semantic guide graph of the target query statement or script code of the target query statement; generating a second generation result corresponding to the first generation result based on a mapping relation between a pre-defined grammar structure of the GS language and a tree structure of the semantic guide graph, wherein the second generation result is the semantic guide graph of the target query statement if the first generation result is the script code of the target query statement, and the second generation result is the script code of the target query statement if the first generation result is the semantic guide graph of the target query statement; and displaying the second generated result to a second display mode interface corresponding to the target query statement. According to the scheme, users unfamiliar with the GS language can traverse and analyze the semantic guide graph of the configured query statement based on the provided visual interface to generate the GS script code of the query statement or analyze the GS script code of the pre-written query statement to construct the semantic guide graph of the query statement. Therefore, users who are not familiar with the GS language do not need to write the GS script code of the query statement, and can generate the GS script code of the target query statement through the visual interface after the semantic graph of the query statement is configured, so that the GS script writing difficulty is reduced, the writing efficiency of the query statement is improved, and the quick response to the change of the business requirement is improved; meanwhile, the complex GS script code of the query statement can be analyzed into a visualized semantic graph through the visual interface, so that a user can intuitively understand the meaning represented by the GS script code, the problem that the user needs to consume more time to analyze and adjust the GS script of the original query statement again is avoided, and the response speed to the change of the service requirement is improved.
The following embodiment specifically explains how to respond to the configuration operation of the target query statement at the query statement generation and analysis interface to obtain a configured first generation result.
Alternatively, in the first case, when the first generation result is the semantic guide of the target query statement, as shown in fig. 4, step S201 described above: responding to the configuration operation of the target query statement in the query statement generation and analysis interface to obtain a first configured generation result, wherein the first configured generation result comprises the following steps:
s401, determining attribute information of a semantic graph of the target query statement according to the identification of the target query statement.
Wherein the attribute information includes: a start node, an end node and an output result.
For example, taking a target query statement of "blood normal white blood cells" as an example, the configuration process of the query statement is introduced, and the first configured generation result is a semantic map of "blood normal white blood cells". As particularly shown by the right area interface in fig. 5.
First, attribute information of a semantic map of a query term can be determined based on the identification of the query term "blood normal white blood cells". Specifically, "blood normal white blood cells" are white blood cell values obtained by searching for patients with fever symptoms after performing blood normal procedures. Blood normal, white blood cells can be represented by triplets, the remaining elements such as: patient, symptom and leukocyte values are represented by nodes. This is an example of a query statement with complex condition constraints that limit the patient from having to develop fever symptoms and that make routine blood projects that limit the white blood cells from which they are derived.
Thus, "blood convention" can be used as a starting node of the semantic graph of the query statement, "white blood cells" can be used as an ending node of the semantic graph of the query statement, and "white blood cell values" can be used as an output result of the semantic graph of the query statement.
S402, responding to configuration operation executed based on attribute information of the semantic guide map of the target query statement, obtaining the semantic guide map of the target query statement, and taking the semantic guide map of the target query statement as a first generation result.
On the basis of the embodiment, after the attribute information of the semantic graph of the target query statement is determined, responding to the configuration operation executed by the user based on the attribute information of the semantic graph of the target query statement, obtaining the semantic graph of the target query statement, and taking the semantic graph of the target query statement as the first generation result.
The following embodiment will specifically explain how to implement the configuration operation performed in response to the attribute information based on the semantic map of the target query statement in step S402, to obtain the semantic map of the target query statement.
Optionally, as shown in fig. 6, step S402 is described above: responding to the configuration operation executed based on the attribute information of the semantic guide map of the target query statement, obtaining the semantic guide map of the target query statement, taking the semantic guide map of the target query statement as the first generation result, and comprising the following steps:
S601, displaying the identification of the target query sentence.
S602, responding to configuration operation aiming at the target query statement, and generating the semantic guide graph of the target query statement layer by layer based on the attribute information of the semantic guide graph of the target query statement.
The definition process of the semantic guide of the target query statement in the application is described below, specifically as follows:
the semantic guide of the query statement is a spread tree diagram, and the whole semantic guide can be dragged to adjust the position and derive the application. The different elements are represented by shapes and colors, their appearance patterns and related operation events are controlled by common components written, and the design of each element is described below.
Query statement name: the query statement name is represented by a gray rectangular box.
And (3) node: nodes are represented by blue elongated ovals.
Triplet: the triplet is indicated by light blue brackets and is connected with 2 nodes, and deep blue directional arrows are arranged between the nodes to jointly indicate the triplet.
Normalization of attributes: the configuration when the node is added is not shown in the derivative graph.
Relationship type of attributes: the selection is configured when an object is added, and the selected type is shown in the figure by a yellow rectangular box within the object.
Constraint conditions for attributes: and displaying in a green font mode, a black font mode and a green font mode respectively in a conditional name + operator + value mode.
Node relation of attributes: the direct relationship is indicated by a blue solid line, the indirect relationship is indicated by a blue broken line, the indirect relationship is indicated by a blue solid line right end plus "X", and the indirect relationship is indicated by a blue broken line right end plus "X".
Rule set: the rule set, including the "and" or "two categories, is indicated by the orange diamond, and a toggle may be clicked.
Events: the element related operation events in the figure comprise addition, modification and deletion.
The semantic guide is a part of a graphical interface for configuring query sentences, and further comprises configuration operations such as normalization configuration, output content and the like.
The specific process of generating a semantic map of a target query statement will be explained in connection with specific embodiments as follows.
The first step, responding to the name configuration operation of a user aiming at a target query sentence, clicking an icon adding plus control on the left side of a page where the identification ID of the query sentence is located as shown in a sequence number 1 of fig. 7 according to the identification of the target query sentence displayed in a query sentence configuration interface, popping up the name configuration interface of the query sentence as shown in a sequence number 2 of fig. 7, setting the name as blood normal white cells, and responding to the clicking operation of the user on a save control, wherein the interface is shown in a sequence number 3 of fig. 7 after the save is successful.
And secondly, responding to the configuration operation of a user aiming at a target query statement, sequentially configuring ' patient ' node information, ' check ' triplet information, value ' node information and ' symptom ' node information, and describing the configuration process of each node in detail below.
1. "patient" node configuration: including node information, rule sets, constraints.
(1) Adding nodes: as shown in fig. 8, a right key is arranged on the sentence name of the 'blood normal leucocyte' query language, a 'newly added node' control is clicked, an interface shown as a sequence number '2' chart in fig. 8 is popped up after clicking, the node name is set as a 'patient', the node type selects a 'root node', a 'save' control is clicked, and an added node successfully pops up the interface to close, and a result shown as a sequence number '3' in fig. 8 is obtained;
(2) Configuration rule set: right-clicking the "new rule" control on the "patient" node as shown in fig. 9, and directly after clicking, adding the "rule" on the "patient" node, as shown by the sequence number "2" in fig. 9.
(3) Configuring constraint conditions: as shown in fig. 10, a right button is used on the rule, a new condition control is clicked, a condition configuration interface is popped up after clicking, condition configuration is shown as a sequence number "2" in fig. 10, a save control is clicked as a sequence number "3" in fig. 10, and the condition setting is successful.
2. "check" triplet configuration: the method comprises the steps of adding triples, starting node configuration and ending node configuration.
(1) Newly added triples: as shown in fig. 11, a right button is used on the rule of the patient node, a new triplet control is clicked, a triplet configuration interface is popped up after clicking and is shown as a sequence number 2 graph in fig. 11, a triplet name is set as "check", an external relation is selected as an indirect relation ", and a save control is clicked to obtain a result shown as a sequence number 3 graph in fig. 11.
(2) Starting node configuration: modifying the name of a starting node, double clicking on the "starting node" pops up an interface shown as a figure with the serial number of "4" in fig. 11, changes the name of the node into "blood routine", and clicks a save control; then, rule sets are added and constraint conditions are set, and the above configuration mode can refer to the configuration of the "patient" node, which is not described herein.
(3) End node configuration: the node name is modified into 'white blood cells', a rule group and constraint conditions are set, the node name is modified into 'white blood cells', the node name is configured in the same way as the node is configured at the beginning, and the effect after the node name is configured is shown as a sequence number '5' in fig. 11.
3. "value" node configuration: the right key is used for clicking the control of the newly added node on the rule of the node of the white blood cell, the node name is set as a value shown in the figure of the serial number 1 in figure 12, the node relation is selected as a direct relation, and the result shown in the serial number 2 is clicked on the control of the save.
4. "symptom" node configuration: the right button is used for clicking the "newly added node" control on the "rule" of the "patient" node, the node name is set as "symptom" as shown in the figure with the serial number of "1" in fig. 13, the node relation is selected as "direct relation", and the "save" control is clicked.
5. Output content configuration: clicking the node of the query sentence name 'blood normal leucocyte' in the semantic guide, selecting the node needing to be returned, selecting the 'value', and clicking the 'save' control. The result shown by the number "2" in FIG. 13 can be obtained.
Based on the configuration steps aiming at the target query statement, a semantic guide of the target query statement is generated.
The following embodiment specifically explains how to generate a second generation result corresponding to the first generation result based on a mapping relation between a syntax structure of a predefined GS language and a tree structure of a semantic graph.
Alternatively, in the first case, when the first generation result is the semantic guide of the target query statement, as shown in fig. 14, step S202 described above: based on the mapping relation between the grammar structure of the pre-defined GS language and the tree structure of the semantic guide, generating a second generation result corresponding to the first generation result, wherein the second generation result comprises:
S1401, performing traversal analysis on the semantic graph of the target query statement by using a script engine component to obtain attribute information of the semantic graph of the target query statement.
In this embodiment, the script engine component is designed and implemented by adopting an object-oriented method, and is adapted by using the name, output content, object, attribute, rule set, event constraint and grammar structure of the GS language, so as to convert the tree structure of the semantic graph of the query statement into the GS script code of the query statement.
The following will specifically describe each element in the "script engine component" provided by the present application.
(1) Query statement name: naming is performed for the query statement defined for the current configuration.
(2) The output content: a query term configuration may involve 1 or more objects, where a user may filter some of the objects of interest for output at the time of output, allowing the user to filter and order the output structure of the query term, for example: the structure of the output content may be (symptom, severity, duration) or may be adjusted to (severity, symptom, duration).
(3) And (3) an object: the method comprises the steps of node and triplet, wherein the structure of the triplet is (a start node, a relation and an end node), the start node and the end node are two nodes in the graph, and the relation is an edge in the graph. The edges have directionality and the arrows point from the start node to the end node.
(4) Attribute: including normalization, relationship type, constraint, and node relationships.
(5) Normalization is to perform normalization configuration on the condition that the content of nodes in the graph data possibly has not been normalized yet. For example, 2 words of fever and fever have the same semantic meaning, and normalization is required when retrieving output;
(6) The relationship types are constraint on the types of edges, for example, the relationship types between the pleura and the depression can have positive and negative relationships, the relationships are configured according to an actual task framework, and all relationship types are defaulted;
(7) Constraint conditions are constraint conditions for screening nodes meeting requirements, including node types, names, positions, contents and the like, and combination condition screening can be carried out through AND, OR and logic operators;
(8) The node relationship refers to a relationship between objects, and includes: direct, indirect, and indirect relationships.
(9) Rule set: including "union rule set" and "or rule set", represent relationships between conditions within the rule set.
(10) Event: the method comprises two events, namely a right key menu and a double click element, wherein a query sentence, a root node, a rule group, a node, an edit and a deletion event are added.
(11) Event constraint: the events of different objects and rule groups are different, the events of the same object are also different in different processes, for example, a query sentence name has a right-click menu newly added root node and a double-click editing event when no child node exists in the graph, and has a right-click deleting node event and a double-click editing event when a child node exists; the node right key menu has only the new rule group and the node deleting event, and the rule group is not only the right key menu but also the new node, the new triplet and the new condition event.
Through the constraint of each element in the script engine component, the grammar structure requirement of GS script codes for generating query sentences in the follow-up process can be ensured.
Therefore, in this embodiment, the GS script engine may be invoked to perform traversal analysis on the semantic graph of the target query statement, so as to analyze and obtain attribute information of the semantic graph of the target query statement.
S1402, generating script codes of the target query sentences according to the attribute information of the semantic guide graphs of the target query sentences and the mapping relation between the grammar structures of the programming language and the tree structures of the semantic guide graphs, and taking the script codes as second generation results.
On the basis of the embodiment, after the attribute information of the semantic graph of the target query statement is obtained by analysis, each element in the defined script engine component and the grammar structure of the GS language can be adapted to generate the GS script code of the target query statement. In addition, clicking on a code mode interface in the query statement configuration interface can be used for switching to the editor to view the GS script code of the generated query statement.
Optionally, in the second case, when the first generated result is the script code of the target query statement, the following embodiment is further described to specifically explain how to respond to the configuration operation on the target query statement at the query statement generation and analysis interface, so as to obtain the configured first generated result.
Optionally, in step S201, in response to the configuration operation of the query statement generating and analyzing interface on the target query statement, a first configured generation result is obtained, and the method further includes:
responding to triggering operation of a control corresponding to the first display mode interface, acquiring a pre-written script code aiming at a target query statement, and taking the script code of the target query statement as a first generation result.
In this embodiment, the first presentation mode interface is a code mode interface.
For example, as shown in fig. 3, by clicking the left "add icon+" button in the query sentence configuration interface, the name of the query sentence is configured as shown by the sequence number "1" in fig. 15, and then, in response to the clicking operation of the "save" control by the user, the saving is successful as shown by the sequence number "2" in fig. 15. Responding to the triggering operation of the control corresponding to the code mode interface, switching to the editor interface, manually writing the GS script code, acquiring the pre-written GS script code, responding to the clicking operation of the user on the control of storing the icon as shown by the sequence number 3 in figure 15, and taking the script code of the target inquiry statement as a first generation result.
Optionally, in the second case, when the first generation result is the script code of the target query statement, the following embodiment is used to specifically explain how to generate the second generation result corresponding to the first generation result based on the mapping relationship between the syntax structure of the predefined GS language and the tree structure of the semantic guide.
Alternatively, as shown in fig. 16, step S202 described above: based on the mapping relation between the grammar structure of the pre-defined GS language and the tree structure of the semantic guide, generating a second generation result corresponding to the first generation result, wherein the second generation result comprises:
s1601, analyzing the script code of the target query statement by using a graphic engine component to obtain information of each attribute in the script code.
S1602, constructing a semantic map of the target query sentence according to the information of each attribute in the script code and the mapping relation between the grammar structure of the GS language and the tree structure of the semantic map, and taking the semantic map as a second generation result.
Wherein the graphics engine component: analyzing the GS script code to generate tree structure data conforming to the semantic graph, and adding event constraint according to the grammar structure of the GS language to ensure the accuracy of the query statement when the semantic graph and the event interact.
The following describes the mapping relation between each attribute of the GS script code and each node in the tree structure of the semantic graph, specifically as follows:
the object is: the Node search method comprises the steps of including triples and nodes, distinguishing the triples and the nodes through the attribute of type in the search condition, wherein the 'multiple' is the triples, and the 'Node' is the Node. The triple corresponding GS grammar structure is a Tuple (conditionals, targetnodeid), that is, the contents of the triple (start node, relationship, end node) in the GS script code can be obtained through the above attributes.
Rule set: AND acquiring the conditions attribute of each node in the search condition, wherein the attribute value of 'logic' is 'AND' corresponding to the semantic graph guide 'AND the rule group, AND the attribute value of' logic 'is' OR 'corresponding to the semantic graph' OR the rule group.
Normalization of attributes: the value of the "normal" attribute of each node in the search condition is a regular expression, and this information is displayed when the node in the semantic graph is double-clicked.
Relationship type of attributes: the value of the "value" is obtained by retrieving the "conditions" attribute of the triplet in the condition, in this example the value "associated with …", which is shown in the semantic map in the yellow rectangle box following the triplet name.
Constraint conditions for attributes: the value in the "rules" of each node in the conditions is obtained through retrieving the "conditions" attribute of each node, the value is an array, each item in the array is a constraint condition, and the "fieldschema", "operator" and "value" respectively represent the condition name, the operator and the value, and are displayed behind the rule set of the node in the semantic map, and the "entity type" in the example is an anatomical part.
Therefore, the script code of the target query statement is analyzed by using the graphic engine component, and the attribute information of each object in the script code is obtained.
For example, the script code of the target query statement is:
/>
/>
/>
therefore, the GS graphic engine assembly is used for analyzing the script code of the target query statement to obtain the attribute information of each object in the script code. For example, first, the "query" attribute value is analyzed as the search condition, and the "return" attribute value is analyzed as the output content.
And secondly, the GS graphic engine assembly further analyzes and acquires objects, rule groups and attributes according to search conditions, further analyzes and acquires return fields and keywords according to output contents, converts content information such as 'objects, rule groups, attributes, return fields and keywords' obtained by analysis into format requirements of tree structure data of the semantic guide map based on mapping relations between grammar structures of a graphic data search language and tree structures of the semantic guide map, constructs the semantic guide map of a target query sentence, and obtains the semantic guide map of the target query sentence as shown in a graphic mode interface in fig. 17, and can also endow corresponding events and constraints for each node in the semantic guide map of the target query sentence.
Optionally, step S201 described above: responding to the configuration operation of the query statement generation and analysis interface on the target query statement, and before obtaining the configured first generation result, further comprising:
responding to touch operation of a query statement configuration control in a task management interface, and acquiring a configuration interface of a target query statement; the configuration interface of the target query statement comprises an identification control of each query statement and at least one display mode interface corresponding to each query statement.
The following describes a device, a storage medium, etc. corresponding to the processing method for executing the graph data query statement provided by the present application, and specific implementation processes and technical effects thereof are referred to above, and are not described in detail below.
Alternatively, as shown in fig. 18, the apparatus includes:
the response module 1801 is configured to respond to the configuration operation of the target query statement in the query statement generation and analysis interface, obtain a first configured generation result, and display the first generation result in a first display mode interface corresponding to the target query statement; the first generation result is a semantic guide graph of the target query statement or script code of the target query statement;
the generating module 1802 is configured to generate a second generating result corresponding to the first generating result based on a mapping relationship between a syntax structure of a predefined GS language and a tree structure of a semantic graph, where if the first generating result is a script code of a target query statement, the second generating result is the semantic graph of the target query statement, and if the first generating result is the semantic graph of the target query statement, the second generating result is the script code of the target query statement;
And the display module 1803 is configured to display a second generated result to a second display mode interface corresponding to the target query statement.
Optionally, the response module 1801 is further configured to:
determining attribute information of a semantic guide graph of the target query statement according to the identification of the target query statement; wherein the attribute information includes: a start node, an end node and an output result;
responding to the configuration operation executed based on the attribute information of the semantic guide map of the target query statement, obtaining the semantic guide map of the target query statement, and taking the semantic guide map of the target query statement as a first generation result.
Optionally, the response module 1801 is further configured to:
displaying the identification of the target query statement;
and responding to the configuration operation aiming at the target query statement, and generating the semantic guide graph of the target query statement layer by layer based on the attribute information of the semantic guide graph of the target query statement.
Optionally, the generating module 1802 is further configured to:
traversing and analyzing the semantic graph of the target query statement by using a script engine component to obtain attribute information of the semantic graph of the target query statement;
generating script codes of the target query sentences according to the attribute information of the semantic guide graphs of the target query sentences and the mapping relation between the grammar structures of the GS language and the tree structures of the semantic guide graphs, and taking the script codes as second generation results.
Optionally, the response module 1801 is further configured to:
responding to triggering operation of a control corresponding to the first display mode interface, acquiring a pre-written script code aiming at a target query statement, and taking the script code as a first generation result.
Optionally, the generating module 1802 is further configured to:
analyzing the script code of the target query statement by using the graphic engine component to obtain information of each attribute in the script code;
according to the information of each attribute in the script code and the mapping relation between the grammar structure of the GS language and the tree structure of the semantic guide, constructing the semantic guide of the target query statement, and taking the semantic guide as a second generation result.
Optionally, the response module 1801 is further configured to:
responding to touch operation of a query statement configuration control in a task management interface, and acquiring a configuration interface of a target query statement; the configuration interface of the target query statement comprises an identification control of each query statement and at least one display mode interface corresponding to each query statement.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more microprocessors (digital singnal processor, abbreviated as DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Optionally, the present invention also provides a program product, such as a computer readable storage medium, comprising a program for performing the above-described method embodiments when being executed by a processor.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., 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 an indirect coupling or communication connection via some interfaces, devices or units, 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 invention 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 integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the invention. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

Claims (6)

1. A method for processing a graph data query statement, comprising:
Responding to configuration operation of a target query statement in a query statement generation and analysis interface, obtaining a configured first generation result, and displaying the first generation result in a first display mode interface corresponding to the target query statement; the first generation result is a semantic guide graph of the target query statement or script code of the target query statement;
generating a second generation result corresponding to the first generation result based on a mapping relation between a grammar structure of a pre-defined graph data search language and a tree structure of a semantic guide graph, wherein the second generation result is the semantic guide graph of the target query statement if the first generation result is the script code of the target query statement, and the second generation result is the script code of the target query statement if the first generation result is the semantic guide graph of the target query statement;
displaying the second generated result to a second display mode interface corresponding to the target query statement;
the response is carried out on the configuration operation of the target query statement in the query statement generation and analysis interface to obtain a first configured generation result, and the method comprises the following steps:
Determining attribute information of a semantic guide graph of the target query statement according to the identification of the target query statement; wherein the attribute information includes: a start node, an end node and an output result;
responding to a configuration operation executed based on attribute information of the semantic guide map of the target query statement, obtaining the semantic guide map of the target query statement, and taking the semantic guide map of the target query statement as the first generation result;
the generating a second generation result corresponding to the first generation result based on the mapping relation between the grammar structure of the predefined graph data search language and the tree structure of the semantic guide graph comprises the following steps:
traversing and analyzing the semantic guide graph of the target query statement by using a script engine component to obtain attribute information of the semantic guide graph of the target query statement;
generating script codes of the target query sentences according to attribute information of the semantic guide graphs of the target query sentences and mapping relations between the grammar structures of the graph data search language and the tree structures of the semantic guide graphs, and taking the script codes of the target query sentences as the second generation results;
The response is carried out on the configuration operation of the target query statement in the query statement generation and analysis interface to obtain a first configured generation result, and the method further comprises the following steps:
responding to triggering operation of a control corresponding to the first display mode interface, acquiring a pre-written script code aiming at the target query statement, and taking the script code of the target query statement as the first generation result;
the generating a second generation result corresponding to the first generation result based on the mapping relation between the grammar structure of the predefined graph data search language and the tree structure of the semantic guide graph comprises the following steps:
analyzing the script code of the target query statement by using a graphic engine component to obtain information of each attribute in the script code;
and constructing a semantic guide graph of the target query statement according to the information of each attribute in the script code and the mapping relation between the grammar structure of the graph data search language and the tree structure of the semantic guide graph, and taking the semantic guide graph as the second generation result.
2. The method of claim 1, wherein obtaining the semantic map of the target query statement based on the configuration operation performed by the attribute information of the semantic map of the target query statement comprises:
Displaying the identification of the target query statement;
responding to the configuration operation aiming at the target query statement, and generating the semantic guide graph of the target query statement layer by layer based on the attribute information of the semantic guide graph of the target query statement.
3. The method of claim 1, wherein the responding to the configuration operation of the query term generation and parsing interface on the target query term, before obtaining the configured first generation result, further comprises:
responding to touch operation of a query statement configuration control in a task management interface, and acquiring a configuration interface of the target query statement; the configuration interface of each query statement comprises an identification control of each query statement and at least one display mode interface corresponding to each query statement.
4. A processing apparatus for a graph data query statement, the apparatus comprising:
the response module is used for responding to the configuration operation of the query statement generation and analysis interface on the target query statement, obtaining a first configured generation result, and displaying the first generation result in a first display mode interface corresponding to the target query statement; the first generation result is a semantic guide graph of the target query statement or script code of the target query statement;
The generation module is used for generating a second generation result corresponding to the first generation result based on a mapping relation between a grammar structure of a pre-defined graph data search language and a tree structure of a semantic guide graph, wherein the second generation result is the semantic guide graph of the target query statement if the first generation result is the script code of the target query statement, and the second generation result is the script code of the target query statement if the first generation result is the semantic guide graph of the target query statement;
the display module is used for displaying the second generation result to a second display mode interface corresponding to the target query statement;
the response module is further configured to:
determining attribute information of a semantic guide graph of the target query statement according to the identification of the target query statement; wherein the attribute information includes: a start node, an end node and an output result;
responding to a configuration operation executed based on attribute information of the semantic guide map of the target query statement, obtaining the semantic guide map of the target query statement, and taking the semantic guide map of the target query statement as the first generation result;
The generating module is further configured to:
traversing and analyzing the semantic guide graph of the target query statement by using a script engine component to obtain attribute information of the semantic guide graph of the target query statement;
generating script codes of the target query statement according to attribute information of the semantic guide graph of the target query statement and the mapping relation between the grammar structure of the graph data search language and the tree structure of the semantic guide graph, and taking the target query statement codes as the second generation result;
the response module is further configured to:
responding to triggering operation of a control corresponding to the first display mode interface, acquiring a pre-written script code aiming at the target query statement, and taking the script code of the target query statement as the first generation result;
the generating module is further configured to:
analyzing the script code of the target query statement by using a graphic engine component to obtain information of each attribute in the script code;
and constructing a semantic guide graph of the target query statement according to the information of each attribute in the script code and the mapping relation between the grammar structure of the graph data search language and the tree structure of the semantic guide graph, and taking the semantic guide graph as the second generation result.
5. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the method of any one of claims 1-3.
6. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1-3.
CN202111641712.8A 2021-12-29 2021-12-29 Processing method, device, equipment and storage medium of graph data query statement Active CN114297443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111641712.8A CN114297443B (en) 2021-12-29 2021-12-29 Processing method, device, equipment and storage medium of graph data query statement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111641712.8A CN114297443B (en) 2021-12-29 2021-12-29 Processing method, device, equipment and storage medium of graph data query statement

Publications (2)

Publication Number Publication Date
CN114297443A CN114297443A (en) 2022-04-08
CN114297443B true CN114297443B (en) 2023-11-24

Family

ID=80970650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111641712.8A Active CN114297443B (en) 2021-12-29 2021-12-29 Processing method, device, equipment and storage medium of graph data query statement

Country Status (1)

Country Link
CN (1) CN114297443B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116108245B (en) * 2023-03-31 2023-06-30 支付宝(杭州)信息技术有限公司 Graph data query method and query engine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339316A (en) * 2020-02-27 2020-06-26 河海大学 Method and system architecture for realizing visual editing and persistence of knowledge graph
CN112711677A (en) * 2021-01-08 2021-04-27 北京仿真中心 Visual management device and method for Neo4j graph database
CN112749194A (en) * 2020-06-03 2021-05-04 腾讯科技(深圳)有限公司 Visualized data processing method and device, electronic equipment and readable storage medium
CN113094037A (en) * 2021-04-20 2021-07-09 上海携宁计算机科技股份有限公司 Interaction method, development platform, equipment and storage medium for forms and workflows
CN113535749A (en) * 2020-04-17 2021-10-22 阿里巴巴集团控股有限公司 Query statement generation method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9275099B1 (en) * 2015-03-09 2016-03-01 Vinyl Development LLC Source independent query language

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339316A (en) * 2020-02-27 2020-06-26 河海大学 Method and system architecture for realizing visual editing and persistence of knowledge graph
CN113535749A (en) * 2020-04-17 2021-10-22 阿里巴巴集团控股有限公司 Query statement generation method and device
CN112749194A (en) * 2020-06-03 2021-05-04 腾讯科技(深圳)有限公司 Visualized data processing method and device, electronic equipment and readable storage medium
CN112711677A (en) * 2021-01-08 2021-04-27 北京仿真中心 Visual management device and method for Neo4j graph database
CN113094037A (en) * 2021-04-20 2021-07-09 上海携宁计算机科技股份有限公司 Interaction method, development platform, equipment and storage medium for forms and workflows

Also Published As

Publication number Publication date
CN114297443A (en) 2022-04-08

Similar Documents

Publication Publication Date Title
US11544257B2 (en) Interactive table-based query construction using contextual forms
US11615073B2 (en) Supplementing events displayed in a table format
US10558651B2 (en) Search point management
US10514827B2 (en) Resequencing actionable task structures for transforming data
US11983167B1 (en) Loading queries across interfaces
US11068452B2 (en) Column-based table manipulation of event data to add commands to a search query
US11698900B2 (en) Leveraging search query history in a search interface
US11216453B2 (en) Data visualization in a dashboard display using panel templates
US11442924B2 (en) Selective filtered summary graph
US10521448B2 (en) Application of actionable task structures to disparate data sets for transforming data in the disparate data sets
US20180157705A1 (en) Events Sets In A Visually Distinct Display Format
US20180150507A1 (en) Command entry list for modifying a search query
US20230306059A1 (en) Tool to build and store a data model and queries for a graph database
US20150127688A1 (en) Facilitating discovery and re-use of information constructs
CN115576974A (en) Data processing method, device, equipment and medium
CN114297443B (en) Processing method, device, equipment and storage medium of graph data query statement
US10445290B1 (en) System and method for a smart configurable high performance interactive log file viewer
US10896161B2 (en) Integrated computing environment for managing and presenting design iterations
CN115794869A (en) Implementation method and device for visual construction and generation of semantic query
WO2024078472A1 (en) Method and apparatus for debugging cloud service application program interface (api) and related device
Costabile et al. Iconit: an environment for design and prototyping of iconic interfaces

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