Data processing method and related device
By constructing two knowledge graphs and managing them separately, and using non-relational data tables to store associated data of objects, the problem of single knowledge graph management is solved, the accuracy and flexibility of management are improved, and it is suitable for risk control between merchants with complex relationships. and visualization applications.
Patent Information
- Application Number
- CN202210046273.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-01-13
AI Technical Summary
The knowledge graph management method in the existing technology is relatively single, resulting in inaccurate management and difficulty in effectively managing complex relationships between multiple objects.
By building two knowledge graphs and managing them according to different management mechanisms, using non-relational data tables to store the associated data of objects, supporting incremental and full update operations, as well as anomaly detection, the accuracy and flexibility of management are improved.
It realizes diversified management of knowledge graphs, improves the accuracy and flexibility of management, enables more comprehensive updates and anomaly detection, and is suitable for application scenarios such as risk control and visualization of correlations between merchants.
Smart Images

Figure CN116484054B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, a data processing device, a computer equipment, a computer-readable storage medium, and a computer program product. Background Art
[0002] In daily life, more and more relational data are generated between different objects (such as Merchant A and Merchant B). At present, these relational data are usually stored in relational databases (such as data tables), and the knowledge graph between objects is constructed based on the data stored in the relational data table. Then, the subsequent management will only be based on this knowledge graph. It can be seen that the current management method of knowledge graphs is relatively single, resulting in inaccurate knowledge graph management process. Therefore, how to improve the accuracy of knowledge graph management is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application propose a data processing method, apparatus, computer device, computer-readable storage medium, and computer program product, which can construct two knowledge graphs and manage the corresponding knowledge graphs separately according to their respective management mechanisms, thereby improving the accuracy of knowledge graph management.
[0004] On the one hand, an embodiment of the present application provides a data processing method, the method comprising:
[0005] Extract knowledge from the associated data of multiple objects in the data source and construct a non-relational data table. The non-relational data table contains nodes and edges. A node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source.
[0006] Based on the non-relational data table, generate a first knowledge graph and a second knowledge graph related to multiple objects in the data source;
[0007] The first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism.
[0008] On the one hand, an embodiment of the present application provides a data processing device, the device comprising:
[0009] A processing unit, used to extract knowledge from the associated data of multiple objects in the data source, and construct a non-relational data table, wherein the non-relational data table includes nodes and edges, wherein a node represents an object in the data source, and an edge represents an association relationship between any two objects in the data source;
[0010] A generating unit, configured to generate a first knowledge graph and a second knowledge graph related to a plurality of objects in a data source based on a non-relational data table;
[0011] A management unit is used to manage the first knowledge graph according to a first management mechanism and to manage the second knowledge graph according to a second management mechanism.
[0012] In a possible implementation, the first knowledge graph is the main graph, and the second knowledge graph is the backup graph;
[0013] The management unit manages the first knowledge graph according to the first management mechanism to perform the following operations:
[0014] Performing an incremental update operation on the first knowledge graph according to a first update frequency, and performing a full update operation on the first knowledge graph according to a second update frequency;
[0015] The management unit manages the second knowledge graph according to the second management mechanism to perform the following operations:
[0016] The second knowledge graph is fully updated according to the third update frequency.
[0017] In a possible implementation, the first knowledge graph is the main graph;
[0018] The management unit manages the first knowledge graph according to the first management mechanism to perform the following operations:
[0019] Performing anomaly detection on the first knowledge graph, where the anomaly detection is used to detect abnormal nodes and / or abnormal edges in the first knowledge graph;
[0020] If there is an abnormal warning in the first knowledge graph, the first knowledge graph is set to a disabled state. The existence of an abnormal warning means that there are abnormal nodes and / or abnormal edges in the first knowledge graph, and the abnormal nodes and / or abnormal edges in the first knowledge graph meet the warning conditions;
[0021] When the first knowledge graph eliminates the abnormal warning, the first knowledge graph is set to an enabled state.
[0022] In a possible implementation, the second knowledge graph is a backup graph;
[0023] The management unit manages the second knowledge graph according to the second management mechanism to perform the following operations:
[0024] If the first knowledge graph is disabled, the second knowledge graph is changed to the main graph;
[0025] If the first knowledge graph is changed from a disabled state to an enabled state, the second knowledge graph is reset to a backup graph.
[0026] In a possible implementation, the associated data includes at least one of the following: registration data, operator data, and transaction data; and the processing unit is further configured to perform the following operations:
[0027] Extract knowledge from the associated data of multiple objects in the data source to obtain the associated features of each object. The associated features are used to represent the association relationship between any object and the associated object.
[0028] Determine the objects and associated objects as nodes, and determine the associated relationships represented by the associated features as edges;
[0029] Write the attribute characteristics of the nodes and the attribute characteristics of the edges into the non-relational data table.
[0030] In a possible implementation, the processing unit writes the attribute characteristics of the node and the attribute characteristics of the edge into a non-relational data table to perform the following operations:
[0031] Compressing the attribute features of the node to obtain a node attribute string; and,
[0032] Compress the attribute features of the edge to obtain an edge attribute string;
[0033] Write the node attribute string and edge attribute string into a non-relational data table.
[0034] In a possible implementation, the processing unit is further configured to perform the following operations:
[0035] Get the type of the attribute in the non-relational data table; the type includes the first type and the second type, the first type refers to the type with a query frequency higher than a preset value, and the second type refers to the type with a query frequency lower than a preset value;
[0036] Add an index for the first type of attribute features. The index includes a composite index or a mixed index. The composite index supports equal value queries, and the mixed index supports range queries.
[0037] In a possible implementation, any object in the data source is represented as a first object; the associated object of the first object includes a second object; the associated data of the first object includes the number of first transaction objects of the first object; the associated feature includes a common transaction object relationship between the first object and the second object;
[0038] The processing unit performs knowledge extraction on the associated data of the first object to obtain associated features of the first object, which are used to perform the following operations:
[0039] Get the second transaction object quantity of the second object;
[0040] Determine the number of common transaction objects of the first object and the second object according to the number of first transaction objects of the first object and the number of second transaction objects of the second object;
[0041] Determining a common transaction coefficient between the first object and the second object according to the number of the first transaction objects, the number of the second transaction objects, and the number of the common transaction objects;
[0042] A common transaction object relationship between the first object and the second object is determined based on a common transaction coefficient between the first object and the second object.
[0043] In a possible implementation, any one of the multiple objects in the data source is represented as a first object; the associated data of the first object includes transaction data of the first object;
[0044] The processing unit is also used to perform the following operations:
[0045] Performing data division processing on the transaction data of the first object according to scenario requirements to obtain multiple units of transaction data;
[0046] Extracting knowledge from each unit transaction data among the plurality of unit transaction data to obtain a unit transaction feature corresponding to each unit transaction data;
[0047] Determining a second feature of the first object based on the obtained plurality of unit transaction features;
[0048] The second feature of the first object is used to determine the attribute feature of the node corresponding to the first object.
[0049] In a possible implementation, any object in the data source is represented as a first object; the registration data of the first object is stored in m data tables in the relational database, where m is a positive integer;
[0050] The processing unit is also used to perform the following operations:
[0051] Extracting knowledge from the data related to the first object in the m data tables respectively to obtain m features to be fused;
[0052] Performing fusion processing on the m features to be fused to obtain a first feature of the first object;
[0053] The first feature of the first object is determined as an attribute feature of a node corresponding to the first object.
[0054] In a possible implementation, the first knowledge graph is a main graph, and the first knowledge graph is in an enabled state;
[0055] The processing unit is also used to perform the following operations:
[0056] Receive an information registration request sent by a target object, where the information registration request carries registration data of the target object;
[0057] According to the registration data of the target object, query the first knowledge graph for a target associated object that has an associated relationship with the target merchant;
[0058] Based on the properties of the queried target-related object, risk control processing is performed on the target object.
[0059] On the one hand, an embodiment of the present application provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the above-mentioned data processing method.
[0060] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is read and executed by a processor of a computer device, the computer device executes the above-mentioned data processing method.
[0061] On the one hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned data processing method.
[0062] In an embodiment of the present application, first, a data source including associated data of multiple objects can be obtained, and knowledge extraction is performed on the associated data of multiple objects in the data source to construct a non-relational data table, wherein the non-relational data table contains nodes and edges, a node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source. Then, based on the non-relational data table, a first knowledge graph and a second knowledge graph related to multiple objects in the data source are generated. Finally, the first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism. It can be seen that the present application is based on the associated data of multiple objects stored in a non-relational data table. Compared with the associated data of multiple objects stored based on a relational database, the present application facilitates the query of the association relationship between objects. In addition, the present application constructs two knowledge graphs, and manages the corresponding knowledge graphs according to their respective management mechanisms. So, compared to only building a graph and managing the knowledge graph according to a management mechanism, the rich and diverse management mechanisms in this application can more comprehensively manage the knowledge graph (including update operations, anomaly detection operations, etc.), thereby improving the accuracy of knowledge graph management. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0064] Figure 1 It is a structural diagram of a data processing system provided in an embodiment of the present application;
[0065] Figure 2 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0066] Figure 3 is a schematic diagram of the structure of a non-relational data table provided in an embodiment of the present application;
[0067] Figure 4 is a schematic diagram of a first knowledge graph provided in an embodiment of the present application;
[0068] Figure 5 It is a schematic diagram of a management process of a knowledge graph provided in an embodiment of the present application;
[0069] Figure 6 This is a schematic diagram of a process for constructing a non-relational data table provided in an embodiment of the present application;
[0070] Figure 7 This is a schematic diagram of an application scenario of a knowledge graph provided in an embodiment of the present application;
[0071] Figure 8 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0072] Fig. 9 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0074] The embodiment of the present application proposes a data processing scheme, which can store the associated data of multiple objects based on a non-relational data table, and construct two knowledge graphs, and manage the corresponding knowledge graphs separately according to their respective management mechanisms, so as to improve the accuracy of managing the knowledge graph. The knowledge graph constructed based on this scheme can be applied to application scenarios such as risk control management of merchants and visualization of association relationships between merchants, and can specifically provide corresponding data support for these application scenarios. Among them, the general principle of the data processing scheme is as follows: First, a data source including the associated data of multiple objects can be obtained, and knowledge extraction is performed on the associated data of multiple objects in the data source to construct a non-relational data table, wherein the non-relational data table contains nodes and edges, a node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source. Then, based on the non-relational data table, a first knowledge graph and a second knowledge graph related to multiple objects in the data source are generated. Finally, the first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism.
[0075] It can be seen that in the embodiment of the present application, the associated data of multiple objects are stored based on non-relational data tables. Compared with storing the associated data of multiple objects based on relational databases, the present application facilitates querying the association relationship between multiple objects. In addition, the present application constructs two knowledge graphs, and manages the corresponding knowledge graphs according to their respective management mechanisms. Then, compared to only building one graph and managing the knowledge graph according to one management mechanism, the rich and diverse management mechanisms in the present application can more comprehensively manage the knowledge graph (including update operations, anomaly detection operations, etc.), thereby improving the accuracy of managing the knowledge graph.
[0076] Next, the above-mentioned data processing solution is introduced in combination with the technical terms involved in this application:
[0077] 1. Artificial Intelligence
[0078] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making. Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level technology and software-level technology. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0079] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine reading comprehension, machine translation, robot question answering, knowledge graph and other technologies.
[0080] In one possible implementation, the data processing scheme of the present application can be combined with the natural language processing technology in the field of artificial intelligence. For example, based on a non-relational data table, a first knowledge graph and a second knowledge graph related to multiple objects in a data source can be generated using knowledge graph technology. For another example, knowledge can be extracted from the associated data of multiple objects in a data source based on text processing and semantic understanding technologies, and non-relational data tables and the like can be constructed. Among them, the so-called knowledge graph is a set of knowledge representation, iteration and growth frameworks based on semantic networks, which describes concepts, entities and their relationships in the objective world in a structured form. Knowledge graphs include graphs and graph computing, in which a graph is an abstract data structure used to represent the relationship between objects, described using nodes and edges, vertices representing objects, and edges representing the relationship between objects. Graph computing is the process of using graphs as data models to express and solve problems.
[0081] 2. Blockchain:
[0082] The blockchain network is a network composed of a peer-to-peer network (P2P network) and a blockchain. The blockchain refers to a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. It is essentially a decentralized database, a string of data blocks (or blocks) generated by cryptographic methods.
[0083] In one possible implementation, the data processing solution of the present application can be combined with blockchain technology. For example, the associated data of multiple objects in the data source can be uploaded to the blockchain of the blockchain network for storage to prevent the internal data of the computer device from being tampered with, thereby improving the security and privacy of the log data.
[0084] 3. Cloud Technology:
[0085] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0086] In one possible implementation, when executing the data processing solution of the present application, a first knowledge graph and a second knowledge graph related to multiple objects in the data source are generated based on a non-relational data table. This process involves large-scale calculations and requires greater computing power and storage space. Therefore, in one possible implementation of the present application, a computer device can obtain sufficient computing power and storage space through cloud storage technology to store the knowledge graph constructed in the present application.
[0087] It is particularly important to note that in the subsequent specific implementation methods of this application, related data such as user information (for example, the transaction data of the first object includes the user's ID number, nickname, address), when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0088] Based on the above description, next, see Figure 1 , Figure 1 Schematic diagram of a data processing system provided in an embodiment of the present application. Figure 1As shown, the structural diagram of the data processing system may include: a server 140 and a terminal device cluster, wherein the terminal device cluster may include: a terminal device 110, a terminal device 120, ..., a terminal device 130, etc. Any terminal device in the terminal device cluster may be directly or indirectly connected to the server 140 via a wired or wireless communication, and the present application does not limit this; in addition, the types of any two terminal devices in the terminal device cluster may be the same or different, and the present application does not limit this either.
[0089] Figure 1 The server 140 shown can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms, etc.
[0090] Figure 1 The terminal devices 110, 120, and 130 shown may include, but are not limited to: mobile phones, tablet computers, laptop computers, PDAs, mobile Internet devices (MIDs), intelligent voice interaction devices, vehicle-mounted terminals, roadside devices, aircraft, wearable devices, smart home appliances, or wearable devices with data processing functions such as smart watches, smart bracelets, pedometers, etc.
[0091] In a possible implementation, taking the terminal device 110 as an example, when the terminal device 110 and the server 140 jointly execute the data processing scheme in the present application, first, the terminal device 110 can obtain a data source including associated data of multiple objects, and then the terminal device 110 can send the data source to the server 140. The server 140 can perform knowledge extraction on the associated data of multiple objects in the data source, and construct a non-relational data table, which contains nodes and edges. A node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source. Then, the server 140 can generate a first knowledge graph and a second knowledge graph related to multiple objects in the data source based on the non-relational data table. Finally, the server 140 can manage the first knowledge graph according to the first management mechanism, and manage the second knowledge graph according to the second management mechanism.
[0092] Subsequently, the server 140 may send the first knowledge graph to the terminal device 110. Subsequently, upon receiving the graph acquisition request, the terminal device 110 may output and display the constructed first knowledge graph.
[0093] It should be understood that the above is only an exemplary description of the various steps that the terminal device 110 and the server 140 are responsible for executing, and the embodiments of the present application do not limit this. In another possible implementation, knowledge extraction is performed on the associated data of multiple objects in the data source to construct a non-relational data table; the above process can also be performed by the terminal device 110, and then the terminal device 110 sends the constructed non-relational data table to the server 140, and then the server 140 executes the non-relational data table to generate a first knowledge graph and a second knowledge graph related to multiple objects in the data source, and manage the first knowledge graph according to the first management mechanism, and manage the second knowledge graph according to the second management mechanism. In another possible implementation, knowledge extraction is performed on the associated data of multiple objects in the data source to construct a non-relational data table; and based on the non-relational data table, a first knowledge graph and a second knowledge graph related to multiple objects in the data source are generated; and the first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism. The above processes can all be performed by the terminal device 110, and so on.
[0094] Furthermore, we can Figure 1 The provided data processing system is deployed on the nodes of the blockchain. For example, the terminal device 110, the terminal device 120 and the server 140 can all be regarded as node devices of the blockchain to form a blockchain network. Therefore, the data processing process involved in this application can be executed on the blockchain, which can not only ensure the fairness and justice of the data processing process, but also make the data processing process traceable, thereby improving the security of the data processing process.
[0095] It can be understood that the system architecture diagram described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0096] Based on the above description of the data processing scheme, the present application embodiment proposes a data processing method. Figure 2 As shown, Figure 2This is a flow chart of a data processing method provided in an embodiment of the present application. The data processing method can be executed by the terminal device or server mentioned above, or can be executed by the terminal device and server mentioned above. For the convenience of explanation, the following description will be given by taking a computer device executing the data processing method as an example. Among them, the data processing method may include the following steps S201 to S203:
[0097] S201: extracting knowledge from the associated data of multiple objects in a data source, and constructing a non-relational data table, wherein the non-relational data table includes nodes and edges, wherein a node represents an object in the data source, and an edge represents an association relationship between any two objects in the data source.
[0098] In the embodiment of the present application, a non-relational data table refers to a data structure compared to a relational data table, and a non-relational data table can be stored in a non-relational database. Among them, the non-relational database stores the corresponding data in a retrieval-oriented columnar manner, and its storage structure is a columnar structure. In addition, the non-relational database may include, but is not limited to: JanusGraph database, MongoDB database (an open source document-oriented NoSQL database), and Redis database. Among them, the JanusGraph database is an open source graph database, which is a non-relational data table that uses graph theory to store relationship information between entities. It has the advantages of highly scalable distributed storage, efficient query of multi-layer related data, and support for multiple graph analysis algorithms.
[0099] Among them, any object in the data source may refer to a business with a physical business location (also referred to as a merchant). For example, merchants may include but are not limited to: libraries, hotels, restaurants, bars, etc. In addition, when the object is a merchant, the operator corresponding to the merchant may be an enterprise. For the convenience of explanation, in the subsequent embodiments of this application, the object is taken as an example for corresponding explanation.
[0100] In one possible implementation, an edge in a non-relational data table may represent: an association relationship between any two merchants (such as a first merchant and a second merchant). In addition, for any object, an object that has an association relationship with the object may be represented as an associated object, wherein the type of the associated object may be the same as the type of the object, or may be different from the type of the object. For example, if any object is represented as a first merchant, then the associated objects of the first merchant may include, but are not limited to: a second merchant, an enterprise, a mobile phone number, a public account, a legal representative, and the like. Therefore, an edge in a non-relational data table may also represent: an association relationship between any object (such as a first merchant) and an associated object. For example, an edge in a non-relational data table may represent: an association relationship between the first merchant and associated objects such as a second merchant, an enterprise, a mobile phone number, a public account, a legal representative, and the like.
[0101] For example, see Figure 3 , Figure 3 Schematic diagram of a non-relational data table provided in the embodiment of the present application. Figure 3 As shown, node 1 can be, for example, the first merchant, node 2 can be, for example, the second merchant, and node 3 can be, for example, the first enterprise. Any edge corresponding to node 1 can represent: the association relationship between node 1 (for example, the first merchant) and any associated object. For example, the first edge corresponding to node 1 can be represented as: the association relationship between the first merchant and the second merchant; for another example, the second edge corresponding to node 1 can be represented as: the association relationship between the first merchant and the first enterprise. It can be understood that the edges included in each node refer to the edges that have an association relationship with the node.
[0102] S202: Based on the non-relational data table, generate a first knowledge graph and a second knowledge graph related to multiple objects in the data source.
[0103] In one possible implementation, the initial content of the first knowledge graph is the same as the initial content of the second knowledge graph. The so-called same initial content means that the original data for constructing the first knowledge graph is the same as the original data for constructing the second knowledge graph. In addition, in an embodiment of the present application, the first knowledge graph can be used as the main graph, and the second knowledge graph can be used as a backup graph. Among them, the main graph can be used for daily analysis and modeling, and the backup graph can be used as an alternative graph when there is a problem with the main graph.
[0104] Specifically, for any object being a first merchant, the process of generating a knowledge graph related to the first merchant may include: first, determining the first merchant and the associated objects having an associated relationship with the first merchant as nodes, and constructing a first knowledge graph according to the associated relationship represented by the edge in the non-relational data table. Please refer to Figure 4, Figure 4 is a schematic diagram of a first knowledge graph provided in an embodiment of the present application. Figure 4 As shown, the nodes in the first knowledge graph may include: the first merchant, the second merchant, the third merchant, and the associated objects (enterprises, legal representatives, public accounts, etc.) associated with the first merchant. It can be understood that the first knowledge graph and the second knowledge graph constructed in the embodiment of the present application are full knowledge graphs, that is, the first knowledge graph and the second knowledge graph may include multiple merchants, multiple enterprises, multiple legal representatives, etc.
[0105] S203: Manage the first knowledge graph according to the first management mechanism, and manage the second knowledge graph according to the second management mechanism.
[0106] In the embodiment of the present application, the management of the first knowledge graph or the second knowledge graph may include but is not limited to: performing incremental update operations, performing full update operations, performing anomaly detection, and the like. Figure 5 , Figure 5 This is a schematic diagram of a knowledge graph management process provided by an embodiment of the present application. Figure 5 The management process of the first knowledge graph and the management process of the second knowledge graph are described in detail respectively:
[0107] (1) Management process for the first knowledge graph (main graph):
[0108] In a possible implementation, the first knowledge graph is the main graph, and the computer device manages the first knowledge graph according to the first management mechanism, which may include: performing an incremental update operation on the first knowledge graph according to the first update frequency, and performing a full update operation on the first knowledge graph according to the second update frequency. Specifically, in an embodiment of the present application, the first management mechanism may refer to a mechanism including a full update operation and an incremental update operation. Among them, the so-called incremental update operation refers to: updating the nodes and edges added, reduced, deleted, and updated in the first knowledge graph. The so-called full update processing refers to: updating all nodes and edges in the first knowledge graph. It can be understood that the workload of the full update operation is much greater than the workload of the incremental update operation. Therefore, the first update frequency corresponding to the incremental update operation can be greater than the second update frequency corresponding to the full update operation. For example, the first knowledge graph can be incrementally updated once a day (that is, the first update frequency is 1 day / time), and the first knowledge graph can be fully updated on the 2nd of each month (that is, the second update frequency is 1 month / time).
[0109] In a possible implementation, the first knowledge graph is the main graph; the computer device manages the first knowledge graph according to the first management mechanism, and may also include: performing anomaly detection on the first knowledge graph, the anomaly detection is used to detect abnormal nodes and / or abnormal edges in the first knowledge graph; if there is an abnormal warning in the first knowledge graph, the first knowledge graph is set to a disabled state, and the existence of an abnormal warning means that there are abnormal nodes and / or abnormal edges in the first knowledge graph, and the abnormal nodes and / or abnormal edges in the first knowledge graph meet the warning conditions; when the first knowledge graph eliminates the abnormal warning, the first knowledge graph is set to an enabled state. Among them, the so-called disabled state refers to a state in which the first knowledge graph cannot be queried or used; the so-called enabled state refers to a state in which the first knowledge graph can be queried or used.
[0110] Among them, the so-called abnormal nodes may include but are not limited to: nodes whose magnitude suddenly increases after two adjacent updates, and nodes whose magnitude suddenly decreases after two adjacent updates. In addition, the so-called sudden increase or decrease in magnitude can be determined according to the ratio between the increase and the original amount. If the ratio between the increase and the original amount exceeds the ratio threshold, it can be considered that the magnitude suddenly increases or decreases. For example, for the merchant nodes in the knowledge graph, the knowledge graph after the first update includes 100 merchant nodes, and the knowledge graph after the second update includes 1000 merchant nodes. The merchant nodes after the second update increase by 900 compared with the merchant nodes after the first update. Assuming that the ratio threshold is 2, 900 / 100=9>2; the added 900 merchant nodes can be considered as abnormal nodes. For another example, for enterprise nodes in the knowledge graph, the knowledge graph after the first update includes 20 enterprise nodes, and the knowledge graph after the second update includes 25 enterprise nodes. The enterprise nodes after the second update increase by 5 compared with the enterprise nodes after the first update. Assuming that the ratio threshold is 10, 5 / 25 < 10; the added 5 enterprise nodes can be considered as normal nodes. Similarly, the determination of abnormal edges can refer to the detailed process of determining abnormal nodes described above, and the embodiments of this application will not be repeated here.
[0111] Among them, the so-called early warning conditions may include but are not limited to: the number of abnormal nodes and the number of abnormal edges in the first knowledge graph both reach a preset number; or, the number of abnormal nodes or the number of abnormal edges in the first knowledge graph reaches a preset number; or, the number of abnormal nodes in the first knowledge graph reaches a first preset number, and the number of abnormal edges reaches a second preset number, wherein the first preset number and the second preset number may be the same or different. For example, the number of abnormal nodes in the first knowledge graph is 10, the number of abnormal edges in the first knowledge graph is 20, and the preset number is 8, then it is determined that the abnormal nodes and abnormal edges in the first knowledge graph meet the early warning conditions. For another example, the number of abnormal nodes in the first knowledge graph is 10, the number of abnormal edges in the first knowledge graph is 20, and the preset number is 12, then it is determined that the abnormal edges in the first knowledge graph meet the early warning conditions. For another example, the number of abnormal nodes in the first knowledge graph is 10, the number of abnormal edges in the first knowledge graph is 20, the first preset number is 8, and the second preset number is 12, then it is determined that the abnormal nodes and abnormal edges in the first knowledge graph meet the early warning conditions.
[0112] (2) Management process of the second knowledge graph (backup graph):
[0113] In one possible implementation, the second knowledge graph is a backup graph. The computer device manages the second knowledge graph according to the second management mechanism, which may include: performing a full update operation on the second knowledge graph according to the third update frequency. For example, the second knowledge graph may be fully updated once every Monday (i.e., the third update frequency is 1 week / time). It is understandable that the first update frequency, the second update frequency, and the third update frequency mentioned above can be customized according to scenario requirements; and the first update frequency, the second update frequency, and the third update frequency may or may not have a size relationship with each other, and the embodiments of the present application do not specifically limit this.
[0114] In one possible implementation, the second knowledge graph is a backup graph; the computer device manages the second knowledge graph according to the second management mechanism, and may also include: if the first knowledge graph is in a disabled state, changing the second knowledge graph to a main graph; if the first knowledge graph changes from a disabled state to an enabled state, resetting the second knowledge graph to a backup graph.
[0115] It can be understood that the first knowledge graph in the embodiment of the present application can be used for data analysis and data modeling. For example, by comparing the differences between the first knowledge graph before the update and the first knowledge graph after the update, the differences and connections between merchants of different types and in different fields can be analyzed. For example, based on data analysis of the merchants in the first knowledge graph, and using the data analysis results as training data for the merchant's risk control model, the second knowledge graph can be used as a backup graph for the first knowledge graph, and switching operations can be performed when problems occur in the first knowledge graph to meet data analysis needs.
[0116] In one possible implementation, the computer device may also issue an alarm for abnormal nodes and / or abnormal edges, and generate a management report on the first knowledge graph and / or the second knowledge graph. For example, after each corresponding update operation is performed on the first knowledge graph and the second knowledge graph, the abnormal nodes and / or abnormal edges existing in the first knowledge graph and the second knowledge graph after two adjacent updates are counted and recorded in the management report. The management report may specifically be a periodic management report table, and the periodic management report table may be shown in Table 1, for example:
[0117] Table 1. Periodic management report table
[0118]
[0119] As shown in Table 1 above, the periodic management report table can record the abnormal nodes and / or abnormal edges corresponding to multiple update cycles. In addition, the periodic management report table can also record the specific time of each update process and other detailed information. This facilitates subsequent data analysis and improvement of the first knowledge graph.
[0120] In an embodiment of the present application, first, a data source including associated data of multiple objects can be obtained, and knowledge extraction is performed on the associated data of multiple objects in the data source to construct a non-relational data table, wherein the non-relational data table contains nodes and edges, a node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source. Then, based on the non-relational data table, a first knowledge graph and a second knowledge graph related to multiple objects in the data source are generated. Finally, the first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism. It can be seen that the present application is based on the associated data of multiple objects stored in a non-relational data table. Compared with the associated data of multiple objects stored based on a relational database, the present application facilitates the query of the association relationship between objects. In addition, the present application constructs two knowledge graphs, and manages the corresponding knowledge graphs according to their respective management mechanisms. So, compared to only building a graph and managing the knowledge graph according to a management mechanism, the rich and diverse management mechanisms in this application can more comprehensively manage the knowledge graph (including update operations, anomaly detection operations, etc.), thereby improving the accuracy of knowledge graph management.
[0121] See also Figure 6 , Figure 6 The present application provides a flowchart of constructing a non-relational data table. The method for constructing the non-relational data table can be executed by the terminal device or server mentioned above, or can be executed by the terminal device and server mentioned above. For the sake of convenience, the following description will be given by taking the method for constructing the non-relational data table executed by a computer device as an example. Among them, the method for constructing the non-relational data table may include the following steps S601 to S603:
[0122] S601: performing knowledge extraction on the associated data of multiple objects in the data source to obtain associated features of each object, where the associated features are used to represent the association relationship between any object and associated objects.
[0123] In the embodiment of the present application, the associated data of any object may include but is not limited to one or more of the following: registration data, operator data, and transaction data. It should be noted that in the embodiment of the present application, for the convenience of explanation, the subsequent explanation is based on the example of any object being the first merchant.
[0124] For example, the registration data of the first merchant may include, but is not limited to: the bank card number corresponding to the first merchant, the ID number of the legal representative, the enterprise unified social credit code corresponding to the first merchant, the public account and the mobile phone number, etc. In a possible implementation, the computer device can obtain the registration data of the first merchant from a preset database. Specifically, the computer device can obtain the registration data of the first merchant from the database of the merchant registration system related to the field to which the first merchant belongs according to the field to which the first merchant belongs. For example, if the first merchant is a merchant in the field of education, the computer device can obtain the registration data of the first merchant from the database of the education merchant registration system. In another possible implementation, the computer device can also obtain the registration data of the first merchant from the database matching the address location of the first merchant according to the address location of the first merchant. For example, if the first merchant is located in XXX city, the computer device can obtain the registration data of the first merchant from the merchant registration system of XXX city. In another possible implementation, the computer device can obtain the registration information of the first merchant from a network channel, and so on.
[0125] In addition, the operator data corresponding to the first merchant may include enterprise data corresponding to the first merchant, and the enterprise data may include but is not limited to: basic information of the enterprise (such as enterprise name, business license registration code, organization code, enterprise type, enterprise status, business scope, etc.), and investment confidence between enterprises (such as enterprise A and enterprise B). In a possible implementation, the enterprise data corresponding to the first merchant that the computer device can obtain may include but is not limited to: the computer device can obtain enterprise data from the official website of the enterprise and other network channels. Alternatively, the computer device obtains enterprise data from a database matching the enterprise type according to the enterprise type, and so on.
[0126] In addition, the transaction data of the first merchant may include transaction logs within a preset period (e.g., one day), wherein the transaction logs record transaction profiles (e.g., transaction time, transaction amount, transaction behavior, payment channel, etc.) and transaction objects (e.g., one or more objects such as object 1, object 2, object 3, etc.). The computer device may obtain the transaction data of the first merchant, including but not limited to: the computer device obtains the transaction data of the first merchant from the database of the payment platform, the computer device obtains the transaction data of the first merchant from the network channel, and so on.
[0127] It is understandable that the channel sources for the computer device to obtain the registration data of the first merchant, the operator data corresponding to the first merchant, and the transaction data of the first merchant may be the same or different, and the embodiments of the present application do not specifically limit this. In addition, the time sequence for the computer device to obtain the registration data of the first merchant, the operator data corresponding to the first merchant, and the transaction data of the first merchant is also not specifically limited.
[0128] In a possible implementation, after obtaining the associated data of any object, the computer device may also perform data cleaning on the associated data of any object. Data cleaning may include but is not limited to one or more of the following: deleting duplicate data, deleting invalid data, completing missing data, correcting erroneous data, etc. In this way, the accuracy and effectiveness of the associated data can be improved, thereby improving the accuracy of subsequent data analysis (extracting knowledge from the associated data of any object).
[0129] Next, a detailed description is given by taking the example of a computer device performing knowledge extraction on the associated data of the first object to obtain the associated features of the first object. The associated features are used to represent the association relationship between any object and the associated object. Among them, the type of the associated object may be the same as the type of the first object, or it may be different from the type of the first object. Specifically, if the first object is the first merchant, the associated objects of the first object may include but are not limited to: the second merchant, the enterprise, the legal representative, the official account, the ID number, the mobile phone number, and so on. Moreover, the number of associated objects of different types in multiple associated objects may be the same or different. For example, the first merchant is associated with 1 enterprise, and the first merchant is associated with 2 other merchants (such as the second merchant and the third merchant).
[0130] It should be noted that in the embodiment of the present application, different types of data may have different corresponding knowledge extraction methods. Specifically, the knowledge extraction methods corresponding to structured data, semi-structured data, and unstructured data may be shown in Table 2:
[0131] Table 2. Knowledge extraction methods corresponding to different data types
[0132]
[0133] As can be seen from the above, since the channel sources for the computer device to obtain the registration data of the first object, the operator data corresponding to the first object, and the transaction data of the first object may be different, the data types of the registration data, the operator data, and the transaction data may also be different. In the process of extracting knowledge from the associated data of the first object, the corresponding knowledge extraction methods can be used for data of different data types as shown in Table 2. Specifically, for structured data, you can directly use extraction tools for knowledge extraction, such as D2R, Virtuoso, OracleSW, Morph and other extraction tools; for semi-structured data such as encyclopedia data and web page data, you can use a wrapper to achieve knowledge extraction, where the generation method of the wrapper includes three categories: manual method, wrapper induction method and automatic extraction method; and for unstructured data, a deep learning-based knowledge extraction model can be used for knowledge extraction. In this way, the efficiency and accuracy of knowledge extraction can be improved, so that the associated features of the first object obtained are more accurate.
[0134] In a possible implementation, knowledge extraction may specifically include: entity extraction, relationship extraction, and event extraction. Among them, the so-called entity extraction can be processed by a sequence annotation model, which may include but is not limited to: Hidden Markov Model (HMM), Conditional Random Fields (CRF), Bidirectional Encoder Representations from Transformer (BERT) and other neural network models; relationship extraction may include but is not limited to: extraction using supervised learning or extraction based on template matching; event extraction refers to extracting information of interest to the object and presenting it in a structured form (such as a relationship table).
[0135] Next, the embodiment of the present application introduces in detail the knowledge extraction process of the registration data of the first object, the transaction data of the first object, and the operator data corresponding to the first object:
[0136] (1) Knowledge extraction of registration data of the first object:
[0137] In a possible implementation, the registration data of the first object includes m data tables, and any data table records data related to the attributes of the first object; m is a positive integer. Specifically, the associated data of the first object may include, but are not limited to: a merchant registration table of the first merchant, a merchant rating table, a merchant transaction portrait table, a merchant investigation table, a merchant fault reporting table, a merchant complaint table, and the like. For example, the merchant registration table of the first merchant records relevant data for registering the first merchant; the merchant rating table records relevant data for evaluating the merchant level of the first merchant; the merchant transaction portrait table records data such as the transaction amount, transaction object, and transaction data of the first merchant; the merchant investigation table records data related to the reputation of the first merchant; the merchant complaint table records relevant data of multiple merchants complained about; and so on. Next, the computer device can perform knowledge extraction on each of the m data tables respectively to obtain m features to be fused; then, the computer device can perform fusion processing on the m features to be fused to obtain the first feature of the first object; finally, the computer device determines the first feature of the first object as the attribute feature of the node corresponding to the first object in the knowledge graph.
[0138] For example, in the embodiment of the present application, the first feature of the first merchant obtained by processing through knowledge extraction and knowledge fusion based on the merchant registration form, merchant rating form, merchant transaction portrait form, merchant investigation form, merchant fault reporting form, merchant complaint form, etc. of the first merchant may include the merchant features of the first merchant, and the merchant features of the first merchant may include but are not limited to: merchant identification (Identity document, Id), merchant name, merchant level, application date, check-in date, transaction type, merchant type, latest investigation information, latest penalty information, historical investigation information, historical penalty information, transaction information, complaint information, etc. It can be understood that the first feature of the first merchant extracted in the embodiment of the present application can be stored in the feature relationship table, and the feature relationship table can be shown in Table 3 below:
[0139] Table 3. The first characteristics of the first merchant
[0140]
[0141] As shown in Table 3, the latest investigation information, historical investigation information, latest penalty information, historical penalty information, and complaint information of the first merchant may specifically include detailed time and reasons.
[0142] (2) Knowledge extraction of transaction data of the first object:
[0143] In a possible implementation, the associated data of the first object includes the transaction data of the first object. The computer device may perform data division processing on the transaction data of the first object according to the scenario requirements to obtain a plurality of unit transaction data. Then, the computer device may perform knowledge extraction on each unit transaction data of the plurality of unit transaction data to obtain a unit transaction feature corresponding to each unit transaction data. Next, the computer device may determine the second feature of the first object based on the plurality of unit transaction features obtained. Finally, the computer device may determine the second feature of the first object as the attribute feature of the node corresponding to the first object in the knowledge graph.
[0144] Specifically, after the transaction data of the first merchant is divided and processed according to the scene requirements, the multiple unit transaction data obtained may include but are not limited to: male-female transaction data (for example, relevant data involved in the transaction between male object A and female object B), commercial payment transaction data (for example, relevant data involved in the cooperative transaction between the first merchant and the second merchant), financial investment transaction data (for example, relevant data involved in the investment transaction between the first merchant and the second merchant), asset auction transaction data (for example, relevant data involved in the asset auction of a commodity owned by the first merchant), etc. Of course, in accordance with different scene requirements, more detailed data division can be performed in the embodiment of the present application. For example, for the male-female transaction scene, the male-female transaction data can be further divided into data such as "transaction amount", "number of transactions", and "number of objects involved in the transaction". Further, the computer device can extract knowledge from each unit transaction data based on the multiple unit transaction data obtained by the division, and obtain the unit transaction features corresponding to each unit transaction data. It should be noted that in the process of extracting knowledge from each unit transaction data, it can be specifically referred to as shown in Table 2. The computer device can determine the knowledge extraction method matching the data type according to the data type of the unit transaction data and then extract the knowledge of the corresponding unit transaction data. In this way, the efficiency and accuracy of knowledge extraction can be improved, so the accuracy and comprehensiveness of the obtained unit transaction features can be guaranteed. Finally, after determining the unit transaction features corresponding to each unit transaction data, the computer device determines the second feature of the first object based on the multiple unit transaction features obtained, which may include: performing feature fusion processing on each unit transaction feature, and determining the fused feature as the second feature of the first object; or, performing feature splicing processing on each transaction feature, and determining the spliced feature as the second feature of the first object; or, screening out a part of important unit transaction features from each unit transaction feature, and then determining the second feature of the first object based on the screened unit transaction features, and so on. It can be understood that, through the above method, the second feature of the first object determined can include, for example, more than 120 features, and these more than 120 features can also be stored in the feature relationship table. The feature relationship table can be shown in Table 4 below:
[0145] Table 4. Second characteristics of the first merchant
[0146]
[0147] (3) Knowledge extraction of operator data corresponding to the first object:
[0148] In a possible implementation, if the first object is the first merchant, the operator corresponding to the first object may be an enterprise, that is, the operator data corresponding to the first merchant may include the enterprise data corresponding to the first merchant. Among them, the enterprise data may include but is not limited to: enterprise master table, enterprise information table and individual master table, etc., so the enterprise characteristics that the computer device can extract from the above tables may include but are not limited to: enterprise id, enterprise name, enterprise unified social credit code, organization code, business license registration code, tax number, enterprise type, enterprise status, business scope, paid-in capital, legal person name, etc. It can also be understood that the method of extracting knowledge of the enterprise data of the first merchant can specifically refer to the knowledge extraction method shown in Table 2, and the embodiment of this application will not be repeated here. In addition, the extracted enterprise characteristics corresponding to the first merchant can also be stored in the feature relationship table.
[0149] In another possible implementation, if the first object is the first merchant, the operator corresponding to the first object may also be a public account, that is, the operator data corresponding to the first merchant may include the public account data corresponding to the first merchant. The public account features extracted by the computer device from the public account data may include, but are not limited to: public account ID, public account name, selected message information of the object under the public account (the so-called selected message information may include the information of the top n likes ranking of the object in the comment area) and main menu content, etc. It can also be understood that the method of extracting knowledge from the public account data of the first merchant can specifically refer to the knowledge extraction method shown in Table 2, and the embodiments of the present application will not be repeated here. In addition, the extracted public account features corresponding to the first merchant can also be stored in the feature relationship table.
[0150] It should be noted that the first feature of the first merchant determined above can be determined as the attribute feature of the node corresponding to the first merchant in the knowledge graph, and the second feature of the first merchant determined above can also be determined as the attribute feature of the node corresponding to the first merchant in the knowledge graph; the enterprise feature corresponding to the first merchant can be determined as the attribute feature of the enterprise corresponding to the first merchant. These features can all be used as attribute features associated with the first merchant and can be stored in the knowledge graph.
[0151] (4) Knowledge extraction of the associated features of the first object:
[0152] It should be noted that the association characteristics of the first object can be used to represent the association relationship between the first object and one or more associated objects. In the embodiment of the present application, the associated objects having an association relationship with the first merchant may include, but are not limited to: other merchants (such as the second merchant), enterprises, legal representatives, public accounts, ID numbers, mobile phone numbers, and the like. Specifically, the association characteristics of the first object may include, but are not limited to: the association relationship between the first merchant and the ID card, the association relationship between the first merchant and the legal representative, the association relationship between the first merchant and the enterprise, the association relationship between the first merchant and the public account, the association relationship between the first merchant and the mobile phone number, the common transaction object relationship between the first merchant and other merchants (such as the second merchant), etc. It can be understood that the "association characteristics between the first merchant and the ID card, the association between the first merchant and the legal representative, the association between the first merchant and the enterprise, the association between the first merchant and the official account, and the association between the first merchant and the mobile phone number" can be specifically determined based on one or more of the registration data of the first merchant and the enterprise data corresponding to the first merchant; the "common transaction object relationship between the first merchant and other merchants (such as the second merchant)" can be specifically determined based on one or more of the transaction data of the first merchant and the transaction data of other merchants (such as the second merchant).
[0153] It can be understood that, through the above method, the associated features of the first object determined can also be stored in the feature relationship table. The feature relationship table can be shown in the following Table 5:
[0154] Table 5. Correlation characteristics of the first merchant
[0155]
[0156] In a possible implementation, any object in the data source is represented as a first object, and the associated object of the first object includes a second object; if the first object is a first merchant, the second object may be a second merchant. The associated data of the first merchant may include the number of first transaction objects of the first merchant, and then the associated feature of the first merchant may include the common transaction object relationship between the first merchant and the second merchant. Specifically, the specific process of the computer device determining the common transaction object relationship between the first merchant and the second merchant may include: first, the computer device may obtain the number of second transaction objects of the second merchant, and specifically, the computer device may obtain the number of second transaction objects from the transaction data of the second merchant. Then, the computer device may determine the number of common transaction objects of the first merchant and the second merchant according to the number of first transaction objects of the first merchant and the number of second transaction objects of the second merchant; and determine the common transaction coefficient between the first merchant and the second merchant according to the number of first transaction objects, the number of second transaction objects, and the number of common transaction objects. Finally, the computer device determines the common transaction object relationship between the first merchant and the second merchant according to the common transaction coefficient between the first merchant and the second merchant. It should be noted that the common transaction object relationship refers to a relationship in which the common transaction coefficient between two merchants is greater than a coefficient threshold (e.g., 5%). The coefficient threshold mentioned above can be customized according to the scene requirements or can be set according to the experience value, and the embodiment of the present application does not specifically limit this.
[0157] For example, the calculation formula of the common transaction coefficient between the first merchant and the second merchant is shown in formula (1):
[0158]
[0159] Among them, in formula (1), activeWeight represents the common transaction coefficient between the first merchant and the second merchant, commonBuyerNum represents the number of common transaction objects between the first merchant and the second merchant, A.buyer_num represents the number of first transaction objects of the first merchant, and B.buyer_num represents the number of second transaction objects of the second merchant. For example, the number of first transaction objects obtained by the computer device from the transaction data of the first merchant includes: object 1, object 2, object 3 and other 10 objects; the number of second transaction objects obtained by the computer device from the transaction data of the second merchant includes: object 1, object 3, object 5 and other 8 objects. Then, the number of common transaction objects between the first merchant and the second merchant can be object 1 and object 3, and the common transaction coefficient between the first merchant and the second merchant can be calculated according to formula 1 as: 2×2 / (10+8)=2 / 9. Further, since 2 / 9 is greater than 5%, it can be determined that there is a common transaction object relationship between the first merchant and the second merchant.
[0160] S602: Determine the object and the associated object as nodes, and determine the association relationship represented by the associated feature as an edge.
[0161] In an embodiment of the present application, the data elements in the non-relational data table may include: nodes (Vertex) and edges (Edge). Each node may include a label feature and a property feature, wherein the label feature of the node may include the category of the node, for example, the category of the node may include but is not limited to: merchants, enterprises, legal representatives, public accounts, ID numbers, mobile phone numbers, and the like. The property features of the node can be determined based on the features extracted in the aforementioned step S401: for example, if node 1 is the first merchant, the property features of node 1 can be determined based on the first feature of the first merchant and the second feature of the first merchant. For another example, if node 2 is the enterprise corresponding to the first merchant, the property features of node 2 can be determined based on the enterprise features corresponding to the first merchant. For another example, if node 3 is a public account, the property features of node 3 can be determined based on the public account features corresponding to the first merchant.
[0162] S603: Write the attribute characteristics of the nodes and the attribute characteristics of the edges into a non-relational data table.
[0163] For example, in the JanusGraph database, a non-relational data table constructed after a computer device extracts knowledge from the associated data of multiple objects in a data source can be stored in the Hbase storage system in the JanusGraph database. Figure 3 , Figure 3 Schematic diagram of a data structure of a graph database provided in an embodiment of the present application. Figure 3In the Hbase storage system shown, the Row key represents the id (vertex id) of the node, and the corresponding row cell stores the attribute features of the node (including the attribute name and attribute value) and the edge related to the node (including the pointing relationship between nodes and the timestamp). For example, the node corresponding to the first merchant can be node 1 (vertex id=1), and the row cell of the node stores the attribute features of the node corresponding to the first merchant. Specifically, one attribute feature in a row cell corresponds to one column, and each attribute feature can include an attribute name (qualifier) and an attribute value (value). As shown in Table 2, the attribute features (Property) of the node corresponding to the first merchant can include, for example: attribute name (merchant name) and corresponding attribute value (XXX Co., Ltd.); or, the attribute features (Property) of the node corresponding to the first merchant can include, for example: attribute name (merchant level) and corresponding attribute value (A), etc. It can be seen that the first feature, the second feature, etc. of the first merchant obtained by the knowledge extraction in the above steps can be used as the attribute features of the node corresponding to the first merchant and stored in the Hbase storage system. In addition, the edge corresponding to node 1 specifically stores: node 1->node 2, node 1->node 3, node 4->node 1. In this way, the adjacency list of the knowledge graph can be generated by cutting edges with the node as the center. Specifically, if the edge corresponding to node 1 stores node 1->node 2, then node 1 can be linked to node 2. If the edge corresponding to node 2 stores node 2->node 3, then node 2 can be linked to node 3, and so on.
[0164] Similarly, the node of the enterprise corresponding to the first merchant can be node 2 (vertex id=2), and the row cell of the node stores the attribute characteristics and edges of the enterprise corresponding to the first merchant. It should be noted that how to determine the attribute characteristics of the node of the enterprise corresponding to the first merchant here can refer to the aforementioned determination of the attribute characteristics of the node corresponding to the first merchant, and the embodiment of the present application will not be repeated here.
[0165] In one possible implementation, a computer device writes attribute characteristics of a node and attribute characteristics of an edge into a non-relational data table, which may include: first, compressing the attribute characteristics of the node to obtain a node attribute string; and, compressing the attribute characteristics of the edge to obtain an edge attribute string; finally, writing the node attribute string and the edge attribute string into the non-relational data table.
[0166] For example, a non-relational data table can be Figure 3As shown. Node 1 as shown in 3 can represent a merchant, node 2 can represent an enterprise, node 3 can represent a legal representative, and so on. It can be understood that, considering the performance characteristics of the Hbase storage system, the number of columns has a great impact on the storage and query performance of the data. From the perspective of storage, more attribute features (columns) consume more memory; from the perspective of query, the corresponding attribute name, attribute value and timestamp can be returned by inputting the node id. When there are many attribute features, the attribute name will occupy a large amount of memory space. Taking into account that in an embodiment of the present application, the attribute features of the node are relatively large (for example, the second feature of the first object includes more than 120 features), therefore, in a possible implementation, the second feature of the first object includes k unit features, where k is a positive integer.
[0167] Among them, the computer device performs feature compression processing on the second feature, which may specifically include: first, converting each unit feature of the k unit features into an attribute string to obtain k attribute strings. Then, the k attribute strings are subjected to feature compression processing to obtain the compressed second feature. Finally, the compressed second feature is determined as the attribute feature of the node corresponding to the first object in the knowledge graph. Similarly, the attribute features of other nodes can also be subjected to feature compression processing as required. For example, the penalty information and complaint information in the first feature of the first object can also be subjected to feature compression processing, and so on. The embodiments of the present application will not be repeated here. In this way, after feature compression processing, the attribute features can be converted into the form of a json string, which optimizes the read and write performance of the knowledge graph, can save storage space, reduce the time consumption caused by the increase of nodes, and can retain the attribute features of the nodes to the maximum extent, which is convenient for subsequent query operations.
[0168] In a possible implementation, a computer device obtains the type of an attribute in a non-relational data table; the type includes a first type and a second type, the first type refers to a type with a query frequency higher than a preset value; the second type refers to a type with a query frequency lower than a preset value. An index is added to the attribute feature of the first type, the index includes a composite index or a mixed index; the composite index supports equal value queries; the mixed index supports range queries.
[0169] Specifically, after the relevant features (the first feature of the first merchant, the second feature of the first merchant, the associated features of the first merchant, etc.) obtained by knowledge extraction are stored in Hbase in the janusGraph database, query operations can be performed according to the attribute features of the corresponding nodes. When querying an object, indexes can be added for frequently queried attribute features. Specifically, composite indexes are added for unique attribute features such as node id (i.e., supporting equivalent queries), and mixed indexes are added for text-based attribute features such as business scope (i.e., supporting range queries, geographic location indexes, etc.). Specifically, in an embodiment of the present application, the underlying storage of the janusGraph database uses the Hbase storage system, and indexes (including composite indexes and mixed indexes) are stored in components for distributed full-text retrieval (Elastic Search, ES). These components are all mature and well-developed components, so no additional installation is required, which can save the operation and maintenance costs of storing and managing knowledge graphs. For example, you can enter the "id" or "name" of node 1 for query, and the query results may include the attribute characteristics corresponding to node 1, the attribute characteristics of other nodes that are associated with node 1, and the timestamp corresponding to each attribute characteristic (the timestamp here may specifically include the timestamp corresponding to the corresponding attribute characteristic being written to the Hbase storage system).
[0170] It is understandable that in the embodiment of the present application, the first knowledge graph related to multiple objects in the data source generated based on the non-relational data table constructed above is full, that is, the knowledge graph is constructed for multiple merchants. Among them, in the above embodiment of the present application, any merchant among multiple merchants is taken as an example, the associated data of the first merchant is obtained, and the associated data of the first merchant is analyzed to construct the first knowledge graph. Then, for other merchants, the associated data of other merchants can also be obtained, and based on the data processing method provided in the embodiment of the present application, the associated data of other merchants are analyzed and the other merchants are added as nodes to the first knowledge graph.
[0171] In a possible implementation, the first knowledge graph is the main graph, and the first knowledge graph is enabled. First, the computer device receives an information registration request sent by the target object, which carries the registration data of the target object; then, the computer device queries the target associated object that has an associated relationship with the target merchant from the first knowledge graph based on the registration data of the target object; finally, the computer device performs risk control processing on the target object based on the attributes of the queried target associated object.
[0172] For example, see Figure 7 , Figure 7 This is a schematic diagram of an application scenario of a knowledge graph provided in an embodiment of the present application. Figure 7 As shown, in the application scenario of risk control management for merchants, the application scenario can be applied to the risk control management system, wherein the risk control management system may include a terminal device and a server, wherein the terminal device may be, for example, a device used by the target merchant, and the server may be a merchant registration system, wherein the merchant registration system stores the first knowledge graph constructed for the successfully registered merchants mentioned above. In the actual application scenario, if the merchant registration system receives an information registration request from a new merchant A (target merchant), wherein the information registration request carries the registration data of the merchant A, then the merchant registration system may query the target object associated with the merchant A from the first knowledge graph based on the registration data of the merchant A (for example, the legal person ID number of the merchant A (i.e., the ID number of the legal representative, which may be referred to as the legal person ID number in the following), the registered public account, the registered mobile phone number, the enterprise unified social credit code, the merchant name, etc.). Specifically, for example, the query result can be determined from the first knowledge graph based on the legal person ID number of merchant A. The query result can be used to indicate whether the legal person ID number of merchant A is associated with other registered merchants. If the legal person ID number of merchant A is found to be associated with merchant B and merchant C. Further, risk control management of merchant A can be performed based on merchant B and merchant C. Specifically, if merchant B and merchant C are merchants with low credit ratings or commercial risks, it is highly likely that merchant A has a low reputation, and merchant A can be considered to be a merchant with potential risks. Next, the risk control management system can intercept the information registration request of merchant A, that is, not respond to the information registration request of merchant A. Alternatively, the risk control management system can respond to the information registration request of merchant A, but it is necessary to increase supervision of merchant A.
[0173] For another example, taking the application scenario of visualization of association relationships between merchants as an example, other nodes associated with any node can be queried based on the first knowledge graph constructed by the embodiment of the present application, and the queried node and other nodes associated with the node can be output in the form of a knowledge graph. For example, if an object needs to query other nodes related to node 1 (such as merchant 1), it can find data related to merchant 1 from the constructed full knowledge graph based on the identification or name of merchant 1. For example, data related to merchant 1 includes but is not limited to: merchant 1's legal person ID number, registered public account, registered mobile phone number, enterprise unified social credit code, merchant name, etc. Then, based on these related data, the knowledge graph corresponding to merchant 1 can also be output, which is convenient for intuitive and vivid observation, thereby enhancing the experience.
[0174] In the above specific implementation methods of the present application, related data such as user information (such as the legal person ID number, mobile phone number, bank card number of the first merchant) are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0175] In the embodiment of the present application, based on the constructed first knowledge graph and second knowledge graph, new analysis ideas and data support can be provided for the risk control of merchants, including but not limited to: providing a data basis for all-round merchant risk management and control through technologies such as related merchant query, relationship visualization, node importance analysis, graph embedding, and graph neural network, as well as identification and mining of risky merchant groups based on the knowledge graph of the network structure. In addition, the knowledge graph composed of nodes with more attribute characteristics can also improve the query efficiency of related merchants, and the query results can be output and displayed in a visual interface without writing code, which is convenient for operation and brings convenience to auditors.
[0176] See also Figure 8 , Figure 8 800 is a structural diagram of a data processing device provided in an embodiment of the present application. The data processing device 800 can be applied to a computer device corresponding to the above embodiment. The data processing device 800 can be a computer program (including program code) running in a computer device, for example, the data processing device 800 is an application software; the device can be used to execute the corresponding steps in the method provided in an embodiment of the present application. The data processing device 800 may include:
[0177] Processing unit 801 is used to extract knowledge from the associated data of multiple objects in the data source and construct a non-relational data table, where the non-relational data table contains nodes and edges, where a node represents an object in the data source and an edge represents an association relationship between any two objects in the data source;
[0178] A generating unit 802, configured to generate a first knowledge graph and a second knowledge graph related to a plurality of objects in a data source based on a non-relational data table;
[0179] The management unit 803 is used to manage the first knowledge graph according to the first management mechanism, and to manage the second knowledge graph according to the second management mechanism.
[0180] In a possible implementation, the first knowledge graph is the main graph, and the second knowledge graph is the backup graph;
[0181] The management unit 803 manages the first knowledge graph according to the first management mechanism, and is used to perform the following operations:
[0182] Performing an incremental update operation on the first knowledge graph according to a first update frequency, and performing a full update operation on the first knowledge graph according to a second update frequency;
[0183] The management unit 803 manages the second knowledge graph according to the second management mechanism, and is used to perform the following operations:
[0184] The second knowledge graph is fully updated according to the third update frequency.
[0185] In a possible implementation, the first knowledge graph is the main graph;
[0186] The management unit 803 manages the first knowledge graph according to the first management mechanism, and is used to perform the following operations:
[0187] Performing anomaly detection on the first knowledge graph, where the anomaly detection is used to detect abnormal nodes and / or abnormal edges in the first knowledge graph;
[0188] If there is an abnormal warning in the first knowledge graph, the first knowledge graph is set to a disabled state. The existence of an abnormal warning means that there are abnormal nodes and / or abnormal edges in the first knowledge graph, and the abnormal nodes and / or abnormal edges in the first knowledge graph meet the warning conditions;
[0189] When the first knowledge graph eliminates the abnormal warning, the first knowledge graph is set to an enabled state.
[0190] In a possible implementation, the second knowledge graph is a backup graph;
[0191] The management unit 803 manages the second knowledge graph according to the second management mechanism, and is used to perform the following operations:
[0192] If the first knowledge graph is disabled, the second knowledge graph is changed to the main graph;
[0193] If the first knowledge graph is changed from a disabled state to an enabled state, the second knowledge graph is reset to a backup graph.
[0194] In one possible implementation, the associated data includes at least one of the following: registration data, operator data, and transaction data;
[0195] The processing unit 801 is further configured to perform the following operations:
[0196] Extract knowledge from the associated data of multiple objects in the data source to obtain the associated features of each object. The associated features are used to represent the association relationship between any object and the associated object.
[0197] Determine the objects and associated objects as nodes, and determine the associated relationships represented by the associated features as edges;
[0198] Write the attribute characteristics of the nodes and the attribute characteristics of the edges into the non-relational data table.
[0199] In a possible implementation, the processing unit 801 writes the attribute characteristics of the node and the attribute characteristics of the edge into a non-relational data table to perform the following operations:
[0200] Compressing the attribute features of the node to obtain a node attribute string; and,
[0201] Compress the attribute features of the edge to obtain an edge attribute string;
[0202] Write the node attribute string and edge attribute string into a non-relational data table.
[0203] In a possible implementation, the processing unit 801 is further configured to perform the following operations:
[0204] Get the type of the attribute in the non-relational data table; the type includes the first type and the second type, the first type refers to the type with a query frequency higher than a preset value, and the second type refers to the type with a query frequency lower than a preset value;
[0205] Add an index for the first type of attribute features. The index includes a composite index or a mixed index. The composite index supports equal value queries, and the mixed index supports range queries.
[0206] In a possible implementation, any object in the data source is represented as a first object; the associated object of the first object includes a second object; the associated data of the first object includes the number of first transaction objects of the first object; the associated feature includes a common transaction object relationship between the first object and the second object;
[0207] The processing unit 801 performs knowledge extraction on the associated data of the first object to obtain associated features of the first object, which are used to perform the following operations:
[0208] Get the second transaction object quantity of the second object;
[0209] Determine the number of common transaction objects of the first object and the second object according to the number of first transaction objects of the first object and the number of second transaction objects of the second object;
[0210] Determining a common transaction coefficient between the first object and the second object according to the number of the first transaction objects, the number of the second transaction objects, and the number of the common transaction objects;
[0211] A common transaction object relationship between the first object and the second object is determined based on a common transaction coefficient between the first object and the second object.
[0212] In a possible implementation, any one of the multiple objects in the data source is represented as a first object; the associated data of the first object includes transaction data of the first object; and the processing unit 801 is further configured to perform the following operations:
[0213] Performing data division processing on the transaction data of the first object according to scenario requirements to obtain multiple units of transaction data;
[0214] Extracting knowledge from each unit transaction data among the plurality of unit transaction data to obtain a unit transaction feature corresponding to each unit transaction data;
[0215] Determining a second feature of the first object based on the obtained plurality of unit transaction features;
[0216] The second feature of the first object is used to determine the attribute feature of the node corresponding to the first object.
[0217] In a possible implementation, any object in the data source is represented as a first object; the registration data of the first object is stored in m data tables in the relational database, where m is a positive integer;
[0218] The processing unit 801 is further configured to perform the following operations:
[0219] Extracting knowledge from the data related to the first object in the m data tables respectively to obtain m features to be fused;
[0220] Performing fusion processing on the m features to be fused to obtain a first feature of the first object;
[0221] The first feature of the first object is determined as an attribute feature of a node corresponding to the first object.
[0222] In a possible implementation, the first knowledge graph is a main graph, and the first knowledge graph is in an enabled state;
[0223] The processing unit 801 is further configured to perform the following operations:
[0224] Receive an information registration request sent by a target object, where the information registration request carries registration data of the target object;
[0225] According to the registration data of the target object, query the first knowledge graph for a target associated object that has an associated relationship with the target merchant;
[0226] Based on the properties of the queried target-related object, risk control processing is performed on the target object.
[0227] In an embodiment of the present application, first, a data source including associated data of multiple objects can be obtained, and knowledge extraction is performed on the associated data of multiple objects in the data source to construct a non-relational data table, wherein the non-relational data table contains nodes and edges, a node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source. Then, based on the non-relational data table, a first knowledge graph and a second knowledge graph related to multiple objects in the data source are generated. Finally, the first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism. It can be seen that the present application is based on the associated data of multiple objects stored in a non-relational data table. Compared with the associated data of multiple objects stored based on a relational database, the present application facilitates the query of the association relationship between objects. In addition, the present application constructs two knowledge graphs, and manages the corresponding knowledge graphs according to their respective management mechanisms. So, compared to only building a graph and managing the knowledge graph according to a management mechanism, the rich and diverse management mechanisms in this application can more comprehensively manage the knowledge graph (including update operations, anomaly detection operations, etc.), thereby improving the accuracy of knowledge graph management.
[0228] See also Fig. 9 , Fig. 9 9 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 900 is used to execute the steps performed by the computer device in the aforementioned method embodiment, and the computer device 900 includes: one or more processors 910; one or more input devices 920, one or more output devices 930 and a memory 940. The above-mentioned processors 910, input devices 920, output devices 930 and memory 940 are connected via a bus 950. The memory 940 is used to store a computer program, and the computer program includes program instructions. The processor 910 is used to call the program instructions stored in the memory 940 to perform the following operations:
[0229] Extract knowledge from the associated data of multiple objects in the data source and construct a non-relational data table. The non-relational data table contains nodes and edges. A node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source.
[0230] Based on the non-relational data table, generate a first knowledge graph and a second knowledge graph related to multiple objects in the data source;
[0231] The first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism.
[0232] In a possible implementation, the first knowledge graph is the main graph, and the second knowledge graph is the backup graph;
[0233] The processor 910 manages the first knowledge graph according to the first management mechanism, and is used to perform the following operations:
[0234] Performing an incremental update operation on the first knowledge graph according to a first update frequency, and performing a full update operation on the first knowledge graph according to a second update frequency;
[0235] The processor 910 manages the second knowledge graph according to the second management mechanism to perform the following operations:
[0236] The second knowledge graph is fully updated according to the third update frequency.
[0237] In a possible implementation, the first knowledge graph is a main graph; the processor 910 manages the first knowledge graph according to a first management mechanism to perform the following operations:
[0238] Performing anomaly detection on the first knowledge graph, where the anomaly detection is used to detect abnormal nodes and / or abnormal edges in the first knowledge graph;
[0239] If there is an abnormal warning in the first knowledge graph, the first knowledge graph is set to a disabled state. The existence of an abnormal warning means that there are abnormal nodes and / or abnormal edges in the first knowledge graph, and the abnormal nodes and / or abnormal edges in the first knowledge graph meet the warning conditions;
[0240] When the first knowledge graph eliminates the abnormal warning, the first knowledge graph is set to an enabled state.
[0241] In a possible implementation, the second knowledge graph is a backup graph;
[0242] The processor 910 manages the second knowledge graph according to the second management mechanism to perform the following operations:
[0243] If the first knowledge graph is disabled, the second knowledge graph is changed to the main graph;
[0244] If the first knowledge graph is changed from a disabled state to an enabled state, the second knowledge graph is reset to a backup graph.
[0245] In one possible implementation, the associated data includes at least one of the following: registration data, operator data, and transaction data;
[0246] The processor 910 is further configured to perform the following operations:
[0247] Extract knowledge from the associated data of multiple objects in the data source to obtain the associated features of each object. The associated features are used to represent the association relationship between any object and the associated object.
[0248] Determine the objects and associated objects as nodes, and determine the associated relationships represented by the associated features as edges;
[0249] Write the attribute characteristics of the nodes and the attribute characteristics of the edges into the non-relational data table.
[0250] In a possible implementation, the processor 910 writes the attribute characteristics of the node and the attribute characteristics of the edge into a non-relational data table to perform the following operations:
[0251] Compressing the attribute features of the node to obtain a node attribute string; and,
[0252] Compress the attribute features of the edge to obtain an edge attribute string;
[0253] Write the node attribute string and edge attribute string into a non-relational data table.
[0254] In a possible implementation, the processor 910 is further configured to perform the following operations:
[0255] Get the type of the attribute in the non-relational data table; the type includes the first type and the second type, the first type refers to the type with a query frequency higher than a preset value, and the second type refers to the type with a query frequency lower than a preset value;
[0256] Add an index for the first type of attribute features. The index includes a composite index or a mixed index. The composite index supports equal value queries, and the mixed index supports range queries.
[0257] In a possible implementation, any object in the data source is represented as a first object; the associated object of the first object includes a second object; the associated data of the first object includes the number of first transaction objects of the first object; the associated feature includes a common transaction object relationship between the first object and the second object;
[0258] The processor 910 extracts knowledge from the associated data of the first object to obtain associated features of the first object, which are used to perform the following operations:
[0259] Get the second transaction object quantity of the second object;
[0260] Determine the number of common transaction objects of the first object and the second object according to the number of first transaction objects of the first object and the number of second transaction objects of the second object;
[0261] Determining a common transaction coefficient between the first object and the second object according to the number of the first transaction objects, the number of the second transaction objects, and the number of the common transaction objects;
[0262] A common transaction object relationship between the first object and the second object is determined based on a common transaction coefficient between the first object and the second object.
[0263] In a possible implementation, any one of the multiple objects in the data source is represented as a first object; the associated data of the first object includes transaction data of the first object;
[0264] The processor 910 is further configured to perform the following operations:
[0265] Performing data division processing on the transaction data of the first object according to scenario requirements to obtain multiple units of transaction data;
[0266] Extracting knowledge from each unit transaction data among the plurality of unit transaction data to obtain a unit transaction feature corresponding to each unit transaction data;
[0267] Determining a second feature of the first object based on the obtained plurality of unit transaction features;
[0268] The second feature of the first object is used to determine the attribute feature of the node corresponding to the first object.
[0269] In a possible implementation, any object in the data source is represented as a first object; the registration data of the first object is stored in m data tables in the relational database, where m is a positive integer;
[0270] The processor 910 is further configured to perform the following operations:
[0271] Extracting knowledge from the data related to the first object in the m data tables respectively to obtain m features to be fused;
[0272] Performing fusion processing on the m features to be fused to obtain a first feature of the first object;
[0273] The first feature of the first object is determined as an attribute feature of a node corresponding to the first object.
[0274] In a possible implementation, the first knowledge graph is a main graph, and the first knowledge graph is in an enabled state;
[0275] The processor 910 is further configured to perform the following operations:
[0276] Receive an information registration request sent by a target object, where the information registration request carries registration data of the target object;
[0277] According to the registration data of the target object, query the first knowledge graph for a target associated object that has an associated relationship with the target merchant;
[0278] Based on the properties of the queried target-related object, risk control processing is performed on the target object.
[0279] In an embodiment of the present application, first, a data source including associated data of multiple objects can be obtained, and knowledge extraction is performed on the associated data of multiple objects in the data source to construct a non-relational data table, wherein the non-relational data table contains nodes and edges, a node represents an object in the data source, and an edge represents the association relationship between any two objects in the data source. Then, based on the non-relational data table, a first knowledge graph and a second knowledge graph related to multiple objects in the data source are generated. Finally, the first knowledge graph is managed according to the first management mechanism, and the second knowledge graph is managed according to the second management mechanism. It can be seen that the present application is based on the associated data of multiple objects stored in a non-relational data table. Compared with the associated data of multiple objects stored based on a relational database, the present application facilitates the query of the association relationship between objects. In addition, the present application constructs two knowledge graphs, and manages the corresponding knowledge graphs according to their respective management mechanisms. So, compared to only building a graph and managing the knowledge graph according to a management mechanism, the rich and diverse management mechanisms in this application can more comprehensively manage the knowledge graph (including update operations, anomaly detection operations, etc.), thereby improving the accuracy of knowledge graph management.
[0280] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer storage medium, and a computer program is stored in the computer storage medium, and the computer program includes program instructions. When the processor executes the above program instructions, the method in the corresponding embodiment of the foregoing text can be executed, so it will not be repeated here. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computer device, or executed on multiple computer devices located in one place, or, executed on multiple computer devices distributed in multiple locations and interconnected by a communication network.
[0281] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device can execute the method in the above corresponding embodiment, so it will not be repeated here.
[0282] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0283] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the invention.
Claims
1. A data processing method, characterized in that: include: Based on text processing technology, knowledge is extracted from the associated data of multiple objects in the data source to construct a non-relational data table, wherein the non-relational data table contains nodes and edges, wherein a node represents an object in the data source, and an edge represents an association relationship between any two objects in the data source; Based on the non-relational data table, generating a first knowledge graph and a second knowledge graph related to multiple objects in the data source; the first knowledge graph is a main graph, and the second knowledge graph is a backup graph; Managing the first knowledge graph according to a first management mechanism, and managing the second knowledge graph according to a second management mechanism; The managing the first knowledge graph according to the first management mechanism includes: performing an incremental update operation on the first knowledge graph according to a first update frequency, and performing a full update operation on the first knowledge graph according to a second update frequency; The managing the second knowledge graph according to the second management mechanism includes: performing a full update operation on the second knowledge graph according to a third update frequency.
2. The method according to claim 1, characterized in that The first knowledge graph is a main graph; and managing the first knowledge graph according to the first management mechanism includes: Performing anomaly detection on the first knowledge graph, wherein the anomaly detection is used to detect abnormal nodes and / or abnormal edges in the first knowledge graph; If there is an abnormal warning in the first knowledge graph, the first knowledge graph is set to a disabled state, wherein the abnormal warning means that there are abnormal nodes and / or abnormal edges in the first knowledge graph, and the abnormal nodes and / or abnormal edges in the first knowledge graph meet the warning conditions; When the first knowledge graph eliminates the abnormal warning, the first knowledge graph is set to an enabled state.
3. The method according to claim 2, characterized in that The second knowledge graph is a backup graph; and managing the second knowledge graph according to the second management mechanism includes: If the first knowledge graph is in a disabled state, changing the second knowledge graph to a main graph; If the first knowledge graph is changed from a disabled state to an enabled state, the second knowledge graph is reset to a backup graph.
4. The method according to any one of claims 1 to 3, characterized in that: The associated data includes at least one of the following: registration data, operator data, and transaction data; The method of extracting knowledge from the associated data of multiple objects in the data source and constructing a non-relational data table includes: Performing knowledge extraction on the associated data of multiple objects in the data source to obtain associated features of each object, wherein the associated features are used to represent the associated relationship between any object and an associated object; Determine the object and the associated object as nodes, and determine the association relationship represented by the association feature as an edge; The attribute characteristics of the node and the attribute characteristics of the edge are written into a non-relational data table.
5. The method according to claim 4, characterized in that The step of writing the attribute characteristics of the node and the attribute characteristics of the edge into a non-relational data table includes: Compressing the attribute features of the node to obtain a node attribute string; and, Compressing the attribute features of the edge to obtain an edge attribute character string; The node attribute string and the edge attribute string are written into a non-relational data table.
6. The method according to claim 4, characterized in that The method further comprises: Acquire the type of the attribute in the non-relational data table; the type includes a first type and a second type, the first type refers to a type with a query frequency higher than a preset value, and the second type refers to a type with a query frequency lower than a preset value; An index is added to the attribute feature of the first type, wherein the index includes a composite index or a mixed index, wherein the composite index supports equal value query, and the mixed index supports range query.
7. The method according to claim 4, characterized in that Any object in the data source is represented as a first object; the associated object of the first object includes a second object; the associated data of the first object includes the number of first transaction objects of the first object; the associated feature includes a common transaction object relationship between the first object and the second object; The process of performing knowledge extraction on the associated data of the first object in the data source to obtain the associated features of the first object includes: Obtain the second transaction object quantity of the second object; Determining the number of common transaction objects of the first object and the second object according to the number of first transaction objects of the first object and the number of second transaction objects of the second object; Determining a common transaction coefficient between the first object and the second object according to the number of the first transaction objects, the number of the second transaction objects, and the number of the common transaction objects; A common transaction object relationship between the first object and the second object is determined based on a common transaction coefficient between the first object and the second object.
8. The method according to claim 4, characterized in that Any one of the multiple objects in the data source is represented as a first object; the associated data of the first object includes transaction data of the first object; the method further includes: Performing data division processing on the transaction data of the first object according to scenario requirements to obtain a plurality of unit transaction data; Performing knowledge extraction on each unit transaction data of the plurality of unit transaction data to obtain a unit transaction feature corresponding to each unit transaction data; Determining a second feature of the first object based on the obtained multiple unit transaction features; The second feature of the first object is used to determine an attribute feature of a node corresponding to the first object.
9. The method according to claim 4, characterized in that Any object in the data source is represented as a first object; the registration data of the first object is stored in m data tables in the relational database, where m is a positive integer; the method further includes: Extracting knowledge from the data related to the first object in the m data tables respectively to obtain m features to be fused; Performing a fusion process on the m features to be fused to obtain a first feature of the first object; The first feature of the first object is determined as an attribute feature of a node corresponding to the first object.
10. The method according to claim 1, characterized in that The first knowledge graph is a main graph, and the first knowledge graph is in an enabled state; the method further includes: Receiving an information registration request sent by a target object, wherein the information registration request carries registration data of the target object; According to the registration data of the target object, querying the first knowledge graph for a target-associated object having an association relationship with the target object; According to the queried properties of the target-related object, risk control processing is performed on the target object.
11. A data processing device, characterized in that: include: A processing unit, configured to extract knowledge from the associated data of multiple objects in the data source based on text processing technology, and construct a non-relational data table, wherein the non-relational data table includes nodes and edges, wherein a node represents an object in the data source, and an edge represents an association relationship between any two objects in the data source; A generating unit, configured to generate, based on the non-relational data table, a first knowledge graph and a second knowledge graph related to a plurality of objects in the data source; The first knowledge graph is a main graph, and the second knowledge graph is a backup graph; A management unit, configured to manage the first knowledge graph according to a first management mechanism, and to manage the second knowledge graph according to a second management mechanism; The managing the first knowledge graph according to the first management mechanism includes: performing an incremental update operation on the first knowledge graph according to a first update frequency, and performing a full update operation on the first knowledge graph according to a second update frequency; The managing the second knowledge graph according to the second management mechanism includes: performing a full update operation on the second knowledge graph according to a third update frequency.
12. A computer device, characterized in that: include: storage devices and processors; a memory storing one or more computer programs; A processor, used to load the one or more computer programs to implement the data processing method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the data processing method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product comprises a computer program, and the computer program is suitable for being loaded by a processor and executing the data processing method according to any one of claims 1 to 10.
