Data processing methods and apparatus, storage media and electronic devices

By performing confidence labeling and fusion processing on entity identifiers in the knowledge graph, the problem of multiple identifiers for the same entity data is solved, the unification of entity data identifiers is achieved, and the continuity of subsequent calculations is ensured.

CN114840636BActive Publication Date: 2026-03-13QINGDAO HAIER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

The technical problem arises because the same entity data corresponds to different entity identifiers, making it impossible to proceed with the next calculation.

Method used

By acquiring N entity identifiers associated with the knowledge graph, marking the entity identifiers according to the confidence information, and obtaining M marked entity identifiers, and responding to the entity fusion instruction when the entity fusion instruction is received, the entity data of at least two entity identifiers are fused to determine the entity identifier of the fused entity data.

Benefits of technology

The entity identifiers of the merged entity data have been standardized, which solves the problem that the next step of calculation cannot be performed when the same entity data corresponds to different entity identifiers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840636B_ABST
    Figure CN114840636B_ABST
Patent Text Reader

Abstract

This invention discloses a data processing method and apparatus, a storage medium, and an electronic device. The method includes: acquiring N entity identifiers associated with a knowledge graph; marking the entity identifiers among the N entity identifiers based on their confidence information to obtain M marked entity identifiers; upon receiving a fusion instruction to perform entity fusion on entity data corresponding to at least two of the N entity identifiers, and where the at least two entity identifiers include any one of the M entity identifiers, responding to the fusion instruction to perform fusion processing on the entity data corresponding to the at least two entity identifiers to obtain fused entity data, and determining any one of the entity identifiers as the entity identifier corresponding to the fused entity data; this technical solution solves the technical problem that the inability to perform further calculations due to different entity identifiers corresponding to the same entity data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communications, and more specifically, to a data processing method and apparatus, a storage medium, and an electronic device. Background Technology

[0002] Currently, in multi-source knowledge graphs, multiple identical or similar entities are typically fused together.

[0003] In related technologies, it is assumed that entity A and entity B are the same entity. After entity fusion, B is selected as the identifier of the fused entity. However, if the data changes and entity B no longer exists, then entity A will not be fused with entity B. Instead, it will use its own entity identifier, entity A, to represent the entity data. This will cause downstream tasks to obtain different entity identifiers for the same entity data, thus preventing further computation.

[0004] There is no effective solution yet for the technical problem in related technologies where the same entity data corresponds to different entity identifiers, making it impossible to proceed with the next calculation. Summary of the Invention

[0005] This invention provides a data processing method and apparatus, a storage medium and an electronic device to at least solve the technical problem in the related art where the same entity data corresponds to different entity identifiers, making it impossible to perform the next step of calculation.

[0006] According to one embodiment of the present invention, a data processing method is provided, comprising: acquiring N entity identifiers associated with a knowledge graph, wherein N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph; marking the entity identifiers among the N entity identifiers according to the confidence information of the entity identifiers to obtain M marked entity identifiers, wherein M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the entity identifiers in the knowledge graph; and, upon acquiring a fusion instruction to perform entity fusion on the entity data corresponding to at least two entity identifiers among the N entity identifiers, and wherein the at least two entity identifiers include any one of the M entity identifiers, responding to the fusion instruction to perform fusion processing on the entity data corresponding to the at least two entity identifiers to obtain fused entity data, and determining any one of the entity identifiers as the entity identifier corresponding to the fused entity data.

[0007] In an exemplary embodiment, the above-mentioned marking of the entity identifiers among the N entity identifiers based on the confidence information of the entity identifiers to obtain M marked entity identifiers includes: dividing the N entity data corresponding to the N entity identifiers into M groups of entity data, wherein each group of entity data includes at least one entity data, and the entity similarity of each group of entity data is greater than a preset threshold; and marking the entity identifier with the highest confidence in each group of entity data based on the confidence information of at least one entity identifier in each group of entity data.

[0008] In one exemplary embodiment, the step of marking the entity identifier with the highest confidence in each group of entity data based on the confidence information of at least one entity identifier in each group of entity data includes: obtaining the update time of each entity data in each group of entity data; determining the confidence of each entity identifier in the at least one entity identifier based on the update time, wherein the time interval between the update time and the current time is inversely correlated with the confidence; and marking the entity identifier with the highest confidence in each group of entity data.

[0009] In one exemplary embodiment, before obtaining the N entity identifiers associated with the knowledge graph, the method includes: dividing the entity data in the knowledge graph into a first type of data and a second type of data; if the entity data belongs to the first type of data, compiling a Uniform Resource Identifier (URI) for the entity data using a first method; and if the entity data belongs to the second type of data, compiling a URI for the entity data using a second method.

[0010] In one exemplary embodiment, the target algorithm is used to generate the entity identifier based on the entity uniform resource identifier; the entity uniform resource identifier and the entity identifier are stored accordingly.

[0011] In one exemplary embodiment, collision detection is performed on a plurality of the aforementioned entity identifiers; if at least two of the aforementioned entity identifiers collide, the entity uniform resource identifier corresponding to the collided entity identifier is modified.

[0012] According to another embodiment of the present invention, a data processing apparatus is also provided, comprising: an acquisition module, configured to acquire N entity identifiers associated with a knowledge graph, wherein N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph; a marking module, configured to mark the entity identifiers among the N entity identifiers according to the confidence information of the entity identifiers, to obtain M marked entity identifiers, wherein M is a natural number less than N, and the confidence information is used to indicate the stability of the entity data corresponding to the entity identifiers in the knowledge graph; and a fusion module, configured to, upon acquiring a fusion instruction to perform entity fusion processing on the entity data corresponding to at least two entity identifiers among the N entity identifiers, and wherein the at least two entity identifiers include any one of the M entity identifiers, respond to the fusion instruction to perform fusion processing on the entity data corresponding to the at least two entity identifiers, to obtain fused entity data, and to determine any one of the entity identifiers as the entity identifier corresponding to the fused entity data.

[0013] In an exemplary embodiment, the marking module further includes: a partitioning unit, configured to partition the N entity data corresponding to the N entity identifiers into M groups of entity data, wherein each group of entity data includes at least one entity data, and the entity similarity of each group of entity data is greater than a preset threshold; and a marking unit, configured to mark the entity identifier with the highest confidence in each group of entity data based on the confidence information of at least one entity identifier in each group of entity data.

[0014] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described data processing method at runtime.

[0015] According to another aspect of the present invention, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described data processing method through the computer program.

[0016] In this embodiment of the invention, N entity identifiers associated with a knowledge graph are obtained, where N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph. The entity identifiers among the N entity identifiers are marked according to their confidence information to obtain M marked entity identifiers, where M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the entity identifier in the knowledge graph. When a fusion instruction is obtained to perform entity fusion on the entity data corresponding to at least two of the N entity identifiers, and at least two entity identifiers include any one of the M entity identifiers, the entity data corresponding to at least two entity identifiers are fused in response to the fusion instruction to obtain fused entity data, and any one of the entity identifiers is determined as the entity identifier corresponding to the fused entity data. By using the above technical solution to identify the fused entity data using marked entity identifiers, the entity identifiers of the fused entity data are unified, solving the technical problem that the next step of calculation cannot be performed because the same entity data corresponds to different entity identifiers. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0018] Figure 1 This is a hardware structure block diagram of a computer terminal for an optional data processing method according to an embodiment of the present invention.

[0019] Figure 2 This is a flowchart of an optional data processing method according to an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram of an optional data processing method according to an embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram of another optional data processing method according to an embodiment of the present invention;

[0022] Figure 5 This is a structural block diagram of an optional data processing apparatus according to an embodiment of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] The methods and embodiments provided in this application can be executed on a computer terminal, a computer terminal, or a similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a hardware structure block diagram of a computer terminal for a data processing method according to an embodiment of the present invention. Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. In one exemplary embodiment, the computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.

[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data processing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0028] This embodiment provides a data processing method. Figure 2 This is a flowchart of a data processing method according to an embodiment of the present invention, which includes the following steps:

[0029] Step S202: Obtain N entity identifiers associated with the knowledge graph, where N is a natural number greater than or equal to 2. The entity identifiers are used to query entity data in the knowledge graph.

[0030] Step S204: Mark the entity identifiers among the N entity identifiers according to the confidence information of the entity identifiers to obtain the M marked entity identifiers, where M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the entity identifier in the knowledge graph.

[0031] Step S206: When a fusion instruction is obtained to perform entity fusion on entity data corresponding to at least two entity identifiers among N entity identifiers, and the at least two entity identifiers include any entity identifier among M entity identifiers, the entity data corresponding to the at least two entity identifiers is fused in response to the fusion instruction to obtain fused entity data, and any entity identifier is determined as the entity identifier corresponding to the fused entity data.

[0032] Optionally, in this embodiment, an entity can be a physical entity or a conceptual entity, and there is no limitation on this; an entity identifier can be letters, numbers, special symbols and any combination thereof, and there is no limitation on this; entity data can correspond one-to-one with entity identifiers, and different entity data can correspond to different entity identifiers, and there is no limitation on this.

[0033] Optionally, in this embodiment, before marking the entity identifiers, the confidence information of each entity identifier can be calculated first; after calculating the confidence information of each entity identifier, the top M entity identifiers can be sorted according to the size of the confidence and marked; the confidence information can be calculated based on the time attribute of the entity data, such as update time or update frequency; it can also be calculated based on other attributes of the entity data, such as the size of the data, the importance of the data in the subject area, etc., which are not limited here.

[0034] It should be noted that when performing entity fusion on multiple identical entity data or multiple entity data with similarity greater than a preset threshold, it is necessary to select one entity identifier from the multiple entity identifiers corresponding to the multiple entity data as the entity identifier of the entity data after entity fusion. Moreover, due to continuous data updates, it is necessary to perform entity fusion on multiple entity data multiple times. Therefore, in order to unify the entity identifier of the entity data after entity fusion, the entity identifier with a label is selected as the entity identifier of the entity data after entity fusion each time entity fusion is performed, thereby achieving the same entity identifier for the same entity data.

[0035] The solution provided in this application obtains N entity identifiers associated with a knowledge graph, where N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph. Based on the confidence information of the entity identifiers, the entity identifiers among the N entity identifiers are marked to obtain M marked entity identifiers, where M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the entity identifier in the knowledge graph. When a fusion instruction is obtained to perform entity fusion on the entity data corresponding to at least two of the N entity identifiers, and at least two entity identifiers include any one of the M entity identifiers, the entity data corresponding to at least two entity identifiers are fused in response to the fusion instruction to obtain fused entity data, and any one of the entity identifiers is determined as the entity identifier corresponding to the fused entity data. By using the above technical solution to identify the fused entity data using marked entity identifiers, the entity identifiers of the fused entity data are unified, solving the technical problem that the next step of calculation cannot be performed because the same entity data corresponds to different entity identifiers.

[0036] In an exemplary embodiment, marking entity identifiers among N entity identifiers based on the confidence information of entity identifiers to obtain M marked entity identifiers includes: dividing the N entity data corresponding to the N entity identifiers into M groups of entity data, wherein each group of entity data includes at least one entity data, and the entity similarity of each group of entity data is greater than a preset threshold; and marking the entity identifier with the highest confidence in each group of entity data based on the confidence information of at least one entity identifier in each group of entity data.

[0037] It should be noted that, in order to avoid labeling multiple entity identifiers in multiple identical or similar entity data, before labeling the entity identifiers, the N entity data are first grouped according to the entity similarity information, and in each group of entity data, the entity identifier with the highest confidence is selected for labeling.

[0038] The solution provided by the embodiments of this application avoids marking multiple entity identifiers in multiple identical or similar entity data by grouping multiple entity data and selecting the entity identifier with the highest confidence in each group of entity data.

[0039] In one exemplary embodiment, marking the entity identifier with the highest confidence in each group of entity data based on the confidence information of at least one entity identifier in each group of entity data includes: obtaining the update time of each entity data in each group of entity data; determining the confidence of each entity identifier in at least one entity identifier based on the update time, wherein the time interval between the update time and the current time is inversely correlated with the confidence; and marking the entity identifier with the highest confidence in each group of entity data.

[0040] Optionally, in this embodiment, the confidence information can be calculated based on the time attributes of the entity data, such as update time or update frequency; wherein, the time interval between the update time and the current time can be inversely correlated with the confidence, or it can be positively correlated, which is not limited here.

[0041] The solution provided in this application improves the stability of entity identifiers by setting the time interval between the update time and the current time, which is inversely correlated with the confidence level.

[0042] In one exemplary embodiment, before obtaining the N entity identifiers associated with the knowledge graph, the method includes: dividing the entity data in the knowledge graph into a first type of data and a second type of data; if the entity data belongs to the first type of data, compiling a Uniform Resource Identifier (URI) for the entity data using a first method; and if the entity data belongs to the second type of data, compiling a URI for the entity data using a second method.

[0043] Optionally, in this embodiment, entity data is aggregated from multiple sources. Each entity data must have a corresponding Uniform Resource Identifier (URI) to generate unique entity data. Generally, data sources can be categorized into structured data, semi-structured data, and unstructured data based on their format. Structured and semi-structured data are typically pre-organized data, sometimes even originating from a database, and can be compiled using a database + data table + data ID approach for entity URI compilation. If the data is manually generated or extracted, entity URIs can be compiled according to data category and date.

[0044] The solution provided in this application reduces the probability of collisions between different entity URIs by using different methods to compile entity URIs for different types of entity data.

[0045] In one exemplary embodiment, an entity identifier is generated based on the entity uniform resource identifier using a target algorithm; the entity uniform resource identifier and the entity identifier are stored accordingly.

[0046] Optionally, in this embodiment, the target algorithm can be a hash algorithm, which is not limited here; after generating the entity identifier based on the entity uniform resource identifier using the target algorithm, the entity uniform resource identifier and the entity identifier can be stored in the database accordingly, which is not limited here.

[0047] The solution provided in this application reduces the probability of collisions between different entity identifiers by using the target algorithm to generate entity identifiers based on the entity's Uniform Resource Identifier.

[0048] In one exemplary embodiment, collision detection is performed on multiple entity identifiers; if at least two entity identifiers collide, the entity uniform resource identifier corresponding to the collided entity identifier is modified.

[0049] Optionally, in this embodiment, to avoid collisions between different entity identifiers, collision detection can be performed on multiple entity identifiers; in the event of a collision between different entity identifiers, the entity's Uniform Resource Identifier corresponding to the colliding entity identifier can be modified, for example, by changing the entity URI or shifting the entity URI, thereby avoiding collisions between different entity identifiers.

[0050] The solution provided in this application reduces the probability of collisions between different entity identifiers by using collision detection and changing entity URIs.

[0051] This embodiment provides a data processing method. Figure 3 This is a schematic diagram of a data processing method according to an embodiment of the present invention, such as... Figure 3 As shown, the specific solution is as follows:

[0052] 1) Entity URI Compilation. Firstly, entity data is aggregated from multiple sources. Each piece of entity data must have a corresponding entity URI to generate a unique entity data. Generally, data sources can be categorized by format as structured data, semi-structured data, and unstructured data. Structured and semi-structured data are usually pre-organized data, sometimes even from databases, and can be compiled using a database + data table + data ID approach for entity URI compilation. For manually generated or extracted data, entity URIs can be compiled according to data category and date.

[0053] 2) Generation of entity identifiers. Entity identifiers are represented by a string of numbers and are generated based on the entity URI using a hash algorithm.

[0054] 3) Storage of entity identifiers. Once generated, entity identifiers are persistently stored in the database. This stores the mapping between entity URIs and entity identifiers.

[0055] 4) Collision detection of entity identifiers. Although the collision probability of entity identifiers generated by hash algorithms can be less than one in a billion, the number of knowledge graphs often reaches tens of billions, so some collisions will still occur. This can be avoided by changing the entity URI or by shifting the identifier.

[0056] 5) Entity identifier lookup. Entity identifier lookup is implemented through a persistent database for use by downstream services.

[0057] This embodiment provides another data processing method. Figure 4 This is a schematic diagram of a data processing method according to an embodiment of the present invention, such as... Figure 4 As shown, the specific solution is as follows:

[0058] like Figure 4 As shown in (a), Figure 4 (a) describes a problem encountered during the release of a knowledge graph. For example, in an older version of the knowledge graph, three entities A, B, and C were obtained from three data sources. These entities were the same entity, and after entity fusion, entity B was selected as the final entity identifier. However, after a period of time, the data sources changed, and entity B no longer existed. For the new version of the knowledge graph, entities A and C were still the same entity. After another entity fusion, entity C was selected as the final entity identifier. This presents a problem. For instance, based on this knowledge graph, the relevance between company entities and articles is calculated. In the first week, a company's entity identifier was B, and several related articles were obtained. In the second week, the company's entity identifier changed to C, and several more related articles were obtained. At this point, if you want to query the company's related articles, you can only get the results calculated in the second week because the company had different entity identifiers in the first and second weeks, and the results are no longer available—unless all the entity identifiers that the company entity had ever had are retained, which would create new work—unless the company's entity identifiers can remain unchanged with changes in data sources or versions.

[0059] Therefore, we proposed, as follows Figure 4 The entity identifier fusion scheme shown in (b) involves selecting a batch of entity data from all participating or potential participants in entity fusion based on confidence level or time sequence. This batch of entity data is then fixed to a dedicated data source, and the entity identifier corresponding to each data point is tagged with "root". When this entity data participates in entity fusion, its corresponding entity identifier is used as the final result. By fixing the entity data information, it is ensured that the entity identifier will not change with changes in the data source. The "root" tag ensures that the entity identifier remains unchanged during entity fusion, thus preventing the issue of entity identifier variations across different versions.

[0060] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0061] Figure 5 This is a structural block diagram of a data processing apparatus according to an embodiment of the present invention; as shown below. Figure 5 As shown, it includes:

[0062] The acquisition module 501 is used to acquire N entity identifiers associated with the knowledge graph, where N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph.

[0063] The tagging module 502 is used to tag the entity identifiers among the above N entity identifiers according to the confidence information of the above entity identifiers, so as to obtain M tagged entity identifiers, where M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the above entity identifiers in the above knowledge graph.

[0064] The fusion module 503 is used to, when it receives a fusion instruction to perform entity fusion on the entity data corresponding to at least two entity identifiers among the above N entity identifiers, and the above at least two entity identifiers include any entity identifier among the above M entity identifiers, respond to the fusion instruction to perform fusion processing on the entity data corresponding to the above at least two entity identifiers, obtain fused entity data, and determine any of the above entity identifiers as the entity identifier corresponding to the fused entity data.

[0065] The solution provided in this application obtains N entity identifiers associated with a knowledge graph, where N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph. Based on the confidence information of the entity identifiers, the entity identifiers among the N entity identifiers are marked to obtain M marked entity identifiers, where M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the entity identifier in the knowledge graph. When a fusion instruction is obtained to perform entity fusion on the entity data corresponding to at least two of the N entity identifiers, and at least two entity identifiers include any one of the M entity identifiers, the entity data corresponding to at least two entity identifiers are fused in response to the fusion instruction to obtain fused entity data, and any one of the entity identifiers is determined as the entity identifier corresponding to the fused entity data. By using the above technical solution to identify the fused entity data using marked entity identifiers, the entity identifiers of the fused entity data are unified, solving the technical problem that the next step of calculation cannot be performed because the same entity data corresponds to different entity identifiers.

[0066] In an exemplary embodiment, the marking module further includes: a partitioning unit, configured to partition the N entity data corresponding to the N entity identifiers into M groups of entity data, wherein each group of entity data includes at least one entity data and the entity similarity of each group of entity data is greater than a preset threshold; and a marking unit, configured to mark the entity identifier with the highest confidence in each group of entity data based on the confidence information of at least one entity identifier in each group of entity data.

[0067] It should be noted that, in order to avoid labeling multiple entity identifiers in multiple identical or similar entity data, before labeling the entity identifiers, the N entity data are first grouped according to the entity similarity information, and in each group of entity data, the entity identifier with the highest confidence is selected for labeling.

[0068] The solution provided by the embodiments of this application avoids marking multiple entity identifiers in multiple identical or similar entity data by grouping multiple entity data and selecting the entity identifier with the highest confidence in each group of entity data.

[0069] Embodiments of the present invention also provide a storage medium comprising a stored program, wherein the program, when executed, performs any of the methods described above.

[0070] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0071] S1, obtain N entity identifiers associated with the knowledge graph, where N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph;

[0072] S2, mark the entity identifiers among the N entity identifiers according to the confidence information of the entity identifiers, and obtain the marked M entity identifiers, where M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the entity identifier in the knowledge graph.

[0073] S3, when a fusion instruction is obtained to perform entity fusion on entity data corresponding to at least two entity identifiers among N entity identifiers, and the at least two entity identifiers include any entity identifier among M entity identifiers, the entity data corresponding to the at least two entity identifiers is fused in response to the fusion instruction to obtain fused entity data, and any entity identifier is determined as the entity identifier corresponding to the fused entity data.

[0074] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0075] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0076] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0077] S1, obtain N entity identifiers associated with the knowledge graph, where N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph;

[0078] S2, mark the entity identifiers among the N entity identifiers according to the confidence information of the entity identifiers, and obtain the marked M entity identifiers, where M is a natural number less than N, and the confidence information is used to represent the stability of the entity data corresponding to the entity identifier in the knowledge graph.

[0079] S3, when a fusion instruction is obtained to perform entity fusion on entity data corresponding to at least two entity identifiers among N entity identifiers, and the at least two entity identifiers include any entity identifier among M entity identifiers, the entity data corresponding to the at least two entity identifiers is fused in response to the fusion instruction to obtain fused entity data, and any entity identifier is determined as the entity identifier corresponding to the fused entity data.

[0080] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0081] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0082] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0083] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data processing method, characterized by, The method comprises the following steps: obtaining N entity identifiers associated with a knowledge graph, wherein N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph; labeling entity identifiers in the N entity identifiers according to confidence information of the entity identifiers, to obtain M labeled entity identifiers, wherein M is a natural number less than N, and the confidence information is used to represent the stability of entity data corresponding to the entity identifiers in the knowledge graph; in the case that a fusion instruction for fusing entity data corresponding to at least two entity identifiers in the N entity identifiers is obtained, and the at least two entity identifiers include any entity identifier in the M entity identifiers, performing fusion processing on the entity data corresponding to the at least two entity identifiers in response to the fusion instruction, to obtain fused entity data, and determining the any entity identifier as an entity identifier corresponding to the fused entity data; wherein the step of labeling entity identifiers in the N entity identifiers according to confidence information of the entity identifiers to obtain M labeled entity identifiers comprises: dividing N entity data corresponding to the N entity identifiers into M groups of entity data, wherein each group of entity data includes at least one entity data, and the entity similarity of each group of entity data is greater than a preset threshold; obtaining the update time of each entity data in each group of entity data; determining the confidence of each entity identifier in the at least one entity identifier according to the update time, wherein the update time and the current time are inversely related to the confidence; labeling the entity identifier with the highest confidence in each group of entity data.

2. The data processing method according to claim 1, characterized in that, Before the step of obtaining N entity identifiers associated with a knowledge graph, the method comprises the following steps: dividing entity data in the knowledge graph into first type data and second type data; in the case that the entity data belongs to the first type data, using a first method to compile an entity uniform resource identifier of the entity data; in the case that the entity data belongs to the second type data, using a second method to compile an entity uniform resource identifier of the entity data.

3. The data processing method according to claim 2, characterized in that, The method further comprises the following steps: generating the entity identifier according to the entity uniform resource identifier by using a target algorithm; storing the entity uniform resource identifier and the entity identifier correspondingly.

4. The data processing method according to claim 3, characterized in that, The method further comprises the following steps: performing collision detection on a plurality of entity identifiers; in the case that collision occurs between at least two entity identifiers, changing the entity uniform resource identifier corresponding to the colliding entity identifiers.

5. A data processing apparatus, characterized by, The method comprises the following steps: an obtaining module is configured to obtain N entity identifiers associated with a knowledge graph, wherein N is a natural number greater than or equal to 2, and the entity identifiers are used to query entity data in the knowledge graph; The marking module is configured to mark entity identifiers in the N entity identifiers according to confidence information of the entity identifiers, to obtain M marked entity identifiers, where M is a natural number less than N, and the confidence information is used to represent a stability degree of entity data corresponding to the entity identifiers in the knowledge graph. The fusion module is configured to, in a case where a fusion instruction for performing entity fusion on entity data corresponding to at least two entity identifiers in the N entity identifiers is acquired, and the at least two entity identifiers include any entity identifier in the M entity identifiers, perform fusion processing on the entity data corresponding to the at least two entity identifiers in response to the fusion instruction, to obtain fused entity data, and determine the any entity identifier as an entity identifier corresponding to the fused entity data. The marking module further includes a division unit configured to divide N entity data corresponding to the N entity identifiers into M groups of entity data, where each group of entity data includes at least one entity data, and entity similarity of each group of entity data is greater than a preset threshold; and a marking unit configured to acquire update times of each entity data in each group of entity data, determine confidence of each entity identifier in the at least one entity identifier according to the update times, where a time interval between the update times and a current time and the confidence are in an inverse correlation relationship, and mark an entity identifier with the highest confidence in each group of entity data.

6. A computer readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where the program performs the method in any one of claims 1 to 4 when executed. 7.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method in any one of claims 1 to 4 by using the computer program.

Citation Information

Patent Citations

  • Industrial Internet of Things identification method based on knowledge graph

    CN110674310A

  • Model fusion-based entity identification method and system

    CN114091458A