Data query method, device, computer equipment, storage medium and program product

By analyzing the model configuration data in the business data query request to determine the target parameter information, and directly querying the target data from the preset database, the problem of inefficient query of large-scale data sets is solved, and efficient and accurate data query is achieved.

CN119759966APending Publication Date: 2025-04-04BEIJING BAIJU YIXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411855506.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the case of large-scale data sets, the prior art leads to inefficient query by comparing the similarity between each historical data name and the target data name one by one.

Method used

By receiving a service data query request, the service data query information is determined, and the model configuration data is parsed to determine the target parameter information, including database instance, table name, row identification, and tag field name. Based on these parameters, query the target data from the preset database, clarify the scope of the target user profile data, including tag user profile data and business user profile data.

Benefits of technology

It realizes precise matching of required data, reduces interference from irrelevant data, narrows the query range, and improves query efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759966A_ABST
    Figure CN119759966A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a data query method, device, computer equipment, storage medium and program product. The method comprises: receiving a business data query request, and determining business data query information corresponding to the business data query request; in response to the business data query request, determining the locally stored model configuration data according to the business data query information; parsing the model configuration data, and determining the target parameter information; wherein the target parameter information comprises: at least one of a database instance, a table name, a row identifier and a label field name; determining the target class user portrait data from a preset database according to the target parameter information, and querying the target data from the target class user portrait data; wherein the target class user portrait data comprises: label class user portrait data or business class user portrait data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data query method, device, computer equipment, storage medium and program product. Background Art

[0002] In order to ensure the efficiency of data query and use, a widely used method is to match the target data name of the data to be called with the data name of each historical data contained in the database. The core of this method is to determine whether there is historical data in the database that matches the data to be called by comparing the similarity of the data names.

[0003] Specifically, when a certain data needs to be queried, the system will first obtain the target data name of the data to be called. Then, the system will traverse all the historical data in the database and compare the similarity between the historical data names of these data and the target data names one by one. When historical data that meets the preset data name similarity condition is found, the historical data is the data to be called, and it will be returned to the user or used for subsequent data processing.

[0004] However, when the database contains a large amount of historical data, it is necessary to compare the similarity of each historical data name with the target data name one by one until a match is found. This one-by-one comparison method is particularly time-consuming on large-scale data sets. Summary of the invention

[0005] In view of this, the present invention provides a data query method, apparatus, computer equipment, storage medium and program product.

[0006] In a first aspect, the present invention provides a data query method, the method comprising: receiving a business data query request, and determining business data query information corresponding to the business data query request; in response to the business data query request, determining locally stored model configuration data according to the business data query information; parsing the model configuration data, and determining target parameter information; wherein the target parameter information comprises: at least one of a database instance, a table name, a row ID, and a label field name; determining target class user portrait data from a preset database according to the target parameter information, and querying the target data from the target class user portrait data; wherein the target class user portrait data comprises: label class user portrait data or business class user portrait data.

[0007] The data query method provided in this embodiment can accurately match the required queried data and avoid interference from irrelevant data by determining the business data query information corresponding to the business data query request and parsing the model configuration data to determine the target parameter information.

[0008] In addition, the locally stored model configuration data is determined based on the business data query information. These model configuration data contain key parameter information required for the query, such as database instance, table name, row identifier, and label field name. These parameters directly point to the data to be queried, reducing unnecessary search scope.

[0009] In addition, the scope of target user portrait data is also clarified, including tag user portrait data and business user portrait data. This further narrows the scope of the query, making the query more accurate and efficient.

[0010] In one possible implementation, the process of building a preset database includes: obtaining historical user portrait data of a configuration center; splitting the historical user portrait data of the configuration center to obtain tag user portrait data and business user portrait data; storing the tag user portrait data and business user portrait data to obtain a preset database.

[0011] The data query method provided in this embodiment realizes centralized management of data by acquiring historical user portrait data from the configuration center, avoiding the problem of difficulty in unified management and analysis caused by data being scattered in multiple systems or data sources. In addition, the historical user portrait data is split into tag user portrait data and business user portrait data, making the data classification clearer and facilitating subsequent data analysis and application.

[0012] In one possible implementation, the method also includes: detecting whether the historical user portrait data of the configuration center has changed; if the historical user portrait data of the configuration center has changed, determining the target user portrait data, and determining the target class user portrait data corresponding to the target user portrait data; and updating the user portrait data corresponding to the target class user portrait data in a preset database according to the target class user portrait data.

[0013] The data query method provided in this embodiment can ensure that the user portrait data is updated in a timely manner by detecting the changes in the historical user portrait data of the configuration center in real time, thereby reflecting the latest status and preferences of the user. This mechanism helps to maintain the accuracy of the user portrait data and avoid decision-making errors caused by data lag. In addition, when the historical user portrait data changes, the system can determine the target user portrait data and its corresponding class user portrait data, which helps to more accurately identify user groups and individual characteristics.

[0014] In one possible implementation, in response to a business data query request, locally stored model configuration data is determined based on the business data query information, including: in response to the business data query request, detecting whether there is business data corresponding to the business data query information in the cache; if there is no business data corresponding to the business data query information in the cache, determining the locally stored model configuration data based on the business data query information.

[0015] In the data query method provided in this embodiment, the cache can be located in the memory, and its access speed is much faster than disk storage. By first checking whether the required business data exists in the cache, the query request can be quickly satisfied and the query latency can be reduced. When the cache hits, the data in the cache can be returned directly without accessing the local storage or database, thereby significantly improving the query efficiency. When the cache misses, it is necessary to access the local storage to obtain the model configuration data. This method reduces unnecessary disk I / O operations and reduces the consumption of system resources.

[0016] In a possible implementation, the method further includes: if the business data corresponding to the business data query information exists in the cache, extracting the business data corresponding to the business data query information from the cache.

[0017] In the data query method provided in this embodiment, the cache can be located in the memory, and its access speed is much faster than disk storage. By first checking whether the required business data exists in the cache, the query request can be quickly satisfied, reducing the query delay. When the cache hits, the data in the cache can be directly returned without accessing the local storage or database, thereby significantly improving the query efficiency.

[0018] In a second aspect, the present invention provides a data query device, which includes: a receiving module, used to receive a business data query request, and determine the business data query information corresponding to the business data query request; a first determination module, used to respond to the business data query request, and determine the locally stored model configuration data according to the business data query information; a second determination module, used to parse the model configuration data and determine the target parameter information; wherein the target parameter information includes: at least one of a database instance, a table name, a row ID, and a label field name; a query module, used to determine the target class user portrait data from a preset database according to the target parameter information, and query the target data from the target class user portrait data; wherein the target class user portrait data includes: label class user portrait data or business class user portrait data.

[0019] In one possible implementation, the device also includes: an acquisition module for acquiring historical user portrait data of the configuration center; a splitting module for splitting the historical user portrait data of the configuration center to obtain tag user portrait data and business user portrait data; and a storage module for storing the tag user portrait data and business user portrait data to obtain a preset database.

[0020] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data query method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data query method of the first aspect or any corresponding embodiment thereof.

[0022] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data query method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 is a flow chart of a data query method according to an embodiment of the present invention;

[0025] Figure 2 is a schematic diagram of a data query method according to an embodiment of the present invention;

[0026] Figure 3 is a structural block diagram of a data query device according to an embodiment of the present invention;

[0027] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0029] Based on relevant technologies, in order to ensure the efficiency of data query and use, a widely used method is to match the target data name of the data to be called with the data name of each historical data contained in the database. The core of this method is to determine whether there is historical data in the database that matches the data to be called by comparing the similarity of the data names.

[0030] Specifically, when a certain data needs to be queried, the system will first obtain the target data name of the data to be called. Then, the system will traverse all the historical data in the database and compare the similarity between the historical data names of these data and the target data names one by one. When historical data that meets the preset data name similarity condition is found, the historical data is the data to be called, and it will be returned to the user or used for subsequent data processing.

[0031] However, when the database contains a large amount of historical data, it is necessary to compare the similarity of each historical data name with the target data name one by one until a match is found. This one-by-one comparison method is particularly time-consuming on large-scale data sets.

[0032] Based on this, the present invention provides a data query method, which can accurately match the required query data and avoid interference from irrelevant data by determining the business data query information corresponding to the business data query request and parsing the model configuration data to determine the target parameter information.

[0033] In addition, the locally stored model configuration data is determined based on the business data query information. These model configuration data contain key parameter information required for the query, such as database instance, table name, row identifier, and label field name. These parameters directly point to the data to be queried, reducing unnecessary search scope.

[0034] In addition, the scope of target user portrait data is also clarified, including tag user portrait data and business user portrait data. This further narrows the scope of the query, making the query more accurate and efficient.

[0035] According to an embodiment of the present invention, a data query method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] In this embodiment, a data query method is provided, which can be used in computer devices, such as computers, servers, etc. Figure 1 is a flow chart of a data query method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0037] Step S101: receiving a business data query request and determining business data query information corresponding to the business data query request.

[0038] The business data query request may be a request initiated by a user or a system to obtain specific business data, and may specifically include specific conditions or requirements for the query.

[0039] As an example, a business data query request may include: a user profile of the query, a time range of the query, a tag of the query, etc., which are not specifically limited here.

[0040] It should be noted that the query time range can be a single time (such as March 15, 2022) or a range value (such as 5:00 to 18:00 on March 15, 2022), etc., and no specific limitation is made here.

[0041] Business data query information can represent specific information extracted from business data query requests and used to guide subsequent query operations, such as user portraits, time ranges, tags, etc.

[0042] Specifically, the system receives a business data query request initiated by a user or other system, and extracts specific query conditions or requirements from the request to form business data query information.

[0043] As an example, a business data query request may be received through an API interface, and the business data query request may be parsed to obtain business data query information.

[0044] As an example, the query conditions input by the user can be received through the front-end page and converted into business data query information. For example, the user enters "query information of users who have purchased more than 5 times in the past week" through the front-end page, and the system receives and parses the request to form business data query information.

[0045] Step S102, in response to the business data query request, determining the locally stored model configuration data according to the business data query information.

[0046] Model configuration data may be pre-configured rules and parameters for guiding how to extract data from a database, and may include database connection information, query logic, etc.

[0047] Specifically, the system searches for matching configuration information in the locally stored model configuration data based on the business data query information.

[0048] As an example, matching model configuration data can be found by querying the configuration table in the database or file system. For example, according to the business data query information "user information with more than 5 purchases in the past week", the corresponding database connection information and query logic are found in the model configuration data.

[0049] Step S103, parsing the model configuration data to determine target parameter information; wherein the target parameter information includes: at least one of a database instance, a table name, a row identifier, and a label field name.

[0050] The target parameter information may be a parameter parsed from the model configuration data and used to specifically execute the query operation, such as a database instance, table name, row identifier, and label field name.

[0051] Specifically, the model configuration data is parsed to extract target parameter information such as specific database instances, table names, row identifiers, and label field names.

[0052] As an example, for configuration data in JSON format, you can use parsing libraries such as json (Python standard library) and jackson (Java library). For configuration data in XML format, you can use parsing libraries such as xml.etree.ElementTree (Python standard library), DOM or SAX (Java API). If the configuration data is not in standard JSON or XML format, or contains specific business logic, you may need to write custom parsing logic to extract target parameter information.

[0053] It should be noted that the database instance refers to the name or identifier of the database server to be connected. Specifically, it may include the IP address, port number, database type (such as MySQL, PostgreSQL, etc.) of the database server, and any other information required for the connection.

[0054] The table name refers to the name of the table in the database to be queried. The table name is related to business logic and stores a specific type of data.

[0055] Row identifiers refer to the conditions or rules used to filter rows. Specifically, they can include the value or value range of one or more fields, as well as the logical relationship between these fields (such as AND, OR). Row identifiers are used to determine which rows meet the query requirements and should be included in the result set.

[0056] The label field name refers to the name of the field in the table used to identify or classify data. The label field name is used to extract specific data columns, which can contain user attributes, event information, or other useful business data.

[0057] Step S104, determining target user portrait data from a preset database according to the target parameter information, and querying target data from the target user portrait data; wherein the target user portrait data includes: tag user portrait data or business user portrait data.

[0058] The target user portrait data can be user portrait data constructed based on user behavior, attributes and other information. It can be tag user portrait data (data based on user tags) or business user portrait data (data based on business logic and user behavior). Specifically, after determining the target parameter information, the target user portrait data corresponding to the target parameter information is determined in the preset database, which can be tag user portrait data or business user portrait data, and then the target data corresponding to the target parameter information is queried from the target user portrait data. For example: based on the target parameter information "database instance: DB1, table name: user_behavior, row identifier: purchase_count>5", the system queries the preset database for user portrait data that meets the conditions, which is business user portrait data, and extracts the target data from the business user portrait data: "The user with user ID 12345 purchased 6 items in the past week."

[0059] The data query method provided in this embodiment can accurately match the required queried data and avoid interference from irrelevant data by determining the business data query information corresponding to the business data query request and parsing the model configuration data to determine the target parameter information.

[0060] In addition, the locally stored model configuration data is determined based on the business data query information. These model configuration data contain key parameter information required for the query, such as database instance, table name, row identifier, and label field name. These parameters directly point to the data to be queried, reducing unnecessary search scope.

[0061] In addition, the scope of target user portrait data is also clarified, including tag user portrait data and business user portrait data. This further narrows the scope of the query, making the query more accurate and efficient.

[0062] In a possible implementation, the process of building a preset database includes:

[0063] Step a1, obtain historical user portrait data from the configuration center.

[0064] The configuration center can be a system or service that centrally manages and distributes configuration information. It allows applications or services to obtain configuration data from a single source without hard-coding these configurations in each instance. The configuration center can be used to manage environment-specific configurations, such as database connection information, API keys, feature flags, etc. Among them, the configuration center can be deployed by the cloud. Historical user profile data can be user data collected at a certain point in time or time period in the past, which is used to build user profiles. User profiles can include information such as user attributes, behaviors, preferences, etc.

[0065] Specifically, historical user profile data is retrieved from the configuration center. This may involve sending a request to the configuration center to obtain the user profile data stored therein. For example, the configuration center is a REST API service, and an HTTP GET request may be used to obtain historical user profile data.

[0066] Step a2, split the historical user portrait data of the configuration center to obtain tag user portrait data and business user portrait data.

[0067] Tag-based user portrait data: Tags in user portraits can be divided into multiple types, such as driver information (age, gender, geographic location), vehicle information, order completion information, etc. Each type of tag can be stored and processed separately according to its characteristics, so that relevant tags can be located more quickly during queries, improving query efficiency. Business-based user portrait data: Different business scenarios may require different user portrait data. For example, marketing activities may focus more on the driver's vehicle dispatch and order completion, while customer service may be more concerned with the driver's completion of the course. Therefore, classifying and managing user portrait tags according to different business needs will help improve the pertinence and efficiency of data use.

[0068] The acquired historical user portrait data is divided into tag user portrait data and business user portrait data. Specifically, the data can be classified and filtered.

[0069] As an example, retrieve the complete historical user portrait dataset from the configuration center. It may exist in a structured (such as JSON, CSV) or unstructured (such as a text file) form. Before splitting, you need to understand the fields in the dataset and what they represent. This includes identifying which fields belong to tag information (such as the user's basic attributes, interest preferences, etc.) and which fields belong to business information (such as the user's purchase records, access behavior, etc.). According to the results of data understanding, the fields in the data set are divided into two categories: tag fields and business fields. Tag fields can contain static attributes of users, such as age, gender, geographic location, interests and hobbies, etc. These attributes can be used for user classification and segmentation. Business fields contain dynamic information related to user behavior or business, such as purchase history, visit frequency, engagement, etc. This information is essential for understanding user behavior and optimizing business strategies. According to the classification results, the data set is split into two parts: one part contains tag fields to form tag user portrait data; the other part contains business fields to form business user portrait data. Splitting can be achieved through programming, using scripts or data processing functions in programming languages ​​to traverse the data set and assign data to different sets according to the field classification results. After the split is completed, the split data needs to be verified to ensure the accuracy and completeness of the data. This includes checking whether the split data set contains all the fields in the original data set and whether the data type and value of each field are correct.

[0070] Step a3, storing the tag user portrait data and the business user portrait data to obtain a preset database.

[0071] The split tag user portrait data and business user portrait data are stored in a preset database or data warehouse for subsequent analysis and use.

[0072] The data query method provided in this embodiment realizes centralized management of data by acquiring historical user portrait data from the configuration center, avoiding the problem of difficulty in unified management and analysis caused by data being scattered in multiple systems or data sources. In addition, the historical user portrait data is split into tag user portrait data and business user portrait data, making the data classification clearer and facilitating subsequent data analysis and application.

[0073] In a possible implementation, the method further includes:

[0074] Step b1, check whether the historical user profile data in the configuration center has changed.

[0075] Regularly check the historical user profile data in the configuration center and compare it with the data from the last check to detect any changes.

[0076] As an example, a timestamp is added to each updated historical user portrait data, and whether the data has changed is determined by comparing the timestamps.

[0077] As an example, add a version number to historical user portrait data, increment the version number each time it is updated, and determine whether the data has changed by comparing the version numbers.

[0078] As an example, you can configure a listener to listen to configuration change events. When a configuration change is detected, the latest configuration information is automatically pulled from the configuration center and updated to the configuration object in memory.

[0079] As an example, the historical user profile data in the configuration center can be hashed regularly, and the generated hash value can be compared with the last saved hash value. If they are different, it means that the data has changed.

[0080] Step b2: If the historical user portrait data of the configuration center changes, the target user portrait data is determined, and the target class user portrait data corresponding to the target user portrait data is determined.

[0081] After detecting data changes, the target user portrait data that needs to be updated is determined from the changed data according to business logic or data classification standards, and the target class user portrait data (label class or business class) that needs to be updated is further determined.

[0082] As an example, a machine learning model is used to analyze the changing data to determine which data is the target user portrait data that needs to be updated, and further classified into target class user portrait data.

[0083] As an example, using rule matching, the system can set rules such as "If the user's interest preferences change, update the tag user profile data; if the user's purchase record changes, update the business user profile data." When data changes are detected, the system determines the target user profile data and target category user profile data based on these rules.

[0084] Step b3: updating the user portrait data corresponding to the target user portrait data in the preset database according to the target user portrait data.

[0085] The changed target user portrait data is updated to the records corresponding to the target user portrait data in the preset database.

[0086] As an example, according to the unique identifier (such as user ID) of the target user portrait data, directly find the corresponding record in the preset database and update it. For example: first, according to the user ID of the target user portrait data, find the corresponding record in the preset database, and then update the changed data to these records. If the change is the tag user portrait data, update the tag field; if the change is the business user portrait data, update the business field.

[0087] As an example, if the amount of changed data is large, a batch update method can be used to reduce the number of database operations and improve update efficiency.

[0088] The data query method provided in this embodiment can ensure that the user portrait data is updated in a timely manner by detecting the changes in the historical user portrait data of the configuration center in real time, thereby reflecting the latest status and preferences of the user. This mechanism helps to maintain the accuracy of the user portrait data and avoid decision-making errors caused by data lag. In addition, when the historical user portrait data changes, the system can determine the target user portrait data and its corresponding class user portrait data, which helps to more accurately identify user groups and individual characteristics.

[0089] In a possible implementation, the above step S102 includes:

[0090] Step c1, in response to a business data query request, detecting whether there is business data corresponding to the business data query information in the cache.

[0091] A cache may be a high-speed data storage mechanism for temporarily storing recently accessed or frequently accessed data to reduce the number of accesses to the original data storage (eg, a database), thereby increasing the data access speed.

[0092] Specifically, when receiving a business data query request, the system first checks whether the business data matching the query information has been stored in the cache. If there is matching data in the cache, the data can be directly returned to reduce the access to the backend storage.

[0093] As an example, a hash table may be used to store cached data, and the data in the cache may be quickly located by calculating the hash value of the query information.

[0094] As an example, cache data may be stored in the form of a key-value pair, where the key is a unique identifier of the query information and the value is the corresponding business data.

[0095] Step c2: if the business data corresponding to the business data query information does not exist in the cache, determine the locally stored model configuration data according to the business data query information.

[0096] If there is no business data matching the query information in the cache, the system needs to determine how to access the data in the local storage based on the query information. This usually involves parsing the query information to identify the required data type and range, and then finding or building the corresponding data model configuration data based on this information. For example: a user requests to query the inventory information of a specific product. If the inventory data of the product does not exist in the cache, the system can parse the query information to identify key information such as product ID and inventory status. The system can then find the corresponding data model configuration data (such as the structure definition and index configuration of the product inventory table) in the local storage based on this information, so as to correctly access and return the required data.

[0097] In the data query method provided in this embodiment, the cache can be located in the memory, and its access speed is much faster than disk storage. By first checking whether the required business data exists in the cache, the query request can be quickly satisfied and the query latency can be reduced. When the cache hits, the data in the cache can be returned directly without accessing the local storage or database, thereby significantly improving the query efficiency. When the cache misses, it is necessary to access the local storage to obtain the model configuration data. This method reduces unnecessary disk I / O operations and reduces the consumption of system resources.

[0098] In a possible implementation, the method further includes: if the business data corresponding to the business data query information exists in the cache, extracting the business data corresponding to the business data query information from the cache.

[0099] When the system detects that there is business data in the cache that fully matches the business data query information or meets the query conditions, the next step is to extract this data from the cache. This means that the system will read the corresponding data block from the cache storage location and prepare it in a format that can be returned to the requester.

[0100] As an example, if the cache is stored in the form of a simple key-value pair, the system can directly read the corresponding value (i.e., business data) based on the key (or unique identifier) ​​of the query information. For hash tables or similar data structures, the system can use a hash function to calculate the hash value of the query information and use the hash value as an index to directly access the data in the cache. For example: a user requests to query the account balance of a specific user. The system first checks the cache and finds that there is an entry that matches the user ID. At this point, the system will extract the value of the entry (i.e., the user's account balance) from the cache and return it to the user as a query result. If the data in the cache is stored in JSON format, the system may need to first deserialize the JSON string into an object or data structure, and then extract the value of the account balance from it.

[0101] In the data query method provided in this embodiment, the cache can be located in the memory, and its access speed is much faster than disk storage. By first checking whether the required business data exists in the cache, the query request can be quickly satisfied, reducing the query delay. When the cache hits, the data in the cache can be directly returned without accessing the local storage or database, thereby significantly improving the query efficiency.

[0102] Please refer to Figure 2 , Figure 2 is a schematic diagram of a data query method provided according to an embodiment of the present invention. In a possible implementation, the business party initiates a request for data query or tag query through an RPC interface or a front-end page. The business party's request is first sent to a tag query service, which retrieves relevant data from storage such as Redis or HBase according to the tag or condition in the request. During the entire request processing process, the cloud control component is responsible for monitoring and managing the operating status of the system to ensure the normal operation of each component. If the request involves complex data processing or analysis, the system may use model configuration information to guide the data processing process. This configuration information may be stored in Redis or a database, and parsed and applied by the component that parses the model configuration information. When processing data, the system may use data date tags to distinguish data at different time points for historical data analysis or time series analysis. For frequently accessed data, the system may store it in a cache such as Redis to increase data access speed. When the business party initiates a data query request, the system will first try to obtain data from the cache. For requests that require complex calculations or historical data analysis, the system may assign tasks to data warehouse data tasks or data offline computing tasks for processing. These tasks may run in the background and update the results periodically. The system receives real-time events or message streams through message queues such as Order MQ and Financial MQ, and processes them using real-time statistical services and real-time data computing tasks. These services can update data status in real time and provide the latest data analysis results. During the processing, the system may use data synchronization components to synchronize data from caches such as Redis to persistent storage such as HBase to ensure data reliability and persistence. Finally, the system returns the processing results to the business party, who can perform corresponding operations or display them based on the results.

[0103] In the present embodiment, a data query device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0104] This embodiment provides a data query device, such as Figure 3 As shown, it includes: a receiving module 301, which is used to receive a business data query request and determine the business data query information corresponding to the business data query request; a first determining module 302, which is used to respond to the business data query request and determine the locally stored model configuration data according to the business data query information; a second determining module 303, which is used to parse the model configuration data and determine the target parameter information; wherein the target parameter information includes: at least one of a database instance, a table name, a row identifier and a label field name; a query module 304, which is used to determine the target class user portrait data from the preset database according to the target parameter information, and query the target data from the target class user portrait data; wherein the target class user portrait data includes: label class user portrait data or business class user portrait data.

[0105] In one possible implementation, the device also includes: an acquisition module for acquiring historical user portrait data of the configuration center; a splitting module for splitting the historical user portrait data of the configuration center to obtain tag user portrait data and business user portrait data; and a storage module for storing the tag user portrait data and business user portrait data to obtain a preset database.

[0106] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0107] The data query device in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0108] The embodiment of the present invention also provides a computer device having the above Figure 3 The data query device shown.

[0109] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.

[0110] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0111] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0112] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0113] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0114] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0115] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0116] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0117] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data query method, characterized in that: The method comprises: Receive a business data query request and determine business data query information corresponding to the business data query request; In response to a business data query request, determining locally stored model configuration data according to the business data query information; Parsing the model configuration data to determine target parameter information; wherein the target parameter information includes: at least one of a database instance, a table name, a row identifier, and a label field name; According to the target parameter information, target user portrait data is determined from a preset database, and target data is queried from the target user portrait data; wherein the target user portrait data includes: tag user portrait data or business user portrait data.

2. The data query method according to claim 1, characterized in that: The process of building a preset database includes: Obtain historical user profile data from the configuration center; Splitting the historical user portrait data of the configuration center to obtain tag user portrait data and business user portrait data; The tag user portrait data and business user portrait data are stored to obtain a preset database.

3. The data query method according to claim 2, characterized in that: The method further comprises: Check whether the historical user profile data in the configuration center has changed; If the historical user portrait data of the configuration center changes, determine the target user portrait data, and determine the target class user portrait data corresponding to the target user portrait data; The user portrait data corresponding to the target user portrait data in the preset database is updated according to the target user portrait data.

4. The data query method according to claim 1, characterized in that: The step of responding to the business data query request and determining the locally stored model configuration data according to the business data query information includes: In response to the business data query request, detecting whether there is business data corresponding to the business data query information in the cache; If the business data corresponding to the business data query information does not exist in the cache, the locally stored model configuration data is determined according to the business data query information.

5. The data query method according to claim 4, characterized in that: The method further comprises: If the business data corresponding to the business data query information exists in the cache, the business data corresponding to the business data query information is extracted from the cache.

6. A data query device, characterized in that: The device comprises: A receiving module, used to receive a business data query request and determine the business data query information corresponding to the business data query request; A first determination module, configured to respond to a business data query request and determine locally stored model configuration data according to the business data query information; A second determination module is used to parse the model configuration data and determine target parameter information; wherein the target parameter information includes: at least one of a database instance, a table name, a row identifier, and a label field name; A query module is used to determine target user portrait data from a preset database according to the target parameter information, and query target data from the target user portrait data; wherein the target user portrait data includes: tag user portrait data or business user portrait data.

7. The data query device according to claim 6, characterized in that: The device also includes: The acquisition module is used to obtain historical user profile data from the configuration center; A splitting module is used to split the historical user portrait data of the configuration center to obtain tag user portrait data and business user portrait data; The storage module is used to store the tag user portrait data and the business user portrait data to obtain a preset database.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data query method according to any one of claims 1 to 5 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data query method according to any one of claims 1 to 5.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the data query method according to any one of claims 1 to 5.