CN116502633A - Method and device for executing service, storage medium and electronic equipment - Google Patents
Method and device for executing service, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN116502633A CN116502633A CN202310233068.3A CN202310233068A CN116502633A CN 116502633 A CN116502633 A CN 116502633A CN 202310233068 A CN202310233068 A CN 202310233068A CN 116502633 A CN116502633 A CN 116502633A
- Authority
- CN
- China
- Prior art keywords
- target node
- image data
- text data
- target
- text
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000003860 storage Methods 0.000 title claims abstract description 23
- 238000012549 training Methods 0.000 claims description 44
- 230000015654 memory Effects 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 19
- 238000005457 optimization Methods 0.000 claims description 8
- 238000004140 cleaning Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 10
- 230000006872 improvement Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 230000002457 bidirectional effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000006227 byproduct Substances 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 229920001296 polysiloxane Polymers 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000010979 ruby Substances 0.000 description 1
- 229910001750 ruby Inorganic materials 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
- G06F16/288—Entity relationship models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Probability & Statistics with Applications (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本说明书公开了一种业务执行的方法、装置、存储介质及电子设备。首先,获取目标业务对应的待扩充知识图谱。其次,将待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到目标节点对应的文本数据以及图像数据。而后,将目标节点对应的文本数据输入到预先训练的第一识别模型中,确定文本数据的三元组信息,以及将目标节点对应的图像数据输入到预先训练的第二识别模型中,确定图像数据的三元组信息。最后,基于文本数据的三元组信息以及图像数据的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱,并通过目标知识图谱,执行目标业务。本方法可以提高业务执行的准确性。
This specification discloses a service execution method, device, storage medium and electronic equipment. First, obtain the knowledge graph to be expanded corresponding to the target business. Secondly, input the entity name corresponding to the target node in the knowledge graph to be expanded into the search engine to obtain the text data and image data corresponding to the target node. Then, input the text data corresponding to the target node into the pre-trained first recognition model, determine the triplet information of the text data, and input the image data corresponding to the target node into the pre-trained second recognition model, determine the image The triplet information of the data. Finally, based on the triplet information of the text data and the triplet information of the image data, the entity relationship between the target node and other nodes is expanded in the knowledge graph to be expanded to obtain the target knowledge graph, and through the target knowledge graph, the target business. The method can improve the accuracy of business execution.
Description
技术领域technical field
本说明书涉及计算机技术领域,尤其涉及一种业务执行的方法、装置、存储介质及电子设备。This specification relates to the field of computer technology, and in particular to a method, device, storage medium, and electronic equipment for service execution.
背景技术Background technique
目前,知识图谱(knowledge graph,KG)本质上是语义网络,是一种基于图的数据结构,由节点和边组成。在知识图谱里,每个节点表示一个实体,每条边表示实体与实体之间的关系。其中,实体指具有可区别性且独立存在的某种事物,例如,某一个人、某一个城市、某一种植物、某一种商品等。At present, the knowledge graph (KG) is essentially a semantic network, a graph-based data structure composed of nodes and edges. In the knowledge graph, each node represents an entity, and each edge represents the relationship between entities. Among them, an entity refers to something that is distinguishable and exists independently, for example, a certain person, a certain city, a certain kind of plant, a certain kind of commodity, etc.
然而,在实际应用场景下,可能出现用于构建知识图谱的数据较少的情况,导致通过知识图谱进行业务执行的准确性较低。However, in actual application scenarios, there may be less data used to construct knowledge graphs, resulting in lower accuracy of business execution through knowledge graphs.
因此,如何对知识图谱进行扩充,以提高业务执行的准确性,则是一个亟待解决的问题。Therefore, how to expand the knowledge graph to improve the accuracy of business execution is an urgent problem to be solved.
发明内容Contents of the invention
本说明书提供一种业务执行的方法、装置、存储介质及电子设备,以部分的解决现有技术存在的上述问题。This specification provides a service execution method, device, storage medium and electronic equipment to partially solve the above-mentioned problems existing in the prior art.
本说明书采用下述技术方案:This manual adopts the following technical solutions:
本说明书提供了一种业务执行的方法,包括:This specification provides a method for business execution, including:
获取目标业务对应的待扩充知识图谱;Obtain the knowledge graph to be expanded corresponding to the target business;
将所述待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到所述目标节点对应的文本数据以及图像数据;Input the entity name corresponding to the target node in the knowledge map to be expanded into the search engine to obtain text data and image data corresponding to the target node;
将所述目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过所述第一识别模型,识别出所述文本数据中涉及的各实体之间的实体关系,并根据所述文本数据中涉及的各实体之间的实体关系,确定所述文本数据的三元组信息,以及将所述目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过所述第二识别模型,识别出所述图像数据中涉及的各实体之间的实体关系,并根据所述图像数据中涉及的各实体之间的实体关系,确定所述图像数据的三元组信息;Input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entity relationship between the entities involved in the text data through the first recognition model, and according to the Entity relationships between entities involved in the text data, determining the triplet information of the text data, and inputting the image data corresponding to the target node into the pre-trained second recognition model, so as to pass the first 2. a recognition model, identifying the entity relationship between the entities involved in the image data, and determining the triplet information of the image data according to the entity relationship between the entities involved in the image data;
基于所述文本数据的三元组信息以及所述图像数据的三元组信息,在所述待扩充知识图谱扩充所述目标节点与其他节点之间的实体关系,以得到目标知识图谱,并通过所述目标知识图谱,执行所述目标业务。Based on the triplet information of the text data and the triplet information of the image data, expand the entity relationship between the target node and other nodes in the knowledge graph to be expanded to obtain the target knowledge graph, and pass The target knowledge graph executes the target business.
可选地,确定目标节点,具体包括:Optionally, determining the target node specifically includes:
获取目标业务对应的业务需求;Obtain the business requirements corresponding to the target business;
根据所述目标业务对应的业务需求,确定所述待扩充知识图谱中的各节点对应的实体名称与所述目标业务对应的业务需求之间的相关度,作为各节点的相关度;According to the business requirements corresponding to the target business, determine the correlation between the entity names corresponding to the nodes in the knowledge map to be expanded and the business requirements corresponding to the target business, as the correlation of each node;
将相关度大于设定相关度阈值的节点,作为目标节点。The nodes whose correlation degree is greater than the set correlation threshold are taken as the target nodes.
可选地,确定目标节点,具体包括:Optionally, determining the target node specifically includes:
确定所述待扩充知识图谱中的各节点对应的三元组数量;Determine the number of triples corresponding to each node in the knowledge map to be expanded;
将三元组数量小于设定数量阈值的节点,作为目标节点。The node whose number of triples is less than the set number threshold is used as the target node.
可选地,所述第一识别模型包括:文本识别网络以及文本关系网络;Optionally, the first recognition model includes: a text recognition network and a text relationship network;
将所述目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过所述第一识别模型,识别出所述文本数据中涉及的各实体之间的实体关系,并根据所述文本数据中涉及的各实体之间的实体关系,确定所述文本数据的三元组信息,具体包括:Input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entity relationship between the entities involved in the text data through the first recognition model, and according to the Entity relationship between entities involved in the text data, determine triplet information of the text data, specifically including:
将所述目标节点对应的文本数据输入到所述文本识别网络中,确定所述文本数据中涉及的各实体;Input the text data corresponding to the target node into the text recognition network, and determine the entities involved in the text data;
将所述文本数据中涉及的各实体输入到所述文本关系网络,确定所述文本数据中涉及的各实体之间的实体关系;inputting the entities involved in the text data into the text relationship network, and determining the entity relationship between the entities involved in the text data;
根据所述文本数据中涉及的各实体以及所述文本数据中涉及的各实体之间的实体关系,确定所述文本数据的三元组信息。The triplet information of the text data is determined according to the entities involved in the text data and the entity relationships among the entities involved in the text data.
可选地,在将所述目标节点对应的文本数据输入到所述文本识别网络中,确定所述文本数据中涉及的各实体之前,所述方法还包括:Optionally, before inputting the text data corresponding to the target node into the text recognition network and determining entities involved in the text data, the method further includes:
对所述目标节点对应的文本数据进行数据清洗,得到清洗后的文本数据;performing data cleaning on the text data corresponding to the target node to obtain the cleaned text data;
将所述目标节点对应的文本数据输入到所述文本识别网络中,确定所述文本数据中涉及的各实体,具体包括:Input the text data corresponding to the target node into the text recognition network, and determine each entity involved in the text data, specifically including:
将所述清洗后的文本数据输入到所述文本识别网络中,确定所述清洗后的文本数据中涉及的各实体。The cleaned text data is input into the text recognition network, and entities involved in the cleaned text data are determined.
可选地,所述第二识别模型包括:图像识别网络以及图像关系网络;Optionally, the second recognition model includes: an image recognition network and an image relationship network;
将所述目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过所述第二识别模型,识别出所述图像数据中涉及的各实体之间的实体关系,并根据所述图像数据中涉及的各实体之间的实体关系,确定所述图像数据的三元组信息,具体包括:input the image data corresponding to the target node into the pre-trained second recognition model, so as to recognize the entity relationship between the entities involved in the image data through the second recognition model, and according to the Entity relationship between entities involved in the image data, determine the triplet information of the image data, specifically include:
将所述目标节点对应的图像数据输入到所述图像识别网络中,确定所述图像数据中涉及的各实体;input the image data corresponding to the target node into the image recognition network, and determine the entities involved in the image data;
将所述图像数据中涉及的各实体输入到所述图像关系网络,确定所述图像数据中涉及的各实体之间的实体关系;input the entities involved in the image data into the image relationship network, and determine the entity relationship between the entities involved in the image data;
根据所述图像数据中涉及的各实体以及所述图像数据中涉及的各实体之间的实体关系,确定所述图像数据的三元组信息。The triplet information of the image data is determined according to the entities involved in the image data and the entity relationships among the entities involved in the image data.
可选地,在将所述目标节点对应的图像数据输入到所述图像识别网络中,确定所述图像数据中涉及的各实体之前,所述方法还包括:Optionally, before inputting the image data corresponding to the target node into the image recognition network and determining entities involved in the image data, the method further includes:
对所述目标节点对应的图像数据的图像尺寸以及图像分辨率进行调整,得到调整后的图像数据;Adjusting the image size and image resolution of the image data corresponding to the target node to obtain adjusted image data;
将所述目标节点对应的图像数据输入到所述图像识别网络中,确定所述图像数据中涉及的各实体,具体包括:Input the image data corresponding to the target node into the image recognition network, and determine each entity involved in the image data, specifically including:
将所述调整后的图像数据输入到所述图像识别网络中,确定所述调整后的图像数据中涉及的各实体。The adjusted image data is input into the image recognition network, and entities involved in the adjusted image data are determined.
可选地,基于所述文本数据的三元组信息以及所述图像数据的三元组信息,在所述待扩充知识图谱扩充所述目标节点与其他节点之间的实体关系,以得到目标知识图谱,具体包括:Optionally, based on the triplet information of the text data and the triplet information of the image data, the entity relationship between the target node and other nodes is expanded in the knowledge graph to be expanded to obtain the target knowledge Spectrum, including:
获取各开源知识图谱;Obtain various open source knowledge graphs;
从所述各开源知识图谱中查询目标节点,确定与目标节点相邻的其他节点,作为目标节点的相邻节点,并根据所述目标节点以及所述目标节点的相邻节点之间的实体关系,确定所述各开源知识图谱对应的三元组信息;Query the target node from the open source knowledge graphs, determine other nodes adjacent to the target node as adjacent nodes of the target node, and according to the entity relationship between the target node and the adjacent nodes of the target node , determining the triplet information corresponding to each of the open source knowledge graphs;
基于所述各开源知识图谱对应的三元组信息、所述文本数据的三元组信息以及所述图像数据的三元组信息,在所述待扩充知识图谱扩充所述目标节点与其他节点之间的实体关系,以得到目标知识图谱。Based on the triplet information corresponding to each open source knowledge graph, the triplet information of the text data, and the triplet information of the image data, expand the knowledge graph to be expanded between the target node and other nodes The entity relationship among them to get the target knowledge graph.
可选地,所述开源知识图谱包括:开放领域知识图谱以及目标业务对应的垂直领域知识图谱。Optionally, the open source knowledge graph includes: an open domain knowledge graph and a vertical domain knowledge graph corresponding to the target business.
可选地,从所述各开源知识图谱中查询目标节点,确定与目标节点相邻的其他节点,作为目标节点的相邻节点,并根据所述目标节点以及所述目标节点的相邻节点之间的实体关系,确定所述各开源知识图谱对应的三元组信息,具体包括:Optionally, query the target node from each of the open source knowledge graphs, determine other nodes adjacent to the target node as adjacent nodes of the target node, and Entity relationship among entities, determine triplet information corresponding to each open source knowledge graph, specifically including:
从所述各开源知识图谱中查询目标节点对应的实体名称,确定包含有所述目标节点对应的实体名称的开源知识图谱,作为候选知识图谱;Query the entity name corresponding to the target node from each of the open source knowledge graphs, and determine the open source knowledge graph containing the entity name corresponding to the target node as a candidate knowledge graph;
根据各候选知识图谱中的所述目标节点的相邻节点与所述待扩充知识图谱中的所述目标节点的相邻节点之间的相似度,确定目标节点对应的候选知识图谱;According to the similarity between the adjacent nodes of the target node in each candidate knowledge graph and the adjacent nodes of the target node in the knowledge graph to be expanded, determine the candidate knowledge graph corresponding to the target node;
将所述目标节点对应的候选知识图谱中的所述目标节点与所述目标节点的相邻节点之间的实体关系进行转换,得到所述候选知识图谱的三元组信息。The entity relationship between the target node and the adjacent nodes of the target node in the candidate knowledge graph corresponding to the target node is converted to obtain triple information of the candidate knowledge graph.
可选地,训练所述第一识别模型,具体包括:Optionally, training the first recognition model specifically includes:
获取文本训练样本;Obtain text training samples;
将所述文本训练样本输入到待训练的第一识别模型中,确定所述文本训练样本对应的三元组信息;Input the text training sample into the first recognition model to be trained, and determine the triplet information corresponding to the text training sample;
以最小化所述文本训练样本对应的三元组信息与所述文本训练样本对应的标签之间的偏差为优化目标,对所述第一识别模型进行训练。The first recognition model is trained with minimizing the deviation between the triplet information corresponding to the text training sample and the label corresponding to the text training sample as an optimization goal.
可选地,训练所述第二识别模型,具体包括:Optionally, training the second recognition model specifically includes:
获取图像训练样本;Obtain image training samples;
将所述图像训练样本输入到待训练的第二识别模型中,确定所述图像训练样本对应的三元组信息;Input the image training sample into the second recognition model to be trained, and determine the triplet information corresponding to the image training sample;
以最小化所述图像训练样本对应的三元组信息与所述图像训练样本对应的标签之间的偏差为优化目标,对所述第二识别模型进行训练。The second identification model is trained with the optimization goal of minimizing the deviation between the triplet information corresponding to the image training samples and the labels corresponding to the image training samples.
本说明书提供了一种业务执行的装置,包括:This manual provides a device for business execution, including:
获取模块,用于获取目标业务对应的待扩充知识图谱;The acquisition module is used to acquire the knowledge map to be expanded corresponding to the target business;
输入模块,用于将所述待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到所述目标节点对应的文本数据以及图像数据;The input module is used to input the entity name corresponding to the target node in the knowledge map to be expanded into the search engine, and obtain the text data and image data corresponding to the target node;
识别模块,用于将所述目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过所述第一识别模型,识别出所述文本数据中涉及的各实体之间的实体关系,并根据所述文本数据中涉及的各实体之间的实体关系,确定所述文本数据的三元组信息,以及将所述目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过所述第二识别模型,识别出所述图像数据中涉及的各实体之间的实体关系,并根据所述图像数据中涉及的各实体之间的实体关系,确定所述图像数据的三元组信息;A recognition module, configured to input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entity relationship between the entities involved in the text data through the first recognition model , and according to the entity relationship between the entities involved in the text data, determine the triplet information of the text data, and input the image data corresponding to the target node into the pre-trained second recognition model, Through the second recognition model, the entity relationship among the entities involved in the image data is identified, and according to the entity relationship between the entities involved in the image data, three elements of the image data are determined tuple information;
执行模块,用于基于所述文本数据的三元组信息以及所述图像数据的三元组信息,在所述待扩充知识图谱扩充所述目标节点与其他节点之间的实体关系,以得到目标知识图谱,并通过所述目标知识图谱,执行所述目标业务。An execution module, configured to expand the entity relationship between the target node and other nodes in the knowledge map to be expanded based on the triple information of the text data and the triple information of the image data, so as to obtain the target knowledge graph, and execute the target business through the target knowledge graph.
本说明书提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述业务执行的方法。This specification provides a computer-readable storage medium, the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned service execution method is realized.
本说明书提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述业务执行的方法。This specification provides an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. The processor implements the above-mentioned service execution method when executing the program.
本说明书采用的上述至少一个技术方案能够达到以下有益效果:The above-mentioned at least one technical solution adopted in this specification can achieve the following beneficial effects:
在本说明书提供的业务执行的方法中,获取目标业务对应的待扩充知识图谱。其次,将待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到目标节点对应的文本数据以及图像数据。而后,将目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过第一识别模型,识别出文本数据中涉及的各实体之间的实体关系,并根据文本数据中涉及的各实体之间的实体关系,确定文本数据的三元组信息,以及将目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过第二识别模型,识别出图像数据中涉及的各实体之间的实体关系,并根据图像数据中涉及的各实体之间的实体关系,确定图像数据的三元组信息。最后,基于文本数据的三元组信息以及图像数据的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱,并通过目标知识图谱,执行目标业务。In the business execution method provided in this manual, the knowledge map to be expanded corresponding to the target business is obtained. Secondly, input the entity name corresponding to the target node in the knowledge graph to be expanded into the search engine to obtain the text data and image data corresponding to the target node. Then, input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entity relationship between the entities involved in the text data through the first recognition model, and according to the various entities involved in the text data Entity relationship between entities, determine the triplet information of the text data, and input the image data corresponding to the target node into the pre-trained second recognition model, so that through the second recognition model, identify each element involved in the image data Entity relationship between entities, and according to the entity relationship between entities involved in the image data, triplet information of the image data is determined. Finally, based on the triplet information of the text data and the triplet information of the image data, the entity relationship between the target node and other nodes is expanded in the knowledge graph to be expanded to obtain the target knowledge graph, and through the target knowledge graph, the target business.
从上述的业务执行的方法中可以看出,本方法可以将待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到目标节点对应的文本数据以及图像数据。然后,将目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过第一识别模型,确定文本数据的三元组信息,以及将目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过第二识别模型,确定图像数据的三元组信息。最后,基于文本数据的三元组信息以及图像数据的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱,并通过目标知识图谱,执行目标业务。本方法可以提高业务执行的准确性。It can be seen from the above business execution method that this method can input the entity name corresponding to the target node in the knowledge map to be expanded into the search engine, and obtain the text data and image data corresponding to the target node. Then, input the text data corresponding to the target node into the pre-trained first recognition model, so as to determine the triplet information of the text data through the first recognition model, and input the image data corresponding to the target node into the pre-trained first recognition model. In the second recognition model, the triplet information of the image data is determined through the second recognition model. Finally, based on the triplet information of the text data and the triplet information of the image data, the entity relationship between the target node and other nodes is expanded in the knowledge graph to be expanded to obtain the target knowledge graph, and through the target knowledge graph, the target business. The method can improve the accuracy of business execution.
附图说明Description of drawings
此处所说明的附图用来提供对本说明书的进一步理解,构成本说明书的一部分,本说明书的示意性实施例及其说明用于解释本说明书,并不构成对本说明书的不当限定。在附图中:The drawings described here are used to provide a further understanding of this specification and constitute a part of this specification. The schematic embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the attached picture:
图1为本说明书实施例提供的业务执行的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for executing a business provided by an embodiment of this specification;
图2为本说明书实施例提供的一种扩充知识图谱的流程示意图;FIG. 2 is a schematic flow diagram of an expanded knowledge map provided by the embodiment of this specification;
图3为本说明书实施例提供的业务执行的装置的结构示意图;FIG. 3 is a schematic structural diagram of a service execution device provided by an embodiment of this specification;
图4为本说明书实施例提供的电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of this specification.
具体实施方式Detailed ways
为使本说明书的目的、技术方案和优点更加清楚,下面将结合本说明书具体实施例及相应的附图对本说明书技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本说明书保护的范围。In order to make the purpose, technical solution and advantages of this specification clearer, the technical solution of this specification will be clearly and completely described below in conjunction with specific embodiments of this specification and corresponding drawings. Apparently, the described embodiments are only some of the embodiments in this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this specification.
以下结合附图,详细说明本说明书各实施例提供的技术方案。The technical solutions provided by each embodiment of this specification will be described in detail below in conjunction with the accompanying drawings.
图1为本说明书实施例提供的业务执行的方法的流程示意图,具体包括以下步骤:Fig. 1 is a schematic flow chart of the method of service execution provided by the embodiment of this specification, which specifically includes the following steps:
S100:获取目标业务对应的待扩充知识图谱。S100: Obtain the knowledge graph to be expanded corresponding to the target business.
在本说明书实施例中,本说明书提供的业务执行的方法的执行主体可以是服务器、台式电脑等电子设备,为了便于描述,下面仅以服务器为执行主体,对本说明书提供的业务执行的方法进行说明。In the embodiment of this specification, the execution subject of the business execution method provided in this specification may be an electronic device such as a server, a desktop computer, etc. For the convenience of description, the following only uses the server as the execution subject to describe the business execution method provided in this specification .
在本说明书实施例中,服务器可以获取目标业务对应的待扩充知识图谱。In this embodiment of the specification, the server may acquire the knowledge graph to be expanded corresponding to the target business.
S102:将所述待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到所述目标节点对应的文本数据以及图像数据。S102: Input the entity name corresponding to the target node in the knowledge graph to be expanded into the search engine, and obtain text data and image data corresponding to the target node.
在本说明书实施例中,服务器可以将待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到目标节点对应的文本数据以及图像数据。这里提到的搜索引擎可以是指根据一定的策略、运用特定的计算机程序搜集互联网上的信息,在对信息进行组织和处理后,为用户提供检索服务的系统。In this embodiment of the specification, the server may input the entity name corresponding to the target node in the knowledge graph to be expanded into the search engine to obtain text data and image data corresponding to the target node. The search engine mentioned here can refer to a system that uses specific computer programs to collect information on the Internet according to a certain strategy, and provides users with retrieval services after organizing and processing the information.
在实际应用中,不同的业务具有不同的业务需求,待扩充知识图谱中的不同的节点与目标业务对应的业务需求的相关度并不相同。因此,服务器需要确定出与目标业务对应的业务需求的相关度较高的节点,作为目标节点,再确定目标节点对应的三元组,以对待扩充知识图谱进行扩充。In practical applications, different businesses have different business requirements, and different nodes in the knowledge graph to be expanded have different degrees of correlation with the business requirements corresponding to the target business. Therefore, the server needs to determine a node with a high correlation with the business requirement corresponding to the target business as the target node, and then determine the triplet corresponding to the target node to expand the knowledge map to be expanded.
具体的,服务器可以获取目标业务对应的业务需求。Specifically, the server may obtain the service requirement corresponding to the target service.
其次,服务器可以根据目标业务对应的业务需求,确定待扩充知识图谱中的各节点对应的实体名称与目标业务对应的业务需求之间的相关度,作为各节点的相关度。Secondly, according to the business requirements corresponding to the target business, the server can determine the correlation between the entity names corresponding to the nodes in the knowledge map to be expanded and the business requirements corresponding to the target business as the correlation of each node.
然后,服务器可以将相关度大于设定相关度阈值的节点,作为目标节点。Then, the server may use a node whose correlation degree is greater than a set correlation threshold as a target node.
在实际应用中,知识图谱中的一个节点对应的三元组数量是有限的,该节点的三元组数量越多,该节点就越不容易扩充。该节点的三元组数量越少,该节点就越容易扩充。因此,服务器可以确定出待扩充知识图谱中的三元组数量较少的节点,作为目标节点,从而,对待扩充知识图谱进行扩充。In practical applications, the number of triples corresponding to a node in the knowledge graph is limited. The more triples the node has, the harder it is for the node to expand. The smaller the number of triples in the node, the easier it is to expand the node. Therefore, the server may determine a node with a small number of triples in the knowledge graph to be expanded as a target node, thereby expanding the knowledge graph to be expanded.
在本说明书实施例中,服务器可以确定待扩充知识图谱中的各节点对应的三元组数量。In this embodiment of the specification, the server may determine the number of triples corresponding to each node in the knowledge graph to be expanded.
然后,服务器可以将三元组数量小于设定数量阈值的节点,作为目标节点。Then, the server may use the node whose number of triples is less than the set number threshold as the target node.
S104:将所述目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过所述第一识别模型,识别出所述文本数据中涉及的各实体之间的实体关系,并根据所述文本数据中涉及的各实体之间的实体关系,确定所述文本数据的三元组信息,以及将所述目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过所述第二识别模型,识别出所述图像数据中涉及的各实体之间的实体关系,并根据所述图像数据中涉及的各实体之间的实体关系,确定所述图像数据的三元组信息。S104: Input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entity relationship between the entities involved in the text data through the first recognition model, and according to Entity relationships between entities involved in the text data, determining triplet information of the text data, and inputting the image data corresponding to the target node into the pre-trained second recognition model, so as to pass the The second identification model, which identifies the entity relationship between the entities involved in the image data, and determines the triplet information of the image data according to the entity relationship between the entities involved in the image data .
在本说明书实施例中,服务器可以将目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过第一识别模型,识别出文本数据中涉及的各实体之间的实体关系,并根据文本数据中涉及的各实体之间的实体关系,确定文本数据的三元组信息,以及将目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过第二识别模型,识别出图像数据中涉及的各实体之间的实体关系,并根据图像数据中涉及的各实体之间的实体关系,确定图像数据的三元组信息。In the embodiment of this specification, the server may input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entity relationship between the entities involved in the text data through the first recognition model, and According to the entity relationship between the entities involved in the text data, determine the triplet information of the text data, and input the image data corresponding to the target node into the pre-trained second recognition model, so that through the second recognition model, the recognition The entity relationship among the entities involved in the image data is obtained, and the triple information of the image data is determined according to the entity relationship among the entities involved in the image data.
这里提到的三元组信息可以是指(实体1,关系,实体2),例如,(用户A,徒弟,用户B)。也可以是指(实体,属性名,属性值),例如,(神木,景点,属神湖)。The triple information mentioned here may refer to (entity 1, relationship, entity 2), for example, (user A, apprentice, user B). It can also refer to (entity, attribute name, attribute value), for example, (Shenmu, scenic spot, Shenhu Lake).
在本说明书实施例中,第一识别模型包括:文本识别网络以及文本关系网络。服务器可以将目标节点对应的文本数据输入到文本识别网络中,确定文本数据中涉及的各实体。这里提到的文本识别网络可以是由来自变压器的双向编码表示(BidirectionalEncoder Representation from Transformers,BERT)、双向长短期记忆网络(Bi-directional Long Short-Term Memory,BiLSTM)以及条件随机场(conditional randomfield,CRF)组成。来自变压器的双向编码表示是指预训练模型,用于确定文本数据的特征向量。双向长短期记忆网络是指编码层,用于特征提取。条件随机场是指解码层,用于输出文本数据中的各实体。当然,文本识别网络也可以是其他用于进行命名实体识别(NamedEntity Recognition,NER)的模型,本说明书不对文本识别网络进行限定。In the embodiment of this specification, the first recognition model includes: a text recognition network and a text relationship network. The server can input the text data corresponding to the target node into the text recognition network to determine the entities involved in the text data. The text recognition network mentioned here can be represented by Bidirectional Encoder Representation from Transformers (BidirectionalEncoder Representation from Transformers, BERT), Bi-directional Long Short-Term Memory (BiLSTM) and conditional random field (conditional randomfield, CRF) composition. Bidirectionally encoded representations from Transformers refer to pre-trained models for determining feature vectors for text data. The bidirectional LSTM network refers to the encoding layer, which is used for feature extraction. The conditional random field refers to the decoding layer, which is used to output each entity in the text data. Of course, the text recognition network may also be other models for named entity recognition (NamedEntity Recognition, NER), and this specification does not limit the text recognition network.
其次,服务器可以将文本数据中涉及的各实体输入到文本关系网络,确定文本数据中涉及的各实体之间的实体关系。Secondly, the server can input the entities involved in the text data into the text relationship network to determine the entity relationship among the entities involved in the text data.
然后,服务器可以根据文本数据中涉及的各实体以及文本数据中涉及的各实体之间的实体关系,确定文本数据的三元组信息。Then, the server can determine the triplet information of the text data according to the entities involved in the text data and the entity relationships among the entities involved in the text data.
在实际应用中,通过搜索引擎搜索到的文本数据中包含有空字符、无用标签、特殊字符等数据,这可能会导致第一识别模型输出的目标节点对应的文本数据的三元组信息出现错误。因此,服务器需要对文本数据进行数据清洗,以提高第一识别模型的输出结果的准确性。In practical applications, the text data searched by the search engine contains data such as empty characters, useless tags, special characters, etc., which may cause errors in the triplet information of the text data corresponding to the target node output by the first recognition model . Therefore, the server needs to perform data cleaning on the text data, so as to improve the accuracy of the output result of the first recognition model.
在本说明书实施例中,服务器可以对目标节点对应的文本数据进行数据清洗,得到清洗后的文本数据。例如,服务器可以去除目标节点对应的文本数据中的页面标签、空字符、特殊字符、无用标签等文本。In the embodiment of this specification, the server may perform data cleaning on the text data corresponding to the target node to obtain the cleaned text data. For example, the server may remove text such as page labels, null characters, special characters, useless labels, etc. in the text data corresponding to the target node.
然后,服务器可以将清洗后的文本数据输入到文本识别网络中,确定清洗后的文本数据中涉及的各实体。Then, the server may input the cleaned text data into the text recognition network to determine entities involved in the cleaned text data.
在本说明书实施例中,服务器在应用第一识别模型之前,需要对第一识别模型进行训练。In the embodiment of this specification, before the server applies the first recognition model, it needs to train the first recognition model.
首先,服务器可以获取文本训练样本。First, the server can obtain text training samples.
其次,服务器可以将文本训练样本输入到待训练的第一识别模型中,确定文本训练样本对应的三元组信息。Secondly, the server may input the text training samples into the first recognition model to be trained, and determine triplet information corresponding to the text training samples.
最后,服务器可以以最小化文本训练样本对应的三元组信息与文本训练样本对应的标签之间的偏差为优化目标,对第一识别模型进行训练。Finally, the server may train the first recognition model with the optimization goal of minimizing the deviation between the triplet information corresponding to the text training sample and the label corresponding to the text training sample.
在本说明书实施例中,第二识别模型可以是指场景图生成模型(Scene GraphGeneration,SGG)。当然,第二识别模型也可以是其他用于识别图像中的各实体之间的实体关系的模型,本说明书不对第二识别模型进行限定。In this embodiment of the specification, the second recognition model may refer to a scene graph generation model (Scene GraphGeneration, SGG). Of course, the second recognition model may also be other models for recognizing entity relationships among entities in the image, and this specification does not limit the second recognition model.
其中,第二识别模型包括:图像识别网络以及图像关系网络。Wherein, the second recognition model includes: an image recognition network and an image relationship network.
首先,服务器可以将目标节点对应的图像数据输入到图像识别网络中,确定图像数据中涉及的各实体。First, the server may input the image data corresponding to the target node into the image recognition network to determine the entities involved in the image data.
然后,服务器可以将图像数据中涉及的各实体输入到图像关系层,确定图像数据中涉及的各实体之间的实体关系。Then, the server can input the entities involved in the image data into the image relationship layer, and determine the entity relationship among the entities involved in the image data.
最后,服务器可以根据图像数据中涉及的各实体以及图像数据中涉及的各实体之间的实体关系,确定图像数据的三元组信息。Finally, the server can determine the triplet information of the image data according to the entities involved in the image data and the entity relationships among the entities involved in the image data.
在实际应用中,通过搜索引擎搜索到的图像数据的图像尺寸以及图像分辨率并不相同,但是,不同的图像尺寸以及图像分辨率的图像输入到第二识别模型进行处理后,确定出的输出结果的准确性较低。因此,服务器需要对各图像数据的图像尺寸以及图像分辨率进行调整,以提高第二识别模型的输出结果的准确性。In practical applications, the image size and image resolution of the image data searched by the search engine are not the same, but the images with different image sizes and image resolutions are input to the second recognition model for processing, and the determined output The result is less accurate. Therefore, the server needs to adjust the image size and image resolution of each image data, so as to improve the accuracy of the output result of the second recognition model.
在本说明书实施例中,服务器可以对目标节点对应的图像数据的图像尺寸以及图像分辨率进行调整,得到调整后的图像数据。In the embodiment of this specification, the server may adjust the image size and image resolution of the image data corresponding to the target node to obtain the adjusted image data.
然后,服务器可以将调整后的图像数据输入到图像识别网络中,确定调整后的图像数据中涉及的各实体。The server may then input the adjusted image data into the image recognition network to determine entities involved in the adjusted image data.
在本说明书实施例中,服务器在应用第二识别模型之前,需要对第二识别模型进行训练。In the embodiment of this specification, before the server applies the second recognition model, it needs to train the second recognition model.
首先,服务器可以获取图像训练样本。First, the server can obtain image training samples.
其次,服务器可以将图像训练样本输入到待训练的第二识别模型中,确定图像训练样本对应的三元组信息。Secondly, the server may input the image training samples into the second recognition model to be trained, and determine triplet information corresponding to the image training samples.
最后,服务器可以以最小化图像训练样本对应的三元组信息与图像训练样本对应的标签之间的偏差为优化目标,对第二识别模型进行训练。Finally, the server may train the second recognition model with the optimization goal of minimizing the deviation between the triplet information corresponding to the image training samples and the labels corresponding to the image training samples.
S106:基于所述文本数据的三元组信息以及所述图像数据的三元组信息,在所述待扩充知识图谱扩充所述目标节点与其他节点之间的实体关系,以得到目标知识图谱。S106: Based on the triplet information of the text data and the triplet information of the image data, expand the entity relationship between the target node and other nodes in the knowledge graph to be expanded to obtain a target knowledge graph.
在本说明书实施例中,服务器可以基于文本数据的三元组信息以及图像数据的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱。这里提到的其他节点可以是指待扩充知识图谱中的已存在的节点,也可以是指从文本数据的三元组信息或图像数据的三元组信息中获取到的新增节点。In this embodiment of the specification, the server may expand the entity relationship between the target node and other nodes in the knowledge graph to be expanded based on the triple information of the text data and the triple information of the image data to obtain the target knowledge graph. Other nodes mentioned here may refer to existing nodes in the knowledge graph to be expanded, or may refer to newly added nodes obtained from triplet information of text data or triplet information of image data.
在实际应用中,在确定出的文本数据的三元组信息以及图像数据的三元组信息中,存在准确率较低的三元组信息。为了避免构建出的目标知识图谱的准确性较低,服务器可以根据识别模型预测三元组信息时的预测概率,选取出预测概率较高的三元组信息,来构建目标知识图谱。In practical applications, among the determined triplet information of text data and triplet information of image data, there is triplet information with a low accuracy rate. In order to avoid the low accuracy of the constructed target knowledge graph, the server can select triple information with a higher prediction probability according to the prediction probability when the recognition model predicts the triple information to construct the target knowledge graph.
在本说明书实施例中,服务器可以确定第一识别模型预测文本数据对应的三元组信息时的预测概率。并确定预测概率大于设定预测概率阈值的文本数据对应的三元组信息。In this embodiment of the specification, the server may determine the prediction probability when the first recognition model predicts the triplet information corresponding to the text data. And determine the triplet information corresponding to the text data whose prediction probability is greater than the set prediction probability threshold.
同样的,服务器可以确定第二识别模型预测图像数据对应的三元组信息时的预测概率。并确定预测概率大于设定预测概率阈值的图像数据对应的三元组信息。Likewise, the server may determine the prediction probability when the second recognition model predicts the triplet information corresponding to the image data. And determine the triplet information corresponding to the image data whose prediction probability is greater than the set prediction probability threshold.
然后,服务器可以基于预测概率大于设定预测概率阈值的文本数据对应的三元组信息以及预测概率大于设定预测概率阈值的图像数据对应的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱。Then, the server can expand the target node and Entity relationships between other nodes to get the target knowledge graph.
在实际应用中,服务器除了可以根据文本数据以及图像数据中的各实体之间的实体关系,确定三元组信息,还可以从其他知识图谱中直接获取三元组信息。In practical applications, in addition to determining triplet information based on the entity relationship between entities in text data and image data, the server can also directly obtain triplet information from other knowledge graphs.
在本说明书实施例中,服务器可以获取各开源知识图谱。开源知识图谱包括:开放领域知识图谱以及目标业务对应的垂直领域知识图谱。这里提到的开放领域可以是指所有领域的集合。这里提到的垂直领域可以是指单一领域,例如,医学领域、金融领域等。In this embodiment of the specification, the server can obtain each open source knowledge graph. Open source knowledge graphs include: open domain knowledge graphs and vertical domain knowledge graphs corresponding to target businesses. The open domain mentioned here may refer to a collection of all domains. The vertical field mentioned here may refer to a single field, for example, the medical field, the financial field, and so on.
其次,服务器可以从各开源知识图谱中查询目标节点,确定与目标节点相邻的其他节点,作为目标节点的相邻节点,并根据目标节点以及目标节点的相邻节点之间的实体关系,确定各开源知识图谱对应的三元组信息。Secondly, the server can query the target node from various open source knowledge graphs, determine other nodes adjacent to the target node as the adjacent nodes of the target node, and determine The triplet information corresponding to each open source knowledge graph.
具体的,服务器可以将目标节点输入到实体链接模型中,确定各开源知识图谱中目标节点所在位置。Specifically, the server may input the target node into the entity link model to determine the location of the target node in each open source knowledge graph.
最后,服务器可以基于各开源知识图谱对应的三元组信息、文本数据的三元组信息以及图像数据的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱。Finally, based on the triplet information corresponding to each open source knowledge graph, the triplet information of text data, and the triplet information of image data, the server can expand the entity relationship between the target node and other nodes in the knowledge graph to be expanded, so as to Get the target knowledge map.
具体的,服务器可以从各开源知识图谱中查询目标节点对应的实体名称,确定包含有目标节点对应的实体名称的开源知识图谱,作为候选知识图谱。Specifically, the server may query the entity name corresponding to the target node from each open source knowledge graph, and determine an open source knowledge graph containing the entity name corresponding to the target node as a candidate knowledge graph.
其次,服务器可以根据各候选知识图谱中的目标节点的相邻节点与待扩充知识图谱中的目标节点的相邻节点之间的相似度,确定目标节点对应的候选知识图谱。Secondly, the server may determine the candidate knowledge graph corresponding to the target node according to the similarity between the adjacent nodes of the target node in each candidate knowledge graph and the adjacent nodes of the target node in the knowledge graph to be expanded.
最后,服务器可以将目标节点对应的候选知识图谱中的目标节点与目标节点的相邻节点之间的实体关系进行转换,得到候选知识图谱的三元组信息。Finally, the server can convert the entity relationship between the target node in the candidate knowledge graph corresponding to the target node and the adjacent nodes of the target node to obtain the triplet information of the candidate knowledge graph.
其中,服务器还可以将目标节点对应的候选知识图谱中的目标节点的相邻节点与其他节点之间的实体关系进行转换,得到候选知识图谱的三元组信息。Wherein, the server may also convert entity relationships between adjacent nodes of the target node and other nodes in the candidate knowledge graph corresponding to the target node to obtain triplet information of the candidate knowledge graph.
在实际应用中,一个实体可能对应有多个提及(mention),也就是多个实体名称。因此,服务器需要对多个实体名称进行统一。In practical applications, one entity may have multiple mentions, that is, multiple entity names. Therefore, the server needs to unify the names of multiple entities.
在本说明书实施例中,服务器可以对文本数据的三元组信息、图像数据的三元组信息以及各开源知识图谱的三元组信息中的实体名称进行统一。例如,一个用户姓A名B,其别称有大B,小A等,则需要统一改为AB。In this embodiment of the specification, the server may unify entity names in triplet information of text data, triplet information of image data, and triplet information of each open source knowledge graph. For example, if a user's surname is A and his name is B, and his aliases include Big B, Little A, etc., they need to be changed to AB uniformly.
进一步的,文本数据的三元组信息、图像数据的三元组信息以及各开源知识图谱的三元组信息中可能存在重复的三元组信息。基于此,服务器可以对上述各三元组信息进行去重,以构建目标知识图谱。Further, there may be repeated triplet information in triplet information of text data, triplet information of image data, and triplet information of each open source knowledge graph. Based on this, the server can deduplicate the information of the above triples to construct the target knowledge graph.
图2为本说明书实施例提供的一种扩充知识图谱的流程示意图。FIG. 2 is a schematic flowchart of an extended knowledge map provided by the embodiment of this specification.
在图2中,服务器从待扩充知识图谱中确定出相关度大于设定相关度阈值的节点,作为目标节点。In FIG. 2 , the server determines a node whose correlation degree is greater than a set correlation threshold from the knowledge graph to be expanded as a target node.
其次,将待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到目标节点对应的文本数据、目标节点对应的图像数据以及目标节点对应的开源知识图谱。Secondly, input the entity name corresponding to the target node in the knowledge map to be expanded into the search engine, and obtain the text data corresponding to the target node, the image data corresponding to the target node, and the open source knowledge map corresponding to the target node.
而后,服务器可以将目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过第一识别模型,识别出文本数据中涉及的各实体之间的实体关系,并根据文本数据中涉及的各实体之间的实体关系,确定文本数据的三元组信息,以及将目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过第二识别模型,识别出图像数据中涉及的各实体之间的实体关系,并根据图像数据中涉及的各实体之间的实体关系,确定图像数据的三元组信息。Then, the server can input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entity relationship between the entities involved in the text data through the first recognition model, and according to the text data involved in The entity relationship between the entities, determine the triplet information of the text data, and input the image data corresponding to the target node into the pre-trained second recognition model, so that through the second recognition model, the image data related to The entity relationship between the various entities in the image data, and according to the entity relationship between the various entities involved in the image data, determine the triplet information of the image data.
然后,服务器可以将目标节点输入到实体链接模型中,确定各开源知识图谱中目标节点所在位置,再确定目标节点对应的候选知识图谱,将目标节点对应的候选知识图谱中的目标节点与目标节点的相邻节点之间的实体关系进行转换,得到候选知识图谱的三元组信息。Then, the server can input the target node into the entity link model, determine the location of the target node in each open source knowledge graph, and then determine the candidate knowledge graph corresponding to the target node, and combine the target node and the target node in the candidate knowledge graph corresponding to the target node The entity relationship between the adjacent nodes is converted to obtain the triple information of the candidate knowledge graph.
最后,服务器可以基于各开源知识图谱对应的三元组信息、文本数据的三元组信息以及图像数据的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱。Finally, based on the triplet information corresponding to each open source knowledge graph, the triplet information of text data, and the triplet information of image data, the server can expand the entity relationship between the target node and other nodes in the knowledge graph to be expanded, so as to Get the target knowledge map.
从上述过程中可以看出,本方法可以将待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到目标节点对应的文本数据以及图像数据。然后,将目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过第一识别模型,确定文本数据的三元组信息,以及将目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过第二识别模型,确定图像数据的三元组信息。最后,基于文本数据的三元组信息以及图像数据的三元组信息,在待扩充知识图谱扩充目标节点与其他节点之间的实体关系,以得到目标知识图谱,并通过目标知识图谱,执行目标业务。本方法可以提高业务执行的准确性。It can be seen from the above process that this method can input the entity name corresponding to the target node in the knowledge map to be expanded into the search engine, and obtain the text data and image data corresponding to the target node. Then, input the text data corresponding to the target node into the pre-trained first recognition model, so as to determine the triplet information of the text data through the first recognition model, and input the image data corresponding to the target node into the pre-trained first recognition model. In the second recognition model, the triplet information of the image data is determined through the second recognition model. Finally, based on the triplet information of the text data and the triplet information of the image data, the entity relationship between the target node and other nodes is expanded in the knowledge graph to be expanded to obtain the target knowledge graph, and through the target knowledge graph, the target business. The method can improve the accuracy of business execution.
以上为本说明书的一个或多个实施例提供的业务执行的方法,基于同样的思路,本说明书还提供了相应的业务执行的装置,如图3所示。The above is the service execution method provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding service execution device, as shown in FIG. 3 .
图3为本说明书实施例提供的业务执行的装置的结构示意图,具体包括:Fig. 3 is a schematic structural diagram of a service execution device provided by an embodiment of this specification, specifically including:
获取模块300,用于获取目标业务对应的待扩充知识图谱;An acquisition module 300, configured to acquire the knowledge map to be expanded corresponding to the target business;
输入模块302,用于将所述待扩充知识图谱中的目标节点对应的实体名称输入到搜索引擎中,得到所述目标节点对应的文本数据以及图像数据;The input module 302 is used to input the entity name corresponding to the target node in the knowledge map to be expanded into the search engine to obtain text data and image data corresponding to the target node;
识别模块304,用于将所述目标节点对应的文本数据输入到预先训练的第一识别模型中,以通过所述第一识别模型,识别出所述文本数据中涉及的各实体之间的实体关系,并根据所述文本数据中涉及的各实体之间的实体关系,确定所述文本数据的三元组信息,以及将所述目标节点对应的图像数据输入到预先训练的第二识别模型中,以通过所述第二识别模型,识别出所述图像数据中涉及的各实体之间的实体关系,并根据所述图像数据中涉及的各实体之间的实体关系,确定所述图像数据的三元组信息;The recognition module 304 is configured to input the text data corresponding to the target node into the pre-trained first recognition model, so as to recognize the entities among the entities involved in the text data through the first recognition model relationship, and according to the entity relationship between the entities involved in the text data, determine the triplet information of the text data, and input the image data corresponding to the target node into the pre-trained second recognition model , so as to identify the entity relationship between the entities involved in the image data through the second recognition model, and determine the entity relationship between the entities involved in the image data according to the entity relationship between the entities involved in the image data triplet information;
执行模块306,用于基于所述文本数据的三元组信息以及所述图像数据的三元组信息,在所述待扩充知识图谱扩充所述目标节点与其他节点之间的实体关系,以得到目标知识图谱,并通过所述目标知识图谱,执行所述目标业务。The execution module 306 is configured to expand the entity relationship between the target node and other nodes in the knowledge map to be expanded based on the triple information of the text data and the triple information of the image data, so as to obtain A target knowledge graph, and execute the target business through the target knowledge graph.
可选地,所述输入模块302具体用于,获取目标业务对应的业务需求,根据所述目标业务对应的业务需求,确定所述待扩充知识图谱中的各节点对应的实体名称与所述目标业务对应的业务需求之间的相关度,作为各节点的相关度,将相关度大于设定相关度阈值的节点,作为目标节点。Optionally, the input module 302 is specifically configured to obtain the business requirements corresponding to the target business, and determine the entity names corresponding to the nodes in the knowledge graph to be expanded and the target business requirements according to the business requirements corresponding to the target business. The correlation between the business requirements corresponding to the business is taken as the correlation of each node, and the node whose correlation is greater than the set correlation threshold is used as the target node.
可选地,所述输入模块302具体用于,确定所述待扩充知识图谱中的各节点对应的三元组数量,将三元组数量小于设定数量阈值的节点,作为目标节点。Optionally, the input module 302 is specifically configured to determine the number of triples corresponding to each node in the to-be-expanded knowledge graph, and use a node whose triple number is less than a set number threshold as a target node.
可选地,所述第一识别模型包括:文本识别网络以及文本关系网络;Optionally, the first recognition model includes: a text recognition network and a text relationship network;
所述识别模块304具体用于,将所述目标节点对应的文本数据输入到所述文本识别网络中,确定所述文本数据中涉及的各实体,将所述文本数据中涉及的各实体输入到所述文本关系网络,确定所述文本数据中涉及的各实体之间的实体关系,根据所述文本数据中涉及的各实体以及所述文本数据中涉及的各实体之间的实体关系,确定所述文本数据的三元组信息。The recognition module 304 is specifically configured to input the text data corresponding to the target node into the text recognition network, determine the entities involved in the text data, and input the entities involved in the text data into The text relationship network determines the entity relationship between the entities involved in the text data, and determines the entity relationship between the entities involved in the text data and the entities involved in the text data. The triplet information describing the text data.
可选地,所述识别模块304具体还用于,对所述目标节点对应的文本数据进行数据清洗,得到清洗后的文本数据,将所述清洗后的文本数据输入到所述文本识别网络中,确定所述清洗后的文本数据中涉及的各实体。Optionally, the identification module 304 is further configured to perform data cleaning on the text data corresponding to the target node to obtain cleaned text data, and input the cleaned text data into the text recognition network , to determine the entities involved in the cleaned text data.
可选地,所述第二识别模型包括:图像识别网络以及图像关系网络;Optionally, the second recognition model includes: an image recognition network and an image relationship network;
所述识别模块304具体用于,将所述目标节点对应的图像数据输入到所述图像识别网络中,确定所述图像数据中涉及的各实体,将所述图像数据中涉及的各实体输入到所述图像关系层,确定所述图像数据中涉及的各实体之间的实体关系,根据所述图像数据中涉及的各实体以及所述图像数据中涉及的各实体之间的实体关系,确定所述图像数据的三元组信息。The recognition module 304 is specifically configured to input the image data corresponding to the target node into the image recognition network, determine the entities involved in the image data, and input the entities involved in the image data into the The image relationship layer determines the entity relationship between the entities involved in the image data, and determines the entity relationship between the entities involved in the image data and the entities involved in the image data. The triplet information of the described image data.
可选地,所述识别模块304具体还用于,对所述目标节点对应的图像数据的图像尺寸以及图像分辨率进行调整,得到调整后的图像数据,将所述调整后的图像数据输入到所述图像识别网络中,确定所述调整后的图像数据中涉及的各实体。Optionally, the identification module 304 is further configured to adjust the image size and image resolution of the image data corresponding to the target node to obtain adjusted image data, and input the adjusted image data to In the image recognition network, entities involved in the adjusted image data are determined.
可选地,所述执行模块306具体用于,获取各开源知识图谱,从所述各开源知识图谱中查询目标节点,确定与目标节点相邻的其他节点,作为目标节点的相邻节点,并根据所述目标节点以及所述目标节点的相邻节点之间的实体关系,确定所述各开源知识图谱对应的三元组信息,基于所述各开源知识图谱对应的三元组信息、所述文本数据的三元组信息以及所述图像数据的三元组信息,在所述待扩充知识图谱扩充所述目标节点与其他节点之间的实体关系,以得到目标知识图谱。Optionally, the execution module 306 is specifically configured to acquire each open source knowledge graph, query the target node from each open source knowledge graph, determine other nodes adjacent to the target node as adjacent nodes of the target node, and According to the entity relationship between the target node and the adjacent nodes of the target node, determine triplet information corresponding to each open source knowledge graph, based on the triplet information corresponding to each open source knowledge graph, the The triplet information of the text data and the triplet information of the image data expand the entity relationship between the target node and other nodes in the knowledge graph to be expanded to obtain the target knowledge graph.
可选地,所述开源知识图谱包括:开放领域知识图谱以及目标业务对应的垂直领域知识图谱。Optionally, the open source knowledge graph includes: an open domain knowledge graph and a vertical domain knowledge graph corresponding to the target business.
可选地,所述执行模块306具体用于,从所述各开源知识图谱中查询目标节点对应的实体名称,确定包含有所述目标节点对应的实体名称的开源知识图谱,作为候选知识图谱,根据各候选知识图谱中的所述目标节点的相邻节点与所述待扩充知识图谱中的所述目标节点的相邻节点之间的相似度,确定目标节点对应的候选知识图谱,将所述目标节点对应的候选知识图谱中的所述目标节点与所述目标节点的相邻节点之间的实体关系进行转换,得到所述候选知识图谱的三元组信息。Optionally, the execution module 306 is specifically configured to query the entity name corresponding to the target node from the open source knowledge graphs, and determine an open source knowledge graph containing the entity name corresponding to the target node as a candidate knowledge graph, According to the similarity between the adjacent nodes of the target node in each candidate knowledge graph and the adjacent nodes of the target node in the knowledge graph to be expanded, the candidate knowledge graph corresponding to the target node is determined, and the The entity relationship between the target node and the adjacent nodes of the target node in the candidate knowledge graph corresponding to the target node is converted to obtain the triplet information of the candidate knowledge graph.
可选地,所述识别模块304具体用于,获取文本训练样本,将所述文本训练样本输入到待训练的第一识别模型中,确定所述文本训练样本对应的三元组信息,以最小化所述文本训练样本对应的三元组信息与所述文本训练样本对应的标签之间的偏差为优化目标,对所述第一识别模型进行训练。Optionally, the recognition module 304 is specifically configured to obtain text training samples, input the text training samples into the first recognition model to be trained, and determine triplet information corresponding to the text training samples, with a minimum The deviation between the triplet information corresponding to the text training sample and the label corresponding to the text training sample is used as an optimization target, and the first recognition model is trained.
可选地,所述识别模块304具体用于,获取图像训练样本,将所述图像训练样本输入到待训练的第二识别模型中,确定所述图像训练样本对应的三元组信息,以最小化所述图像训练样本对应的三元组信息与所述图像训练样本对应的标签之间的偏差为优化目标,对所述第二识别模型进行训练。Optionally, the recognition module 304 is specifically configured to acquire image training samples, input the image training samples into the second recognition model to be trained, and determine triplet information corresponding to the image training samples, with a minimum The deviation between the triplet information corresponding to the image training sample and the label corresponding to the image training sample is used as an optimization target, and the second recognition model is trained.
本说明书还提供了一种计算机可读存储介质,该存储介质存储有计算机程序,计算机程序可用于执行上述图1提供的业务执行的方法。This specification also provides a computer-readable storage medium, which stores a computer program, and the computer program can be used to execute the service execution method provided in FIG. 1 above.
本说明书还提供了图4所示的电子设备的结构示意图。如图4所述,在硬件层面,该电子设备包括处理器、内部总线、网络接口、内存以及非易失性存储器,当然还可能包括其他业务所需要的硬件。处理器从非易失性存储器中读取对应的计算机程序到内存中然后运行,以实现上述图1提供的业务执行的方法。This specification also provides a schematic structural diagram of the electronic device shown in FIG. 4 . As shown in FIG. 4 , at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required by other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, so as to realize the service execution method provided in the above-mentioned FIG. 1 .
当然,除了软件实现方式之外,本说明书并不排除其他实现方式,比如逻辑器件抑或软硬件结合的方式等等,也就是说以下处理流程的执行主体并不限定于各个逻辑单元,也可以是硬件或逻辑器件。Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or the combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic device.
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable GateArray,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware DescriptionLanguage)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(RubyHardware Description Language)等,目前最普遍使用的是VHDL(Very-High-SpeedIntegrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, the improvement of a technology can be clearly distinguished as an improvement in hardware (for example, improvements in circuit structures such as diodes, transistors, and switches) or improvements in software (improvement in method flow). However, with the development of technology, the improvement of many current method flows can be regarded as the direct improvement of the hardware circuit structure. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (Programmable Logic Device, PLD) (such as a Field Programmable Gate Array (Field Programmable Gate Array, FPGA)) is such an integrated circuit, and its logic function is determined by programming the device by a user. It is programmed by the designer to "integrate" a digital system on a PLD, instead of asking a chip manufacturer to design and make a dedicated integrated circuit chip. Moreover, nowadays, instead of making integrated circuit chips by hand, this kind of programming is mostly realized by "logic compiler (logic compiler)" software, which is similar to the software compiler used when writing programs. The original code of the computer must also be written in a specific programming language, which is called a hardware description language (Hardware Description Language, HDL), and there is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language) , AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., currently the most commonly used is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be clear to those skilled in the art that only a little logical programming of the method flow in the above-mentioned hardware description languages and programming into an integrated circuit can easily obtain a hardware circuit for realizing the logic method flow.
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller may be implemented in any suitable way, for example the controller may take the form of a microprocessor or processor and a computer readable medium storing computer readable program code (such as software or firmware) executable by the (micro)processor , logic gates, switches, Application Specific Integrated Circuit (ASIC), programmable logic controllers, and embedded microcontrollers, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic. Those skilled in the art also know that, in addition to realizing the controller in a purely computer-readable program code mode, it is entirely possible to make the controller use logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded The same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as structures within the hardware component. Or even, means for realizing various functions can be regarded as a structure within both a software module realizing a method and a hardware component.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementing device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Combinations of any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above devices, functions are divided into various units and described separately. Of course, when implementing this specification, the functions of each unit can be implemented in one or more pieces of software and/or hardware.
本领域内的技术人员应明白,本说明书的实施例可提供为方法、系统、或计算机程序产品。因此,本说明书可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of this specification may be provided as methods, systems, or computer program products. Accordingly, this description may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本说明书是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The specification is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the specification. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM. Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes Other elements not expressly listed, or elements inherent in the process, method, commodity, or apparatus are also included. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本领域技术人员应明白,本说明书的实施例可提供为方法、系统或计算机程序产品。因此,本说明书可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of this specification may be provided as methods, systems or computer program products. Accordingly, this description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本说明书可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to part of the description of the method embodiment.
以上所述仅为本说明书的实施例而已,并不用于限制本说明书。对于本领域技术人员来说,本说明书可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本说明书的权利要求范围之内。The above descriptions are only examples of this specification, and are not intended to limit this specification. For those skilled in the art, various modifications and changes may occur in this description. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification shall be included within the scope of the claims of this specification.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310233068.3A CN116502633A (en) | 2023-03-03 | 2023-03-03 | Method and device for executing service, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310233068.3A CN116502633A (en) | 2023-03-03 | 2023-03-03 | Method and device for executing service, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116502633A true CN116502633A (en) | 2023-07-28 |
Family
ID=87315612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310233068.3A Pending CN116502633A (en) | 2023-03-03 | 2023-03-03 | Method and device for executing service, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116502633A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033667A (en) * | 2023-10-07 | 2023-11-10 | 之江实验室 | Knowledge graph construction method and device, storage medium and electronic equipment |
CN117033666A (en) * | 2023-10-07 | 2023-11-10 | 之江实验室 | Method and device for constructing multi-mode knowledge graph, storage medium and equipment |
CN118626656A (en) * | 2024-05-28 | 2024-09-10 | 杰软科技(集团)有限公司 | A large model training method, device and electronic device based on knowledge graph |
-
2023
- 2023-03-03 CN CN202310233068.3A patent/CN116502633A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033667A (en) * | 2023-10-07 | 2023-11-10 | 之江实验室 | Knowledge graph construction method and device, storage medium and electronic equipment |
CN117033666A (en) * | 2023-10-07 | 2023-11-10 | 之江实验室 | Method and device for constructing multi-mode knowledge graph, storage medium and equipment |
CN117033667B (en) * | 2023-10-07 | 2024-01-09 | 之江实验室 | Knowledge graph construction method and device, storage medium and electronic equipment |
CN117033666B (en) * | 2023-10-07 | 2024-01-26 | 之江实验室 | Method and device for constructing multi-mode knowledge graph, storage medium and equipment |
CN118626656A (en) * | 2024-05-28 | 2024-09-10 | 杰软科技(集团)有限公司 | A large model training method, device and electronic device based on knowledge graph |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116502633A (en) | Method and device for executing service, storage medium and electronic equipment | |
US11030411B2 (en) | Methods, apparatuses, and devices for generating word vectors | |
CN113221555B (en) | Keyword recognition method, device and equipment based on multitasking model | |
US10824819B2 (en) | Generating word vectors by recurrent neural networks based on n-ary characters | |
CN112948449A (en) | Information recommendation method and device | |
CN114926437A (en) | Image quality evaluation method and device | |
CN116303625A (en) | Data query method and device, storage medium and electronic equipment | |
CN111222315B (en) | Movie scenario prediction method | |
CN108959330A (en) | A kind of processing of database, data query method and apparatus | |
CN116303989A (en) | Patent retrieval method, device and equipment for multiple retrieval scenes | |
CN107688604A (en) | Data answering processing method, device and server | |
CN116049761A (en) | Data processing method, device and equipment | |
CN115391426A (en) | A data query method, device, storage medium and electronic equipment | |
WO2025108030A1 (en) | Model training | |
CN114117028A (en) | Information recommendation method, device, storage medium and electronic device | |
CN115017915B (en) | Model training and task execution method and device | |
CN111209277A (en) | Data processing method, device, equipment and medium | |
CN116342888A (en) | A method and device for training a segmentation model based on sparse annotation | |
CN116662657A (en) | Model training and information recommending method, device, storage medium and equipment | |
CN114926687B (en) | A training method and device for a classification model | |
CN115689676A (en) | Method, device, storage medium and electronic equipment for industry identification | |
CN113344197A (en) | Training method of recognition model, service execution method and device | |
CN117573849B (en) | A knowledge graph multi-hop question answering method, device, equipment and storage medium | |
CN118193757B (en) | Task execution method, device, storage medium and electronic device | |
CN117079646B (en) | Training method, device, equipment and storage medium of voice recognition model |
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 |