CN113392212A - Service knowledge graph construction method and device, electronic equipment and storage medium - Google Patents

Service knowledge graph construction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113392212A
CN113392212A CN202110047756.1A CN202110047756A CN113392212A CN 113392212 A CN113392212 A CN 113392212A CN 202110047756 A CN202110047756 A CN 202110047756A CN 113392212 A CN113392212 A CN 113392212A
Authority
CN
China
Prior art keywords
service
text information
information
text
target service
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
CN202110047756.1A
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.)
Tencent Technology Shenzhen Co Ltd
Guangzhou Tencent Technology Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110047756.1A priority Critical patent/CN113392212A/en
Publication of CN113392212A publication Critical patent/CN113392212A/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/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/247Thesauruses; Synonyms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供一种服务知识图谱构建方法、装置、电子设备及存储介质,涉及人工智能技术领域。本申请实施例针对搜索服务场景,获取各个目标服务文本信息;分别根据各个目标服务文本信息的第一文本特征,确定各个目标服务文本信息各自关联的至少一个衍生服务文本信息;根据各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱;由于本申请实施例提供的服务知识图谱构建方案,并不局限于获取到的目标服务文本信息,根据目标服务文本信息可以得到关联的衍生服务文本信息,从而使得构建得到的服务知识图谱包含更为丰富的信息。

Figure 202110047756

The present application provides a service knowledge graph construction method, device, electronic device and storage medium, which relate to the technical field of artificial intelligence. The embodiment of the present application obtains each target service text information for a search service scenario; determines at least one derivative service text information associated with each target service text information according to the first text feature of each target service text information; The association relationship between the information and at least one derivative service text information associated with each other, and the corresponding service knowledge graph is constructed; because the service knowledge graph construction solution provided by the embodiment of this application is not limited to the acquired target service text information, according to The target service text information can obtain the associated derivative service text information, so that the constructed service knowledge graph contains more abundant information.

Figure 202110047756

Description

一种服务知识图谱构建方法、装置、电子设备及存储介质A service knowledge graph construction method, device, electronic device and storage medium

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种服务知识图谱构建方法、装置、电子设备及存储介质。The present application relates to the field of computer technology, and in particular, to a method, apparatus, electronic device and storage medium for constructing a service knowledge graph.

背景技术Background technique

知识图谱(knowledge graph)是指以实体、概念作为节点,以节点之间关系作为边的树状拓扑网络。知识图谱使得知识获取更直接,从而实现数据搜索的便捷化、智能化和人性化。Knowledge graph refers to a tree-like topology network with entities and concepts as nodes and relationships between nodes as edges. The knowledge graph makes knowledge acquisition more direct, thus realizing the convenience, intelligence and humanization of data search.

在进行信息搜索时,可以根据预先构建的知识图谱,搜索与用户输入的搜索关键词有关联关系的信息。目前在构建知识图谱时是采用人工构建方式,人工获取大量的关键词,将获取到的关键词作为知识图谱的节点;以及人工设置的两个节点之间的关系,将具有关联关系的两个节点进行连线作为知识图谱的边;在生成节点和边之后完成知识图谱的构建。但是,采用人工构建的方式得到的知识图谱包含的信息数量和类型都有很大的局限性,构建得到的知识图谱过于单一。When searching for information, information related to the search keyword input by the user can be searched according to a pre-built knowledge graph. At present, the manual construction method is adopted when constructing the knowledge graph. A large number of keywords are obtained manually, and the obtained keywords are used as the nodes of the knowledge graph; and the relationship between the two nodes is manually set. The nodes are connected as the edges of the knowledge graph; the construction of the knowledge graph is completed after the nodes and edges are generated. However, the amount and type of information contained in the knowledge graph obtained by artificial construction have great limitations, and the constructed knowledge graph is too single.

发明内容SUMMARY OF THE INVENTION

本申请提供一种服务知识图谱构建方法、装置、电子设备及存储介质,用以灵活构建信息丰富的服务知识图谱。The present application provides a method, apparatus, electronic device and storage medium for constructing a service knowledge graph, which are used to flexibly construct a service knowledge graph with rich information.

第一方面,本申请提供了一种服务知识图谱构建方法,包括:In a first aspect, the present application provides a method for constructing a service knowledge graph, including:

针对搜索服务场景,获取各个目标服务文本信息;For search service scenarios, obtain text information of each target service;

分别根据所述各个目标服务文本信息的第一文本特征,确定所述各个目标服务文本信息各自关联的至少一个衍生服务文本信息;Determine at least one derivative service text information associated with each target service text information according to the first text feature of each target service text information respectively;

根据所述各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱。A corresponding service knowledge graph is constructed according to the association relationship between the respective target service text information and at least one derivative service text information associated with each other.

第二方面,本申请提供了一种服务知识图谱构建装置,包括:In a second aspect, the present application provides a service knowledge graph construction device, including:

获取单元,用于针对搜索服务场景,获取各个目标服务文本信息;an obtaining unit, used for obtaining text information of each target service according to the search service scenario;

确定单元,用于分别根据所述各个目标服务文本信息的第一文本特征,确定所述各个目标服务文本信息各自关联的至少一个衍生服务文本信息;a determining unit, configured to determine at least one derivative service text information associated with each target service text information according to the first text feature of each target service text information;

处理单元,用于根据所述各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱。The processing unit is configured to construct a corresponding service knowledge graph according to the association relationship between the respective target service text information and at least one derivative service text information associated with each other.

可选的,所述处理单元具体用于:Optionally, the processing unit is specifically used for:

针对所述各个目标服务文本信息分别执行以下操作:Perform the following operations on each of the target service text information:

根据所述各个服务文本信息中的一个目标服务文本信息与关联的至少一个衍生服务文本信息,分别生成包含目标服务文本信息、关联类型、衍生服务文本信息的三元组信息;其中,所述三元组信息的个数与所述一个目标服务文本信息关联的衍生服务文本信息的个数相同,所述关联类型为所述三元组信息包含的所述目标服务文本信息与所述衍生服务文本信息之间关联关系的类型。According to one target service text information in the respective service text information and at least one associated derivative service text information, the triple information including the target service text information, the association type, and the derivative service text information is respectively generated; wherein, the three The number of tuple information is the same as the number of derivative service text information associated with the one target service text information, and the association type is the target service text information and the derivative service text contained in the triple information. The type of relationship between information.

可选的,所述确定单元还用于:Optionally, the determining unit is also used for:

分别根据所述各个目标服务文本信息的第二文本特征,确定所述各个目标服务文本信息各自所属的服务类型;以及分别根据获得的各个衍生服务文本信息的第三文本特征,确定所述各个衍生服务文本信息各自所属的服务类型;Determine the service type to which each target service text information belongs respectively according to the second text feature of each target service text information; and determine each derivative service text information according to the obtained third text feature of each derivative service text information The service type to which the service text information belongs;

所述处理单元还用于:The processing unit is also used to:

在所述构建相应的服务知识图谱之后,响应展示所述服务知识图谱的指令,根据生成的各个三元组信息中包含的目标服务文本信息、衍生服务文本信息生成分别生成相应的节点,并基于所述各个目标服务文本信息各自对应的服务类型、以及所述各个衍生服务文本信息各自对应的服务类型,对生成的相应的节点进行分类展示;以及,根据生成的所述各个三元组信息中包含的关联类型,生成各个节点之间的边;根据生成的节点以及节点之间的边,展示构建的所述服务知识图谱。After the corresponding service knowledge graph is constructed, in response to the instruction for displaying the service knowledge graph, the corresponding nodes are generated according to the target service text information and the derived service text information contained in the generated triple information, respectively, and based on The respective service types corresponding to the respective target service text information and the respective service types corresponding to the respective derived service text information are classified and displayed on the generated corresponding nodes; The included association type generates the edges between each node; according to the generated nodes and the edges between the nodes, the constructed service knowledge graph is displayed.

可选的,所述衍生服务文本信息包括与所述目标服务文本信息为同义关联关系的同义文本信息;Optionally, the derivative service text information includes synonymous text information that is in a synonymous relationship with the target service text information;

所述确定单元还用于:The determining unit is also used for:

在所述确定所述各个目标服务文本信息各自关联的至少一个衍生服务文本信息之前,分别确定所述各个目标服务文本信息各自对应的文本内容信息;将所述各个服务文本信息各自对应的文本内容信息的信息内容,分别进行融合处理,得到相应目标服务文本信息的第一文本特征;以及,确定预设的候选文本信息集合中各个候选文本信息各自对应文本内容信息;将所述各个候选文本信息各自对应的文本内容信息的信息内容,分别进行融合处理,得到相应候选文本信息的第三文本特征;其中,所述文本内容信息包含编辑距离、语义距离、共现信息、属性信息中的任意一种或组合;Before determining at least one derivative service text information associated with each target service text information, respectively determine the text content information corresponding to each target service text information; The information content of the information is fused respectively to obtain the first text feature of the corresponding target service text information; and, the corresponding text content information of each candidate text information in the preset candidate text information set is determined; The information contents of the corresponding text content information are respectively fused to obtain the third text feature of the corresponding candidate text information; wherein the text content information includes any one of edit distance, semantic distance, co-occurrence information, and attribute information. species or combination;

所述确定单元具体用于:The determining unit is specifically used for:

针对各个目标服务文本信息分别执行以下操作:基于已训练的文本相关性模型,根据所述各个目标服务文本信息中的一个目标服务文本信息的第一文本特征,以及所述预设的候选文本信息集合中各个候选文本信息的第三文本特征,确定所述一个目标服务文本信息与所述预设的候选文本信息集合中各个候选文本信息之间的相似度;根据确定出的各个相似度,从所述预设的候选文本信息集合中筛选出与所述一个目标服务文本信息为同义关联关系的至少一个同义文本信息。The following operations are respectively performed for each target service text information: based on the trained text correlation model, according to the first text feature of one target service text information in the various target service text information, and the preset candidate text information The third text feature of each candidate text information in the set determines the similarity between the one target service text information and each candidate text information in the preset candidate text information set; At least one synonymous text information that is synonymous with the one target service text information is screened out from the preset candidate text information set.

可选的,所述衍生服务文本信息包括所述目标服务文本信息的上位文本信息;Optionally, the derivative service text information includes upper text information of the target service text information;

所述处理单元具体用于:The processing unit is specifically used for:

根据各个目标服务文本信息的第一文本特征以及预设的匹配规则,从预设的候选文本信息集合中筛选出各个目标服务文本信息各自关联的至少一个上位文本信息。According to the first text feature of each target service text information and the preset matching rule, at least one upper-level text information associated with each target service text information is screened from the preset candidate text information set.

可选的,所述获取单元具体用于:Optionally, the obtaining unit is specifically used for:

获取多个对象在搜索客户端中历史输入的各个服务文本信息,将获取到所述各个服务文本信息作为针对所述搜索服务场景的目标服务文本信息;或Obtain each service text information historically input by multiple objects in the search client, and use the acquired service text information as the target service text information for the search service scenario; or

从至少一个数据库中获取各个服务文本信息,作为针对所述搜索服务场景的目标服务文本信息。Each service text information is acquired from at least one database as the target service text information for the search service scenario.

可选的,所述处理单元还用于:Optionally, the processing unit is also used for:

响应目标对象触发的搜索指令,获取所述搜索指令中包含的搜索服务文本信息;根据构建的所述服务知识图谱,从所述服务知识图谱中确定出所述搜索服务文本信息、以及与所述搜索服务文本信息有关联关系的至少一个服务文本信息;并将所述搜索服务文本信息、以及与所述搜索服务文本信息有关联关系的至少一个服务文本信息作为待推荐服务文本信息;将确定出的所述待推荐服务文本信息对应的页面展示信息推荐给所述目标对象。In response to the search instruction triggered by the target object, obtain the search service text information contained in the search instruction; according to the constructed service knowledge graph, determine the search service text information from the service knowledge graph, and Searching for at least one piece of service text information associated with the service text information; using the search service text information and at least one service text information associated with the search service text information as the service text information to be recommended; The page display information corresponding to the text information of the service to be recommended is recommended to the target object.

第三方面,本申请实施例提供一种电子设备,包括:In a third aspect, an embodiment of the present application provides an electronic device, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请提供的服务知识图谱构建方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the service knowledge graph construction method provided by the present application.

第四方面,本申请实施例提供一种计算机可读介质,存储有计算机可执行指令,所述计算机可执行指令用于执行本申请提供的服务知识图谱构建方法。In a fourth aspect, an embodiment of the present application provides a computer-readable medium storing computer-executable instructions, where the computer-executable instructions are used to execute the service knowledge graph construction method provided by the present application.

本申请有益效果:Beneficial effects of this application:

本申请实施例提供的构建服务知识图谱方案,在构建服务知识图谱时,首先获取多个目标服务文本信息,然后根据目标服务文本信息的文本特征确定每个目标服务文本信息关联的至少一个衍生服务文本信息,因此,可以根据一个目标服务文本信息得到关联的至少一个衍生服务文本,从而能够丰富服务文本信息。另外,在得到每个目标服务文本信息关联的至少一个衍生服务文本信息,根据各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱。因此,本申请实施例提供的服务知识图谱构建方案,并不局限于获取到的目标服务文本信息,根据目标服务文本信息可以得到关联的衍生服务文本信息,从而使得构建得到的服务知识图谱包含更为丰富的信息。In the solution for building a service knowledge graph provided by the embodiments of the present application, when building a service knowledge graph, first obtain a plurality of target service text information, and then determine at least one derivative service associated with each target service text information according to the text features of the target service text information Therefore, at least one associated derivative service text can be obtained according to a target service text information, so that the service text information can be enriched. In addition, after obtaining at least one derivative service text information associated with each target service text information, a corresponding service knowledge graph is constructed according to the association relationship between each target service text information and the at least one derivative service text information associated with each target service text information. Therefore, the service knowledge graph construction solution provided by the embodiments of the present application is not limited to the acquired target service text information, and related derivative service text information can be obtained according to the target service text information, so that the constructed service knowledge graph contains more for rich information.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理,并不构成对本申请的不当限定。The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description, serve to explain the principles of the present application, and do not constitute an improper limitation of the present application.

图1为本申请实施例提供的一种服务知识图谱构建方法的应用场景示意图;1 is a schematic diagram of an application scenario of a method for constructing a service knowledge graph according to an embodiment of the present application;

图2为本申请实施例提供的一种服务知识图谱构建方法的流程图;2 is a flowchart of a method for constructing a service knowledge graph according to an embodiment of the present application;

图3为本申请实施例提供的一种确定衍生服务文本信息示意图;FIG. 3 is a schematic diagram of determining text information of a derivative service provided by an embodiment of the present application;

图4为本申请实施例提供的另一种确定衍生服务文本信息示意图;FIG. 4 is another schematic diagram of determining text information of derivative services provided by an embodiment of the present application;

图5为本申请实施例提供的一种服务知识图谱示意图;FIG. 5 is a schematic diagram of a service knowledge graph provided by an embodiment of the present application;

图6为本申请实施例提供的一种服务知识图谱的应用场景示意图;FIG. 6 is a schematic diagram of an application scenario of a service knowledge graph provided by an embodiment of the present application;

图7为本申请实施例提供的一种基于服务知识图谱的搜索方法流程示意图;FIG. 7 is a schematic flowchart of a search method based on a service knowledge graph provided by an embodiment of the present application;

图8为本申请实施例提供的一种服务知识图谱构建装置的结构示意图;FIG. 8 is a schematic structural diagram of an apparatus for constructing a service knowledge graph according to an embodiment of the present application;

图9为本申请实施例提供的一种电子设备的结构示意图;FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图10为本申请实施例提供的一种计算装置的结构示意图。FIG. 10 is a schematic structural diagram of a computing device according to an embodiment of the present application.

具体实施方式Detailed ways

为了使本领域技术人员更好地理解本申请的技术方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整的描述。In order to make those skilled in the art better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.

以下,对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。Hereinafter, some terms in the embodiments of the present application will be explained, so as to facilitate the understanding of those skilled in the art.

1、垂直搜索:垂直搜索是针对某一个行业的专业搜索引擎,是搜索引擎的细分和延伸,是对库中的某类专门的信息进行一次整合,定向分字段抽取出需要的数据进行处理后再以某种形式返回给用户。例如公众号搜索、小程序搜索等。1. Vertical search: Vertical search is a professional search engine for a certain industry. It is a subdivision and extension of the search engine. It integrates a certain type of specialized information in the library, and extracts the required data for processing by directional sub-fields. It is then returned to the user in some form. For example, official account search, small program search, etc.

2、服务搜索:用户可以通过搜索引擎进行服务搜索,用户输入搜索关键词(query),网页或客户端可以将满足用户搜索关键词的服务直接展示给用户。例如,用户搜索保姆时,服务搜索可以直接提供雇佣保姆的服务菜单。服务搜索是垂直搜索的一种。2. Service search: a user can search for a service through a search engine, the user enters a search keyword (query), and the web page or client can directly display the service satisfying the user's search keyword to the user. For example, when a user searches for a babysitter, the service search can directly provide a menu of services for hiring babysitters. Service search is a type of vertical search.

3、知识图谱:是通过将应用数学、图形学、信息可视化技术、信息科学等学科的理论与方法与计量学引文分析、共现分析等方法结合,并利用可视化的图谱形象地展示学科的核心结构、发展历史、前沿领域以及整体知识架构达到多学科融合目的的现代理论。把复杂的知识领域通过数据挖掘、信息处理、知识计量和图形绘制而显示出来,揭示知识领域的动态发展规律,为学科研究提供切实的、有价值的参考。通过对错综复杂的文档的数据进行有效的加工、处理和整合,转化为简单和清晰的“实体-关系-实体”的三元组,聚合大量知识的拓扑图。3. Knowledge graph: It combines the theories and methods of applied mathematics, graphics, information visualization technology, information science and other disciplines with methods such as metrology citation analysis and co-occurrence analysis, and uses a visual graph to visually display the core of the discipline The structure, development history, frontier fields and overall knowledge structure achieve modern theory for the purpose of multidisciplinary integration. The complex knowledge field is displayed through data mining, information processing, knowledge measurement and graphic drawing, revealing the dynamic development law of the knowledge field, and providing practical and valuable reference for subject research. Through the effective processing, processing and integration of the data of the intricate documents, it is transformed into a simple and clear "entity-relation-entity" triplet, and a topology map that aggregates a large amount of knowledge.

4、自然语言处理(NLP):是计算机科学领域与人工智能领域中的一个重要方向。它研究能实现人与计算机之间用自然语言进行有效通信的各种理论和方法。自然语言处理是一门融语言学、计算机科学、数学于一体的科学。4. Natural Language Processing (NLP): It is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can realize effective communication between humans and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics.

5、语义:语言所蕴含的信息就是语义。符号是语言的载体,符号本身没有意义,只有被赋予含义的符号才能够被使用,这时候语言被转化为信息,而语言的含义就是语义(Semantic)。5. Semantics: The information contained in language is semantics. Symbols are the carrier of language. Symbols themselves have no meaning. Only symbols that have been given meaning can be used. At this time, language is transformed into information, and the meaning of language is Semantic.

6、终端:又称为用户设备(User Equipment,UE)、移动台(Mobile Station,MS)、移动终端(Mobile Terminal,MT)等,是一种向用户提供语音和/或数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。目前,一些终端的举例为:手机(mobilephone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(Mobile Internet Device,MID)。6. Terminal: Also known as User Equipment (UE), Mobile Station (MS), Mobile Terminal (MT), etc., it is a device that provides voice and/or data connectivity to users , for example, handheld devices with wireless connectivity, in-vehicle devices, etc. At present, some examples of terminals are: a mobile phone (mobile phone), a tablet computer, a notebook computer, a palmtop computer, and a mobile Internet device (Mobile Internet Device, MID).

7、客户端:既可以指软件类的应用程序(Application,APP),也可以指终端设备。它具有可视的显示界面,能与用户进行交互;是与服务器相对应,为客户提供本地服务。针对软件类的应用程序,除了一些只在本地运行的应用程序之外,一般安装在普通的客户终端上,需要与服务端互相配合运行。因特网发展以后,较常用的应用程序包括了如收寄电子邮件时的电子邮件客户端,以及即时通讯的客户端等。对于这一类应用程序,需要网络中有相应的服务器和服务程序来提供相应的服务,如数据库服务,配置参数服务等,这样在客户终端和服务器端,需要建立特定的通信连接,来保证应用程序的正常运行。7. Client: It can refer to either a software application (Application, APP) or a terminal device. It has a visual display interface and can interact with users; it corresponds to the server and provides local services for customers. For software applications, except for some applications that only run locally, they are generally installed on common client terminals and need to run in cooperation with the server. After the development of the Internet, the more commonly used applications include e-mail clients for sending and receiving e-mails, and instant messaging clients. For this type of application, there needs to be a corresponding server and service program in the network to provide corresponding services, such as database service, configuration parameter service, etc., so that a specific communication connection needs to be established between the client terminal and the server to ensure the application normal operation of the program.

8、服务器:可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。8. Server: It can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud Cloud servers for basic cloud computing services such as communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

下面对本申请实施例的设计思想进行简要介绍:The design ideas of the embodiments of the present application are briefly introduced below:

人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。Artificial Intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.

人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, including both hardware-level technology and software-level technology. The basic technologies of artificial intelligence generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning.

机器学习(Machine Learning,ML)是专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。Machine Learning (ML) is the study of how computers simulate or implement human learning behaviors to acquire new knowledge or skills, and to reorganize existing knowledge structures to continuously improve their performance. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, teaching learning and other technologies. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications are in all fields of artificial intelligence.

随着搜素引擎和各种客户端的不断普及,越来越多的场景下用户可以使用搜索功能,用户在搜索引擎或客户端中输入搜索关键词,搜索引擎或客户端可以基于预先构建的知识图谱搜索与用户输入搜索关键词相关的信息展示给用户。目前在构建知识图谱时是采用人工构建方式,人工获取大量的关键词,将获取到的关键词作为知识图谱的节点;以及人工设置的两个节点之间的关系,将具有关联关系的两个节点进行连线作为知识图谱的边;在生成节点和边之后完成知识图谱的构建。但是,采用人工构建的方式得到的知识图谱包含的信息数量和类型都有很大的局限性。并且,目前构建的知识图谱均是针对物品或商品搜索场景,基于构建的知识图谱,向用户推荐的也是与用户搜索物品或商品相似的其它物品或商品;例如,用户输入的搜索关键词为“空调”,则会向用户推荐各种品牌各项功能的空调。目前并没有针对服务场景构建服务知识图谱。With the continuous popularity of search engines and various clients, users can use the search function in more and more scenarios. Users enter search keywords in the search engine or client, and the search engine or client can be based on pre-built knowledge. Graph search displays information related to the search keywords entered by the user to the user. At present, the manual construction method is adopted when constructing the knowledge graph. A large number of keywords are obtained manually, and the obtained keywords are used as the nodes of the knowledge graph; and the relationship between the two nodes is manually set. The nodes are connected as the edges of the knowledge graph; the construction of the knowledge graph is completed after the nodes and edges are generated. However, the amount and type of information contained in the knowledge graph obtained by artificial construction have great limitations. Moreover, the currently constructed knowledge graphs are all aimed at the item or commodity search scenario. Based on the constructed knowledge graph, other items or commodities similar to the user’s searched item or commodity are recommended to the user; for example, the search keyword entered by the user is “” Air Conditioning”, it will recommend air conditioners of various brands and functions to users. Currently, there is no service knowledge graph built for service scenarios.

因此,本申请实施例提供一种服务知识图谱的构建方法,针对搜索服务场景,获取各个目标服务文本信息;分别根据各个目标服务文本信息的第一文本特征,确定各个目标服务文本信息各自关联的至少一个衍生服务文本信息;根据各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱。本申请实施例提供的构建服务知识图谱方案,在构建服务知识图谱时,首先获取多个目标服务文本信息,然后根据目标服务文本信息的文本特征确定每个目标服务文本信息关联的至少一个衍生服务文本信息,因此,可以根据一个目标服务文本信息得到关联的至少一个衍生服务文本,从而能够丰富服务文本信息。另外,在得到每个目标服务文本信息关联的至少一个衍生服务文本信息,根据各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱。因此,本申请实施例提供的服务知识图谱构建方案,并不局限于获取到的目标服务文本信息,根据目标服务文本信息可以得到关联的衍生服务文本信息,从而使得构建得到的服务知识图谱包含更为丰富的信息。Therefore, an embodiment of the present application provides a method for constructing a service knowledge graph, which acquires text information of each target service according to a search service scenario; At least one derivative service text information; according to the association relationship between each target service text information and at least one derivative service text information associated with each, a corresponding service knowledge graph is constructed. In the solution for building a service knowledge graph provided by the embodiments of the present application, when building a service knowledge graph, first obtain a plurality of target service text information, and then determine at least one derivative service associated with each target service text information according to the text features of the target service text information Therefore, at least one associated derivative service text can be obtained according to a target service text information, so that the service text information can be enriched. In addition, after obtaining at least one derivative service text information associated with each target service text information, a corresponding service knowledge graph is constructed according to the association relationship between each target service text information and the at least one derivative service text information associated with each target service text information. Therefore, the service knowledge graph construction solution provided by the embodiments of the present application is not limited to the acquired target service text information, and related derivative service text information can be obtained according to the target service text information, so that the constructed service knowledge graph contains more for rich information.

在介绍完本申请实施例的设计思想之后,下面对本申请实施例的技术方案能够适用的应用场景做一些简单介绍,需要说明的是,以下介绍的应用场景仅用于说明本申请实施例而非限定。在具体实施过程中,可以根据实际需要灵活地应用本申请实施例提供的技术方案。After introducing the design ideas of the embodiments of the present application, the following briefly introduces some application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and not limited. In the specific implementation process, the technical solutions provided by the embodiments of the present application may be flexibly applied according to actual needs.

如图1所示,为本申请实施例示例性的一种应用场景的示意图,包括用户10、终端11、服务器12;As shown in FIG. 1, it is a schematic diagram of an exemplary application scenario of an embodiment of the present application, including a user 10, a terminal 11, and a server 12;

一种可选的应用场景为,用户10通过终端11的显示界面,触发服务知识图谱的构建指令,终端11将用户10触发的构建指令发送给服务器12;服务器12在接收到构建指令后,获取针对搜索服务场景的各个目标服务文本信息;分别根据各个目标服务文本信息的第一文本特征,确定各个目标服务文本信息各自关联的至少一个衍生服务文本信息;根据各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱;服务器12在构建得到服务知识图谱后,将构建得到的服务知识图谱进行存储。An optional application scenario is that the user 10 triggers the construction instruction of the service knowledge graph through the display interface of the terminal 11, and the terminal 11 sends the construction instruction triggered by the user 10 to the server 12; the server 12 obtains the construction instruction after receiving the construction instruction. For each target service text information of the search service scenario; according to the first text feature of each target service text information, determine at least one derivative service text information associated with each target service text information; The association relationship between at least one derivative service text information is used to construct a corresponding service knowledge graph; after the server 12 constructs and obtains the service knowledge graph, it stores the constructed service knowledge graph.

其中,本申请实施例的服务器可以为一个独立服务器,或者可以是由多个服务器组成的服务器集群。终端11与服务器12之间通过网络进行通信连接,该网络可以为局域网、广域网等。The server in this embodiment of the present application may be an independent server, or may be a server cluster composed of multiple servers. The terminal 11 and the server 12 are connected through a network for communication, and the network may be a local area network, a wide area network, or the like.

下面结合上述描述的应用场景,参考图2-图5来描述本申请示例性实施方式提供的服务知识图谱构建方法。需要注意的是,上述应用场景仅是为了便于理解本申请的精神和原理而示出,本申请的实施方式在此方面不受任何限制。相反,本申请的实施方式可以应用于适用的任何场景。The following describes the service knowledge graph construction method provided by the exemplary embodiment of the present application with reference to FIG. 2 to FIG. 5 in conjunction with the application scenarios described above. It should be noted that the above application scenarios are only shown for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, the embodiments of the present application can be applied to any scenario where applicable.

如图2所示,为本申请实施例提供的一种服务知识图谱构建方法流程示意图,该方法可以包括以下步骤:As shown in FIG. 2 , a schematic flowchart of a method for constructing a service knowledge graph provided in an embodiment of the present application, the method may include the following steps:

步骤S201、针对搜索服务场景,获取各个目标服务文本信息;Step S201, for the search service scenario, obtain text information of each target service;

步骤S202、分别根据各个目标服务文本信息的第一文本特征,确定各个目标服务文本信息各自关联的至少一个衍生服务文本信息;Step S202: Determine at least one derivative service text information associated with each target service text information according to the first text feature of each target service text information;

步骤S203、根据各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱。Step S203 , constructing a corresponding service knowledge graph according to the association relationship between each target service text information and at least one associated derivative service text information.

本申请实施例的目标服务文本信息可以为具有服务搜索意图的关键词;The target service text information in this embodiment of the present application may be keywords with service search intent;

本申请实施例目标服务文本信息的获取方式可以包括但不限于下列方式:The acquisition methods of the target service text information in this embodiment of the present application may include but are not limited to the following methods:

方式1、获取多个对象在搜索客户端中历史输入的各个服务文本信息,将获取到各个服务文本信息作为针对搜索服务场景的目标服务文本信息;Mode 1: Acquire each service text information historically input by multiple objects in the search client, and use the acquired service text information as the target service text information for the search service scenario;

在该种方式下,可以搜集大量用户在搜索客户端中历史输入的服务文本信息;由于用户在搜索客户端中历史输入的服务文本信息一般均为具有服务搜索意图的关键词,因此,可以将大量用户在搜索客户端中历史输入的服务文本信息作为针对搜索服务场景的目标服务文本信息。In this way, a large number of service text information historically input by users in the search client can be collected; since the service text information historically input by the user in the search client are generally keywords with service search intentions, it is possible to use The service text information historically input by a large number of users in the search client is used as the target service text information for the search service scenario.

例如,用户在搜索客户端中历史输入的服务文本信息可以为“修理空调”、“维修洗衣机”、“干洗”、“找保姆”、“找工作”等文本信息。For example, the service text information historically input by the user in the search client may be text information such as "repair air conditioner", "repair washing machine", "dry cleaning", "find a nanny", "find a job" and so on.

方式2、从至少一个数据库中获取各个服务文本信息,作为针对搜索服务场景的目标服务文本信息;Mode 2: Acquire each service text information from at least one database as the target service text information for the search service scenario;

在该种方式下,本申请实施例在构建服务知识图谱时,可以从一个或多个数据库中获取服务文本信息,从一个或多个数据库中获取的服务文本信息可以为具有服务搜索意图的文本信息。In this way, when constructing a service knowledge graph in this embodiment of the present application, service text information may be obtained from one or more databases, and the service text information obtained from one or more databases may be texts with service search intentions information.

本申请实施例在构建服务知识图谱时,需要根据节点所属的类目体系对服务知识图谱中的节点进行分类;在获取到各个目标服务文本信息之后,确定每个目标服务文本信息所属的服务类型;When constructing a service knowledge graph in the embodiment of the present application, it is necessary to classify the nodes in the service knowledge graph according to the category system to which the nodes belong; after acquiring the text information of each target service, determine the service type to which the text information of each target service belongs. ;

需要说明的是,目标服务文本信息所属的服务类型为目标服务文本信息在服务知识图谱中所属的类目体系。It should be noted that the service type to which the target service text information belongs is the category system to which the target service text information belongs in the service knowledge graph.

在一些实施例中,根据下列方式确定各个目标服务文本信息所属的服务类型:In some embodiments, the service type to which each target service text information belongs is determined according to the following methods:

基于已训练的文本分类模型,确定各个目标服务文本信息所属的服务类型;Based on the trained text classification model, determine the service type to which each target service text information belongs;

实施中,可以将各个目标服务文本信息分别输入已训练的文本分类模型,并将已训练的文本分类模型的输出作为各个目标服务文本信息所属的服务类型。In implementation, each target service text information may be input into the trained text classification model respectively, and the output of the trained text classification model may be used as the service type to which each target service text information belongs.

其中,已训练的文本分类模型包括特征提取网络和分类网络;Among them, the trained text classification model includes feature extraction network and classification network;

已训练的文本分类模型的特征提取网络是通过embedding的方式对目标服务文本信息进行随机初始化;The feature extraction network of the trained text classification model randomly initializes the target service text information by embedding;

已训练的文本分类模型的分类网络对随机初始化得到的embedding向量进行分类,得到各个目标服务文本信息所属的服务类型。The classification network of the trained text classification model classifies the randomly initialized embedding vectors to obtain the service type to which each target service text information belongs.

下面针对基于已训练的文本分类模型得到各个目标服务文本信息所属的服务类型的方式进行详细说明:The following describes in detail how to obtain the service type to which each target service text information belongs based on the trained text classification model:

基于已训练的文本分类模型的特征提取网络,针对各个目标服务文本信息分别执行以下操作:Based on the feature extraction network of the trained text classification model, the following operations are performed for each target service text information:

从各个目标服务文本信息中提取一个目标服务文本信息对应的字向量、词向量以及表示一个目标服务文本信息中各字符之间相对位置关系位置向量;将提取出的字向量、词向量以及位置向量进行融合处理得到一个目标服务文本信息的第二文本特征。Extract the word vector, word vector and position vector representing the relative positional relationship between characters in a target service text information from each target service text information; the extracted word vector, word vector and position vector Perform fusion processing to obtain a second text feature of the target service text information.

在基于已训练的文本分类模型的特征提取网络,得到目标服务文本信息第二文本特征之后,基于已训练的文本分类模型的分类网络,确定每个目标服务文本信息所属的服务类型;After obtaining the second text feature of the target service text information based on the feature extraction network of the trained text classification model, determine the service type to which each target service text information belongs based on the classification network of the trained text classification model;

基于已训练的文本分类模型的分类网络,针对各个目标服务文本信息分别执行以下操作:Based on the classification network of the trained text classification model, the following operations are performed for each target service text information:

将各个目标服务文本信息中的一个目标服务文本信息的第二文本特征进行均值化处理,得到用于表示一个目标服务文本信息分别属于各个预设服务类型的概率的分类结果;根据所述分类结果,确定一个目标服务文本信息所属的服务类型。Perform averaging processing on the second text feature of a target service text information in each target service text information to obtain a classification result for representing the probability that a target service text information belongs to each preset service type; according to the classification result , to determine the service type to which a target service text message belongs.

需要说明的是,本发明实施例的文本分类模型可以为Fasttext模型。It should be noted that, the text classification model in the embodiment of the present invention may be a Fasttext model.

本申请实施例在获取到各个目标服务文本信息之后,还可以确定每个目标服务文本信息的属性信息;In this embodiment of the present application, after acquiring each target service text information, the attribute information of each target service text information can also be determined;

在确定每个目标服务文本信息的属性信息时,本申请实施例获取每个目标服务文本信息对应的属性特征;When determining the attribute information of each target service text information, the embodiment of the present application acquires the attribute feature corresponding to each target service text information;

其中,目标服务文本信息对应的属性特征包括但不限于词性特征、embedding特征、词频特征;The attribute features corresponding to the target service text information include but are not limited to part-of-speech features, embedding features, and word frequency features;

针对词性特征,可以采用结巴分词得到各个目标服务文本信息的词性特征;例如,词性特征可以为名词、动词、动名词等;For part-of-speech features, stammering word segmentation can be used to obtain the part-of-speech features of each target service text information; for example, the part-of-speech features can be nouns, verbs, gerunds, etc.;

针对embedding特征,可以采用已训练的word2vec模型,得到各个目标服务文本信息的embedding特征;For the embedding feature, the trained word2vec model can be used to obtain the embedding feature of the text information of each target service;

针对词频特征,可以采用已训练的TF IDF模型,得到各个目标服务文本信息的词频特征。For word frequency features, the trained TF IDF model can be used to obtain word frequency features of each target service text information.

在得到目标服务文本信息对应的属性特征之后,将各个目标服务文本信息对应的属性特征输入已训练的Xgboost分类模型,得到各个目标服务文本信息的属性信息。After the attribute features corresponding to the target service text information are obtained, the attribute features corresponding to each target service text information are input into the trained Xgboost classification model to obtain the attribute information of each target service text information.

本申请实施例在获取到各个目标服务文本信息之后,根据各个目标服务文本信息的第一文本特征,确定各个目标服务文本信息各自关联的至少一个衍生服务文本信息;In this embodiment of the present application, after acquiring each target service text information, according to the first text feature of each target service text information, at least one derivative service text information associated with each target service text information is determined;

需要说明的是,本申请实施例中每个目标服务文本信息可以确定出至少一个衍生服务文本信息。It should be noted that, in this embodiment of the present application, each target service text information may determine at least one derivative service text information.

其中,衍生服务文本信息包括与目标服务文本信息为同义关联关系的同义文本信息、目标服务文本信息的上位文本信息;Wherein, the derivative service text information includes synonymous text information that is in a synonymous relationship with the target service text information, and superordinate text information of the target service text information;

下面针对这两种类型的衍生服务文本信息的确定方式分别进行说明:The following describes the determination methods of these two types of derivative service text information:

1、衍生服务文本信息与目标服务文本信息为同义关联关系的同义文本信息;1. The derivative service text information and the target service text information are synonymous text information with a synonymous relationship;

例如,在目标服务文本信息为实体词时,衍生服务文本信息为实体词的同义词或扩展词。For example, when the target service text information is an entity word, the derived service text information is a synonym or extension of the entity word.

在确定目标服务文本信息的同义文本信息时,可以基于已训练的文本相关性模型,确定各个目标服务文本信息的同义文本信息;When determining the synonymous text information of the target service text information, the synonymous text information of each target service text information can be determined based on the trained text correlation model;

基于已训练的文本相关性模型,提取各个目标服务文本信息的第一文本特征;Based on the trained text correlation model, extract the first text feature of each target service text information;

实施中,针对各个目标服务文本信息,可以根据下列方式得到每个目标服务文本信息的第一文本特征:In implementation, for each target service text information, the first text feature of each target service text information can be obtained according to the following methods:

分别确定各个目标服务文本信息各自对应的文本内容信息;将各个服务文本信息各自对应的文本内容信息的信息内容,分别进行融合处理,得到相应目标服务文本信息的第一文本特征。The text content information corresponding to each target service text information is determined respectively; the information content of the text content information corresponding to each service text information is respectively fused to obtain the first text feature of the corresponding target service text information.

另外,本申请实施例在基于已训练的文本相关性模型确定各个目标服务文本信息的同义文本信息时,是根据各个目标服务文本信息的第一文本特征,以及预设的候选文本信息集合中各个候选文本信息对应的第三文本特征,从预设的候选文本信息集合中筛选出与目标服务文本信息为同义关联关系的至少一个同义文本信息;In addition, in the embodiment of the present application, when the synonymous text information of each target service text information is determined based on the trained text correlation model, it is based on the first text feature of each target service text information and the preset candidate text information set in the set of text information. For the third text feature corresponding to each candidate text information, at least one synonymous text information that is synonymous with the target service text information is selected from the preset candidate text information set;

实施中,针对预设的候选文本信息集合中各个候选文本信息,可以根据下列方式得到每个候选文本信息的第三文本特征:In implementation, for each candidate text information in the preset candidate text information set, the third text feature of each candidate text information can be obtained in the following manner:

确定预设的候选文本信息集合中各个候选文本信息各自对应文本内容信息;将各个候选文本信息各自对应的文本内容信息的信息内容,分别进行融合处理,得到相应候选文本信息的第三文本特征。Determine the corresponding text content information of each candidate text information in the preset candidate text information set; respectively fuse the information content of the text content information corresponding to each candidate text information to obtain the third text feature of the corresponding candidate text information.

需要说明的是,文本内容信息包含编辑距离、语义距离、共现信息、属性信息中的任意一种或组合;It should be noted that the text content information includes any one or a combination of edit distance, semantic distance, co-occurrence information, and attribute information;

其中,编辑距离为文本信息中两个字符串的差异程度的量化量测,量测方式是看至少需要多少次的处理才能将一个字符串变成另一个字符串。编辑距离可以用在NLP中;语义距离为在语义空间中的距离;共现信息为文本信息描述的信息共同出现的现象。Among them, the edit distance is a quantitative measure of the degree of difference between two character strings in text information, and the measurement method is to see how many times of processing is required to turn one character string into another character string. Edit distance can be used in NLP; semantic distance is the distance in semantic space; co-occurrence information is the phenomenon that the information described by text information co-occurs.

属性信息的确定方式可以参见上文描述;例如,在目标服务文本信息包括服务词时,属性信息包括服务实体词、服务行为词、服务状态词、服务复合词等。The way of determining the attribute information can be referred to the above description; for example, when the target service text information includes service words, the attribute information includes service entity words, service behavior words, service status words, service compound words, and the like.

在得到各个目标服务文本信息的第一文本特征,以及预设的候选文本信息集合中各个候选文本信息的第三文本特征之后,基于已训练的文本相关性模型,得到各个目标服务文本信息各自关联的至少一个衍生服务文本信息;After obtaining the first text feature of each target service text information and the third text feature of each candidate text information in the preset candidate text information set, based on the trained text correlation model, obtain the respective associations of each target service text information at least one derivative service text message of ;

例如,本申请实施例的文本相关性模型可以为线性LR模型。For example, the text correlation model in this embodiment of the present application may be a linear LR model.

实施中,针对各个目标服务文本信息分别执行以下操作:During implementation, perform the following operations for each target service text information:

基于已训练的文本相关性模型,根据各个目标服务文本信息中的一个目标服务文本信息的第一文本特征,以及预设的候选文本信息集合中各个候选文本信息的第三文本特征,确定一个目标服务文本信息与预设的候选文本信息集合中各个候选文本信息之间的相似度;根据确定出的各个相似度,从预设的候选文本信息集合中筛选出与一个目标服务文本信息为同义关联关系的至少一个同义文本信息。Based on the trained text correlation model, a target is determined according to the first text feature of one target service text information in each target service text information, and the third text feature of each candidate text information in the preset candidate text information set The similarity between the service text information and each candidate text information in the preset candidate text information set; according to each determined similarity, screen out from the preset candidate text information set as synonymous with a target service text information At least one synonymous textual information of the association relationship.

需要说明的是,在确定目标文本信息关联的同义文本信息时,可以根据目标文本信息的属性信息以及候选文本信息的属性信息,可以得到不同属性的同义文本信息。It should be noted that, when the synonymous text information associated with the target text information is determined, synonymous text information of different attributes can be obtained according to the attribute information of the target text information and the attribute information of the candidate text information.

例如,在目标文本信息为“空调”时,对应的同义文本信息包括同义词和扩展词;其中,得到的与“空调”对应的同义词可以为“制冷空调”,得到的与“空调”对应的扩展词可以为汽车空调、中央空调、空调设备、空调机、空调车、空调网、空气、变频空调等。For example, when the target text information is "air conditioner", the corresponding synonym text information includes synonyms and extended words; wherein, the obtained synonym corresponding to "air conditioner" may be "refrigeration air conditioner", and the obtained synonym corresponding to "air conditioner" The expanded words can be automobile air conditioners, central air conditioners, air conditioners, air conditioners, air conditioners, air conditioners, air conditioners, inverter air conditioners, etc.

2、衍生服务文本信息与目标服务文本信息为目标服务文本信息的上位文本信息;2. The derivative service text information and the target service text information are the upper text information of the target service text information;

例如,在目标服务文本信息为实体词时,衍生服务文本信息为实体词的上位词。For example, when the target service text information is an entity word, the derived service text information is a hypernym of the entity word.

在一些实施例中,根据下列方式得到各个目标服务文本信息各自关联的至少一个上位文本信息:In some embodiments, at least one upper-level text information associated with each target service text information is obtained according to the following methods:

根据各个目标服务文本信息的第一文本特征以及预设的匹配规则,从预设的候选文本信息集合中筛选出各个目标服务文本信息各自关联的至少一个上位文本信息。According to the first text feature of each target service text information and the preset matching rule, at least one upper-level text information associated with each target service text information is screened from the preset candidate text information set.

需要说明的是,本申请实施例在根据目标服务文本信息得到关联的上位文本信息时,可以基于人工pattern挖掘的方式,得到目标服务文本信息关联的上位文本信息集合。例如,pattern挖掘确定A属于B,则B为A的上位文本信息。It should be noted that, in this embodiment of the present application, when the associated upper text information is obtained according to the target service text information, a set of upper text information associated with the target service text information may be obtained based on manual pattern mining. For example, if pattern mining determines that A belongs to B, then B is the upper text information of A.

通过上文描述的方式,针对各个目标服务文本信息,可以得到目标服务文本信息所属的服务类型、目标服务文本信息的属性信息、目服务文本信息关联的同义文本信息以及目标服务文本信息的上位文本信息。Through the method described above, for each target service text information, the service type to which the target service text information belongs, the attribute information of the target service text information, the synonymous text information associated with the target service text information, and the upper level of the target service text information can be obtained. text information.

例如,如图3所示,在本申请实施例的目标服务文本信息包括空调:确定“空调”所属的服务类型为家政;确定“空调”的属性信息为服务实体词;确定“空调”的扩展词包括汽车空调、中央空调、空调设备、空调机、空调车、空调网、空气、变频空调;确定“空调”的同义词为制冷空调;确定“空调”的上位词包括家用电器、家居电器、家电、电器、消费电子产品。For example, as shown in FIG. 3 , the target service text information in this embodiment of the present application includes air conditioners: determine the service type to which "air conditioner" belongs is housekeeping; determine the attribute information of "air conditioner" as a service entity word; determine the extension of "air conditioner" The words include automobile air conditioner, central air conditioner, air conditioner equipment, air conditioner, air conditioner vehicle, air conditioner network, air, inverter air conditioner; the synonym of "air conditioner" is determined as refrigeration air conditioner; the hypernym of "air conditioner" is determined to include household appliances, household appliances, household appliances , electrical appliances, consumer electronics.

如图4所示,在本申请实施例的目标服务文本信息包括快速:确定“快速”所属的服务类型为家政或交通;在家政类型下,确定“快速”的属性信息为服务状态词,确定“快速”的扩展词包括快、速度;在交通类型下,确定“快速”的属性信息为服务状态词,确定“快速”的扩展词包括快速道路、速度、高速。As shown in FIG. 4 , the text information of the target service in this embodiment of the present application includes express: determine that the service type to which “express” belongs is housekeeping or transportation; The extended word of "fast" includes fast and speed; under the traffic type, the attribute information of "fast" is determined as the service status word, and the extended word of "fast" includes express road, speed and high speed.

本申请实施例在确定各个目标服务文本信息各自关联的至少一个衍生服务文本信息之后,根据各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱;In this embodiment of the present application, after determining at least one derivative service text information associated with each target service text information, a corresponding service knowledge graph is constructed according to the association relationship between each target service text information and at least one derivative service text information associated with each target service text information. ;

在一些实施例中,可以根据下列方式构建服务知识图谱:In some embodiments, the service knowledge graph can be constructed in the following manner:

根据各个服务文本信息中的一个目标服务文本信息与关联的至少一个衍生服务文本信息,分别生成包含目标服务文本信息、关联类型、衍生服务文本信息的三元组信息;其中,三元组信息的个数与一个目标服务文本信息关联的衍生服务文本信息的个数相同,关联类型为所述三元组信息包含的目标服务文本信息与所述衍生服务文本信息之间关联关系的类型。According to one target service text information in each service text information and the associated at least one derivative service text information, the triple information including the target service text information, the association type, and the derived service text information is respectively generated; wherein, the triple information of the triple information The number is the same as the number of derivative service text information associated with a target service text information, and the association type is the type of the association relationship between the target service text information contained in the triplet information and the derivative service text information.

需要说明的是,本申请实施例构建的服务知识图谱在存储时可以以三元组信息的方式进行存储,每一个三元组信息表示形式为<实体-关系-实体>;其中实体可以为目标服务文本信息或衍生服务文本信息,关系为两个实体之间的关联关系;It should be noted that the service knowledge graph constructed in the embodiment of the present application may be stored in the form of triple information, and each triple information is represented in the form of <entity-relation-entity>; the entity may be the target Service text information or derivative service text information, the relationship is an association relationship between two entities;

其中,本申请实施例两个实体之间的关联关系包括但不限于:属于、作用于、行为是、同义、位于、品牌是、主要服务是、服务地域、服务人群、发生。Wherein, the association relationship between the two entities in this embodiment of the present application includes, but is not limited to: belonging to, acting on, behavior is, synonymous, located, brand is, main service is, service area, service crowd, and occurrence.

例如,目标服务文本信息为“洗衣机维修”,确定上位文本信息包括家电维修,确定同义文本信息包括洗衣机、维修;目标服务文本信息为“马桶修理”,确定上位文本信息包括房屋维修、厨卫维修,确定同义文本信息包括马桶、修理;目标服务文本信息为“厨卫维修”,确定上位文本信息包括房屋维修,确定同义文本信息包括厨卫用具、维修、修理;For example, if the target service text information is "washing machine repair", it is determined that the upper text information includes home appliance repair, and the synonymous text information is determined to include washing machines and repairs; the target service text information is "toilet repair", and it is determined that the upper text information includes house repair, kitchen and bathroom Maintenance, determine that the synonymous text information includes toilet and repair; the target service text information is "kitchen and bathroom maintenance", determine that the upper text information includes house maintenance, and determine that the synonymous text information includes kitchen and bathroom utensils, maintenance, and repair;

则生成的三元组信息包括:Then the generated triple information includes:

<洗衣机维修-属于-家电维修>、<洗衣机维修-同义-洗衣机>、<洗衣机维修-同义-维修>、<马桶修理-属于-房屋维修>、<马桶修理-属于-厨卫维修>、<马桶修理-同义-马桶>、<马桶修理-同义-修理>、<厨卫维修-属于-房屋维修>、<厨卫维修-同义-厨卫用具>、<厨卫维修-同义-维修>、<厨卫维修-同义-修理>。<Washing Machine Repair-belongs-Home Appliance Repair>, <Washing Machine Repair-Synonym-Washing Machine>, <Washing Machine Repair-Synonym-Maintenance>, <Toilet Repair-Belong-House Repair>, <Toilet Repair-Belong-Kitchen Maintenance> , <Toilet Repair-Synonym-Toilet>, <Toilet Repair-Synonym-Repair>, <Kitchen Maintenance-Belongs-House Maintenance>, <Kitchen Maintenance-Synonym-Kitchen Appliance>, <Kitchen Maintenance- Synonym-Maintenance>, <Kitchen Maintenance-Synonym-Repair>.

另外,本申请实施例还需要确定每个目标服务文本信息和衍生服务文本信息的服务类型,其中,目标服务文本信息所属的服务类型的确定方式可以参见上文描述,衍生服务文本信息所属的服务类型的确定方式与目标服务类型所属的服务类型的确定方式相似,在此不再详细赘述。In addition, the embodiment of the present application also needs to determine the service type of each target service text information and the derived service text information, wherein, for the determination method of the service type to which the target service text information belongs, reference may be made to the above description, and the service type to which the derived service text information belongs. The manner of determining the type is similar to the manner of determining the service type to which the target service type belongs, and will not be described in detail here.

在展示构建的服务知识图谱时,服务知识图谱可以以树状拓扑结构的方式进行展示;一种可选的实施方式为,在展示构建的服务知识图谱时,是根据不同服务类型进行分类展示;When displaying the constructed service knowledge graph, the service knowledge graph can be displayed in the form of a tree topology; an optional implementation is that when displaying the constructed service knowledge graph, it is classified and displayed according to different service types;

实施中,分别确定各个目标服务文本信息各自所属的服务类型;以及分别确定各个衍生服务文本信息各自所属的服务类型;In the implementation, the service type to which each target service text information belongs is determined respectively; and the service type to which each derivative service text information belongs is determined respectively;

响应展示服务知识图谱的指令,根据生成的各个三元组信息中包含的目标服务文本信息、衍生服务文本信息生成分别生成相应的节点,并基于各个目标服务文本信息各自对应的服务类型、以及各个衍生服务文本信息各自对应的服务类型,对生成的相应的节点进行分类展示;以及根据生成的各个三元组信息中包含的关联类型,生成各个节点之间的边;根据生成的节点以及节点之间的边,展示构建的服务知识图谱。In response to the instruction to display the service knowledge graph, the corresponding nodes are generated according to the target service text information and the derived service text information contained in the generated triple information, and the corresponding service type and each Derive the corresponding service types of the service text information, and classify and display the corresponding generated nodes; and generate the edges between the nodes according to the association types contained in the generated triple information; The edge between them displays the constructed service knowledge graph.

例如,家政服务类型下包括的服务类目体系有家电维修和房屋维修;其中,家电维修服务类目体系下包括的三元组信息如下:For example, the service category system included under the housekeeping service type includes home appliance repair and house repair; among them, the triple information included under the home appliance repair service category system is as follows:

<洗衣机维修-同义-洗衣机>、<洗衣机维修-上位-维修>、<洗衣机-上位-家电>、<家电-同义-家庭用品>;<Washing Machine Maintenance-Synonym-Washing Machine>, <Washing Machine Maintenance-Host-Maintenance>, <Washing Machine-Host-Home Appliances>, <Home Appliances-Synonym-Household Goods>;

房屋维修服务类目体系下包括的三元组信息如下:The triple information included in the housing maintenance service category system is as follows:

<马桶修理-同义-马桶>、<马桶修理-上位-厨卫维修>、<马桶修理-上位-修理>、<马桶-上位-厨卫用具>、<厨卫维修-上位-厨卫用具>、<厨卫维修-同义-维修>、<厨卫维修-同义-修理>、<厨卫用具-上位-家庭用品>、<维修-同义-修理>、<维修-同义-清洗>、<修理-同义-清洗>。<Toilet Repair-Synonym-Toilet>, <Toilet Repair-Superior-Kitchen Maintenance>, <Toilet Repair-Superior-Repair>, <Toilet-Superior-Kitchen and Bathroom Appliances>, <Kitchen and Bathroom Maintenance-Superior-Kitchen and Bathroom Appliances >, <kitchen and bathroom maintenance-synonym-repair>, <kitchen and bathroom maintenance-synonym-repair>, <kitchen and bathroom appliances-superior-household goods>, <maintenance-synonym-repair>, <maintenance-synonym- cleaning>, <repair-synonym-cleaning>.

政务服务类型下包括的服务类目体系有交管服务和户政服务;其中,交管服务类目体系下包括的三元组信息如下:The service category system included under the government service type includes traffic management service and household registration service; among them, the triple information included under the traffic management service category system is as follows:

<交通违章-同义-交通违章查询>、<交通违章查询-上位-交通违章>、<交通违章查询-上位-查询>、<交通违章-上位-交通>、<交通违章-同义-违章>;<traffic violation-synonym-traffic violation inquiry>, <traffic violation inquiry-superior-traffic violation>, <traffic violation inquiry-superior-inquiry>, <traffic violation-superior-traffic>, <traffic violation-synonym-violation >;

户政服务类目体系下包括的三元组信息如下:The triple information included in the household registration service category system is as follows:

<身份证-同义-身份证挂失>、<身份证-同义-查询>、<身份证挂失-上位-身份证>、<身份证挂失-上位-挂失>。<ID card-synonym-ID card loss report>, <ID card-synonym-inquiry>, <ID card loss report-superior-ID card>, <ID card loss-superior-report loss>.

则基于上述三元组信息,生成的服务知识图谱如图5所示。Based on the above triplet information, the generated service knowledge graph is shown in Figure 5.

本申请实施例在构建服务知识图谱之后,构建的服务知识图谱可以应用于搜索场景;一种可选的服务知识图谱的应用场景示意图如图6所示,包括用户60、终端61和服务器62;其中,终端61上安装有客户端;After the service knowledge graph is constructed in this embodiment of the present application, the constructed service knowledge graph can be applied to a search scenario; an optional schematic diagram of an application scenario of the service knowledge graph is shown in FIG. 6 , including a user 60 , a terminal 61 and a server 62 ; Wherein, a client terminal is installed on the terminal 61;

用户60通过终端61上安装的客户端触发搜索指令,客户端获取搜索指令中包含的搜索服务文本信息;并将搜索服务文本信息发送给服务器62,服务器62根据构建的服务知识图谱,从服务知识图谱中确定出搜索服务文本信息、以及与搜索服务文本信息有关联关系的至少一个服务文本信息;并将搜索服务文本信息、以及与搜索服务文本信息有关联关系的至少一个服务文本信息作为待推荐服务文本信息;将确定出的待推荐服务文本信息对应的页面展示信息返回给客户端,客户端在显示界面中向目标对象展示待推荐服务文本信息对应的页面展示信息。The user 60 triggers the search instruction through the client installed on the terminal 61, and the client obtains the search service text information contained in the search instruction; and sends the search service text information to the server 62, and the server 62, according to the constructed service knowledge graph, obtains the information from the service knowledge. The search service text information and at least one service text information related to the search service text information are determined in the map; the search service text information and the at least one service text information related to the search service text information are used as to-be-recommended Service text information; the determined page display information corresponding to the text information of the service to be recommended is returned to the client, and the client displays the page display information corresponding to the text information of the service to be recommended to the target object in the display interface.

如图7所示,为本申请实施例提供的一种基于服务知识图谱的搜索方法流程示意图,该方法可以包括以下步骤:As shown in FIG. 7 , a schematic flowchart of a search method based on a service knowledge graph provided by an embodiment of the present application, the method may include the following steps:

步骤S701、客户端响应目标对象触发的搜索指令,获取搜索指令中包含的搜索服务文本信息;Step S701, the client obtains the search service text information contained in the search instruction in response to the search instruction triggered by the target object;

步骤S702、客户端将搜索服务文本信息发送给服务器;Step S702, the client sends the search service text information to the server;

步骤S703、服务器根据构建的服务知识图谱,从服务知识图谱中确定出搜索服务文本信息、以及与搜索服务文本信息有关联关系的至少一个服务文本信息;Step S703, the server determines the search service text information and at least one service text information associated with the search service text information from the service knowledge map according to the constructed service knowledge map;

步骤S704、服务器将搜索服务文本信息、以及与搜索服务文本信息有关联关系的至少一个服务文本信息作为待推荐服务文本信息;Step S704, the server uses the search service text information and at least one service text information associated with the search service text information as the service text information to be recommended;

步骤S705、服务器将确定出的待推荐服务文本信息对应的页面参数返回给客户端;Step S705, the server returns the determined page parameter corresponding to the text information of the service to be recommended to the client;

步骤S706、客户端将待推荐服务文本信息对应的页面展示信息推荐给目标对象。Step S706, the client recommends the page display information corresponding to the text information of the service to be recommended to the target object.

基于同一发明构思,本申请实施例中还提供了一种标题文本处理装置,由于该装置解决问题的原理与上述标题文本处理方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application also provides a title text processing device. Since the principle of the device for solving problems is similar to the above title text processing method, the implementation of the device can refer to the implementation of the method, and the repetition is not repeated. Repeat.

如图8所示,为本申请实施例提供的一种服务知识图谱构建装置的结构示意图,包括:As shown in FIG. 8 , a schematic structural diagram of an apparatus for constructing a service knowledge graph provided by an embodiment of the present application includes:

获取单元801,用于针对搜索服务场景,获取各个目标服务文本信息;an obtaining unit 801, configured to obtain text information of each target service for a search service scenario;

确定单元802,用于分别根据所述各个目标服务文本信息的第一文本特征,确定所述各个目标服务文本信息各自关联的至少一个衍生服务文本信息;a determining unit 802, configured to determine at least one derivative service text information associated with each target service text information according to the first text feature of each target service text information;

处理单元803,用于根据所述各个目标服务文本信息与各自关联的至少一个衍生服务文本信息之间的关联关系,构建相应的服务知识图谱。The processing unit 803 is configured to construct a corresponding service knowledge graph according to the association relationship between the respective target service text information and at least one derivative service text information associated with each other.

可选的,所述处理单元803具体用于:Optionally, the processing unit 803 is specifically configured to:

针对所述各个目标服务文本信息分别执行以下操作:Perform the following operations on each of the target service text information:

根据所述各个服务文本信息中的一个目标服务文本信息与关联的至少一个衍生服务文本信息,分别生成包含目标服务文本信息、关联类型、衍生服务文本信息的三元组信息;其中,所述三元组信息的个数与所述一个目标服务文本信息关联的衍生服务文本信息的个数相同,所述关联类型为所述三元组信息包含的所述目标服务文本信息与所述衍生服务文本信息之间关联关系的类型。According to one target service text information in the respective service text information and at least one associated derivative service text information, the triple information including the target service text information, the association type, and the derivative service text information is respectively generated; wherein, the three The number of tuple information is the same as the number of derivative service text information associated with the one target service text information, and the association type is the target service text information and the derivative service text contained in the triple information. The type of relationship between information.

可选的,所述确定单元802还用于:Optionally, the determining unit 802 is further configured to:

分别根据所述各个目标服务文本信息的第二文本特征,确定所述各个目标服务文本信息各自所属的服务类型;以及分别根据获得的各个衍生服务文本信息的第三文本特征,确定所述各个衍生服务文本信息各自所属的服务类型;Determine the service type to which each target service text information belongs respectively according to the second text feature of each target service text information; and determine each derivative service text information according to the obtained third text feature of each derivative service text information The service type to which the service text information belongs;

所述处理单元803还用于:The processing unit 803 is also used for:

在所述构建相应的服务知识图谱之后,响应展示所述服务知识图谱的指令,根据生成的各个三元组信息中包含的目标服务文本信息、衍生服务文本信息生成分别生成相应的节点,并基于所述各个目标服务文本信息各自对应的服务类型、以及所述各个衍生服务文本信息各自对应的服务类型,对生成的相应的节点进行分类展示;以及,根据生成的所述各个三元组信息中包含的关联类型,生成各个节点之间的边;根据生成的节点以及节点之间的边,展示构建的所述服务知识图谱。After the corresponding service knowledge graph is constructed, in response to the instruction for displaying the service knowledge graph, the corresponding nodes are generated according to the target service text information and the derived service text information contained in the generated triple information, respectively, and based on The respective service types corresponding to the respective target service text information and the respective service types corresponding to the respective derived service text information are classified and displayed on the generated corresponding nodes; The included association type generates the edges between each node; according to the generated nodes and the edges between the nodes, the constructed service knowledge graph is displayed.

可选的,所述衍生服务文本信息包括与所述目标服务文本信息为同义关联关系的同义文本信息;Optionally, the derivative service text information includes synonymous text information that is in a synonymous relationship with the target service text information;

所述确定单元802还用于:The determining unit 802 is further configured to:

在所述确定所述各个目标服务文本信息各自关联的至少一个衍生服务文本信息之前,分别确定所述各个目标服务文本信息各自对应的文本内容信息;将所述各个服务文本信息各自对应的文本内容信息的信息内容,分别进行融合处理,得到相应目标服务文本信息的第一文本特征;以及,确定预设的候选文本信息集合中各个候选文本信息各自对应文本内容信息;将所述各个候选文本信息各自对应的文本内容信息的信息内容,分别进行融合处理,得到相应候选文本信息的第三文本特征;其中,所述文本内容信息包含编辑距离、语义距离、共现信息、属性信息中的任意一种或组合;Before determining at least one derivative service text information associated with each target service text information, respectively determine the text content information corresponding to each target service text information; The information content of the information is fused respectively to obtain the first text feature of the corresponding target service text information; and, the corresponding text content information of each candidate text information in the preset candidate text information set is determined; The information contents of the corresponding text content information are respectively fused to obtain the third text feature of the corresponding candidate text information; wherein the text content information includes any one of edit distance, semantic distance, co-occurrence information, and attribute information. species or combination;

所述确定单元802具体用于:The determining unit 802 is specifically configured to:

针对各个目标服务文本信息分别执行以下操作:基于已训练的文本相关性模型,根据所述各个目标服务文本信息中的一个目标服务文本信息的第一文本特征,以及所述预设的候选文本信息集合中各个候选文本信息的第三文本特征,确定所述一个目标服务文本信息与所述预设的候选文本信息集合中各个候选文本信息之间的相似度;根据确定出的各个相似度,从所述预设的候选文本信息集合中筛选出与所述一个目标服务文本信息为同义关联关系的至少一个同义文本信息。The following operations are respectively performed for each target service text information: based on the trained text correlation model, according to the first text feature of one target service text information in the various target service text information, and the preset candidate text information The third text feature of each candidate text information in the set determines the similarity between the one target service text information and each candidate text information in the preset candidate text information set; At least one synonymous text information that is synonymous with the one target service text information is screened out from the preset candidate text information set.

可选的,所述衍生服务文本信息包括所述目标服务文本信息的上位文本信息;Optionally, the derivative service text information includes upper text information of the target service text information;

所述确定单元802具体用于:The determining unit 802 is specifically configured to:

根据各个目标服务文本信息的第一文本特征以及预设的匹配规则,从预设的候选文本信息集合中筛选出各个目标服务文本信息各自关联的至少一个上位文本信息。According to the first text feature of each target service text information and the preset matching rule, at least one upper-level text information associated with each target service text information is screened from the preset candidate text information set.

可选的,所述获取单元801具体用于:Optionally, the obtaining unit 801 is specifically used for:

获取多个对象在搜索客户端中历史输入的各个服务文本信息,将获取到所述各个服务文本信息作为针对所述搜索服务场景的目标服务文本信息;或Obtain each service text information historically input by multiple objects in the search client, and use the acquired service text information as the target service text information for the search service scenario; or

从至少一个数据库中获取各个服务文本信息,作为针对所述搜索服务场景的目标服务文本信息。Each service text information is acquired from at least one database as the target service text information for the search service scenario.

可选的,所述处理单元803还用于:Optionally, the processing unit 803 is further configured to:

响应目标对象触发的搜索指令,获取所述搜索指令中包含的搜索服务文本信息;根据构建的所述服务知识图谱,从所述服务知识图谱中确定出所述搜索服务文本信息、以及与所述搜索服务文本信息有关联关系的至少一个服务文本信息;并将所述搜索服务文本信息、以及与所述搜索服务文本信息有关联关系的至少一个服务文本信息作为待推荐服务文本信息;将确定出的所述待推荐服务文本信息对应的页面展示信息推荐给所述目标对象。In response to the search instruction triggered by the target object, obtain the search service text information contained in the search instruction; according to the constructed service knowledge graph, determine the search service text information from the service knowledge graph, and Searching for at least one piece of service text information associated with the service text information; using the search service text information and at least one service text information associated with the search service text information as the service text information to be recommended; The page display information corresponding to the text information of the service to be recommended is recommended to the target object.

为了描述的方便,以上各部分按照功能划分为各模块(或单元)分别描述。当然,在实施本申请时可以把各模块(或单元)的功能在同一个或多个软件或硬件中实现。For the convenience of description, the above parts are divided into modules (or units) according to their functions and described respectively. Of course, the functions of each module (or unit) may be implemented in one or more software or hardware when implementing the present application.

所属技术领域的技术人员能够理解,本申请的每个方面可以实现为系统、方法或程序产品。因此,本申请的每个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。As will be appreciated by one skilled in the art, each aspect of the present application may be implemented as a system, method or program product. Therefore, each aspect of the present application can be embodied in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be collectively referred to herein as is a "circuit", "module" or "system".

在一些可能的实施方式中,本申请实施例还提供一种电子设备,参阅图9所示,电子设备900可以至少包括至少一个处理器901、以及至少一个存储器902。其中,存储器902存储有程序代码,当程序代码被处理器901执行时,使得处理器901执行本说明书上述描述的根据本申请各种示例性实施方式的服务知识图谱构建方法中的步骤,例如,处理器901可以执行如图2或如图7所示的步骤。In some possible implementations, the embodiments of the present application further provide an electronic device. Referring to FIG. 9 , the electronic device 900 may at least include at least one processor 901 and at least one memory 902 . Wherein, the memory 902 stores program codes, and when the program codes are executed by the processor 901, the processor 901 is made to execute the steps in the service knowledge graph construction method according to various exemplary embodiments of the present application described above in this specification, for example, The processor 901 may perform the steps shown in FIG. 2 or FIG. 7 .

在一些可能的实施方式中,本申请实施例还提供一种计算装置,可以至少包括至少一个处理单元、以及至少一个存储单元。其中,存储单元存储有程序代码,当程序代码被处理单元执行时,使得处理单元执行本说明书上述描述的根据本申请各种示例性实施方式的服务知识图谱构建方法中的步骤,例如,处理器901可以执行如图2或如图7中所示的步骤。In some possible implementation manners, the embodiments of the present application further provide a computing device, which may at least include at least one processing unit and at least one storage unit. The storage unit stores program codes, and when the program codes are executed by the processing unit, the processing unit executes the steps in the service knowledge graph construction method according to various exemplary embodiments of the present application described above in this specification, for example, a processor 901 may perform steps as shown in FIG. 2 or FIG. 7 .

下面参照图10来描述根据本申请的这种实施方式的计算装置1000。图10的计算装置1000仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。A computing device 1000 according to such an embodiment of the present application is described below with reference to FIG. 10 . The computing device 1000 in FIG. 10 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.

如图10,计算装置1000以通用计算装置的形式表现。计算装置1000的组件可以包括但不限于:上述至少一个处理单元1001、上述至少一个存储单元1002、连接不同系统组件(包括存储单元1002和处理单元1001)的总线1003。As shown in FIG. 10, computing device 1000 takes the form of a general-purpose computing device. Components of the computing device 1000 may include, but are not limited to, the above-mentioned at least one processing unit 1001 , the above-mentioned at least one storage unit 1002 , and a bus 1003 connecting different system components (including the storage unit 1002 and the processing unit 1001 ).

总线1003表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器、外围总线、处理器或者使用多种总线结构中的任意总线结构的局域总线。Bus 1003 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus structures.

存储单元1002可以包括易失性存储器形式的可读介质,例如随机存取存储器(RAM)1021或高速缓存存储器1022,还可以进一步包括只读存储器(ROM)1023。The storage unit 1002 may include readable media in the form of volatile memory, such as random access memory (RAM) 1021 or cache memory 1022 , and may further include read only memory (ROM) 1023 .

存储单元1002还可以包括具有一组(至少一个)程序模块1024的程序/实用工具1025,这样的程序模块1024包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 1002 may also include a program/utility 1025 having a set (at least one) of program modules 1024 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, An implementation of a network environment may be included in each or some combination of these examples.

计算装置1000也可以与一个或多个外部设备1004(例如键盘、指向设备等)通信,还可与一个或者多个使得用户能与计算装置1000交互的设备通信,或与使得该计算装置1000能与一个或多个其它计算装置进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口1005进行。并且,计算装置1000还可以通过网络适配器1006与一个或者多个网络(例如局域网(LAN),广域网(WAN)或公共网络,例如因特网)通信。如图所示,网络适配器1006通过总线1003与用于计算装置1000的其它模块通信。应当理解,尽管图中未示出,可以结合计算装置1000使用其它硬件或软件模块,包括但不限于:微代码、设备驱动器、冗余处理器、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The computing apparatus 1000 may also communicate with one or more external devices 1004 (eg, keyboards, pointing devices, etc.), and may also communicate with one or more devices that enable a user to interact with the computing apparatus 1000, or communicate with the computing apparatus 1000. Any device (eg, router, modem, etc.) that communicates with one or more other computing devices. Such communication may take place through input/output (I/O) interface 1005 . Also, the computing device 1000 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), or a public network such as the Internet) through a network adapter 1006 . As shown, network adapter 1006 communicates with other modules for computing device 1000 via bus 1003 . It should be understood that, although not shown, other hardware or software modules may be used in conjunction with computing device 1000, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data Backup storage systems, etc.

在一些可能的实施方式中,本申请提供的服务知识图谱构建方法的每个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在计算机设备上运行时,程序代码用于使计算机设备执行本说明书上述描述的根据本申请各种示例性实施方式的服务知识图谱构建方法中的步骤,例如,计算机设备可以执行如图2或如图7中所示的步骤。In some possible implementations, each aspect of the service knowledge graph construction method provided by the present application can also be implemented in the form of a program product, which includes program code, and when the program product runs on a computer device, the program code uses To make the computer device execute the steps in the service knowledge graph construction method according to various exemplary embodiments of the present application described above in this specification, for example, the computer device may execute the steps as shown in FIG. 2 or FIG. 7 .

程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While the preferred embodiments of the present application have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of this application.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (10)

1. A service knowledge graph construction method is characterized by comprising the following steps:
acquiring text information of each target service aiming at a search service scene;
determining at least one derivative service text message associated with each target service text message according to the first text feature of each target service text message;
and constructing a corresponding service knowledge graph according to the association relationship between each target service text message and each associated at least one derivative service text message.
2. The method of claim 1, wherein constructing a corresponding service knowledge graph according to the association relationship between each target service text message and the respectively associated at least one derived service text message comprises:
respectively executing the following operations aiming at each target service text message:
generating triple information containing target service text information, association type and derived service text information respectively according to one target service text information and associated at least one derived service text information in each service text information; the number of the triple information is the same as the number of the derived service text information associated with the target service text information, and the association type is the type of the association relationship between the target service text information and the derived service text information contained in the triple information.
3. The method of claim 2, wherein the method further comprises:
determining the service type of each target service text message according to the second text feature of each target service text message; determining the service type of each derived service text message according to the obtained third text feature of each derived service text message;
after the building of the corresponding service knowledge graph, the method further comprises:
responding to an instruction for displaying the service knowledge graph, generating corresponding nodes according to target service text information and derived service text information contained in each generated triple information, and performing classified display on the generated corresponding nodes based on service types corresponding to each target service text information and each derived service text information; and
generating edges among the nodes according to the generated association types contained in the triple information;
and displaying the constructed service knowledge graph according to the generated nodes and the edges among the nodes.
4. The method of claim 1, wherein the derived service text information comprises synonymous text information in a synonymous association with the target service text information;
before the determining at least one derivative service text message associated with each target service text message, the method further includes:
respectively determining text content information corresponding to each target service text information; respectively fusing the information content of the text content information corresponding to each service text information to obtain a first text characteristic of the corresponding target service text information; and
determining text content information corresponding to each candidate text information in a preset candidate text information set; respectively fusing the information content of the text content information corresponding to each candidate text information to obtain a third text characteristic of the corresponding candidate text information; the text content information comprises any one or combination of an editing distance, a semantic distance, co-occurrence information and attribute information;
the determining at least one derivative service text message associated with each target service text message according to the first text feature of each target service text message respectively includes:
respectively executing the following operations aiming at each target service text message: based on a trained text correlation model, determining similarity between one target service text message and each candidate text message in the preset candidate text message set according to a first text feature of one target service text message in each target service text message and a third text feature of each candidate text message in the preset candidate text message set; and screening out at least one synonymy text message which is in synonymy association with the target service text message from the preset candidate text message set according to the determined similarity.
5. The method of claim 1, wherein the derived service text information comprises upper text information of the target service text information;
the determining at least one derivative service text message associated with each target service text message according to the first text feature of each target service text message respectively includes:
and screening at least one upper text message associated with each target service text message from a preset candidate text message set according to the first text feature of each target service text message and a preset matching rule.
6. The method according to any one of claims 1 to 5, wherein acquiring text information of each target service for a search service scenario comprises:
obtaining each service text information historically input by a plurality of objects in a search client, and taking the obtained each service text information as target service text information aiming at the search service scene; or
And acquiring each service text message from at least one database as target service text message aiming at the search service scene.
7. The method of any one of claims 1 to 5, further comprising:
responding to a search instruction triggered by a target object, and acquiring search service text information contained in the search instruction;
determining the search service text information and at least one service text information having a correlation with the search service text information from the service knowledge map according to the constructed service knowledge map; taking the search service text information and at least one piece of service text information which has a correlation with the search service text information as service text information to be recommended;
and recommending the determined page display information corresponding to the text information of the service to be recommended to the target object.
8. A service knowledge graph building apparatus, comprising:
the acquisition unit is used for acquiring text information of each target service aiming at a search service scene;
the determining unit is used for determining at least one derivative service text message respectively associated with each target service text message according to the first text feature of each target service text message;
and the processing unit is used for constructing a corresponding service knowledge graph according to the association relation between each target service text message and each associated at least one derivative service text message.
9. An electronic device, comprising a processor and a memory, wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that it comprises program code for causing an electronic device to carry out the steps of the method according to any one of claims 1 to 7, when said program code is run on said electronic device.
CN202110047756.1A 2021-01-14 2021-01-14 Service knowledge graph construction method and device, electronic equipment and storage medium Pending CN113392212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110047756.1A CN113392212A (en) 2021-01-14 2021-01-14 Service knowledge graph construction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110047756.1A CN113392212A (en) 2021-01-14 2021-01-14 Service knowledge graph construction method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113392212A true CN113392212A (en) 2021-09-14

Family

ID=77616709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110047756.1A Pending CN113392212A (en) 2021-01-14 2021-01-14 Service knowledge graph construction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113392212A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114239496A (en) * 2021-11-12 2022-03-25 北京卓思天成数据咨询股份有限公司 Service state generation method, device, equipment and computer readable storage medium
CN114925208A (en) * 2022-03-11 2022-08-19 广州市阿尔法软件信息技术有限公司 A construction method, device and system for map knowledge service
CN117151429A (en) * 2023-10-27 2023-12-01 中电科大数据研究院有限公司 Government service flow arranging method and device based on knowledge graph

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424279A (en) * 2013-08-30 2015-03-18 腾讯科技(深圳)有限公司 Text relevance calculating method and device
CN105956052A (en) * 2016-04-27 2016-09-21 青岛海尔软件有限公司 Building method of knowledge map based on vertical field
CN112000815A (en) * 2020-10-28 2020-11-27 科大讯飞(苏州)科技有限公司 Knowledge graph complementing method and device, electronic equipment and storage medium
CN112115390A (en) * 2019-06-20 2020-12-22 华为技术有限公司 Method, device and equipment for displaying topology structure diagram and storage medium
CN112199516A (en) * 2020-11-17 2021-01-08 重庆金融资产交易所有限责任公司 Method, device, terminal and storage medium for constructing knowledge graph

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424279A (en) * 2013-08-30 2015-03-18 腾讯科技(深圳)有限公司 Text relevance calculating method and device
CN105956052A (en) * 2016-04-27 2016-09-21 青岛海尔软件有限公司 Building method of knowledge map based on vertical field
CN112115390A (en) * 2019-06-20 2020-12-22 华为技术有限公司 Method, device and equipment for displaying topology structure diagram and storage medium
CN112000815A (en) * 2020-10-28 2020-11-27 科大讯飞(苏州)科技有限公司 Knowledge graph complementing method and device, electronic equipment and storage medium
CN112199516A (en) * 2020-11-17 2021-01-08 重庆金融资产交易所有限责任公司 Method, device, terminal and storage medium for constructing knowledge graph

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114239496A (en) * 2021-11-12 2022-03-25 北京卓思天成数据咨询股份有限公司 Service state generation method, device, equipment and computer readable storage medium
CN114239496B (en) * 2021-11-12 2023-10-24 北京卓思天成数据咨询股份有限公司 Service state generation method, device, equipment and computer readable storage medium
CN114925208A (en) * 2022-03-11 2022-08-19 广州市阿尔法软件信息技术有限公司 A construction method, device and system for map knowledge service
CN117151429A (en) * 2023-10-27 2023-12-01 中电科大数据研究院有限公司 Government service flow arranging method and device based on knowledge graph
CN117151429B (en) * 2023-10-27 2024-01-26 中电科大数据研究院有限公司 Government service flow arranging method and device based on knowledge graph

Similar Documents

Publication Publication Date Title
CN107220352B (en) Method and device for constructing comment map based on artificial intelligence
Preethi et al. Application of deep learning to sentiment analysis for recommender system on cloud
CN107609152B (en) Method and apparatus for expanding query expressions
CN112749266B (en) Industrial question and answer method, device, system, equipment and storage medium
CN109002516A (en) A search method and device
CN113392212A (en) Service knowledge graph construction method and device, electronic equipment and storage medium
CN112989208B (en) Information recommendation method and device, electronic equipment and storage medium
KR102560521B1 (en) Method and apparatus for generating knowledge graph
CN112559717B (en) Search matching method, device, electronic equipment and storage medium
Xu Formalizing natural‐language spatial relations between linear objects with topological and metric properties
CN116561288B (en) Event query method, device, computer equipment, storage medium and program product
D’Aniello et al. An environment for collective perception based on fuzzy and semantic approaches
CN108846006A (en) Excavation, searching method and the system of field of finance and economics unstructured text data
CN112784591B (en) Data processing method and device, electronic equipment and storage medium
WO2015084757A1 (en) Systems and methods for processing data stored in a database
CN115809334B (en) Training method of event relevance classification model, text processing method and device
CN104636386A (en) Information monitoring method and device
CN111666419A (en) Knowledge graph construction method and device for legal data
CN118551031A (en) Platform content intelligent recommendation method and system based on natural language processing
CN113377739A (en) Knowledge graph application method, knowledge graph application platform, electronic equipment and storage medium
Afuan et al. A new approach in query expansion methods for improving information retrieval
Kalloubi et al. Graph based tweet entity linking using DBpedia
Alves et al. Semantic enrichment of places: Ontology learning from web
CN114491232B (en) Information query method and device, electronic equipment and storage medium
Liu [Retracted] Construction of a 5G Wireless Semantic Web‐Assisted English Digital Learning Resource Query System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40052253

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230407

Address after: 510310 No. 1, brand area, No. 397, Xingang Middle Road, Haizhu District, Guangzhou City, Guangdong Province

Applicant after: GUANGZHOU TENCENT TECHNOLOGY Co.,Ltd.

Applicant after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Address before: 35th floor, Tencent building, Keji Zhongyi Road, high tech Zone, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TA01 Transfer of patent application right
OSZAR »