Data query method and device, electronic equipment and readable storage medium

By matching and graph querying the initial object data and querying object recognition data, calculating the correlation score and filtering the target object data, the problems of poor relationship recognition capabilities and insufficient data dimensions in the existing technology are solved, and more accurate and efficient Data query.

CN119474336APending Publication Date: 2025-02-18BEIJING LONGZHI DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411480372.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art cannot effectively reflect the relationship and interaction frequency between personnel, resulting in poor relationship recognition capabilities and fewer data dimensions in query results.

Method used

By obtaining the initial object data and query object identification data, performing matching processing and graph query, the correlation scores of each query object data are calculated, and the target object data is filtered according to the correlation score threshold.

Benefits of technology

The query data dimension is added, the accuracy and efficiency of query results are improved, and the flexibility and scalability of data query methods are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474336A_ABST
    Figure CN119474336A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and provides a data query method and device, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring initial object data and query object identification data; performing matching processing on the query object identification data to obtain at least one query object data corresponding to the query object identification data; performing graph query processing on each piece of query object data corresponding to the query object identification data and the initial object data to obtain at least one piece of graph relation data corresponding to each piece of query object data; according to each piece of graph relation data corresponding to the query object data, determining a correlation score corresponding to each piece of query object data; sorting the correlation scores corresponding to the query object data to obtain a query object data sequence; and determining at least one piece of target object data according to the preset correlation score threshold and the query object data sequence, so that the query data dimension is increased, and the accuracy of a query result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data query method, device, electronic device and readable storage medium. Background Art

[0002] Data search is generally achieved through a search system. Conventional search systems use precise queries to obtain precise corresponding results in a pre-set database and provide feedback. In application scenarios such as address books, traditional search systems need to query based on specific personal information and search based on static organizational structures and limited interaction data, but they cannot understand the relationships and interactions between people. Since data search cannot reflect the relationships and interaction frequencies between people, the dimension of the data is limited, and there is a lack of analysis and understanding of the relationships between people. It cannot effectively identify and process multi-level relationship networks, resulting in poor relationship recognition capabilities.

[0003] It can be seen that the existing technology has problems such as poor relationship recognition ability and few data dimensions of query results due to the inability to reflect the relationship and interaction frequency between people and the lack of analysis and understanding of the relationship between people. Summary of the invention

[0004] In view of this, the embodiments of the present disclosure provide a data query method, device, electronic device and readable storage medium to solve the problems in the prior art that the relationship recognition ability is poor and the query result data dimension is small due to the inability to reflect the relationship and interaction frequency between people and the lack of analysis and understanding of the relationship between people.

[0005] In a first aspect of an embodiment of the present disclosure, a data query method is provided, including: acquiring initial object data and query object identification data; performing matching processing on the query object identification data to obtain at least one query object data corresponding to the query object identification data; performing graph query processing on each query object data and the initial object data corresponding to the query object identification data to obtain at least one graph relationship data corresponding to each query object data; determining a relevance score corresponding to each query object data based on each graph relationship data corresponding to the query object data; performing sorting processing on the relevance scores corresponding to each query object data to obtain a query object data sequence; and determining at least one target object data based on a preset relevance score threshold and the query object data sequence.

[0006] According to a second aspect of an embodiment of the present disclosure, a data query device is provided, comprising: an acquisition module for acquiring initial object data and query object identification data; a first processing module for matching the query object identification data to obtain at least one query object data corresponding to the query object identification data; a second processing module for performing graph query processing on each query object data and the initial object data corresponding to the query object identification data to obtain at least one graph relationship data corresponding to each query object data; a first determination module for determining a relevance score corresponding to each query object data based on each graph relationship data corresponding to the query object data; a third processing module for sorting the relevance scores corresponding to each query object data to obtain a query object data sequence; and a second determination module for determining at least one target object data based on a preset relevance score threshold and the query object data sequence.

[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0008] According to a fourth aspect of an embodiment of the present disclosure, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0009] Compared with the prior art, the embodiments of the present disclosure have the following beneficial effects: by acquiring the initial object data and the query object identification data input by the user, the query object identification data can be processed by a matching algorithm to identify and extract at least one query object data corresponding to the query object identification data, each query object data can be associated with the initial object data by a preset relationship graph to obtain at least one graph relationship data between each query object data and the initial object data; based on each graph relationship data, the correlation between each query object data and the initial object data is evaluated by a correlation degree calculation method, and a corresponding correlation score is obtained, the query object data can be sorted according to the correlation scores corresponding to each query object data to obtain an ordered query object data sequence, and then according to a preset correlation score threshold, the query object data greater than or equal to the correlation score threshold can be screened from the sorted query object data sequence as the target object data, thereby increasing the query data dimension and improving the accuracy of the query result, by performing precise matching processing on the query object identification data, the query object data can be quickly located, the interference of irrelevant data can be reduced, and the query efficiency can be improved, and the screening conditions can be adjusted by setting the correlation score threshold, thereby enhancing the flexibility and scalability of the data query method. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure;

[0012] Figure 2 It is a flowchart of a data query method provided by an embodiment of the present disclosure;

[0013] Figure 3 is a structural diagram of a data query device provided by an embodiment of the present disclosure;

[0014] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0015] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0016] It should be noted that the user information (including but not limited to terminal device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0017] A data query method and device according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0018] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.

[0019] Terminal devices 1, 2 and 3 can be hardware or software. When terminal devices 1, 2 and 3 are hardware, they can be various electronic devices with display screens and supporting communication with server 4, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when terminal devices 1, 2 and 3 are software, they can be installed in the above electronic devices. Terminal devices 1, 2 and 3 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present disclosure are not limited to this. Furthermore, various applications can be installed on terminal devices 1, 2 and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0020] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the embodiments of the present disclosure.

[0021] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the terminal devices 1, 2, and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the terminal devices 1, 2, and 3, or it can be a single software or software module that provides various services for the terminal devices 1, 2, and 3, and the embodiments of the present disclosure are not limited to this.

[0022] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present disclosure.

[0023] The user can establish a communication connection with the server 4 through the terminal devices 1, 2 and 3 via the network 5 to receive or send information, etc. Specifically, the server 4 can obtain the initial object data and the query object identification data input by the user through the terminal devices 1, 2 and 3, and then process the query object identification data through the matching algorithm to identify and extract at least one query object data corresponding to the query object identification data, and can associate each query object data with the initial object data through a preset relationship graph to obtain at least one graph relationship data between each query object data and the initial object data; based on each graph relationship data, through a calculation method of the degree of association, evaluate the correlation between each query object data and the initial object data, and obtain a corresponding correlation score, and can sort the query object data according to the correlation score corresponding to each query object data to obtain an ordered query object data sequence, and then according to a preset correlation score threshold, filter out the query object data greater than or equal to the correlation score threshold from the sorted query object data sequence as the target object data.

[0024] It should be noted that the specific types, quantities and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure are not limited to this.

[0025] Figure 2 It is a flowchart of a data query method provided by an embodiment of the present disclosure. Figure 2 The data query method can be Figure 1 The server executes. Figure 2 As shown, the data query method includes:

[0026] Step 201: Acquire initial object data and query object recognition data.

[0027] Specifically, an initial data set submitted by a user, i.e., initial object data, may be received through an interface or a user interaction interface. The initial object data may include information to be queried or analyzed, including but not limited to records in a database or file contents in a file system, etc. Query object identification data submitted by a user may be received through an interface or a user interaction interface. The query object identification data may be an identifier of a query object, which is not limited here. The query object identification data may exist in the form of keywords, regular expressions, specific IDs, or customized query statements, which are not limited here. The query object identification data may be used to accurately or fuzzily match target information in a database or a preset relationship map, thereby enhancing the flexibility of data query, improving the efficiency of data processing, and simplifying the operation process of complex data query.

[0028] Among them, the initial object data can be the original data set used for query, and the initial object data can be stored in a database, file system, memory, or cloud storage, which is not limited here. The initial object data can include multiple types of structured, semi-structured, or unstructured data, and the initial object data includes but is not limited to customer information, transaction records, or log files, etc.; the query object identification data can be a condition or identifier used to identify and locate specific information in a database or a preset relationship graph. The query object identification data can be a keyword, query statement, or expression, etc., which is not limited here. The query object identification data can be used to query the query object data from the preset relationship graph.

[0029] For example, in the product search function of an e-commerce platform, the initial object data may be the user's historical interaction information, and the query object identification data may be the product name. Then, the user may enter the product name through the search box of the website, and the user's historical interaction information may be obtained in the historical interaction database of the e-commerce platform.

[0030] Step 202: Perform matching processing on the query object identification data to obtain at least one query object data corresponding to the query object identification data.

[0031] Specifically, key features in the query object identification data can be extracted, and the key features include but are not limited to keywords in the text or feature points in the image, etc. The key features can be compared and matched with data in a preset query object database or a preset relationship map, and at least one query object data that semantically matches the query object identification data or has a similarity greater than or equal to a threshold can be obtained through a matching algorithm query, wherein the matching algorithm can be a hash table search or a similarity measurement, etc., which is not limited here. The query object data can be structured information pre-set and stored in a database or a preset relationship map, and the query object data includes but is not limited to a name, description, attribute, or location, etc., thereby enhancing the intelligence of data query, obtaining corresponding data through automatic matching, improving data processing efficiency, and reducing the cost of manual intervention. For large-scale data sets, the matching processing method also enhances the usability of the data query method.

[0032] Among them, the query object data corresponding to the query object identification data can be a data set that has similarity, correlation in content, or meets preset conditions with the query object identification data input by the user. The query object data corresponding to the query object identification data can be obtained through data collection, cleaning, labeling, and storage processes, and stored in a structured form in a database or a preset relationship graph. The structured form includes but is not limited to database tables or file frameworks, etc. The query object data corresponding to the query object identification data can be used in a variety of application scenarios, including but not limited to product recommendations, information retrieval, intelligent question and answer, or user portrait construction, etc.

[0033] For example, on an e-commerce platform, the query object identification data can be the keyword "sports shoes" entered by the user, and then all product data marked as "sports shoes" can be retrieved from the product database, including but not limited to the brand, model, price, size, color, and / or user reviews of the product.

[0034] Step 203, performing graph query processing on each query object data and initial object data corresponding to the query object identification data, and obtaining at least one graph relationship data corresponding to each query object data.

[0035] Specifically, each query object data corresponding to the query object identification data and the initial object data can be used as the query starting point, and can be traversed or queried through a pre-constructed relationship graph or relationship graph database, and then the association relationship between each query object data and the initial object data, including direct relationship and indirect relationship, can be obtained through a graph query algorithm, and then the graph relationship data corresponding to each query object data can be obtained, wherein the graph query algorithm includes but is not limited to depth-first search, breadth-first search, or graph database query language, etc. The graph relationship data corresponding to the obtained query object data can be used to characterize the internal connection, logical structure, or historical communication information between people between the initial object and the query object, thereby enhancing the data analysis capability of the data query method, and through graph query processing, the query object data and the initial object data can be connected, which improves the correlation and interpretability between the data, so that the user can intuitively observe the logical relationship or communication information between the initial object and the query object.

[0036] The graph relationship data corresponding to the query object data may be the query object data directly or indirectly connected to the initial object data in the relationship graph or relationship graph database, and the relationship information between the two. The relationship information may be the social relationship between users, the supply chain relationship of products, or the adjacency relationship of geographical locations, etc. The graph relationship data corresponding to the query object data may be organized and stored in the form of a graph structure. The nodes in the graph structure may be used to represent different objects, and the edges in the graph structure may be used to represent the historical exchange information between objects, and may be retrieved and analyzed through a graph query language or algorithm. The graph relationship data may be applicable in multiple fields, including but not limited to social network analysis, recommendation systems, risk assessment, or knowledge question answering, etc.

[0037] For example, in the medical field, the initial object data may be the medical record information of a patient, and the query object data may be the information related to the disease suffered by the patient. Then, through the preset relationship graph query processing, other symptoms, complications, treatment methods, drug information and other graph relationship data related to the disease can be found, which are not limited here.

[0038] Step 204, determining the correlation score corresponding to each query object data according to each graph relationship data corresponding to the query object data.

[0039] Specifically, according to the query object data, all graph relationship data associated with the query object data can be traversed. The graph relationship data can include connection information between nodes in a preset relationship graph, including but not limited to attributes, relationship types, historical communication information, and / or distances between entities. Then, the relevance or importance of each graph relationship data to the initial object data can be calculated. The processing method may include but is not limited to weight allocation, path length consideration, or relationship type matching algorithms. The relevance score corresponding to each query object data is obtained by accumulation or weighted summation. The relevance score corresponding to the query object data can be used to characterize the degree of association and importance between the query object and the initial object, thereby enhancing the accuracy of data analysis, improving the efficiency of information retrieval, and improving the quality of decision support. Based on accurate relevance evaluation, a basis can be provided for subsequent data analysis or business decisions.

[0040] Among them, the relevance score corresponding to the query object data can be a quantitative indicator. The relevance score corresponding to the query object data can be obtained by analyzing the direct and indirect relationships between the query object and the initial object data. The specific processing method can be combined with factors such as the type, strength, and direction of the direct and indirect relationships, which are not limited here. It is calculated through a correlation algorithm. The relevance score corresponding to the query object data can be used to characterize the degree of association between the query object and the initial object.

[0041] For example, in the company's personnel address book, the initial object is the query person, and a personnel relationship graph containing information such as gender, name, age, and historical participation projects is constructed. When the user enters a person's name as the query object, the relationship between the person corresponding to the name and the query person can be traversed, such as possible projects worked together, related businesses, and / or meetings participated in together, etc., and then the correlation score between the query person and each associated item can be calculated based on the type, distance, and importance of the aforementioned relationship. The correlation score can be expressed by an expression, for example, correlation score = ∑(weight value corresponding to the graph relationship data * frequency data corresponding to the graph relationship data).

[0042] Step 205 , sorting the relevance scores corresponding to the query object data to obtain a query object data sequence.

[0043] Specifically, the relevance scores corresponding to the various query object data may be sorted in descending or ascending order, which is not limited here, and the query object data may be rearranged in this order to obtain an ordered sequence of query object data. The relevance score array may be processed by a sorting algorithm, which includes but is not limited to quick sort or merge sort, etc., and the sorting results may be mapped to the query object data, thereby enhancing the intuitiveness and relevance of the query results and improving the efficiency of information acquisition. By sorting the relevance scores, results matching the query intent may be found more quickly, thereby speeding up the query.

[0044] Among them, the query object data sequence can be a data set sequence obtained by sorting according to the correlation score between the query object and the initial object. The query object data sequence can be obtained by calculating the correlation between each query object and the initial object and sorting them. The query object data sequence can be used in a variety of scenarios, including but not limited to search engine result display, recommendation system content push, enterprise personnel address book relevance query, and database query results optimization sorting, etc.

[0045] For example, in a corporate address book query, the query object data may be a corporate person named B, and the initial object data may be a query person named A. The relevance score corresponding to the query object data may be used to characterize the degree of association between the corporate person named B who has past contact records with A and the query person A in the corporate address book, and the query object data set obtained by arranging the data in descending order.

[0046] Step 206: Determine at least one target object data according to a preset relevance score threshold and the query object data sequence.

[0047] Specifically, all query objects in the query object data sequence can be traversed according to a preset relevance score threshold, and query object data with a relevance score higher than or equal to the preset relevance score threshold can be compared and obtained as target object data, wherein the preset relevance score threshold can be determined through historical data analysis, expert evaluation, or machine learning model training, etc., which is not limited here, thereby enhancing the accuracy of data processing, improving the efficiency and accuracy of information retrieval, and enhancing user experience and response speed.

[0048] Among them, the preset relevance score threshold can be a quantitative standard, and the preset relevance score threshold can be used to characterize the minimum relevance level that needs to be achieved between the query object and the initial object. The minimum relevance level is used to characterize the degree of association that meets the requirements. The preset relevance score threshold can be determined based on multiple factors, including but not limited to the characteristics of the data set, the urgency of the query demand, or the user's expectations for the accuracy of the results.

[0049] For example, in a corporate address book query, the query object data may be a corporate employee named B, the initial object data may be a query person named A, and the preset relevance score threshold may be 70%. Then, the query object data corresponding to a relevance score greater than or equal to 70% may be traversed in the query object data sequence, i.e., the target object data.

[0050] According to the technical solution provided by the embodiment of the present disclosure, by acquiring the initial object data and the query object identification data input by the user, the query object identification data can be processed by a matching algorithm to identify and extract at least one query object data corresponding to the query object identification data, and each query object data can be associated with the initial object data through a preset relationship graph to obtain at least one graph relationship data between each query object data and the initial object data; based on each graph relationship data, the correlation between each query object data and the initial object data is evaluated through a correlation degree calculation method, and a corresponding correlation score is obtained, and the query object data can be sorted according to the correlation score corresponding to each query object data to obtain an ordered query object data sequence, and then according to a preset correlation score threshold, the query object data greater than or equal to the correlation score threshold can be screened from the sorted query object data sequence as the target object data, thereby increasing the query data dimension and improving the accuracy of the query result, and by performing precise matching processing on the query object identification data, the query object data can be quickly located, the interference of irrelevant data can be reduced, and the query efficiency can be improved, and the screening conditions can be adjusted by setting the correlation score threshold, thereby enhancing the flexibility and scalability of the data query method.

[0051] In some embodiments, the correlation scores corresponding to the query object data are determined based on the graph relationship data corresponding to the query object data, including: performing frequency calculation processing based on the graph relationship data to obtain the frequency data corresponding to the graph relationship data; performing weight assignment processing on the graph relationship data to obtain the weight value corresponding to the graph relationship data; performing correlation calculation processing on the weight value corresponding to the graph relationship data and the frequency data corresponding to the graph relationship data to obtain the correlation score corresponding to the query object data.

[0052] Specifically, a query and calculation process can be performed on the frequency field of each graph relationship data, and the frequency of each graph relationship data can be counted to obtain the frequency data corresponding to each graph relationship data. The frequency data corresponding to the graph relationship data can be used to characterize the degree of connection between the query object and the initial object through the corresponding graph relationship. The value of the frequency data can be 1, 2, or 16, etc., which is not limited here. At the same time, a weight value can be assigned to each graph relationship data according to preset rules or algorithms. The weight value corresponding to the graph relationship data can be used to characterize the importance of different relationship types in evaluating the correlation between the query object and the initial object. The weight value corresponding to each graph relationship data and the frequency data corresponding to each graph relationship data are weighted summed or correlated to obtain the correlation score corresponding to each query object data.

[0053] Among them, the frequency data corresponding to the graph relationship data can be the number of times or frequency that the query object data establishes a connection with the initial object data through a preset relationship in the preset relationship graph, and the frequency data corresponding to the graph relationship data can be used to quantify the degree of closeness of the relationship; the weight value corresponding to the graph relationship data can be a numerical value assigned to each graph relationship, and the weight value corresponding to the graph relationship data can be used to measure the importance of the corresponding graph relationship in the correlation calculation, and the weight value corresponding to the graph relationship data can be determined according to business logic, expert experience, or a machine learning model, and the weight value corresponding to the graph relationship data can be used to characterize the different contribution degrees of different relationship types to the evaluation of the relevance of the query object.

[0054] For example, in a corporate address book query, graph relationship data may include projects worked on together, meetings participated in together, and business dealings information. The frequency data fields of each graph relationship data can be counted to obtain the frequency data corresponding to each graph relationship data. At the same time, each graph relationship data can be weighted to obtain the weight value corresponding to each graph relationship data. Based on the individual graph relationship data, the frequency data corresponding to the graph relationship data and the weight value corresponding to the graph relationship data are weightedly summed, and the aforementioned weighted summation is performed on all the graph relationship data to obtain the relevance score corresponding to the query object data.

[0055] According to the technical solution provided by the embodiment of the present disclosure, by querying and calculating the frequency field of each graph relationship data, the frequency of each graph relationship data is counted to obtain the frequency data corresponding to each graph relationship data. At the same time, according to the preset rules or algorithms, a weight value can be assigned to each graph relationship data, and the weight value corresponding to each graph relationship data and the frequency data corresponding to each graph relationship data are weighted summed or correlation calculated to obtain the correlation score corresponding to each query object data, thereby enhancing the depth and accuracy of the relationship analysis between data. Through the combination of frequency and weight, the calculation of the correlation score is more comprehensive and reasonable. Since the weight allocation is adjusted according to actual needs, the flexibility and adaptability of data processing are improved, and the accuracy of information retrieval and recommendation is improved.

[0056] In some embodiments, graph query processing is performed on each query object data and initial object data corresponding to the query object identification data to obtain at least one graph relationship data corresponding to each query object data, including: performing identifier extraction processing on each query object data to obtain an identifier corresponding to each query object data; performing mapping processing on the identifier corresponding to each query object data based on a preset relationship graph to obtain a graph node corresponding to each query object data; performing information extraction processing on the graph node corresponding to each query object data based on the initial object data to obtain at least one graph relationship data corresponding to each query object data.

[0057] Specifically, identifier extraction can be performed on each query object data, including but not limited to extracting unique identification information from text, image, or video data through regular expression matching, and the identification information is not limited to identity identification or name, etc. As the identifier corresponding to the query object data, a pre-constructed and stored relationship graph, that is, a preset relationship graph, which can be a graph structure database describing the relationship between entities, the identifier corresponding to the extracted query object data is mapped to the corresponding node in the preset relationship graph, that is, the graph node corresponding to the query object data, and then the graph nodes corresponding to each mapped query object data can be processed by information expansion or relationship mining according to the initial object data, which is not limited here, and at least one graph relationship data related to the initial object data can be extracted by traversing adjacent nodes and edges in the preset relationship graph, including but not limited to associated entities, attributes, or behaviors.

[0058] Among them, the identifier corresponding to the query object data can be a mark or code that can represent the query object data itself, such as a product ID, a person's name, or a place name, etc., which is not limited here. The identifier corresponding to the query object data can be used to identify and locate specific data objects during data processing; the preset relationship graph can be a graph structure database, the preset relationship graph can be pre-built and stored, the preset relationship graph can be used to describe the relationship between entities, and the preset relationship graph can include multiple nodes and edges, wherein a node can be used to represent an entity or object, and an edge can be used to represent the relationship between entities or objects; the graph node corresponding to the query object data can be an entity node associated with the query object data through identifier mapping, the graph node corresponding to the query object data can be used to represent the query object itself, and the graph node corresponding to the query object data can include attributes, behaviors, and relationship information related to the query object, etc., which are not limited here.

[0059] For example, in the e-commerce field, when a user searches for a product, the product name can be extracted from the search query as an identifier of the query object data, and then the identifier can be mapped to the corresponding product node in the preset product relationship graph through the preset product relationship graph. The initial object data can be the user's historical purchase record, and the graph relationship data associated with the product node can be extracted based on the user's historical purchase record, such as similar products, supporting products, and / or user reviews.

[0060] According to the technical solution provided by the embodiment of the present disclosure, by extracting an identifier for each query object data as the identifier corresponding to the query object data, the identifier corresponding to the extracted query object data can be mapped to the corresponding node in the preset relationship graph, i.e., the graph node corresponding to the query object data, through a pre-constructed and stored relationship graph, i.e., the preset relationship graph. Then, information expansion or relationship mining and other processing can be performed on the graph nodes corresponding to each mapped query object data according to the initial object data. At least one graph relationship data related to the initial object data can be extracted by traversing adjacent nodes and edges in the preset relationship graph, thereby enhancing the intelligent level of data processing. Through automated identifier extraction and relationship mapping, manual intervention is reduced, the accuracy and efficiency of information retrieval are improved, and the ability of data analysis and decision-making is enhanced.

[0061] In some embodiments, before mapping the identifiers corresponding to each query object data based on a preset relationship graph to obtain the graph nodes corresponding to each query object data, it also includes: obtaining at least one preset object data and historical graph relationship data corresponding to each preset object data; and graphing each preset object data and the historical graph relationship data corresponding to each preset object data based on a preset target graph relationship set to obtain a preset relationship graph.

[0062] Specifically, at least one preset object data and its corresponding historical graph relationship data can be obtained, and then the preset object data and the historical relationship data corresponding to each preset object data can be graphed through a preset target graph relationship set, and the two can be converted into structured graph nodes and edges to obtain a preset relationship graph, wherein the preset object data includes but is not limited to user information, product information, or geographic location, etc., and the historical graph relationship data includes but is not limited to social relationships between users, supply chain relationships of products, or adjacency relationships of geographic locations, etc. The preset target graph relationship set can be constructed by defining key relationship types, attributes and structural rules, and can be used to characterize the relationship between entities.

[0063] Among them, the preset object data can be pre-set entity data that needs to be included in the relationship graph construction process, including but not limited to user information, product information, or organizational data; the historical graph relationship data corresponding to the preset object data can be relationship data that has existed or been recorded in the past between the preset objects, including but not limited to the friendship history between users, transaction records between products, and / or cooperation history between institutions; the preset target graph relationship set can include a set of relationship types, attributes, and structural rules allowed to exist in the relationship graph, and the preset target graph relationship set can be used to guide the relationship graph construction process.

[0064] For example, in the e-commerce field, products, users, or stores can be used as preset object data, and the purchase records, browsing histories, and / or evaluation relationships between the preset objects can be obtained as historical graph relationship data. Then, based on the preset target graph relationship set, the preset object data and the historical graph relationship data corresponding to the preset object data can be graphed to construct a relationship graph between products, users, and stores.

[0065] According to the technical solution provided by the embodiments of the present disclosure, by obtaining at least one preset object data and its corresponding historical graph relationship data, the preset object data and the historical relationship data corresponding to each preset object data can be graphed through a preset target graph relationship set, and the two can be converted into structured graph nodes and edges, and a preset relationship graph can be obtained, thereby enhancing the intelligent level of data processing, improving the ability to mine the correlation between data, and improving the efficiency and accuracy of data analysis and application.

[0066] In some embodiments, the above-mentioned data query method also includes: obtaining real-time graph relationship data corresponding to each preset object data; determining the node data corresponding to each real-time graph relationship data and the edge data corresponding to each real-time graph relationship data according to the real-time graph relationship data corresponding to each preset object data; mapping the node data corresponding to each real-time graph relationship data and the edge data corresponding to each real-time graph relationship data to obtain an updated relationship graph.

[0067] Specifically, the real-time graph relationship data corresponding to each preset object data can be obtained. The real-time graph relationship data can be a dynamic network structure of interactions or associations between preset object data, wherein the preset objects include but are not limited to users, products, or services, etc. The real-time graph relationship data can be parsed and processed to identify the nodes and edges that constitute the graph relationship network, wherein the nodes can be objects or entities, which are not limited here, and the edges can be used to represent the connection lines between the nodes, including but not limited to purchase, association, and / or dependency, etc., and then the node and edge data can be mapped to obtain a relationship graph format, that is, the relationship graph is updated, so that the graph can be updated.

[0068] Among them, the real-time graph relationship data corresponding to the preset object data can be dynamic network structure data that describes the interaction, mutual influence, or mutual association between the preset objects; the node data corresponding to the real-time graph relationship data can be used to characterize entities or objects, including but not limited to users or commodities; edges connect different nodes in the relationship graph and can be used to characterize the relationship between nodes, and the edge data corresponding to the real-time graph relationship data can be used to describe the type, strength, or direction of the relationship between nodes. The updated relationship graph can be a relationship graph model, and the updated relationship graph can be obtained by real-time acquisition and processing of the graph relationship corresponding to the preset object data, and dynamically adjusting and optimizing the existing relationship graph model.

[0069] For example, in a corporate address book query, you can obtain employee A's relationship data for the past three months, that is, the real-time graph relationship data corresponding to the preset object data. The real-time graph relationship data is parsed and processed to obtain the corresponding node data and edge data. The obtained node data and edge data are mapped to obtain an updated relationship graph.

[0070] According to the technical solution provided by the embodiments of the present disclosure, by acquiring the real-time graph relationship data corresponding to each preset object data, the real-time graph relationship data can be parsed and processed, and the nodes and edges that constitute the graph relationship network can be identified, and then the node and edge data can be mapped to obtain a relationship graph format, that is, the relationship graph is updated, thereby enhancing the real-time and dynamic visualization capabilities of the data, improving the efficiency and accuracy of data analysis and decision-making, and improving the ability to respond to changes in business scenarios.

[0071] In some embodiments, before graphing each preset object data and the historical graph relationship data corresponding to each preset object data based on a preset target graph relationship set to obtain a preset relationship graph, it also includes: deduplicating the historical graph relationship data corresponding to each preset object data to obtain at least one deduplicated graph relationship data; formatting each preset object data and each deduplicated graph relationship data to obtain each object format data and each graph relationship format data; graphing each object format data and each graph relationship format data based on the preset target graph relationship set to obtain a formatted relationship graph.

[0072] Specifically, the historical graph relationship data corresponding to each preset object data can be deduplicated to ensure the uniqueness of the relationship data in the graph, and at least one deduplicated graph relationship data can be obtained. The preset object data and the deduplicated graph relationship data can be formatted to convert the preset object data and the deduplicated graph relationship data into a unified and structured format to obtain object format data and graph relationship format data. The object format data can be preset object information with clear fields and structures through formatting. The graph relationship format data can be used to represent the relationship between objects, formatted and structured data, including but not limited to representation in the form of key-value pairs or triples. Then, based on the preset target graph relationship set, each formatted object format data and each graph relationship format data can be graphed, that is, a relationship graph is constructed according to a predefined relationship model to obtain a formatted relationship graph.

[0073] Among them, the deduplicated graph relationship data can be a data set obtained by processing the historical graph relationship data corresponding to the preset object data to eliminate or merge duplicate items. The duplicate items that are eliminated or merged may be caused by the diversity of data sources, errors in data records, or problems in the data synchronization process. Deduplication can be achieved through algorithms, and the algorithms include but are not limited to hash tables, sorting plus double pointers, or database deduplication queries, etc.; object format data can be data that organizes and represents the information of entities or objects according to preset structures and specifications. Object format data can be used to represent the attributes, characteristics, and behaviors of objects, etc., which are not limited here; graph relationship format data can be formatted data that describes the relationship between entities or objects. Graph relationship format data can be organized and represented according to preset structures and specifications; graph relationship format data can be obtained in a variety of ways, including but not limited to obtaining from the original data source through data extraction, transformation and loading (Extract & Transform & Load, ETL) processes.

[0074] For example, the preset object data may be the personnel information of enterprise personnel C, and the historical graph relationship data corresponding to the preset object data may be the historical relationship information of enterprise personnel C. The historical relationship information of enterprise personnel C is deduplicated to obtain deduplicated graph relationship data, and then the deduplicated graph relationship data and the personnel information of enterprise personnel C may be formatted to obtain the format data of enterprise personnel C and various graph relationship format data. According to the enterprise personnel relationship graph framework, the format data of enterprise personnel C and various graph relationship format data are graphed to obtain a formatted relationship graph.

[0075] According to the technical solution provided by the embodiment of the present disclosure, by deduplicating the historical graph relationship data corresponding to each preset object data to obtain at least one deduplicated graph relationship data, the preset object data and the deduplicated graph relationship data can be formatted to obtain object format data and graph relationship format data, and then based on the preset target graph relationship set, the formatted object format data and the graph relationship format data can be graphed to obtain a formatted relationship graph, thereby enhancing the accuracy of the data, reducing data redundancy through deduplication processing, and improving the efficiency of data processing. The formatting processing makes the data more standardized, which is convenient for subsequent graph construction and analysis, and improves the quality of the relationship graph.

[0076] In some embodiments, the query object identification data is matched to obtain at least one query object data corresponding to the query object identification data, including: performing structured processing on the query object identification data to obtain a query statement corresponding to the query object identification data; matching the query statement corresponding to the query object data with each preset graph node data to obtain at least one query object data corresponding to the query object identification data.

[0077] Specifically, the query object identification data can be converted into an executable query statement through structured processing. The query statement corresponding to the query object identification data can be used to describe user intentions and query conditions, and then the query statement corresponding to the query object identification data can be matched with each node data pre-stored in the relationship graph. By comparing the similarity between keywords, attributes, or relationships in the query statement and the graph node data, at least one query object data corresponding to the query object identification data can be obtained.

[0078] Among them, the query statement corresponding to the query object identification data can be a query instruction or an expression, and the query statement corresponding to the query object identification data can be obtained by parsing and converting the query object identification data input by the user. The query object identification data includes but is not limited to natural language text, images, or voice, etc.; the preset graph node data can be node information pre-defined and stored in the relationship graph, each node represents an entity or concept, and the relationship between nodes can be represented by edges. The preset graph node data can be obtained through data collection, cleaning, and / or integration processes, which are not limited here, and can be stored in the relationship graph database according to the preset structure and specifications.

[0079] For example, the query object identification data may be the name of an enterprise employee B. The name of enterprise employee B is structured to obtain a query statement corresponding to the name of enterprise employee B. The query statement is matched with the information of each enterprise employee in the relationship graph to obtain at least one enterprise employee named B in the relationship graph.

[0080] According to the technical solution provided by the embodiments of the present disclosure, query object identification data is converted into executable query statements through structured processing, and the query statements corresponding to the query object identification data can be matched with the various node data pre-stored in the relationship graph. By comparing the similarity between the keywords, attributes, or relationships in the query statements and the graph node data, at least one query object data corresponding to the query object identification data can be obtained, thereby enhancing the accuracy and flexibility of data queries and improving query efficiency. By accurately matching structured query statements with graph node data, mis-searches and missed searches are reduced.

[0081] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0082] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0083] Figure 3 Schematic diagram of a data query device provided by an embodiment of the present disclosure. Figure 3 As shown, the data query device includes:

[0084] An acquisition module 301 is used to acquire initial object data and query object identification data;

[0085] The first processing module 302 is used to perform matching processing on the query object identification data to obtain at least one query object data corresponding to the query object identification data;

[0086] The second processing module 303 is used to perform graph query processing on each query object data and the initial object data corresponding to the query object identification data to obtain at least one graph relationship data corresponding to each query object data;

[0087] A first determination module 304 is used to determine the relevance score corresponding to each query object data according to each graph relationship data corresponding to the query object data;

[0088] The third processing module 305 is used to sort the relevance scores corresponding to each query object data to obtain a query object data sequence;

[0089] The second determination module 306 is used to determine at least one target object data according to a preset correlation score threshold and the query object data sequence.

[0090] According to the technical solution provided by the embodiment of the present disclosure, by acquiring the initial object data and the query object identification data input by the user, the query object identification data can be processed by a matching algorithm to identify and extract at least one query object data corresponding to the query object identification data, and each query object data can be associated with the initial object data through a preset relationship graph to obtain at least one graph relationship data between each query object data and the initial object data; based on each graph relationship data, the correlation between each query object data and the initial object data is evaluated through a correlation degree calculation method, and a corresponding correlation score is obtained, and the query object data can be sorted according to the correlation score corresponding to each query object data to obtain an ordered query object data sequence, and then according to a preset correlation score threshold, the query object data greater than or equal to the correlation score threshold can be screened from the sorted query object data sequence as the target object data, thereby increasing the query data dimension and improving the accuracy of the query result, and by performing precise matching processing on the query object identification data, the query object data can be quickly located, the interference of irrelevant data can be reduced, and the query efficiency can be improved, and the screening conditions can be adjusted by setting the correlation score threshold, thereby enhancing the flexibility and scalability of the data query method.

[0091] In some embodiments, the first determination module 304 is specifically used to perform frequency calculation processing based on each graph relationship data to obtain frequency data corresponding to each graph relationship data; perform weight assignment processing on each graph relationship data to obtain a weight value corresponding to each graph relationship data; perform correlation calculation processing on the weight value corresponding to each graph relationship data and the frequency data corresponding to each graph relationship data to obtain a correlation score corresponding to each query object data.

[0092] In some embodiments, the second processing module 303 is specifically used to perform identifier extraction processing on each query object data to obtain an identifier corresponding to each query object data; perform mapping processing on the identifier corresponding to each query object data based on a preset relationship graph to obtain a graph node corresponding to each query object data; perform information extraction processing on the graph node corresponding to each query object data based on the initial object data to obtain at least one graph relationship data corresponding to each query object data.

[0093] In some embodiments, the above-mentioned data query device is also used to obtain at least one preset object data and historical graph relationship data corresponding to each preset object data; based on a preset target graph relationship set, each preset object data and the historical graph relationship data corresponding to each preset object data are graphed to obtain a preset relationship graph.

[0094] In some embodiments, the above-mentioned data query device is also used to obtain the real-time graph relationship data corresponding to each preset object data; determine the node data corresponding to each real-time graph relationship data and the edge data corresponding to each real-time graph relationship data according to the real-time graph relationship data corresponding to each preset object data; map the node data corresponding to each real-time graph relationship data and the edge data corresponding to each real-time graph relationship data to obtain an updated relationship graph.

[0095] In some embodiments, the above-mentioned data query device is also used to deduplicate the historical graph relationship data corresponding to each preset object data to obtain at least one deduplicated graph relationship data; format each preset object data and each deduplicated graph relationship data to obtain each object format data and each graph relationship format data; and graph each object format data and each graph relationship format data based on a preset target graph relationship set to obtain a formatted relationship graph.

[0096] In some embodiments, matching processing is performed on the query object identification data to obtain at least one query object data corresponding to the query object identification data, which is specifically used to perform structured processing on the query object identification data to obtain a query statement corresponding to the query object identification data; matching processing is performed on the query statement corresponding to the query object data and each preset graph node data to obtain at least one query object data corresponding to the query object identification data.

[0097] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.

[0098] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present disclosure. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0099] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.

[0100] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0101] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0102] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0103] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0104] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.

Claims

1. A data query method, characterized in that: include: Obtaining initial object data and query object recognition data; Performing matching processing on the query object identification data to obtain at least one query object data corresponding to the query object identification data; Performing graph query processing on each query object data corresponding to the query object identification data and the initial object data to obtain at least one graph relationship data corresponding to each query object data; Determine, according to each graph relationship data corresponding to the query object data, a correlation score corresponding to each query object data; Sorting the relevance scores corresponding to the query object data to obtain the query object data sequence; At least one target object data is determined according to a preset relevance score threshold and the query object data sequence.

2. The data query method according to claim 1, characterized in that: The determining, according to each graph relationship data corresponding to the query object data, a relevance score corresponding to each query object data includes: Perform frequency calculation processing based on each of the graph relationship data to obtain frequency data corresponding to each of the graph relationship data; Performing weight distribution processing on each of the graph relationship data to obtain a weight value corresponding to each of the graph relationship data; The weight values ​​corresponding to the respective graph relationship data and the frequency data corresponding to the respective graph relationship data are subjected to correlation calculation processing to obtain the correlation scores corresponding to the respective query object data.

3. The data query method according to claim 1, characterized in that: The performing graph query processing on each query object data corresponding to the query object identification data and the initial object data to obtain at least one graph relationship data corresponding to each query object data includes: Performing identifier extraction processing on each of the query object data to obtain an identifier corresponding to each of the query object data; Mapping the identifiers corresponding to the query object data based on a preset relationship graph to obtain graph nodes corresponding to the query object data; Based on the initial object data, information extraction processing is performed on the graph nodes corresponding to each of the query object data to obtain at least one graph relationship data corresponding to each of the query object data.

4. The data query method according to claim 3, characterized in that: Before mapping the identifiers corresponding to the query object data based on the preset relationship graph to obtain the graph nodes corresponding to the query object data, the method further includes: Acquire at least one preset object data and historical graph relationship data corresponding to each of the preset object data; Based on a preset target graph relationship set, each of the preset object data and the historical graph relationship data corresponding to each of the preset object data are graphed to obtain the preset relationship graph.

5. The data query method according to claim 4, characterized in that: The method further comprises: Obtaining real-time graph relationship data corresponding to each of the preset object data; According to the real-time graph relationship data corresponding to each of the preset object data, determining the node data corresponding to each of the real-time graph relationship data and the edge data corresponding to each of the real-time graph relationship data; Mapping processing is performed on the node data corresponding to each of the real-time graph relationship data and the edge data corresponding to each of the real-time graph relationship data to obtain an updated relationship graph.

6. The data query method according to claim 4, characterized in that: Before the preset target graph relationship set is used to process each of the preset object data and the historical graph relationship data corresponding to each of the preset object data into a graph to obtain the preset relationship graph, the method further includes: Deduplication processing is performed on the historical graph relationship data corresponding to each of the preset object data to obtain at least one deduplication graph relationship data; Formatting each of the preset object data and each of the deduplicated graph relationship data to obtain each object format data and each graph relationship format data; Based on the preset target graph relationship set, each object format data and each graph relationship format data are graphed to obtain a formatted relationship graph.

7. The data query method according to claim 1, characterized in that: The matching process is performed on the query object identification data to obtain at least one query object data corresponding to the query object identification data, including: Performing structured processing on the query object identification data to obtain a query statement corresponding to the query object identification data; The query statement corresponding to the query object data and each preset graph node data are matched to obtain at least one query object data corresponding to the query object identification data.

8. A data query device, characterized in that: include: An acquisition module, used to acquire initial object data and query object recognition data; A first processing module, configured to perform matching processing on the query object identification data to obtain at least one query object data corresponding to the query object identification data; A second processing module is used to perform graph query processing on each query object data corresponding to the query object identification data and the initial object data to obtain at least one graph relationship data corresponding to each query object data; A first determination module, configured to determine, based on each graph relationship data corresponding to the query object data, a correlation score corresponding to each query object data; A third processing module is used to sort the relevance scores corresponding to the query object data to obtain the query object data sequence; The second determination module is used to determine at least one target object data according to a preset correlation score threshold and the query object data sequence.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.