A data processing method and device
By building a data knowledge graph, matching the target entity according to the user's intention and obtaining its attribute information, the problem of poor entity recognition accuracy in the human-computer dialogue system is solved, and more efficient data processing is achieved.
Patent Information
- Application Number
- CN201910495814.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-10
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2039-06-10
AI Technical Summary
The existing human-computer dialogue system has poor entity recognition accuracy in data processing and cannot meet user needs.
By constructing a data knowledge graph, determining the user's intentions based on the user's input content, matching the target entity and obtaining its attribute information, performing corresponding data processing operations, and improving the accuracy of entity recognition.
It effectively improves the accuracy of entity identification in data processing, meets users' data processing needs, and reduces system complexity.
Smart Images

Figure CN112069267B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method and device. Background Art
[0002] With the rapid development of computer technology and artificial intelligence, human-computer dialogue systems have emerged. Human-computer dialogue systems are computer systems that can have coherent conversations with people. At present, when human-computer dialogue systems are applied to data processing scenarios, entity recognition relies on pre-defined data models, resulting in poor accuracy of entity recognition, making the data processing process unable to meet user needs. Summary of the invention
[0003] In view of this, the present disclosure proposes a data processing method and device, which can improve the accuracy of entity recognition during the data processing process, thereby effectively meeting the data processing needs of users.
[0004] According to the first aspect of the present disclosure, a data processing method is provided, including: determining user intent based on user input content; determining multiple target entities matching the user intent based on a data knowledge graph; respectively determining attribute information of the multiple target entities; and performing data processing operations corresponding to the user intent based on the attribute information.
[0005] In a possible implementation, the data knowledge graph is constructed in the following manner: based on the metadata in the database, user domain entities, indicator domain entities, dimension domain entities, and mapping relationships between different entities are constructed, the user domain entities include multiple different user entities, the indicator domain entities include multiple different indicator entities, and the dimension domain entities include multiple different dimension entities; based on the user domain entities, the indicator domain entities, the dimension domain entities and the mapping relationships between the different entities, the data knowledge graph is constructed.
[0006] In a possible implementation, based on the data knowledge graph, multiple target entities that match the user intent are determined, including: determining a target indicator entity in the indicator domain entity and a target user entity in the user domain entity according to the user intent; determining at least one target dimension entity that has a mapping relationship with the target indicator entity and the target user entity according to the data knowledge graph; wherein the target indicator entity, the target user entity, and the at least one target dimension entity constitute multiple target entities that match the user intent.
[0007] In a possible implementation, the user intention includes one of the following: data query and data analysis.
[0008] In one possible implementation, the user intention is data query; based on the attribute information, a data processing operation corresponding to the user intention is performed, including: determining the database information corresponding to the attribute information based on the data knowledge graph; generating SQL based on the database information corresponding to the attribute information; and performing a data query operation in the database based on the SQL.
[0009] In a possible implementation manner, the database information includes at least one of the following: physical table information, field information, partition information, and data distribution information.
[0010] In a possible implementation, the method further includes: when the metadata in the database is updated, updating the data knowledge graph.
[0011] In a possible implementation manner, the user input content is text input content and / or voice input content.
[0012] According to a second aspect of the present disclosure, a method for constructing a data knowledge graph is provided, comprising: constructing user domain entities, indicator domain entities, dimension domain entities, and mapping relationships between different entities based on metadata in a database, wherein the user domain entities include multiple different user entities, the indicator domain entities include multiple different indicator entities, and the dimension domain entities include multiple different dimension entities; constructing the data knowledge graph based on the user domain entities, the indicator domain entities, the dimension domain entities, and the mapping relationships between the different entities.
[0013] According to a third aspect of the present disclosure, a data processing device is provided, comprising: a first determination module for determining user intent based on user input content; a second determination module for determining multiple target entities matching the user intent based on a data knowledge graph; a third determination module for respectively determining attribute information of the multiple target entities; and a data processing module for performing data processing operations corresponding to the user intent based on the attribute information.
[0014] In a possible implementation, the device also includes: a first construction module, used to construct user domain entities, indicator domain entities, dimension domain entities, and mapping relationships between different entities based on metadata in a database, wherein the user domain entities include multiple different user entities, the indicator domain entities include multiple different indicator entities, and the dimension domain entities include multiple different dimension entities; a second construction module, used to construct the data knowledge graph based on the user domain entities, the indicator domain entities, the dimension domain entities, and the mapping relationships between the different entities.
[0015] In a possible implementation, the second determination module includes: a first determination submodule, used to determine a target indicator entity in the indicator domain entity and a target user entity in the user domain entity according to the user intention; a second determination submodule, used to determine at least one target dimension entity having a mapping relationship with the target indicator entity and the target user entity according to the data knowledge graph; wherein the target indicator entity, the target user entity, and the at least one target dimension entity constitute a plurality of target entities that match the user intention.
[0016] In a possible implementation, the user intention includes one of the following: data query and data analysis.
[0017] In one possible implementation, the user intention is data query; the data processing module includes: a third determination submodule, used to determine the database information corresponding to the attribute information according to the data knowledge graph; a query language generation submodule, used to generate SQL according to the database information corresponding to the attribute information; a data query submodule, used to perform data query operations in the database according to the SQL.
[0018] In a possible implementation manner, the database information includes at least one of the following: physical table information, field information, partition information, and data distribution information.
[0019] In a possible implementation, the device further includes: an updating module, configured to update the data knowledge graph when the metadata in the database is updated.
[0020] In a possible implementation manner, the user input content is text input content and / or voice input content.
[0021] According to a fourth aspect of the present disclosure, a data processing device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to execute the data processing method described in the first aspect above.
[0022] According to a fifth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the data processing method described in the first aspect above.
[0023] According to a sixth aspect of the present disclosure, a device for constructing a data knowledge graph is provided, comprising: a first construction module, used to construct user domain entities, indicator domain entities, dimension domain entities, and mapping relationships between different entities according to metadata in a database, wherein the user domain entities include multiple different user entities, the indicator domain entities include multiple different indicator entities, and the dimension domain entities include multiple different dimension entities; a second construction module, used to construct the data knowledge graph according to the user domain entities, the indicator domain entities, the dimension domain entities, and the mapping relationships between the different entities.
[0024] According to the seventh aspect of the present disclosure, a data processing device is provided, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute the method for constructing a data knowledge graph as described in the second aspect above.
[0025] According to an eighth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the method for constructing a data knowledge graph as described in the second aspect above.
[0026] Determine the user's intention based on the user's input content, determine multiple target entities that match the user's intention based on the data knowledge graph, and determine the attribute information of the multiple target entities respectively, and then perform data processing operations corresponding to the user's intention based on the attribute information, thereby improving the accuracy of entity recognition in the data processing process and effectively meeting the user's data processing needs.
[0027] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0029] Figure 1 A schematic diagram showing a flow chart of a data processing method according to an embodiment of the present disclosure;
[0030] Figure 2 A schematic diagram showing a process of constructing a data knowledge graph according to an embodiment of the present disclosure;
[0031] Figure 3 A schematic diagram showing construction of a data knowledge graph according to an embodiment of the present disclosure;
[0032] Figure 4 A schematic diagram showing the structure of a data processing device according to an embodiment of the present disclosure;
[0033] Figure 5 A schematic diagram showing the structure of an apparatus for constructing a data knowledge graph according to an embodiment of the present disclosure;
[0034] Figure 6 A schematic structural diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0035] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0036] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0037] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0038] Figure 1 A flow chart showing a data processing method according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method may include:
[0039] Step S11, determining the user intention according to the user input content.
[0040] Step S12: Based on the data knowledge graph, determine multiple target entities that match the user's intention.
[0041] Step S13, determining attribute information of multiple target entities respectively.
[0042] Step S14: Execute a data processing operation corresponding to the user's intention according to the attribute information.
[0043] Figure 1 The data processing method shown can be applied to data processing based on human-computer dialogue, and can also be applied to other data processing, which is not specifically limited in the present disclosure. Figure 1 The data processing method shown is introduced in detail, but does not constitute a limitation on the data processing method.
[0044] Before data processing based on human-computer dialogue, a semantic data knowledge graph is pre-built based on the database.
[0045] Figure 2 A schematic diagram showing a method for constructing a data knowledge graph according to an embodiment of the present disclosure is shown.
[0046] Figure 2 As shown, the method may include:
[0047] Step S21, constructing user domain entities, indicator domain entities, dimension domain entities, and mapping relationships between different entities according to metadata in the database, wherein the user domain entity includes multiple different user entities, the indicator domain entity includes multiple different indicator entities, and the dimension domain entity includes multiple different dimension entities;
[0048] Step S22, constructing a data knowledge graph based on the user domain entities, indicator domain entities, dimension domain entities and the mapping relationships between different entities.
[0049] Among them, metadata is data that describes data, that is, information used to describe the data attributes of data stored in the database, and is used to implement functions such as indicating storage location, historical data, resource search, file records, etc.
[0050] From an academic perspective, knowledge graph refers to the knowledge base of semantic network. In the database field, data knowledge graph refers to the multi-relationship graph between different data in the database.
[0051] An entity refers to an object or thing that exists objectively and can be distinguished from each other in the real world. In the database field, an entity refers to a collection of a certain type of thing, which can be a specific person, thing, or object, or an abstract concept or relationship.
[0052] In one example, constructing a semantic data knowledge graph specifically includes: first, based on the data business model in the database, establish a link relationship between the fields of different physical tables. For the same fields, indicators or dimensions in different physical tables, determine whether the semantics are the same. If they are the same, establish a unified (mapping) relationship. For example, as shown in the following physical tables 1 and 2, the field "amount" in physical table 1 has the same semantics as the field "money" in physical table 2, and both are used to represent the user's consumption value. Then, a mapping relationship is established between the field "amount" in physical table 1 and the field "money" in physical table 2.
[0053] Physical Table 1
[0054]
[0055]
[0056] Physical Table 2
[0057] user Buy Products money User A Product 3 Z Yuan User C Product 2 Y yuan
[0058] Then, the physical table is integrated as attribute information to mask the physical limitations of the data table, that is, user domain entities, indicator domain entities, dimension domain entities, and the mapping relationship between different entities are constructed, and then the data knowledge graph is constructed according to the user domain entities, indicator domain entities, dimension domain entities and the mapping relationship between different entities.
[0059] Figure 3 A schematic diagram of constructing a data knowledge graph according to an embodiment of the present disclosure is shown. Figure 3 As shown in the figure, the business metadata in the database includes multiple metadata sets: personal metadata set, enterprise metadata set, service field metadata set, etc. Among them, the personal metadata set includes multiple metadata such as basic attributes, preferences, geography, social, consumption, etc.; the enterprise metadata set includes multiple metadata such as basic information, enterprise relationships, financial risk control, etc.; the service field metadata set includes multiple metadata such as request volume, pick-up volume, resolution rate, and transfer rate.
[0060] By performing entity alignment, attribute fusion, value normalization and other operations on the business metadata in the database, a data knowledge graph is constructed. Figure 3 As shown, the data knowledge graph includes user domain entities (including business domain entities, department (Business Unit, BU) entities, etc.), indicator domain entities (including conversation turn entities, resolution rate entities, transfer rate entities, etc.), dimension domain entities (date entities, industry entities, whether it is an important customer (Key Account, KA) entity, main category entity, scenario entity, etc.), and mapping relationships between different entities.
[0061] In a possible implementation, it also includes: when the metadata in the database is updated, updating the data knowledge graph.
[0062] like Figure 3 As shown, when the business metadata in the database is updated, the entities and / or the mapping relationships between entities in the data knowledge graph are updated, so that the updated data knowledge graph can be accurately applied to data processing requests, facilitating the expansion of data processing application scenarios.
[0063] Compared with the existing method of pre-building rule templates or training data models, building and updating data knowledge graphs can effectively reduce the system complexity of data processing based on human-computer dialogue.
[0064] After the data knowledge graph is built, it can be applied to data processing scenarios. In the process of data processing, the user's intention can be determined by semantically parsing the user's input content. For example, in a data processing scenario based on human-computer dialogue, the user's intention is determined by semantically parsing the human-computer dialogue content (user input content).
[0065] In a possible implementation manner, the user input content is text input content and / or voice input content.
[0066] In one example, when the user input content is text input content, the user intention is determined by performing named entity recognition (NER) on the text input content input by the user.
[0067] In one example, when the user input content is voice input content, voice recognition is first performed on the user's voice input content to convert the voice input content into text content, and then named entity recognition is performed on the text content to determine the user's intention.
[0068] Named entity recognition, also known as "proper name recognition", is a basic task of natural language processing (NLP). It refers to the identification of entities with specific meanings in text content, mainly including names of people, places, time, organization names, proper nouns, etc.
[0069] In a possible implementation, the user intention includes one of the following: data query and data analysis.
[0070] In addition to the data query and data analysis described above, user intent may also include other user intents, which are not specifically limited in the present disclosure.
[0071] For example, the user input content is "yesterday's wireless terminal product A resolution rate", by performing named entity recognition on the user input content, it is determined that the user's intention is an indicator query.
[0072] After determining the user intent, multiple target entities matching the user intent are determined based on the data knowledge graph.
[0073] In a possible implementation, based on the data knowledge graph, multiple target entities that match the user intent are determined, including: determining a target indicator entity in the indicator domain entity and a target user entity in the user domain entity according to the user intent; determining at least one target dimension entity that has a mapping relationship with the target indicator entity and the target user entity according to the data knowledge graph; wherein the target indicator entity, the target user entity, and at least one target dimension entity constitute multiple target entities that match the user intent.
[0074] During the user input process (for example, during the human-computer dialogue process), the user domain constraints are automatically added by default, that is, the target dimension entity associated with the target user entity can be obtained according to the context of the human-computer dialogue. In addition, based on the data knowledge graph, the target dimension entity with a mapping relationship with the target indicator entity and the target user entity can also be inferred. The target indicator entity, the target user entity, and the target dimension entity together constitute multiple target entities that match the user's intention.
[0075] Through the data knowledge graph, determine whether there is a logical relationship between dimension entities and indicator entities. For example, based on whether the query statement has results, determine whether there is an associated dimension between the industry entity - Industry Clothing Industry and the indicator entity - Measure Solution Rate. The Cypher syntax is: MATCH (i: Industry) <- [: DIMENSION] - (m: MEASURE) WHERE i.name = "clothing industry" AND m.name = "solution rate" RETURN m.name.
[0076] In data processing based on human-computer dialogue, multiple target entities matching the user's intention are determined based on the data knowledge graph, and the attribute information of the multiple target entities is determined respectively, that is, multiple slots matching the user's intention are determined and each slot is filled. Among them, the slot refers to the clearly defined attribute of the entity, and the slot is composed of slots.
[0077] Based on the data knowledge graph, it is possible to dynamically determine the target entity, that is, during a human-computer dialogue for a data processing request, the target entity that can be determined is not fixed (the slot is not fixed). As long as the dimensional entity that has a mapping relationship with the target indicator entity and the target user entity can be queried in the data knowledge graph, it can be determined as the target entity, thereby solving the problem that the existing technology cannot meet user data processing needs in the case of uncertain dimensions.
[0078] After determining multiple target entities, it is determined whether the attribute information of each target entity can be determined according to the context. If so, the attribute information of the multiple target entities is determined according to the context; if not, the attribute information of the multiple target entities is obtained respectively through state tracking and dialogue strategy optimization.
[0079] For example, the content of the human-computer dialogue is "Yesterday's wireless terminal product A resolution rate", and the user's intention is determined to be an indicator query. After named entity recognition and target entity determination based on the data knowledge graph, the four target entities that match the user's intention are obtained: indicator, time, type, and product. According to the context, the attribute information of the target entity indicator is determined to be the resolution rate, the attribute information of the target entity time is yesterday, the attribute information of the target entity type is the wireless terminal, and the attribute information of the target entity product is product A.
[0080] In one possible implementation, the user intention is to query data; based on the attribute information, a data processing operation corresponding to the user intention is performed, including: determining the database information corresponding to the attribute information based on the data knowledge graph; generating a structured query language (SQL) based on the database information corresponding to the attribute information; and performing a data query operation in the database based on the SQL.
[0081] In a possible implementation, the database information includes at least one of the following: physical table information, field information, partition information, and data distribution information.
[0082] After determining multiple target entities according to user intention and data knowledge graph and respectively obtaining attribute information of multiple target entities, the database information (physical table information, field information, partition information, and data distribution information) corresponding to the attribute information is determined according to the data knowledge graph, and then the data query SQL is constructed according to the database information corresponding to the attribute information. According to the SQL, the data query operation is executed in the database, and the query results are fed back to the user.
[0083] In a possible implementation, the query result fed back to the user may be a visual chart. By outputting the query result in a visual chart to the user, the user can intuitively understand the data information to be queried.
[0084] The user intention is determined according to the user input content, and multiple target entities matching the user intention are determined based on the data knowledge graph, and the attribute information of the multiple target entities are determined respectively. Then, according to the attribute information, the data processing operation corresponding to the user intention is performed, thereby improving the accuracy of entity recognition in the data processing process and effectively meeting the user's data processing needs.
[0085] Figure 4 A schematic diagram showing the structure of a data processing device according to an embodiment of the present disclosure is shown. Figure 4 The device 40 shown can be used to perform Figure 1 The steps of the method embodiment shown, the device 40 includes:
[0086] A first determination module 41, used to determine the user intention according to the user input content;
[0087] A second determination module 42 is used to determine a plurality of target entities for matching with the intent based on the data knowledge graph;
[0088] A third determination module 43, used to respectively determine the attribute information of multiple target entities;
[0089] The data processing module 44 is used to perform data processing operations corresponding to the user's intention according to the attribute information.
[0090] In a possible implementation, the device 40 further includes:
[0091] A first construction module is used to construct a user domain entity, an indicator domain entity, a dimension domain entity, and a mapping relationship between different entities according to metadata in a database, wherein the user domain entity includes a plurality of different user entities, the indicator domain entity includes a plurality of different indicator entities, and the dimension domain entity includes a plurality of different dimension entities;
[0092] The second construction module is used to construct a data knowledge graph based on user domain entities, indicator domain entities, dimension domain entities and mapping relationships between different entities.
[0093] In a possible implementation, the second determining module 42 includes:
[0094] A first determination submodule is used to determine a target indicator entity in the indicator domain entity and a target user entity in the user domain entity according to the user intention;
[0095] A second determination submodule is used to determine at least one target dimension entity having a mapping relationship with the target indicator entity and the target user entity according to the data knowledge graph;
[0096] Among them, the target indicator entity, the target user entity, and at least one target dimension entity constitute the target entity that matches the user intention.
[0097] In a possible implementation, the user intention includes one of the following:
[0098] Data query and data analysis.
[0099] In a possible implementation, the user intent is a data query;
[0100] The data processing module 44 includes:
[0101] The third determination submodule is used to determine the database information corresponding to the attribute information according to the data knowledge graph;
[0102] The query language generation submodule is used to generate SQL according to the database information corresponding to the attribute information;
[0103] The data query submodule is used to perform data query operations in the database according to SQL.
[0104] In a possible implementation, the database information includes at least one of the following:
[0105] Physical table information, field information, partition information, and data distribution information.
[0106] In a possible implementation, the device 40 further includes:
[0107] The update module is used to update the data knowledge graph after the metadata in the database is updated.
[0108] In a possible implementation manner, the user input content is text input content and / or voice input content.
[0109] The device 40 provided by the present disclosure can achieve Figure 1 The various steps in the method embodiment shown achieve the same technical effect and will not be described again here to avoid repetition.
[0110] Figure 5 A schematic diagram of the structure of an apparatus for constructing a data knowledge graph according to an embodiment of the present disclosure is shown. Figure 5 The device 50 shown can be used to perform Figure 2 The steps of the method embodiment shown, the device 50 includes:
[0111] A first construction module 51 is used to construct a user domain entity, an indicator domain entity, a dimension domain entity, and a mapping relationship between different entities according to metadata in the database, wherein the user domain entity includes a plurality of different user entities, the indicator domain entity includes a plurality of different indicator entities, and the dimension domain entity includes a plurality of different dimension entities;
[0112] The second construction module 52 is used to construct a data knowledge graph according to the user domain entity, the indicator domain entity, the dimension domain entity and the mapping relationship between different entities.
[0113] The device 50 provided by the present disclosure can achieve Figure 2 The various steps in the method embodiment shown achieve the same technical effect and will not be described again here to avoid repetition.
[0114] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. Figure 6As shown, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0115] The processor, network interface and memory can be interconnected through an internal bus, which can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0116] The memory stores the program. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0117] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a data processing device and / or a device for constructing a data knowledge graph at the logical level. The processor executes the program stored in the memory and specifically performs: determining the user intention based on the user input content; determining multiple target entities matching the user intention based on the data knowledge graph; determining the attribute information of multiple target entities respectively; and performing data processing operations corresponding to the user intention based on the attribute information.
[0118] In a possible implementation, the processor is further configured to execute: constructing user domain entities, indicator domain entities, dimension domain entities, and mapping relationships between different entities based on metadata in a database, wherein the user domain entities include multiple different user entities, the indicator domain entities include multiple different indicator entities, and the dimension domain entities include multiple different dimension entities; constructing a data knowledge graph based on the user domain entities, indicator domain entities, dimension domain entities, and mapping relationships between different entities.
[0119] In one possible implementation, the processor is specifically configured to execute: determining a target indicator entity in the indicator domain entity and a target user entity in the user domain entity according to user intent; determining at least one target dimension entity having a mapping relationship with the target indicator entity and the target user entity according to a data knowledge graph; wherein the target indicator entity, the target user entity, and at least one target dimension entity constitute a plurality of target entities that match the user intent.
[0120] In a possible implementation, the user intention includes one of the following: data query and data analysis.
[0121] In one possible implementation, the user's intention is to query data; the processor is specifically configured to execute: determining the database information corresponding to the attribute information based on the data knowledge graph; generating SQL based on the database information corresponding to the attribute information; and performing a data query operation in the database based on the SQL.
[0122] In a possible implementation, the database information includes at least one of the following: physical table information, field information, partition information, and data distribution information.
[0123] In a possible implementation, the processor is further configured to execute: when the metadata in the database is updated, updating the data knowledge graph.
[0124] In a possible implementation manner, the user input content is text input content and / or voice input content.
[0125] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of this specification may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of this specification may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0126] The electronic device may perform Figure 1 and / or Figure 2 The method shown in the method embodiment is executed and the above Figure 1 and / or Figure 2 The functions of the method embodiment shown are not described in detail in this specification.
[0127] The embodiment of the present specification also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 1 The data processing method and / or Figure 2 The method for constructing a data knowledge graph in the embodiment shown is specifically implemented Figure 1 and / or Figure 2 Steps of the method embodiment are shown.
[0128] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0129] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0130] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0131] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0132] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0133] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0134] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0135] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0136] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A data processing method, characterized in that: include: Determine user intent based on user input; Based on the data knowledge graph, determine multiple target entities matching the user intent; respectively determining attribute information of the plurality of target entities; According to the attribute information, executing a data processing operation corresponding to the user intention; The data knowledge graph is constructed in the following manner: according to the metadata in the database, a user domain entity, an indicator domain entity, a dimension domain entity, and a mapping relationship between different entities are constructed, wherein the user domain entity includes a plurality of different user entities, the indicator domain entity includes a plurality of different indicator entities, and the dimension domain entity includes a plurality of different dimension entities; according to the mapping relationship between the user domain entity, the indicator domain entity, the dimension domain entity, and the different entities, the data knowledge graph is constructed; Wherein, based on the data knowledge graph, multiple target entities matching the user intent are determined, including: according to the user intent, determining a target indicator entity in the indicator domain entity, and determining a target user entity in the user domain entity; according to the data knowledge graph, determining at least one target dimension entity having a mapping relationship with the target indicator entity and the target user entity; wherein the target indicator entity, the target user entity, and the at least one target dimension entity constitute multiple target entities matching the user intent.
2. The method according to claim 1, characterized in that The user intent includes one of the following: Data query and data analysis.
3. The method according to claim 1, characterized in that The user intention is data query; According to the attribute information, a data processing operation corresponding to the user intention is performed, including: Determine the database information corresponding to the attribute information according to the data knowledge graph; Generate structured query language SQL according to the database information corresponding to the attribute information; According to the SQL, a data query operation is performed in the database.
4. The method according to claim 3, characterized in that The database information includes at least one of the following: Physical table information, field information, partition information, and data distribution information.
5. The method according to claim 1, characterized in that: The method further comprises: When the metadata in the database is updated, the data knowledge graph is updated.
6. The method according to claim 1, characterized in that The user input content is text input content and / or voice input content.
7. A method for constructing a data knowledge graph, characterized in that: include: According to the metadata in the database, construct a user domain entity, an indicator domain entity, a dimension domain entity, and a mapping relationship between different entities, wherein the user domain entity includes a plurality of different user entities, the indicator domain entity includes a plurality of different indicator entities, and the dimension domain entity includes a plurality of different dimension entities; Constructing the data knowledge graph according to the mapping relationship between the user domain entity, the indicator domain entity, the dimension domain entity and the different entities; Wherein, the data knowledge graph is used to: determine the target indicator entity in the indicator domain entity and the target user entity in the user domain entity according to the user intention; determine at least one target dimension entity having a mapping relationship with the target indicator entity and the target user entity according to the data knowledge graph; wherein the target indicator entity, the target user entity, and the at least one target dimension entity constitute a plurality of target entities that match the user intention.
8. A data processing device, characterized in that: include: A first determination module, used to determine the user intention according to the user input content; A second determination module is used to determine multiple target entities matching the user intention based on the data knowledge graph; A third determination module, used to respectively determine the attribute information of the multiple target entities; A data processing module, used to perform a data processing operation corresponding to the user's intention according to the attribute information; A first construction module is used to construct a user domain entity, an indicator domain entity, a dimension domain entity, and a mapping relationship between different entities according to metadata in a database, wherein the user domain entity includes a plurality of different user entities, the indicator domain entity includes a plurality of different indicator entities, and the dimension domain entity includes a plurality of different dimension entities; A second construction module is used to construct the data knowledge graph according to the mapping relationship between the user domain entity, the indicator domain entity, the dimension domain entity and the different entities; Wherein, the second determining module includes: A first determination submodule, configured to determine a target indicator entity in the indicator domain entity and a target user entity in the user domain entity according to the user intention; A second determination submodule is used to determine at least one target dimension entity having a mapping relationship with the target indicator entity and the target user entity according to the data knowledge graph; Among them, the target indicator entity, the target user entity, and the at least one target dimension entity constitute a plurality of target entities that match the user intention.
9. The device according to claim 8, characterized in that The user intent includes one of the following: Data query and data analysis.
10. The device according to claim 8, characterized in that The user intention is data query; The data processing module comprises: A third determination submodule is used to determine the database information corresponding to the attribute information according to the data knowledge graph; A query language generation submodule, used to generate SQL according to the database information corresponding to the attribute information; The data query submodule is used to perform data query operations in the database according to the SQL.
11. The device according to claim 10, characterized in that The database information includes at least one of the following: Physical table information, field information, partition information, and data distribution information.
12. The device according to claim 8, characterized in that The device also includes: An updating module is used to update the data knowledge graph after the metadata in the database is updated.
13. The device according to claim 8, characterized in that The user input content is text input content and / or voice input content.
14. A data processing device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the data processing method described in any one of claims 1-6.
15. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the data processing method according to any one of claims 1 to 6 is implemented.
16. A device for constructing a data knowledge graph, characterized in that: include: A first construction module is used to construct a user domain entity, an indicator domain entity, a dimension domain entity, and a mapping relationship between different entities according to metadata in a database, wherein the user domain entity includes a plurality of different user entities, the indicator domain entity includes a plurality of different indicator entities, and the dimension domain entity includes a plurality of different dimension entities; A second construction module is used to construct the data knowledge graph according to the mapping relationship between the user domain entity, the indicator domain entity, the dimension domain entity and the different entities; Wherein, the data knowledge graph is used to: determine the target indicator entity in the indicator domain entity and the target user entity in the user domain entity according to the user intention; determine at least one target dimension entity having a mapping relationship with the target indicator entity and the target user entity according to the data knowledge graph; wherein the target indicator entity, the target user entity, and the at least one target dimension entity constitute a plurality of target entities that match the user intention.
17. A device for constructing a data knowledge graph, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the method for constructing a data knowledge graph as described in claim 7.
18. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method for constructing a data knowledge graph as described in claim 7 is implemented.
