Knowledge graph construction method and device, electronic equipment and storage medium
By obtaining government data, extracting and annotating processing entities, determining relationships, and building a knowledge graph that adapts to government business scenarios, the problem of low efficiency in identification and relationship extraction of government data entities is solved, and the efficiency of data interaction and approval decision-making of government services is improved.
Patent Information
- Application Number
- CN202410903990.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-29
AI Technical Summary
It is difficult for the existing technology to effectively build a knowledge graph that is compatible with government business scenarios, resulting in low efficiency in entity identification and relationship extraction of government data, affecting the objectivity and efficiency of cross-departmental data interaction and approval decisions of government services.
By obtaining initial business data, extracting the pending entities based on the preset entity type, performing entity annotation processing and relational data determination, building a target knowledge graph, realizing entity recognition, relationship extraction and connection, and adapting to government business scenarios.
It has improved the construction effect of the knowledge graph, improved the efficiency of entity identification and relationship extraction of government data, enhanced the objectivity and efficiency of data interaction and approval decisions of government services, and simplified the government service process.
Smart Images

Figure CN119047550A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and specifically to a method, device, electronic device and storage medium for constructing a knowledge graph. Background Art
[0002] Graph recognition technology describes concepts, entities and their relationships in the objective world in a structured form, providing a way to better organize, manage and understand the government service information system. It stores specific administrative department names, matter names, material names, data item names, etc. in the form of multiple groups to form a graph knowledge base, which accurately displays the dynamically adjusted relationship between administrative departments, matters, materials and data in a graph form, realizes knowledge association reasoning and result visualization, improves the objectivity and efficiency of cross-departmental data interaction and approval decision-making in government services, and improves the efficiency of government services. Summary of the invention
[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the purpose of the present disclosure is to propose a method, device, electronic device and storage medium for constructing a knowledge graph, thereby being able to perform entity recognition, relationship extraction and entity connection on government data, and construct a target knowledge graph that is compatible with the target business scenario, thereby effectively improving the construction effect of the target knowledge graph.
[0005] To achieve the above-mentioned purpose, the first aspect of the present disclosure provides a method for constructing a knowledge graph, the method comprising:
[0006] Obtain initial business data in the target business scenario;
[0007] Extracting a plurality of entities to be processed corresponding to each entity type from the initial business data based on the preset entity type;
[0008] Annotate entities in the initial business data according to the entities to be processed corresponding to each entity type to obtain candidate business data;
[0009] Determine entity relationship data among multiple entities to be processed based on the candidate business data;
[0010] According to multiple entities to be processed and entity relationship data between the multiple entities to be processed, a target knowledge graph corresponding to the target business scenario is constructed.
[0011] In order to achieve the above-mentioned purpose, the second aspect of the present disclosure provides a knowledge graph construction device, which includes:
[0012] An acquisition module is used to acquire initial business data in a target business scenario;
[0013] An extraction module, used to extract from the initial business data a plurality of entities to be processed corresponding to each entity type based on a preset entity type;
[0014] A processing module, used for labeling entities in the initial business data according to the entities to be processed corresponding to each entity type, so as to obtain candidate business data;
[0015] A determination module, used to determine entity relationship data between multiple entities to be processed based on candidate business data;
[0016] A construction module is used to construct a target knowledge graph corresponding to a target business scenario based on multiple entities to be processed and entity relationship data between multiple entities to be processed.
[0017] The electronic device proposed in the third aspect of the present disclosure includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for constructing a knowledge graph proposed in the first aspect of the present disclosure is implemented.
[0018] The fourth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for constructing a knowledge graph as proposed in the first aspect embodiment of the present disclosure.
[0019] The fifth aspect embodiment of the present disclosure proposes a computer program product. When the instructions in the computer program product are executed by a processor, the method for constructing a knowledge graph proposed in the first aspect embodiment of the present disclosure is executed.
[0020] The knowledge graph construction method, device, electronic device and storage medium provided by the present disclosure have at least the following beneficial effects: through the initial business data in the target business scenario, multiple entities to be processed corresponding to each entity type are extracted from the initial business data based on the preset entity type, and then the entities in the initial business data are labeled according to the entities to be processed corresponding to each entity type to obtain candidate business data, and then based on the candidate business data, the entity relationship data between the multiple entities to be processed is determined, and according to the entity relationship data between the multiple entities to be processed and the multiple entities to be processed, the target knowledge graph corresponding to the target business scenario is constructed, thereby, entity recognition, relationship extraction and entity connection can be performed on government data, and a target knowledge graph adapted to the target business scenario is constructed, thereby effectively improving the construction effect of the target knowledge graph.
[0021] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0023] Figure 1 It is a flowchart of a method for constructing a knowledge graph proposed in an embodiment of the present disclosure;
[0024] Figure 2 is a schematic diagram of a target knowledge graph proposed in an embodiment of the present disclosure;
[0025] Figure 3 It is a schematic diagram of the structure of a knowledge graph construction device proposed in one embodiment of the present disclosure;
[0026] Figure 4 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0027] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and should not be construed as limitations on the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications, and equivalents that fall within the spirit and connotation of the appended claims.
[0028] Figure 1 It is a flowchart of a method for constructing a knowledge graph proposed in an embodiment of the present disclosure.
[0029] Among them, it should be noted that the executor of the knowledge graph construction method of this embodiment is the knowledge graph construction device, which can be implemented by software and / or hardware. The device can be configured in an electronic device, and the electronic device can include but is not limited to a terminal, a server, etc. For example, the terminal can be a mobile phone, a handheld computer, etc.
[0030] like Figure 1 As shown, the method for constructing the knowledge graph includes:
[0031] S101: Acquire initial business data in a target business scenario.
[0032] In the embodiment of the present disclosure, the method for constructing the knowledge graph in the embodiment of the present disclosure will be specifically explained with the target business scenario being configured as a government service scenario. Of course, the method for constructing the knowledge graph in the embodiment of the present disclosure can also be applied to any other possible business scenario without any limitation.
[0033] The initial business data in the target business scenario may be image data, text data, etc., without limitation.
[0034] In the disclosed embodiment, obtaining the initial business data in the target business scenario may be obtaining government service operation process information, operation specification information, operation time information and other data in the government service scenario as the initial business data.
[0035] S102: extracting from the initial business data a plurality of entities to be processed corresponding to each entity type based on the preset entity type.
[0036] In the disclosed embodiment, the entity type includes at least one of the following: user; service item; service demand material; service time; service provision object.
[0037] In the disclosed embodiment, after the initial business data in the target business scenario is acquired, entity extraction may be performed on the initial business data based on preset entity types to acquire a plurality of entities to be processed corresponding to each entity type.
[0038] For example, the initial business data is: "I bring my ID card to Center A to handle information inquiry business, and the processing time is 10:00-17:00 on weekdays." The entity to be processed can be extracted from the initial business data based on the user entity type: "I", and the entity to be processed can be extracted from the initial business data based on the service item type: "Information inquiry business", and the entity to be processed can be extracted from the initial business data based on the service requirement material type: "ID card", and the entity to be processed can be extracted from the initial business data based on the service time type: "Working days 10:00-17:00", and the entity to be processed can be extracted from the initial business data based on the service provider object type: "Center A". There is no restriction on this.
[0039] In the embodiments of the present disclosure, there are three methods for entity extraction: (1) Rule and dictionary based method. Usually, it is necessary to write corresponding rules for entities and then match them in the original data. (2) Method based on statistical machine learning. Mainly use data to train the model, and then use the trained model to identify entities. (3) Open domain oriented extraction method. Mainly for massive network data, identify named entities through the semantic features of known entities, and propose an unsupervised open domain clustering algorithm for entity clustering, and use terminology, corpus statistical information and shallow grammatical knowledge to extract entities from biomedicine, without any restrictions.
[0040] In the disclosed embodiment, after extracting the entity to be processed from the initial business data, when there are multiple possible entities to be processed, especially when there is one entity name corresponding to multiple different entities to be processed, a disambiguation method is used to obtain the most likely entity to be processed.
[0041] In the disclosed embodiment, entity disambiguation can be achieved through a topic model, using text information existing in the knowledge base, and learning common entity groups to achieve collective entity disambiguation. Based on the natural concept of semantic similarity, it is proposed to represent the semantics of entities and documents through probability distribution obtained by random walks in the knowledge subgraph on the knowledge base, and then the entity disambiguation task is performed based on an iterative greedy approximation algorithm and a learning ranking method. And entity disambiguation is performed based on the semantic similarity between information words of entities in the context and the knowledge graph. There is also an idea of entity disambiguation using time, which calculates the temporal features of the entity and compares them with the temporal features of the input named entity context. Even if the information provided by the context of the named entity is insufficient, the entity disambiguation task can be completed.
[0042] Optionally, in some embodiments, multiple entities to be processed corresponding to each entity type are extracted from the initial business data based on a preset entity type. It can be that multiple initial entities corresponding to each entity type are extracted from the initial business data based on a preset entity type, and then the semantic similarity between each two initial entities of the same entity type is determined, and then the entity to be processed is determined from the multiple initial entities based on the semantic similarity.
[0043] The initial entity refers to unprocessed entity information extracted from initial business data based on a preset entity type.
[0044] The similarity between the two initial entities may refer to the semantic similarity, text overlap, etc. between the two initial entities, and there is no limitation on this.
[0045] That is to say, in the embodiments of the present disclosure, initial entities corresponding to each entity type can be extracted from the initial business data based on the preset entity type, and then the Euclidean distance or cosine similarity between every two initial entities of the same entity type is determined, and the Euclidean distance or cosine similarity between every two initial entities determined above is used as the semantic similarity. Then, the entity to be processed can be determined from multiple initial entities based on the semantic similarity.
[0046] Optionally, in some embodiments, an entity to be processed is determined from multiple initial entities based on semantic similarity. When the semantic similarity is greater than or equal to a similarity threshold, time information corresponding to two initial entities corresponding to the semantic similarity is determined, and then the two initial entities corresponding to the semantic similarity are sorted according to the time information, and the initial entity with a later sorting position is deleted to obtain the entity to be processed.
[0047] Among them, the similarity threshold can be combined with the knowledge graph construction needs in the actual business scenario and set adaptively without any restrictions.
[0048] The time information corresponding to the initial entity may be the generation time of the initial business data to which the initial entity belongs in the business scenario, and there is no limitation on this.
[0049] Among them, when the semantic similarity is greater than or equal to the similarity threshold, it can be understood that the similarity probability between the two entities is relatively large, that is, the two entities are likely to be the same entity.
[0050] Therefore, in the embodiment of the present disclosure, when it is determined that the semantic similarity is greater than or equal to the similarity threshold, the time information corresponding to the two initial entities corresponding to the semantic similarity can be determined, and the two initial entities corresponding to the semantic similarity can be sorted in sequence according to the order of the time information, and the initial entity with a later sorting position can be deleted to obtain the entity to be processed.
[0051] In the disclosed embodiment, two initial entities corresponding to semantic similarity are sorted in sequence according to the order of time information, and the initial entity with a later sorting position is deleted, thereby avoiding redundancy of duplicate entities. Moreover, since the initial entities with earlier times are deleted, it is ensured that the retained entities to be processed have newer time information, that is, the retained entities to be processed are more suitable for the current business scenario.
[0052] S103: Annotate entities in the initial business data according to the entities to be processed corresponding to each entity type to obtain candidate business data.
[0053] In an embodiment of the present disclosure, after extracting multiple entities to be processed corresponding to each entity type from the initial business data based on the preset entity type, the entities in the initial business data can be labeled according to the entities to be processed corresponding to each entity type to obtain candidate business data.
[0054] In some embodiments, entities in the initial business data are annotated according to the entities to be processed corresponding to each entity type to obtain candidate business data. This can be done by using an annotation tool (such as BRAT, etc.) or a text editor to annotate the initial business data based on the entities to be processed to obtain candidate business data.
[0055] S104: Determine entity relationship data among multiple entities to be processed based on the candidate business data.
[0056] In the disclosed embodiment, after the entities in the initial business data are labeled according to the entities to be processed corresponding to each entity type to obtain candidate business data, entity relationship data between multiple entities to be processed can be determined based on the candidate business data.
[0057] The entity relationship data refers to data used to describe the business association between the initial entities, or may also be data used to describe the sequential association between the initial entities, and there is no limitation on this.
[0058] Optionally, in some embodiments, entity relationship data between multiple entities to be processed are determined based on candidate business data, and the candidate business data can be input into an entity relationship extraction model to obtain entity relationship data between multiple entities to be processed output by the entity relationship extraction model.
[0059] Among them, the entity relationship extraction model can be a large model, or it can be an entity relationship extraction model obtained by pre-training an artificial intelligence model based on sample business data, the mapping relationship between sample entities and sample entity relationship data until the artificial intelligence model converges. There is no restriction on this.
[0060] That is to say, in the embodiment of the present disclosure, the candidate business data may be input into the entity relationship extraction model to obtain the entity relationship data between the multiple initial entities output by the entity relationship extraction model.
[0061] In the disclosed embodiment, by discovering and identifying entities and entity relationship data between entities, it is possible to consider only the fusion of related entity parts, reduce the redundancy of the knowledge graph, and improve the efficiency of building the knowledge graph.
[0062] S105: Construct a target knowledge graph corresponding to a target business scenario based on multiple entities to be processed and entity relationship data between the multiple entities to be processed.
[0063] In the embodiment of the present disclosure, after extracting multiple entities to be processed corresponding to each entity type from the initial business data based on the preset entity type, and determining the entity relationship data between the multiple entities to be processed based on the candidate business data, a target knowledge graph corresponding to the target business scenario can be constructed based on the multiple entities to be processed and the entity relationship data between the multiple entities to be processed.
[0064] In some embodiments, a target knowledge graph corresponding to a target business scenario is constructed based on multiple entities to be processed and entity relationship data between multiple entities to be processed. The entities to be processed may be used as nodes, and based on the entity relationship data between the multiple entities to be processed, the connecting edges between the nodes are determined to obtain the target knowledge graph.
[0065] Optionally, in some embodiments, a target knowledge graph corresponding to a target business scenario is constructed based on multiple entities to be processed and entity relationship data between multiple entities to be processed. An initial matrix may be generated, where the target matrix includes multiple rows and multiple columns, and the subjects of the rows correspond to the description of entity types, and the subjects of the columns correspond to the description of multiple initial entities of the corresponding entity types. The initial matrix is then adjusted based on the entity relationship data to obtain a target matrix, and the target matrix is then used as the target knowledge graph.
[0066] That is to say, in the embodiments of the present disclosure, a matrix may be pre-constructed, and the subjects of the rows in the matrix may be, in order: "user, service demand material, service item, service provider, service time", and then, multiple entities to be processed may be filled into the matrix to obtain an initial matrix, and then, the initial matrix may be adjusted according to the entity relationship data to obtain a target matrix, and then the target matrix may be used as the target knowledge graph.
[0067] In the embodiments of the present disclosure, see Figure 2 , Figure 2 It is a schematic diagram of the target knowledge graph proposed in one embodiment of the present disclosure, that is, after the initial matrix is reconstructed, multiple entities to be processed in the initial matrix can be connected according to the entity relationship data between the multiple entities to be processed to obtain the target matrix as the target knowledge graph.
[0068] In the disclosed embodiment, an initial matrix is generated, the target matrix includes multiple rows and multiple columns, the main body of the row corresponds to the entity type, and the subject of the column corresponds to the multiple initial entities describing the corresponding entity type, and then the initial matrix is adjusted according to the entity relationship data to obtain the target matrix, and then the target matrix is used as the target knowledge graph. Thus, the target knowledge graph corresponding to the target business scenario can be displayed in the form of a matrix, and one business corresponds to one table. Compared with the intricate knowledge graph in the related technology, it can accurately display the dynamically adjusted relationship between administrative departments (users), matters, materials, and data, realize knowledge association reasoning and result visualization, improve the objectivity and efficiency of cross-departmental data interaction and approval decision-making in government services, and improve government service efficiency. The target knowledge graph thus constructed is more convenient for users to sequentially read a clear set of government service processes from the target knowledge graph, thereby facilitating the development of government service business.
[0069] In the disclosed embodiment, by acquiring the initial business data in the target business scenario, extracting multiple entities to be processed corresponding to each entity type from the initial business data based on the preset entity type, annotating the entities in the initial business data according to the entities to be processed corresponding to each entity type to obtain candidate business data, and then determining the entity relationship data between the multiple entities to be processed based on the candidate business data, and constructing a target knowledge graph corresponding to the target business scenario based on the entity relationship data between the multiple entities to be processed and the multiple entities to be processed. Thus, entity recognition, relationship extraction and entity connection can be performed on government data to construct a target knowledge graph that is compatible with the target business scenario, thereby effectively improving the construction effect of the target knowledge graph.
[0070] Figure 3 It is a structural diagram of a knowledge graph construction device proposed in one embodiment of the present disclosure.
[0071] like Figure 3 As shown, the knowledge graph construction device 30 includes:
[0072] An acquisition module 301 is used to acquire initial business data in a target business scenario;
[0073] An extraction module 302, configured to extract from the initial business data a plurality of entities to be processed corresponding to each entity type based on a preset entity type;
[0074] The processing module 303 is used to perform labeling processing on entities in the initial business data according to the entities to be processed corresponding to each entity type, so as to obtain candidate business data;
[0075] A determination module 304, configured to determine entity relationship data between a plurality of entities to be processed based on the candidate business data;
[0076] The construction module 305 is used to construct a target knowledge graph corresponding to the target business scenario based on multiple entities to be processed and entity relationship data between multiple entities to be processed.
[0077] In some embodiments of the present disclosure, the entity type includes at least one of the following:
[0078] user;
[0079] Service matters;
[0080] Service request materials;
[0081] Service time;
[0082] Service provider.
[0083] In some embodiments of the present disclosure, the determination module is further configured to:
[0084] The candidate business data is input into the entity relationship extraction model to obtain entity relationship data between multiple entities to be processed output by the entity relationship extraction model.
[0085] In some embodiments of the present disclosure, the extraction module is further used to:
[0086] Extracting a plurality of initial entities corresponding to each entity type from the initial business data based on the preset entity type;
[0087] Determine the semantic similarity between each two of the multiple initial entities of the same entity type;
[0088] According to the semantic similarity, an entity to be processed is determined from multiple initial entities.
[0089] In some embodiments of the present disclosure, the extraction module is further used to:
[0090] When the semantic similarity is greater than or equal to the similarity threshold, determining time information corresponding to two initial entities corresponding to the semantic similarity;
[0091] The two initial entities corresponding to the semantic similarity are sorted according to the time information, and the initial entity with a later sorting position is deleted to obtain the entity to be processed.
[0092] In some embodiments of the present disclosure, the construction module 305 is further used to:
[0093] Generate an initial matrix, the target matrix includes multiple rows and multiple columns, the subject of the row corresponds to the description entity type, and the subject of the column corresponds to the description of multiple initial entities of the corresponding entity type;
[0094] Adjust the initial matrix according to the entity relationship data to obtain the target matrix;
[0095] The target matrix is used as the target knowledge graph.
[0096] It should be noted that the aforementioned explanation of the method for constructing a knowledge graph is also applicable to the device for constructing a knowledge graph in this embodiment and will not be repeated here.
[0097] In the disclosed embodiment, initial business data in a target business scenario is used, and then a plurality of entities to be processed corresponding to each entity type are extracted from the initial business data based on preset entity types, and then the entities in the initial business data are labeled according to the entities to be processed corresponding to each entity type to obtain candidate business data, and then based on the candidate business data, entity relationship data between the plurality of entities to be processed is determined, and based on the entity relationship data between the plurality of entities to be processed and the plurality of entities to be processed, a target knowledge graph corresponding to the target business scenario is constructed. Thus, entity recognition, relationship extraction and entity connection can be performed on government data to construct a target knowledge graph that is compatible with the target business scenario, thereby effectively improving the construction effect of the target knowledge graph.
[0098] Figure 4 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 4 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0099] like Figure 4 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0100] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.
[0101] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0102] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 Not shown, often called a "hard drive").
[0103] although Figure 4 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (hereinafter referred to as: CD-ROM), a digital versatile disc read only memory (hereinafter referred to as: DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0104] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0105] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable the human body to interact with the electronic device 12, and / or communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. In addition, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 through a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0106] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the knowledge graph construction method mentioned in the above embodiment.
[0107] In order to implement the above embodiments, the present disclosure also proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for constructing a knowledge graph proposed in the above embodiments of the present disclosure.
[0108] In order to implement the above embodiments, the present disclosure also proposes a computer program product. When the instruction processor in the computer program product is executed, it executes the knowledge graph construction method proposed in the above embodiments of the present disclosure.
[0109] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0110] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0111] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.
[0112] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.
[0113] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0114] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0115] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0116] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0117] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0118] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.
Claims
1. A method for constructing a knowledge graph, characterized in that: The method comprises: Obtain initial business data in the target business scenario; Extracting from the initial business data a plurality of entities to be processed corresponding to each entity type based on a preset entity type; Annotating entities in the initial business data according to the entities to be processed corresponding to each of the entity types to obtain candidate business data; Determining entity relationship data among a plurality of entities to be processed according to the candidate business data; Based on the multiple entities to be processed and the entity relationship data between the multiple entities to be processed, a target knowledge graph corresponding to the target business scenario is constructed.
2. The method of claim 1, wherein the entity type comprises at least one of the following: user; Service matters; Service request materials; Service time; Service provider.
3. The method according to claim 2, characterized in that The step of determining entity relationship data between a plurality of entities to be processed according to the candidate business data includes: The candidate business data is input into an entity relationship extraction model to obtain the entity relationship data between the plurality of entities to be processed output by the entity relationship extraction model.
4. The method according to claim 1, characterized in that The extracting, based on the preset entity type, from the initial business data to obtain a plurality of entities to be processed corresponding to each entity type, respectively, comprises: Extracting from the initial business data a plurality of initial entities corresponding to each of the entity types based on a preset entity type; Determining the semantic similarity between each two initial entities of a plurality of initial entities of the same entity type; According to the semantic similarity, the entity to be processed is determined from the multiple initial entities.
5. The method according to claim 4, characterized in that The step of determining the entity to be processed from the plurality of initial entities according to the semantic similarity comprises: In a case where the semantic similarity is greater than or equal to a similarity threshold, determining time information corresponding to the two initial entities corresponding to the semantic similarity; The two initial entities corresponding to the semantic similarity are sorted according to the time information, and the initial entity with a later sorting position is deleted to obtain the entity to be processed.
6. The method according to claim 1, characterized in that The step of constructing a target knowledge graph corresponding to the target business scenario according to the plurality of entities to be processed and the entity relationship data between the plurality of entities to be processed includes: Generate an initial matrix, wherein the target matrix includes a plurality of rows and a plurality of columns, the subject of the row corresponds to describing the entity type, and the subject of the column corresponds to describing a plurality of initial entities of the corresponding entity type; Adjusting the initial matrix according to the entity relationship data to obtain the target matrix; The target matrix is used as the target knowledge graph.
7. A knowledge graph construction device, characterized in that: The device comprises: An acquisition module is used to acquire initial business data in a target business scenario; An extraction module, configured to extract from the initial business data a plurality of entities to be processed corresponding to each entity type based on a preset entity type; A processing module, configured to perform labeling processing on entities in the initial business data according to the entities to be processed corresponding to each of the entity types, so as to obtain candidate business data; A determination module, used to determine entity relationship data between a plurality of entities to be processed according to the candidate business data; A construction module is used to construct a target knowledge graph corresponding to the target business scenario based on the multiple entities to be processed and the entity relationship data between the multiple entities to be processed.
8. The device according to claim 7, characterized in that The entity type includes at least one of the following: user; Service matters; Service request materials; Service time; Service provider.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed 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 perform the method according to any one of claims 1 to 6.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
