CN111581399A - Method, system, medium and equipment for dynamically calculating knowledge graph index rule - Google Patents

Method, system, medium and equipment for dynamically calculating knowledge graph index rule Download PDF

Info

Publication number
CN111581399A
CN111581399A CN202010521689.8A CN202010521689A CN111581399A CN 111581399 A CN111581399 A CN 111581399A CN 202010521689 A CN202010521689 A CN 202010521689A CN 111581399 A CN111581399 A CN 111581399A
Authority
CN
China
Prior art keywords
rule
index
value
graph
query
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.)
Pending
Application number
CN202010521689.8A
Other languages
Chinese (zh)
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 Haizhi Xingtu Technology Co ltd
Original Assignee
Beijing Haizhi Xingtu 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 Haizhi Xingtu Technology Co ltd filed Critical Beijing Haizhi Xingtu Technology Co ltd
Priority to CN202010521689.8A priority Critical patent/CN111581399A/en
Publication of CN111581399A publication Critical patent/CN111581399A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method, a system, a medium and equipment for dynamically calculating knowledge graph index rules, wherein the method comprises the following steps: determining a rule formula of the index rule; splicing the scenes into regular sentences according to the rule formula; splicing and assembling the rule statements and the related parameters to generate query conditions; and determining the value of the index rule according to the query condition. When a new index rule is added, index calculation does not need to be developed again, the existing interactive index rule is directly used for dynamic calculation, the development efficiency is greatly saved, and the requirements of interactivity, universality and complexity are met.

Description

Method, system, medium and equipment for dynamically calculating knowledge graph index rule
Technical Field
The invention relates to the field of knowledge graphs, in particular to a method, a system, a medium and equipment for dynamically calculating index rules of a knowledge graph.
Background
Indexes of various rules configured in the current knowledge graph can be calculated only by one rule, when new knowledge graph index rule calculation occurs, codes need to be re-developed for the index rule to calculate the rule, and the service scenes of interchangeability, universality and expandability of the index rule cannot be met.
Disclosure of Invention
The invention provides a method, a system, a medium and equipment for dynamically calculating index rules of a knowledge graph, aiming at solving the problems of interchangeability, trafficability and expansibility of index rule calculation of a knowledge graph which cannot be uniformly identified and calculated.
The technical scheme for solving the technical problems is as follows:
in a first aspect, the invention provides a method for dynamically calculating knowledge graph index rules, which comprises the following steps:
determining a rule formula of the index rule;
splicing the scenes into regular sentences according to the rule formula;
splicing and assembling the rule statements and the related parameters to generate query conditions;
and determining the value of the index rule according to the query condition.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the determining the value of the index rule according to the query condition specifically includes:
sending the query condition to a graph computation distributed engine to query computation resources;
and calculating the value of the index rule according to the query result returned by the graph calculation distributed engine.
Further, the graph computation distribution engine employs Spark graph.
Further, the method further comprises:
and writing the value of the index rule back to a database.
In a second aspect, the invention provides a knowledge graph index rule dynamic calculation system, which comprises the following modules:
the formula determining module is used for determining a rule formula of the index rule;
the sentence splicing module is used for splicing scenes into regular sentences according to the rule formula;
the condition generating module is used for splicing and assembling the rule statements and the related parameters to generate query conditions;
and the value determining module is used for determining the value of the index rule according to the query condition.
Further, the value determining module specifically includes:
the condition sending unit is used for sending the query condition to a query computing resource in a graph computing distributed engine;
and the value calculation unit is used for calculating the value of the index rule according to the query result returned by the graph calculation distributed engine.
Further, the graph computation distribution engine employs Spark graph.
Further, the above system further comprises:
and the value write-back module is used for writing back the value of the index rule to a database.
In a third aspect, the present invention also provides a computer-readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the above-mentioned method.
In a fourth aspect, the present invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the above method when executing the program.
The invention has the beneficial effects that: when a new index rule is added, index calculation does not need to be developed again, the existing interactive index rule is directly used for dynamic calculation, development efficiency is greatly saved, and the requirements of interactivity, universality and complexity are met.
Drawings
FIG. 1 is a flowchart of a method for dynamically calculating knowledge-graph index rules according to an embodiment of the present invention;
FIG. 2 is a block diagram of a software operation flow based on an embodiment of the method;
FIG. 3 is a block diagram of a knowledge graph index rule dynamic computing system according to the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Fig. 1 is a flowchart of a method for dynamically calculating a knowledge graph index rule according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
11. and determining a rule formula of the index rule.
In the step, a user configures rules on an interface, firstly, the universality of the rules is extracted according to the rules, a rule formula of an index rule is determined, and the interface converts the interface and a rear-end agreed interface according to the rules configured by the user.
12. And splicing the scenes into regular sentences according to the rule formula.
Specifically, the step may be implemented by a JAVA program, and the JAVA program may splice into rule statements recognizable by the algorithm in different scenes according to the index rule configured in the page in step 11, for example: object _ key, (v.field1/v.field2) as tag 1from edge1e left join field vertex1v on (concat _ ws ('/', 'vertex1', v.object _ key) ═ e.to _ key) "
13. And splicing and assembling the rule statements and the related parameters to generate query conditions.
Specifically, after the JAVA application splices the statements and related parameters of the rule, the JAVA application sends Spark graph x as a query condition to perform distributed query.
14. And determining the value of the index rule according to the query condition.
Step 14 may specifically include:
141. sending the query condition to a graph computation distributed engine to query computation resources;
142. and calculating the value of the index rule according to the query result returned by the graph calculation distributed engine.
Specifically, Spark graph is based on rule statements, parameter analysis, data value, and rule engine. And acquiring data resources required by calculation, acquiring the required value of the index rule by using an algorithm, and finally writing back the executed result to various databases.
Fig. 2 is a software operation flow diagram based on the embodiment of the method, and the meaning of each element in the diagram is as follows:
program-01: an application program written in the computer Java language;
program-02: a calculation module written based on a graph calculation distributed engine Spark graph;
DataCluster-01: a graph database cluster;
DB-01 to DB-n: a single database server in the spectrum database cluster;
flow-01: referring to the 3 rd step of the knowledge graph index calculation process, the process is to assemble the query conditions by Program-01 and deliver the query conditions to Program-02 for step 2 query;
flow-02: refer to the 4 th step of the knowledge graph offline query process, which is a process of querying and assembling final results by Program-02 using Spark graph x distribution.
Fig. 3 is a block diagram of a system for dynamically calculating knowledge graph index rules according to the present invention, where the functional principles of the modules in the system have been specifically introduced in the foregoing embodiment of the method, and are not described in detail below.
As shown in fig. 3, the system includes the following modules:
the formula determining module is used for determining a rule formula of the index rule;
the sentence splicing module is used for splicing scenes into regular sentences according to the rule formula;
the condition generating module is used for splicing and assembling the rule statements and the related parameters to generate query conditions;
and the value determining module is used for determining the value of the index rule according to the query condition.
Optionally, in this embodiment, the value determining module specifically includes:
the condition sending unit is used for sending the query condition to a query computing resource in a graph computing distributed engine;
and the value calculation unit is used for calculating the value of the index rule according to the query result returned by the graph calculation distributed engine.
Optionally, in this embodiment, the graph computation distribution engine employs Spark graph;
optionally, in this embodiment, the system further includes:
and the value write-back module is used for writing back the value of the index rule to a database.
An embodiment of the present invention further provides a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to perform the method steps in the above method embodiment; or storing the instructions corresponding to the software modules of the system embodiments.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the method steps in the above method embodiments are implemented.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the modules and units in the above described system embodiment may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A dynamic calculation method for knowledge graph index rules is characterized by comprising the following steps:
determining a rule formula of the index rule;
splicing the scenes into regular sentences according to the rule formula;
splicing and assembling the rule statements and the related parameters to generate query conditions;
and determining the value of the index rule according to the query condition.
2. The method according to claim 1, wherein the determining the value of the index rule according to the query condition specifically includes:
sending the query condition to a graph computation distributed engine to query computation resources;
and calculating the value of the index rule according to the query result returned by the graph calculation distributed engine.
3. The method of claim 2, wherein the graph computation distribution engine employs Spark graph x.
4. The method for dynamically calculating knowledge-graph index rules according to any one of claims 1 to 3, further comprising:
and writing the value of the index rule back to a database.
5. A knowledge graph index rule dynamic computing system is characterized by comprising the following modules:
the formula determining module is used for determining a rule formula of the index rule;
the sentence splicing module is used for splicing scenes into regular sentences according to the rule formula;
the condition generating module is used for splicing and assembling the rule statements and the related parameters to generate query conditions;
and the value determining module is used for determining the value of the index rule according to the query condition.
6. The system according to claim 5, wherein the value determining module specifically comprises:
the condition sending unit is used for sending the query condition to a query computing resource in a graph computing distributed engine;
and the value calculation unit is used for calculating the value of the index rule according to the query result returned by the graph calculation distributed engine.
7. The system of claim 6, wherein the graph computation distribution engine employs Spark graph x.
8. The system according to any one of claims 5 to 7, further comprising:
and the value write-back module is used for writing back the value of the index rule to a database.
9. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 4.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 4 when executing the program.
CN202010521689.8A 2020-06-10 2020-06-10 Method, system, medium and equipment for dynamically calculating knowledge graph index rule Pending CN111581399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010521689.8A CN111581399A (en) 2020-06-10 2020-06-10 Method, system, medium and equipment for dynamically calculating knowledge graph index rule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010521689.8A CN111581399A (en) 2020-06-10 2020-06-10 Method, system, medium and equipment for dynamically calculating knowledge graph index rule

Publications (1)

Publication Number Publication Date
CN111581399A true CN111581399A (en) 2020-08-25

Family

ID=72127395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010521689.8A Pending CN111581399A (en) 2020-06-10 2020-06-10 Method, system, medium and equipment for dynamically calculating knowledge graph index rule

Country Status (1)

Country Link
CN (1) CN111581399A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558479A (en) * 2018-11-29 2019-04-02 北京羽扇智信息科技有限公司 Rule matching method, device, equipment and storage medium
CN110647549A (en) * 2019-09-29 2020-01-03 北京卓信智恒数据科技股份有限公司 Data index analyzing and executing method and device based on business dynamic modeling
CN111259037A (en) * 2020-01-14 2020-06-09 重庆特斯联智慧科技股份有限公司 Data query method and device based on rule configuration, storage medium and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558479A (en) * 2018-11-29 2019-04-02 北京羽扇智信息科技有限公司 Rule matching method, device, equipment and storage medium
CN110647549A (en) * 2019-09-29 2020-01-03 北京卓信智恒数据科技股份有限公司 Data index analyzing and executing method and device based on business dynamic modeling
CN111259037A (en) * 2020-01-14 2020-06-09 重庆特斯联智慧科技股份有限公司 Data query method and device based on rule configuration, storage medium and terminal

Similar Documents

Publication Publication Date Title
US8407253B2 (en) Apparatus and method for knowledge graph stabilization
CN108804641B (en) Text similarity calculation method, device, equipment and storage medium
EP2674875B1 (en) Method, controller, program and data storage system for performing reconciliation processing
KR20200098378A (en) Method, device, electronic device and computer storage medium for determining description information
CN112328762A (en) Question and answer corpus generation method and device based on text generation model
EP3736723A1 (en) Differentially private budget tracking using renyi divergence
CN111506721A (en) Question-answering system and construction method for domain knowledge graph
US20210406993A1 (en) Automated generation of titles and descriptions for electronic commerce products
CN108228875B (en) Log analysis method and device based on perfect hash
EP3001329A1 (en) Method, controller, program and data storage system for performing reconciliation processing
CN110008308B (en) Method and device for supplementing information for user question
CN114969819A (en) Data asset risk discovery method and device
Rodriguez et al. Comparison of information retrieval techniques for traceability link recovery
CN111813803A (en) Statement block execution plan generation method, device, equipment and storage medium
KR20180130733A (en) System and method for recommending component reuse based on collaboration dependency
Bielecki et al. Estimation of execution time for computing tasks
CN117312518A (en) Intelligent question-answering method and device, computer equipment and storage medium
CN111680226A (en) Network public opinion analysis method, device, system, equipment and readable storage medium
CN111581399A (en) Method, system, medium and equipment for dynamically calculating knowledge graph index rule
CN112989044B (en) Text classification method, device, equipment and storage medium
CN110032445B (en) Big data aggregation calculation method and device
CN113760864A (en) Data model generation method and device
CN113434273A (en) Data processing method, device, system and storage medium
CN113590805A (en) Method and device for searching textile commodity names based on knowledge graph
US11120060B2 (en) Efficient resolution of syntactic patterns in question and answer (QA) pairs in an n-ary focus cognitive QA system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200825