Data query method and device, equipment and storage medium
By receiving user requests, performing multi-system login verification, and assembling data templates, the problem of low efficiency in multi-system data querying has been solved, achieving efficient and flexible data integration and querying.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-10
AI Technical Summary
When querying data across multiple systems, existing technologies require logging into each system separately and relying on the system's native query templates, resulting in low data query efficiency.
It receives data query requests from users, performs multi-system login verification and caches the original data locally, assembles multiple data templates according to predefined assembly rules, generates the target data set, and determines the data query results.
By dynamically integrating data from multiple systems, the efficiency and flexibility of data querying are improved, while reducing dependence on data systems and the resource consumption of real-time queries.
Smart Images

Figure CN121833778A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a data query method, apparatus, device, and storage medium. Background Technology
[0002] In some scenarios, it is necessary to obtain data from multiple systems simultaneously. For example, in the financial sector, data analysts need to extract data from multiple business systems to support business decisions.
[0003] In related technologies, when data analysts need to query data in multiple systems, they need to log into multiple systems separately, rely on the system's native query templates to obtain the data within the system, and then filter the data to obtain the query results.
[0004] However, the above methods require a significant amount of time to acquire and filter data, resulting in low efficiency in data retrieval. Summary of the Invention
[0005] This application provides a data query method, apparatus, device, and storage medium to solve the problem of low efficiency in data querying.
[0006] Firstly, this application provides a data query method, including:
[0007] Receive user data query requests. Data query requests are used to query data within multiple data systems. Data query requests include user identity information.
[0008] Based on identity information, login verification is performed in multiple data systems. In response to successful login verification in multiple data systems, multiple original data corresponding to multiple data systems are cached locally.
[0009] Based on the data query request, multiple data filtering conditions are determined, and multiple raw data are filtered according to the data filtering conditions to obtain multiple filtered data templates.
[0010] Obtain predefined assembly rules, assemble multiple data templates according to the assembly rules, and obtain the target data set. The assembly rules are used to indicate the association logic between fields.
[0011] Determine the data query results based on the target dataset.
[0012] In one possible design, multiple data templates are assembled according to assembly rules, including:
[0013] Retrieve the first field corresponding to multiple data templates;
[0014] Based on the assembly rules, determine the second field with associated logic within the first field;
[0015] Based on the second field, multiple data templates are assembled.
[0016] In one possible design, multiple data templates are assembled based on the second field, including:
[0017] Within multiple data templates, determine multiple values of the first field corresponding to the second field based on the second field;
[0018] Based on multiple first field values and multiple data templates, a first data set corresponding to the multiple first field values is determined, and the first field values corresponding to the second field values within the first data set are the same;
[0019] Based on the second field and the first data set, multiple data templates are assembled.
[0020] In one possible design, for any given first field value; based on multiple first field values and multiple data templates, determine the first data set corresponding to the multiple first field values, including:
[0021] Within multiple data templates, determine multiple sub-data sets corresponding to the value of the first field;
[0022] Multiple sub-data sets are merged to obtain the first data set corresponding to the first field value.
[0023] In one possible design, after obtaining the target data set, the following steps are also included:
[0024] Retrieve multiple third fields corresponding to the target data set;
[0025] Determine multiple degrees of association between multiple third fields;
[0026] Based on multiple correlation degrees, multiple target fields are determined, and the correlation degree between the multiple target fields is less than or equal to a first preset value;
[0027] Based on multiple target fields, determine the fields to be supplemented corresponding to the target fields. These fields are used to supplement the relationships between the multiple target fields.
[0028] Generate data supplementation suggestions based on the fields to be supplemented.
[0029] In one possible design, based on multiple target fields, the fields to be supplemented corresponding to the target fields are determined, including:
[0030] Multiple target fields are input into a first model, which is used to predict the fields associated with the input fields based on the input fields.
[0031] Obtain at least one predicted field from the first model;
[0032] Determine the correlation between at least one prediction field and multiple target fields;
[0033] Identify the field to be supplemented within at least one prediction field, where the field to be supplemented has the highest correlation with multiple target fields.
[0034] In one possible design, after receiving the user's data query request, the process also includes:
[0035] Retrieve historical query results for a user within a historical time period;
[0036] Based on historical query results, determine multiple historical filtering conditions corresponding to the historical query results;
[0037] When there is a historical filtering condition among multiple historical filtering conditions that has a similarity to the data filtering condition greater than or equal to the second preset value, the target filtering condition with the highest similarity to the data filtering condition is determined among the multiple historical filtering conditions, and the target historical query result corresponding to the target filtering condition is determined.
[0038] Determine the distinguishing criteria between the data filtering criteria and the target filtering criteria; the distinguishing criteria are data filtering criteria but not target filtering criteria.
[0039] Based on the distinguishing conditions, the target historical query results are updated to obtain the data query results.
[0040] Secondly, this application provides a data query device, comprising: a receiving module, a caching module, a filtering processing module, an assembly processing module, and a determining module, wherein,
[0041] The receiving module is used to receive user data query requests, which are used to query data within multiple data systems. The data query requests include the user's identity information.
[0042] The caching module is used to perform login verification in multiple data systems based on identity information, and in response to successful login verification in multiple data systems, to perform local caching processing on multiple original data corresponding to multiple data systems.
[0043] The filtering module is used to determine multiple data filtering conditions based on the data query request, and to filter multiple raw data according to the data filtering conditions to obtain multiple filtered data templates; the assembly module is used to obtain predefined assembly rules, and to assemble multiple data templates according to the assembly rules to obtain the target data set. The assembly rules are used to indicate the association logic between fields.
[0044] The determination module is used to determine the data query results based on the target dataset.
[0045] In one possible design, the assembly processing module is specifically used for,
[0046] Retrieve the first field corresponding to multiple data templates;
[0047] Based on the assembly rules, determine the second field with associated logic within the first field;
[0048] Based on the second field, multiple data templates are assembled.
[0049] In one possible design, the assembly processing module is specifically used for,
[0050] Within multiple data templates, determine multiple values of the first field corresponding to the second field based on the second field;
[0051] Based on multiple first field values and multiple data templates, a first data set corresponding to the multiple first field values is determined, and the first field values corresponding to the second field values within the first data set are the same;
[0052] Based on the second field and the first data set, multiple data templates are assembled.
[0053] In one possible design, the assembly processing module is specifically used for,
[0054] Within multiple data templates, determine multiple sub-data sets corresponding to the value of the first field;
[0055] Multiple sub-data sets are merged to obtain the first data set corresponding to the first field value.
[0056] In one possible design, a generation module is also included, wherein,
[0057] The generation module is used to obtain multiple third fields corresponding to the target data set;
[0058] Determine multiple degrees of association between multiple third fields;
[0059] Based on multiple correlation degrees, multiple target fields are determined, and the correlation degree between the multiple target fields is less than or equal to a first preset value;
[0060] Based on multiple target fields, determine the fields to be supplemented corresponding to the target fields. These fields are used to supplement the relationships between the multiple target fields.
[0061] Generate data supplementation suggestions based on the fields to be supplemented.
[0062] In one possible design, the generation module is specifically used for,
[0063] Multiple target fields are input into a first model, which is used to predict the fields associated with the input fields based on the input fields.
[0064] Obtain at least one predicted field from the first model;
[0065] Determine the correlation between at least one prediction field and multiple target fields;
[0066] Identify the field to be supplemented within at least one prediction field, where the field to be supplemented has the highest correlation with multiple target fields.
[0067] In one possible design, an update module is also included, in which...
[0068] The update module is used to retrieve the user's historical query results for a historical time period;
[0069] Based on historical query results, determine multiple historical filtering conditions corresponding to the historical query results;
[0070] Based on the data query request, determine the data filtering conditions corresponding to the data query request. The data filtering conditions are used to filter data within multiple data systems.
[0071] When there is a historical filtering condition among multiple historical filtering conditions that has a similarity to the data filtering condition greater than or equal to the second preset value, the target filtering condition with the highest similarity to the data filtering condition is determined among the multiple historical filtering conditions, and the target historical query result corresponding to the target filtering condition is determined.
[0072] Determine the distinguishing criteria between the data filtering criteria and the target filtering criteria; the distinguishing criteria are data filtering criteria but not target filtering criteria.
[0073] Based on the distinguishing conditions, the target historical query results are updated to obtain the data query results.
[0074] Thirdly, embodiments of this application provide an electronic device, including: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, causing the at least one processor to perform the data query method as described in the first aspect and various possible designs of the first aspect.
[0075] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the data query method described in the first aspect and various possible designs of the first aspect.
[0076] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the data query method described in the first aspect and various possible designs of the first aspect.
[0077] The data query method, apparatus, device, and storage medium provided in this application can receive user data query requests when data querying is required. These requests are used to query data across multiple data systems. Based on the data query requests, multiple data templates corresponding to the multiple data systems are determined. Predefined assembly rules are obtained, and the multiple data templates are assembled according to these rules to obtain a target data set. The assembly rules indicate the relationship logic between fields. Based on the target data set, the data query result is determined. Through this method, multiple data templates can be determined in multiple data systems according to the data query requests, and then integrated according to the assembly rules to obtain an integrated data set. This data set is then filtered according to data filtering conditions to obtain the final query result. In this way, users can dynamically integrate data from multiple systems according to the assembly rules, improving the efficiency and flexibility of data querying. Furthermore, multiple data templates can be cached in a local database, thereby avoiding repeated calls to data systems, reducing dependence on data systems, and decreasing the resource consumption of real-time data queries. Attached Figure Description
[0078] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0079] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application;
[0080] Figure 2 A flowchart illustrating a data query method provided in an embodiment of this application;
[0081] Figure 3 This is a schematic diagram of the assembly process provided in the embodiments of this application;
[0082] Figure 4 A schematic diagram illustrating the process of generating supplementary data suggestions provided in the embodiments of this application;
[0083] Figure 5 This is a schematic diagram of the structure of a data query device provided in an embodiment of this application;
[0084] Figure 6 This is a schematic diagram of another data query device provided in an embodiment of this application;
[0085] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0086] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0087] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0088] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0089] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0090] To facilitate understanding, the following will be combined with... Figure 1 The system architecture applicable to the embodiments of this application will be described.
[0091] Figure 1 This is a schematic diagram of the system architecture provided for an embodiment of this application. Please refer to [link / reference]. Figure 1 This includes electronic devices, which can be devices with on-device computing capabilities, such as servers and terminal devices. Data System 1, Data System 2, Data System 3, and Data System 4 can be data systems with a large amount of business data. Electronic devices can be used to query data within multiple data systems. For example, electronic devices can query business data from Data System 1, Data System 2, Data System 3, and Data System 4.
[0092] In related technologies, when data analysts need to query data across multiple systems, they must log into each system separately, rely on the system's native query templates to retrieve the data, and then filter the data to obtain the query results. However, this method wastes a significant amount of time acquiring and filtering data, resulting in low data query efficiency.
[0093] To address the aforementioned technical issues, in this embodiment, when a data query is required, a user's data query request can be received. This request is used to query data across multiple data systems. Based on the query request, multiple data templates corresponding to the various data systems are determined. Predefined assembly rules are obtained, and the multiple data templates are assembled according to these rules to obtain a target data set. The assembly rules indicate the relationship logic between fields. Based on the target data set, the data query result is determined. Through this method, multiple data templates can be determined within multiple data systems based on the query request, and then integrated according to the assembly rules to obtain an integrated data set. This data set is then filtered according to the query request to obtain the final query result. This allows users to dynamically integrate data from multiple systems based on the assembly rules, improving the efficiency and flexibility of data queries. Furthermore, multiple data templates can be cached in a local database, avoiding repeated calls to data systems and reducing dependence on data systems and resource consumption for real-time data queries.
[0094] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0095] Figure 2 This is a flowchart illustrating a data query method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 As shown, the method may include the following steps:
[0096] S201, Receive user's data query request.
[0097] The execution subject in this application embodiment can be an electronic device, which can be a device with on-device computing capabilities, such as a terminal device or a server. The execution subject in this application embodiment can also be a data query device installed in an electronic device. The data query device can be implemented through software or through a combination of software and hardware.
[0098] A data query request can be a query instruction initiated by a user. A data query request can include the query scope and data filtering conditions. That is, a data query request can be used to perform data queries in multiple data systems based on data filtering conditions.
[0099] Data query requests can include user identity information, such as username, password, and token. This identity information can be used to log in to multiple data systems.
[0100] The data system can be an independent platform for storing business data. The query scope can refer to multiple data systems that need to be accessed. Data filtering conditions can refer to the criteria used to filter the final data required.
[0101] For example, a data query request could be "to query for premium customers who spent more than 5,000 yuan in the first half of 2025 in the order system and customer management system". It can be understood that the query scope of this data query request is the order system and customer management system, and the data filtering conditions are the first half of 2025, spending more than 5,000 yuan, and premium customers.
[0102] In one possible implementation, the user's electronic device may be equipped with a data query system that can receive the user's data query requests in the following three ways.
[0103] Method 1: Input via a visual operation interface.
[0104] The data query system may include a visual operation interface. Within the visual operation interface of the data query system, users can select the data systems they want to access and configure filtering conditions through interactive spaces such as drop-down boxes and input boxes.
[0105] Method 2: API call.
[0106] Users can use code to generate requests with parameters through the data query system. These parameters can include the query scope and data filtering conditions.
[0107] Method 2: Import data via commands.
[0108] Users can upload text files containing their query requirements through the data query system. Electronic devices can then parse the files to obtain the data query request. The text file can be in a text data exchange format, such as JavaScript Object Notation (JSON).
[0109] In this way, the data query system can provide users with a single query entry point, eliminating the need to log in to different data systems one by one, thereby improving the efficiency of data query.
[0110] S202. Based on the identity information, perform login verification in multiple data systems. In response to the successful login verification in multiple data systems, perform local caching processing on multiple original data corresponding to multiple data systems.
[0111] Raw data can refer to the collection of business data within a data system, that is, the total amount of data in the data system.
[0112] For any data system, the target identity information required for login verification can be determined. Login is performed using the target identity information. If login is successful, login verification is considered passed; if login fails, login verification is considered failed.
[0113] After successful login verification in each data system, multiple original data sets corresponding to the data systems can be cached locally. Local caching refers to storing multiple original data sets in a cache database, which facilitates direct use for subsequent queries, reduces repeated access to the data systems, and thus improves the speed of data retrieval.
[0114] S203. Based on the data query request, determine multiple data filtering conditions, and filter multiple raw data according to the data filtering conditions to obtain multiple filtered data templates.
[0115] Based on the data query request, multiple data systems and data filtering conditions that need to be queried can be identified; multiple raw data corresponding to multiple data systems can be obtained, and the raw data may include business data within the data systems; based on the data filtering conditions, multiple raw data can be filtered to obtain multiple filtered data templates.
[0116] For example, suppose the data filtering condition can be to filter data with an order date of October 11th. If any original data includes "Customer Name: A, Order Number: 1, Order Date: October 10th; Customer Name: A, Order Number: 2, Order Date: October 11th; Customer Name: B, Order Number: 3, Order Date: October 11th", then the data template after filtering according to the data filtering condition can be "Customer Name: A, Order Number: 2, Order Date: October 11th; Customer Name: B, Order Number: 3, Order Date: October 11th".
[0117] In one possible implementation, data standardization can be performed on multiple data information corresponding to multiple data systems to achieve cross-system data format compatibility.
[0118] In one possible implementation, multiple data templates can be cached in the storage space of the electronic device or in a database, thereby avoiding repeated calls to the data system.
[0119] S204. Obtain predefined assembly rules, and assemble multiple data templates according to the assembly rules to obtain the target data set.
[0120] Assembly rules allow electronic devices to retrieve pre-configured cross-template association logic from a rule base. These rules indicate the association logic between fields and can be customized for different scenarios; for example, different fields can be used for association in different business scenarios. For instance, assembly rules could refer to customer identifiers, order numbers, etc.
[0121] Assembling multiple data templates can refer to associating and integrating fields from different templates according to assembly rules, eliminating data redundancy, and thus forming a target data set containing fields from multiple data systems.
[0122] The target dataset can be a unified structured dataset generated by processing multiple data templates through assembly rules, containing fields from different data systems and their corresponding values.
[0123] In one possible implementation, the assembly process can be performed as follows: obtain the first field corresponding to multiple data templates; determine the second field with association logic within the first field according to the assembly rules; and assemble the multiple data templates according to the second field.
[0124] The first field can be any of the fields contained in multiple data templates. For example, assuming that multiple data systems are an order system and a customer system, the data template corresponding to the order system can include the order number field, the order time field, the order amount field, and the customer identifier field, and the data template corresponding to the customer system can include the customer identifier field, the customer location field, and the customer level field. In this case, the first field can include the order number field, the order time field, the order amount field, the customer identifier field, the customer location field, and the customer level field.
[0125] Based on the assembly rules, the second field with associated logic, specified by the assembly rules, can be filtered from the first field. For example, the second field can be the customer identifier.
[0126] Assembling multiple data templates refers to combining multiple data templates into a single target dataset, using the second field as the base dimension. For example, assuming the second field is "customer identifier," data template 1 includes customer identifier, customer level, and customer registration time, while data template 2 includes order identifier, order time, order amount, and customer identifier. After assembling data templates 1 and 2, a target dataset can be obtained, using the customer identifier as the base dimension and simultaneously including customer identifier, customer level, customer registration time, order identifier, order time, and order amount. In other words, the second field, "customer identifier," serves as the intermediary link for assembling and integrating multiple data templates.
[0127] S205. Determine the data query results based on the target data set.
[0128] Data query results can refer to the final results extracted from the target data set that meet the user's needs.
[0129] Optionally, the data query results can be the results obtained after deduplication, sorting, and format conversion of the target data set.
[0130] Deduplication refers to removing duplicate records from the target dataset. For example, it removes records of the same transaction from the same customer that have been spliced together multiple times, thus ensuring the uniqueness of the resulting data. Sorting refers to ranking the target dataset based on preset rules. For instance, if the second field of the preset rule is transaction time, the dataset can be sorted in ascending order by transaction time, allowing users to quickly locate core data. Format conversion refers to converting the target dataset into visual chart formats, making it easier to display through a visual interface and improving the user experience.
[0131] In one possible implementation, after the electronic device receives the user's data query request, it further includes: obtaining the user's historical query results for a historical period; determining multiple historical filtering conditions corresponding to the historical query results based on the historical query results; when there is a historical filtering condition among the multiple historical filtering conditions whose similarity to the data filtering condition is greater than or equal to a second preset value, determining the target filtering condition with the highest similarity to the data filtering condition among the multiple historical filtering conditions, and determining the target historical query result corresponding to the target filtering condition; determining the distinguishing condition between the data filtering condition and the target filtering condition, wherein the distinguishing condition belongs to the data filtering condition but not to the target filtering condition; and incrementally updating the target historical query result based on the distinguishing condition to obtain the data query result.
[0132] Among them, historical filtering conditions can refer to the filtering rules for historical query results.
[0133] The second preset value can be a value set by the user in advance. For example, the second preset value can be 0.9. Understandably, in high-frequency repeated query scenarios, the second preset value can be set lower to improve the reuse rate, while in low-repetition query scenarios, the second preset value can be set higher to ensure the accuracy of the reuse results.
[0134] Similarity can be calculated using a preset similarity algorithm. For example, similarity can be calculated using a field matching algorithm, or a weighted similarity algorithm can be used to assign different weights to fields of different importance.
[0135] Understandably, since different users may have different query habits, the database can be used to determine the historical query results corresponding to that user in a given time period by using the user's identifier, thereby improving query efficiency.
[0136] In this way, for frequently repeated query requests, there is no need to wait for the full data to be queried, thus improving query efficiency.
[0137] In this embodiment, when a data query is required, the electronic device can receive a user's data query request. The data query request can be a query instruction initiated by the user and can include the user's identity information. Based on the identity information, login verification is performed in multiple data systems. In response to successful login verification in multiple data systems, multiple original data corresponding to multiple data systems are locally cached. Based on the data query request, multiple data filtering conditions are determined, and multiple original data are filtered according to the data filtering conditions to obtain multiple filtered data templates. Each data template can include multiple fields and their corresponding values. Predefined assembly rules are obtained, and multiple data templates are assembled according to the assembly rules to obtain a target data set. The assembly rules can be pre-configured cross-template association logic retrieved by the electronic device from a rule base. The target data set can be a unified structured dataset generated after processing multiple data templates by the assembly rules. Based on the target data set, the data query result is determined. The data query result can refer to the final result extracted from the target data set that meets the user's needs. In this way, users can dynamically integrate data from multiple systems according to the assembly rules, improving the efficiency and flexibility of data query. Furthermore, multiple data templates can be cached in the local database, thereby avoiding repeated calls to data systems, reducing dependence on data systems and resource consumption for real-time data queries. At the same time, there is no need to customize and develop interfaces for each data system, reducing development costs.
[0138] Based on any of the above embodiments, the following, in conjunction with Figure 3 The assembly process ( Figure 2 S203 in the embodiments will be described in detail.
[0139] Figure 3 This is a schematic diagram illustrating the assembly process provided in an embodiment of this application. Please refer to [link / reference]. Figure 3 The method may include:
[0140] S301. Obtain the first field corresponding to multiple data templates.
[0141] A data template can refer to a set of data obtained after filtering data information within a data system according to the data filtering conditions of a data query request.
[0142] The first field can refer to a set of unique fields extracted from multiple data templates. Understandably, after extracting all fields from multiple data templates, deduplication can be performed on all fields to ensure that the first field is a set of unique fields.
[0143] S302. Based on the assembly rules, determine the second field with associated logic within the first field.
[0144] Assembly rules can retrieve pre-configured cross-template association logic from the rule base for electronic devices.
[0145] It should be noted that the second field is a common field across all data templates. For example, the second field can be a timestamp, user identifier, order number, etc.
[0146] S303. Based on the second field, assemble multiple data templates.
[0147] Assembly processing can refer to using the second field as a connection key to associate and concatenate the values corresponding to the second field in different data templates.
[0148] In one possible implementation, the assembly process can be performed as follows: within multiple data templates, determine multiple first field values corresponding to the second field based on the second field; based on the multiple first field values and multiple data templates, determine a first data set corresponding to the multiple first field values, wherein the first field values corresponding to the second field in the first data set are the same; and assemble the multiple data templates based on the second field and the first data set.
[0149] For example, assuming the second field is a user identifier, the multiple first field values corresponding to the second field can be user 1, user 2, user 3, and user 4; assuming multiple data templates include an order data template and a user information template, the first data set corresponding to user 1 can include "user identifier: user 1, user level: level 1, order number: 123", the first data set corresponding to user 2 can include "user identifier: user 2, user level: level 1, order number: 234", the first data set corresponding to user 3 can include "user identifier: user 3, user level: level 2, order number: 345", and the first data set corresponding to user 4 can include "user identifier: user 4, user level: level 3, order number: 456".
[0150] In one possible implementation, for any first field value, the first data set can be determined as follows: within multiple data templates, determine multiple sub-data sets corresponding to the first field value; merge the multiple sub-data sets to obtain the first data set corresponding to the first field value.
[0151] For example, suppose multiple data templates include an order data template and a user information template, and the first field value is user 1. In the order data template, the sub-data set corresponding to user 1 may include "User ID: User 1, User Level: Level 1". In the user information template, the sub-data set corresponding to user 1 may include "User ID: User 1, Order Number: 123, Order Amount: 100". After merging the multiple sub-data sets, the first data set corresponding to the first field value can be obtained as "User ID: User 1, User Level: Level 1, Order Number: 123, Order Amount: 100".
[0152] Assembling multiple data templates based on the second field and the first data set can mean integrating multiple first data sets according to the second field as the sorting basis.
[0153] exist Figure 3 In the illustrated embodiment, when assembly processing is required, the electronic device can obtain a first field corresponding to multiple data templates. The first field can refer to a set of non-repeating fields extracted from multiple data templates. According to the assembly rules, a second field with association logic is determined within the first field. The assembly rules can be pre-configured cross-template association logic retrieved by the electronic device from a rule base. Based on the second field, multiple data templates are assembled. In this way, by configuring the assembly rules, the above method can adapt to integration scenarios of any multi-source data templates without the need to obtain data separately across data systems, thereby improving the efficiency of data query. At the same time, it breaks down the barriers between data templates, transforming scattered data into a unified view linked by the second field.
[0154] Based on any of the above embodiments, the following, in conjunction with Figure 4 The process of generating data supplementation suggestions after obtaining the target dataset is explained in detail.
[0155] Figure 4 This is a schematic diagram illustrating the process of generating supplementary data suggestions provided in the embodiments of this application. Please refer to... Figure 4 The method may include:
[0156] S401. Obtain multiple third fields corresponding to the target data set.
[0157] Multiple third fields can refer to all fields in the target dataset. For example, multiple third fields could include: user ID, user level, transaction amount, transaction time, etc.
[0158] S402. Determine multiple degrees of association between multiple third fields.
[0159] Correlation can be used to indicate the degree of correlation between multiple third-party fields. For example, user level and transaction amount are highly correlated, while transaction amount and transaction time are less correlated.
[0160] Optionally, multiple correlations can be determined using statistical algorithms, business rule algorithms, machine learning algorithms, etc. Specifically, statistical algorithms can be Pearson correlation coefficient algorithms, business rule algorithms can be correlations between fields pre-defined based on business experience, and machine learning algorithms can be mutual information algorithms.
[0161] S403. Determine multiple target fields based on multiple degrees of association.
[0162] The target field can refer to the set of fields selected from the third field whose correlation with each other is less than or equal to the first preset value. In other words, the target field can refer to the fields that need to be added for correlation.
[0163] The correlation between multiple target fields is less than or equal to the first preset value.
[0164] The first preset value can be a value set by the user in advance, for example, the first preset value can be 0.8.
[0165] S404. Based on multiple target fields, determine the fields to be supplemented corresponding to the multiple target fields.
[0166] The fields to be supplemented can be used to supplement the relationships between multiple target fields.
[0167] In one possible implementation, the field to be supplemented can be determined as follows: multiple target fields are input into a first model, which is used to predict fields associated with the input fields; at least one predicted field is obtained from the first model; the correlation between the at least one predicted field and the multiple target fields is determined; and the field to be supplemented is determined within the at least one predicted field, wherein the correlation between the field to be supplemented and the multiple target fields is the highest.
[0168] The first model can be a model pre-trained by the user, such as an association rule mining model, a field recommendation model, or a knowledge graph reasoning model.
[0169] For example, suppose multiple target fields include transaction time and customer registration date. Inputting multiple target fields into a first model, the first model can predict the fields associated with the input fields. That is, the predicted fields output by the first model may include customer usage time and transaction frequency.
[0170] In this way, by using a model, the accuracy of determining the fields to be supplemented can be improved.
[0171] S405. Generate data supplementation suggestions based on the fields to be supplemented.
[0172] Data supplementation suggestions can refer to supplementary suggestions generated for users based on the fields to be supplemented.
[0173] For example, assuming the field to be supplemented is order return frequency, a data supplementation suggestion of "suggesting supplementation of order return frequency" can be generated and displayed on the visualization interface of the data query system.
[0174] In one possible implementation, specific supplementary suggestions can be generated based on the type, retrieval method, and calculation logic of the field to be supplemented.
[0175] For example, assuming the field to be supplemented is customer usage duration, data supplementation suggestions can be generated for the supplemented field. The data supplementation suggestions can include the meaning of the field, the supplementation method, and the supplementation value. Specifically, the generated field meaning can be "Customer usage duration: the interval between the customer's account opening date and the transaction time, used to establish the correlation between the transaction time and the account opening date". The supplementation method can be "calculate the time difference based on the transaction time and the account opening date to determine the customer's usage duration". The supplementation value can be "fill the gap in the correlation between the transaction time and the account opening date, enrich the dimensions of data analysis, analyze the differences in transaction behavior of customers with different usage durations, and help business activities accurately target customers". The data supplementation suggestions are then displayed on the visual operation interface of the data query system.
[0176] exist Figure 4 In the illustrated embodiment, when data supplementation suggestions need to be generated, multiple third fields corresponding to the target data set can be obtained. These multiple third fields can refer to all fields in the target data set. Multiple correlation degrees between the multiple third fields are determined, indicating the tightness of the relationship between them. Based on these correlation degrees, multiple target fields are determined. These target fields can refer to a set of fields selected from the third fields whose correlation degrees are less than or equal to a first preset value. Based on these target fields, fields to be supplemented corresponding to them are determined. These fields to be supplemented are used to supplement the relationships between the target fields. Based on these fields to be supplemented, data supplementation suggestions are generated, which can refer to supplementary suggestions generated for the user based on these fields. In this way, the above method can solve the problems of broken data relationships and single analytical dimensions by using the fields to be supplemented, thereby improving the completeness and analytical value of the data query results.
[0177] Figure 5 This is a schematic diagram of a data query device provided in an embodiment of this application. Please refer to... Figure 5The data query device 10 includes: a receiving module 11, a caching module 12, a filtering processing module 13, an assembly processing module 14, and a determining module 15, wherein...
[0178] The receiving module 11 is used to receive a user's data query request, which is used to query data in multiple data systems and includes the user's identity information.
[0179] The caching module 12 is used to perform login verification in multiple data systems based on identity information, and in response to successful login verification in multiple data systems, to perform local caching processing on multiple original data corresponding to multiple data systems.
[0180] The filtering processing module 13 is used to determine multiple data filtering conditions according to the data query request, and to filter multiple raw data according to the data filtering conditions to obtain multiple filtered data templates.
[0181] The assembly processing module 14 is used to obtain predefined assembly rules, and to assemble multiple data templates according to the assembly rules to obtain the target data set. The assembly rules are used to indicate the association logic between fields.
[0182] The determination module 15 is used to determine the data query results based on the target data set.
[0183] The data query device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0184] In one possible design, the assembly processing module 14 is specifically used for,
[0185] Retrieve the first field corresponding to multiple data templates;
[0186] Based on the assembly rules, determine the second field with associated logic within the first field;
[0187] Based on the second field, multiple data templates are assembled.
[0188] In one possible design, the assembly processing module 14 is specifically used for,
[0189] Within multiple data templates, determine multiple values of the first field corresponding to the second field based on the second field;
[0190] Based on multiple first field values and multiple data templates, a first data set corresponding to the multiple first field values is determined, and the first field values corresponding to the second field values within the first data set are the same;
[0191] Based on the second field and the first data set, multiple data templates are assembled.
[0192] In one possible design, the assembly processing module 14 is specifically used for,
[0193] Within multiple data templates, determine multiple sub-data sets corresponding to the value of the first field;
[0194] Multiple sub-data sets are merged to obtain the first data set corresponding to the first field value.
[0195] The data query device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0196] Figure 6 This is a schematic diagram of another data query device provided in an embodiment of this application. Please refer to... Figure 6 The data query device 10 also includes a generation module 16 and an update module 17, wherein,
[0197] The generation module 16 is used to obtain multiple third fields corresponding to the target data set;
[0198] Determine multiple degrees of association between multiple third fields;
[0199] Based on multiple correlation degrees, multiple target fields are determined, and the correlation degree between the multiple target fields is less than or equal to a first preset value;
[0200] Based on multiple target fields, determine the fields to be supplemented corresponding to the target fields. These fields are used to supplement the relationships between the multiple target fields.
[0201] Generate data supplementation suggestions based on the fields to be supplemented.
[0202] In one possible design, the generation module 16 is specifically used for,
[0203] Multiple target fields are input into a first model, which is used to predict the fields associated with the input fields based on the input fields.
[0204] Obtain at least one predicted field from the first model;
[0205] Determine the correlation between at least one prediction field and multiple target fields;
[0206] Identify the field to be supplemented within at least one prediction field, where the field to be supplemented has the highest correlation with multiple target fields.
[0207] The update module 17 is used to obtain the user's historical query results for a historical period.
[0208] Based on historical query results, determine multiple historical filtering conditions corresponding to the historical query results;
[0209] Based on the data query request, determine the data filtering conditions corresponding to the data query request. The data filtering conditions are used to filter data within multiple data systems.
[0210] When there is a historical filtering condition among multiple historical filtering conditions that has a similarity to the data filtering condition greater than or equal to the second preset value, the target filtering condition with the highest similarity to the data filtering condition is determined among the multiple historical filtering conditions, and the target historical query result corresponding to the target filtering condition is determined.
[0211] Determine the distinguishing criteria between the data filtering criteria and the target filtering criteria; the distinguishing criteria are data filtering criteria but not target filtering criteria.
[0212] Based on the distinguishing conditions, the target historical query results are updated to obtain the data query results.
[0213] The data query device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0214] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 20 may include: a transceiver 21, a processor 22, and a memory 23.
[0215] Processor 22 executes computer execution instructions stored in memory, causing processor 22 to perform the scheme in the above embodiments. Processor 22 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0216] The memory 23 is connected to the processor 22 via the system bus and completes communication between them. The memory 23 is used to store computer program instructions.
[0217] Transceiver 21 can be used to obtain the task to be run and the configuration information of the task to be run.
[0218] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0219] The electronic device provided in this application embodiment can be the terminal device described in the above embodiments.
[0220] This application also provides a chip for executing instructions, which is used to execute the data query method described in the above embodiments.
[0221] This application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer performs the data query method described in the above embodiments.
[0222] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solution of the data query method in the above embodiments.
[0223] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0224] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0225] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0226] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0227] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0228] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0229] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0230] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0231] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic control unit or main control device.
[0232] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A data query method, characterized by, The method comprises the following steps: receiving a data query request of a user, the data query request being used for data query in a plurality of data systems, the data query request comprising identity information of the user; performing login verification in the plurality of data systems according to the identity information, and performing local cache processing on a plurality of original data corresponding to the plurality of data systems in response to the plurality of data system login verification passing; determining a plurality of data filtering conditions according to the data query request, and performing filtering processing on the plurality of original data according to the data filtering conditions to obtain a plurality of data templates after filtering; obtaining a predefined assembly rule, performing assembly processing on the plurality of data templates according to the assembly rule to obtain a target data set, and the assembly rule being used for indicating the association logic between fields; determining a data query result according to the target data set.
2. The method of claim 1, wherein, The assembly processing on the plurality of data templates according to the assembly rule comprises the following steps: obtaining a first field corresponding to the plurality of data templates; determining a second field with association logic in the first field according to the assembly rule; performing assembly processing on the plurality of data templates according to the second field.
3. The method of claim 2, wherein, The assembly processing on the plurality of data templates according to the second field comprises the following steps: determining a plurality of first field values corresponding to the second field in the plurality of data templates according to the second field; determining a first data set corresponding to the plurality of first field values according to the plurality of first field values and the plurality of data templates, the first field values corresponding to the second field in the first data set being the same; performing assembly processing on the plurality of data templates according to the second field and the first data set.
4. The method of claim 3, wherein, For any one first field value, determining a first data set corresponding to the plurality of first field values according to the plurality of first field values and the plurality of data templates comprises the following steps: determining a plurality of sub-data sets corresponding to the first field value in the plurality of data templates; merging the plurality of sub-data sets to obtain the first data set corresponding to the first field value.
5. The method according to any one of claims 1 to 4, characterized in that, After obtaining the target data set, the method further comprises the following steps: obtaining a plurality of third fields corresponding to the target data set; determining a plurality of association degrees between the plurality of third fields; determining a plurality of target fields according to the plurality of association degrees, the association degrees between the plurality of target fields being less than or equal to a first preset value; determining a to-be-supplemented field corresponding to the plurality of target fields according to the plurality of target fields, the to-be-supplemented field being used for supplementing the association between the plurality of target fields; generating a data supplement suggestion according to the to-be-supplemented field.
6. The method of claim 5, wherein, Determining the to-be-supplemented field corresponding to the plurality of target fields according to the plurality of target fields comprises the following steps: inputting the plurality of target fields into a first model, the first model being used for predicting a field associated with an input field according to the input field; obtaining at least one predicted field predicted by the first model; determining an association degree between the at least one predicted field and the plurality of target fields; Within the at least one prediction field, a field to be supplemented is determined, wherein the field to be supplemented has the highest correlation with the plurality of target fields.
7. The method according to any one of claims 1 to 4, characterized in that, After receiving the user's data query request, it also includes: Obtain the user's historical query results for the specified historical time period; Based on the historical query results, determine multiple historical filtering conditions corresponding to the historical query results; Based on the data query request, the data filtering conditions corresponding to the data query request are determined, and the data filtering conditions are used to filter data within the multiple data systems; When there is a historical filtering condition among the multiple historical filtering conditions that has a similarity to the data filtering condition that is greater than or equal to a second preset value, the target filtering condition that has the highest similarity to the data filtering condition is determined among the multiple historical filtering conditions, and the target historical query result corresponding to the target filtering condition is determined. Determine the distinguishing condition between the data filtering condition and the target filtering condition, wherein the distinguishing condition belongs to the data filtering condition but does not belong to the target filtering condition; Based on the distinguishing conditions, the target historical query results are updated to obtain the data query results.
8. A data query apparatus, characterized by comprising: include: The module comprises a receiving module, a buffering module, a filtering processing module, an assembly processing module, and a determining module. The receiving module is used to receive a user's data query request, the data query request being used to perform data queries within multiple data systems, and the data query request including the user's identity information; The caching module is used to perform login verification in the multiple data systems based on the identity information, and in response to the successful login verification in the multiple data systems, to perform local caching processing on multiple original data corresponding to the multiple data systems. The filtering processing module is used to determine multiple data filtering conditions according to the data query request, and to filter the multiple original data according to the data filtering conditions to obtain multiple filtered data templates. The assembly processing module is used to obtain predefined assembly rules, and to assemble the multiple data templates according to the assembly rules to obtain a target data set. The assembly rules are used to indicate the association logic between fields. The determining module is used to determine the data query results based on the target data set.
9. An electronic device, comprising: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.
11. A computer program product, characterised in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.