Data query method and device, computer equipment and storage medium

Through the method of dividing order data and summarizing the expected access frequency, the data query sequence is optimized, and the problem of low resource replacement data query efficiency is solved, and the time and computing power are reduced and query efficiency is improved.

CN119003619AInactive Publication Date: 2024-11-22CHINA SOUTHERN POWER GRID INTERNET SERVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411182490.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

As the scale of network resource substitution expands, the efficiency of resource substitution data query decreases, resulting in an increase in query time and computing power consumption.

Method used

By dividing order data, generating data sets, and summarizing the data query table according to the expected access frequency, optimizing the query order to improve query efficiency.

Benefits of technology

It effectively reduces the time and computing power required for data query and improves query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003619A_ABST
    Figure CN119003619A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data query, in particular to a data query method and device, computer equipment and a storage medium. The method comprises the steps of performing data division on order data of at least one target order to obtain at least one divided data set and a data query table corresponding to each data set; wherein the data query table records a data identifier of each piece of order data in the data set; summarizing each data query table based on the predicted access frequency corresponding to each data set to obtain a target query table; and according to the target query table, performing data query on the to-be-queried data in each data set. According to the method and the device, the time and the computing power required for performing data query on the order data of each target order are effectively reduced through the target query table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data query, and in particular to a data query method, apparatus, computer equipment and storage medium. Background Art

[0002] As network technology continues to develop, the scale of network resource exchange is also expanding; users can select items in applications to achieve resource exchange for items (for example, internal employees of an enterprise can select items in internal applications).

[0003] However, with the increasing number of users participating in resource exchange and the amount of resource exchange, more and more resource exchange data are generated in the process of resource exchange. When it is necessary to query the resource exchange data, it often takes a lot of time, affecting the efficiency of data query. Summary of the invention

[0004] Based on this, it is necessary to provide a data query method, device, computer equipment and storage medium that can improve data query efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a data query method. The method comprises:

[0006] Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set;

[0007] Aggregating the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table;

[0008] According to the target query table, data query is performed on the data to be queried in each data set.

[0009] In one embodiment, the estimated access frequency corresponding to the data set is determined in the following manner:

[0010] Determining a first access frequency of each historical data according to query records of at least two historical data;

[0011] According to the first access frequency of each of the historical data, the access frequency of the data set is predicted to obtain the estimated access frequency corresponding to the data set.

[0012] In one embodiment, predicting the access frequency of each data set according to the first access frequency of each historical data to obtain the estimated access frequency corresponding to each data set includes:

[0013] Determining second access frequencies corresponding to different data types according to the first access frequencies of each of the historical data and the data types of each of the historical data;

[0014] According to the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to different data types, the access frequency of each data set is predicted to obtain the expected access frequency corresponding to each data set.

[0015] In one embodiment, the data division of the order data of at least one target order to obtain at least one data set after division includes:

[0016] Determine a set type corresponding to each data set, and a set subtype corresponding to each set type;

[0017] Dividing the order data according to each of the set types to obtain at least one candidate set after the division;

[0018] According to each of the set subtypes, data is divided for each of the candidate sets to obtain at least one divided data set.

[0019] In one embodiment, order data of the same target order belongs to the same data set.

[0020] In one embodiment, the data query tables are aggregated based on the expected access frequencies corresponding to the data sets to obtain a target query table, including:

[0021] Determining the arrangement position of each data set in the target query table based on the expected access frequency corresponding to each data set;

[0022] According to the arrangement position of each data set, each data query table is aggregated to obtain a target query table.

[0023] In a second aspect, the present application also provides a data query device. The device comprises:

[0024] A partitioning module, used to partition the order data of at least one target order to obtain at least one data set after partitioning, and a data query table corresponding to each data set; wherein the data query table records the data identifier of each order data in the data set;

[0025] A summarizing module, used for summarizing the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table;

[0026] The query module is used to perform data query on the query data in each data set according to the target query table.

[0027] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0028] Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set;

[0029] Aggregating the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table;

[0030] According to the target query table, data query is performed on the data to be queried in each data set.

[0031] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0032] Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set;

[0033] Aggregating the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table;

[0034] According to the target query table, data query is performed on the data to be queried in each data set.

[0035] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0036] Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set;

[0037] Aggregating the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table;

[0038] According to the target query table, data query is performed on the data to be queried in each data set.

[0039] The above-mentioned data query method, device, computer equipment and storage medium divide the order data of at least one target order to obtain at least one data set after division, and summarize the data query tables corresponding to each data set according to the expected access frequency corresponding to each data set to obtain the target query table, and then, according to the target query table, perform data query on the data to be queried in each data set. According to the above content, it can be seen that when the present application performs data query on the order data, it does not directly perform data query on the order data of each target order, but first divides the order data of each target order, and performs data query on the data to be queried in each data set according to the target query table corresponding to each data set; compared with the process of directly performing data query on the order data of each target order in the prior art, the present application not only effectively reduces the time and computing power required for data query on the order data of each target order through the target query table, but also, the target query table in the present application summarizes the data query tables according to the expected access frequency corresponding to each data set, therefore, the target query table in the present application can further reduce the time and computing power required for data query on the data to be queried, and improves the query efficiency for the data to be queried. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 An application environment diagram of a data query method provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of a first data query method provided in an embodiment of the present application;

[0042] Figure 3 A flow chart of a data query method provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of a second data query method provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of a third data query method provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of a fourth data query method provided in an embodiment of the present application;

[0046] Figure 7 A structural block diagram of a first data query device provided in an embodiment of the present application;

[0047] Figure 8FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. In the description of the present application, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms is not necessarily for the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradicting each other.

[0050] The data query method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. By dividing the order data of at least one target order, at least one data set after division is obtained, and according to the expected access frequency corresponding to each data set, the data query table corresponding to each data set is summarized and processed to obtain the target query table, and then, according to the target query table, the data to be queried is queried in each data set. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0051] In one embodiment, Figure 2 As shown, a data query method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:

[0052] S201, performing data partitioning on the order data of at least one target order to obtain at least one data set after the partitioning, and a data query table corresponding to each data set.

[0053] The data query table records the data identifier of each order data in the data set. Further, the data identifier refers to the unique identity identifier corresponding to each order data, and the data identifier of a certain order data can also be used to distinguish the order data from other order data.

[0054] It should be noted that when it is necessary to partition the order data of at least one target order, partition rules for the order data can be pre-specified to partition the order data of at least one target order according to the partition rules to obtain at least one data set after partitioning.

[0055] The partitioning rules record the common attributes of the data including the order data in each data set.

[0056] In one embodiment of the present application, the division rules may be recorded as follows: the order data of each target order is divided into three data sets according to the date, and the three data sets are respectively data set 1, data set 2 and data set 3; wherein, the order data contained in data set 1 are all order data of target orders with order signing time in the morning, the order data contained in data set 2 are all order data of target orders with order signing time in the afternoon, and the order data contained in data set 3 are all order data of target orders with order signing time in the night; therefore, the common attribute of the data corresponding to data set 1 is "target orders with order signing time in the morning"; the common attribute of the data corresponding to data set 2 is "target orders with order signing time in the afternoon"; and the common attribute of the data corresponding to data set 3 is "target orders with order signing time at night".

[0057] To further explain, when it is necessary to determine the data query table corresponding to each data set, since the data query table records the data identifier of each order data in the data set, the data identifier of each order data contained in each data set can be extracted; the data identifier of each order data is integrated in the same query table, and the data query table corresponding to the data set can be obtained.

[0058] S202 , summarizing and processing each data query table based on the expected access frequency corresponding to each data set to obtain a target query table.

[0059] It should be noted that when subsequently performing data queries on the target query table, at least one data identifier contained in the target query table can be traversed and queried in order from first to last. Therefore, in order to further improve the efficiency of data queries on the data to be queried, the data query tables corresponding to each data set can be concatenated and aggregated in order from high to low according to the expected access frequencies corresponding to each data set, so that the data query tables corresponding to the data sets with higher expected access frequencies can be located at the front of the target query table, and the data query tables corresponding to the data sets with lower expected access frequencies can be located at the back of the target query table, thereby further improving the query efficiency of data queries on the data to be queried.

[0060] To further illustrate, when it is necessary to predict the access frequency of each data set to obtain the expected access frequency corresponding to each data set, historical data of at least one historical order can be obtained, and the historical access frequency corresponding to each historical data can be determined; then, based on the historical access frequency corresponding to each historical data, the access frequency of each data set is predicted to obtain the expected access frequency corresponding to each data set.

[0061] In one embodiment of the present application, when it is necessary to determine the expected access frequency corresponding to each data set, the reference data with the greatest similarity to each data set can be determined from each historical data, and then the historical access frequency corresponding to the reference data is used as the expected access frequency corresponding to each data set; specifically, for a certain data set, when it is necessary to determine the historical access frequency corresponding to the data set, the data similarity is judged between the data set and each historical data to obtain the similarity of each historical data to the data set; and then the historical access frequency of the historical data with the greatest similarity to the data set is used as the expected access frequency of the data set.

[0062] Furthermore, when it is necessary to determine the data similarity between a data set and certain historical data, the data similarity can be calculated between the historical data and each order data contained in the data set; after obtaining the similarity corresponding to each order data, the similarity corresponding to each order data is averaged, and the result of the calculation is the data similarity between the data set and the historical data.

[0063] In another embodiment of the present application, each data set can be input into a pre-trained access frequency prediction model so that the access frequency prediction model predicts the access frequency of each data set to obtain an output result of the access frequency prediction model, which is the expected access frequency corresponding to each data set.

[0064] Among them, the training process of the access frequency prediction model includes: obtaining at least one sample order data, dividing each sample order data, and obtaining at least one sample set after division; and annotating each sample set with the expected access frequency through manual labeling, and then, training the initial model through the sample set annotated with the expected access frequency to obtain the trained access frequency prediction model.

[0065] The initial model may be selected according to actual conditions, and the model type of the initial model is not limited herein.

[0066] S203: performing data query on the data to be queried in each data set according to the target query table.

[0067] It should be noted that when it is necessary to perform data query on the data to be queried in each data set according to the target query table, the order of the data identifiers recorded in the target query table can be used to determine whether they are the same as the queried identifier of the data to be queried. If they are the same, the data set corresponding to the data identifier recorded in the target query table and the data position of the order data in the data set can be used to implement the data query operation on the data to be queried.

[0068] In one embodiment of the present application, Figure 3 As shown, at least one MySQL (relational database management system) database can be partitioned to obtain at least one data set after the partition, and a data query table corresponding to each data set; an ElasticSearch (a search and analysis engine based on Lucene) cluster is built, and each data set is synchronized with the ElasticSearch cluster through cloudcancal (a data synchronization tool); thereby caching each data set in the ElasticSearch cluster, and, in this case, the target query table is obtained by processing each data query table with custom code, and is updated to a wide table of the ElasticSearch cluster, so as to implement data query operations for the data to be queried in each data set according to the target query table.

[0069] The above data query method divides the order data of at least one target order to obtain at least one data set after division, and summarizes the data query tables corresponding to each data set according to the expected access frequency corresponding to each data set to obtain the target query table, and then, according to the target query table, performs data query on the data to be queried in each data set. According to the above content, it can be seen that when the present application performs data query on the order data, it does not directly perform data query on the order data of each target order, but first divides the order data of each target order, and performs data query on the data to be queried in each data set according to the target query table corresponding to each data set; compared with the process of directly performing data query on the order data of each target order in the prior art, the present application not only effectively reduces the time and computing power required for data query on the order data of each target order through the target query table, but also, the target query table in the present application summarizes the data query tables according to the expected access frequency corresponding to each data set, therefore, the target query table in the present application can further reduce the time and computing power required for data query on the data to be queried, and improves the query efficiency for the data to be queried.

[0070] In one embodiment, if Figure 4 As shown, when it is necessary to determine the expected access frequency corresponding to the data set, the following contents may be specifically included:

[0071] S401, determining a first access frequency of each historical data according to query records of at least two historical data.

[0072] It should be noted that when it is necessary to determine the first access frequency of each historical data, the number of visits to each historical household can be counted based on the query records of at least two historical data, and then the access frequency of each historical data in a preset unit time period is used as the first access frequency of each historical data.

[0073] In one embodiment of the present application, an access frequency statistical model can be pre-trained by inputting query records of at least two historical data into the pre-trained access frequency statistical model and obtaining the output result of the access frequency statistical model, which is the first access frequency of each historical data.

[0074] Among them, the training process of the access frequency statistical model includes: obtaining at least one sample data and the query record of each sample data, marking the first access frequency on the query record of each sample data to obtain the query record of each sample data marked with the first access frequency; inputting the query record of each sample data marked with the first access frequency into the initial model for training, so as to realize the training to obtain the access frequency statistical model.

[0075] S402: predicting the access frequency of the data set according to the first access frequency of each historical data to obtain an estimated access frequency corresponding to the data set.

[0076] It should be noted that when it is necessary to predict the access frequency of a data set based on the first access frequency of each historical data, the following may be specifically included: determining the second access frequency corresponding to different data types based on the first access frequency of each historical data and the data type of each historical data; predicting the access frequency of each data set based on the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to different data types, to obtain the expected access frequency corresponding to each data set.

[0077] The second access frequency refers to the frequency at which different data types are accessed within a preset unit time.

[0078] In one embodiment of the present application, since the second access frequency refers to the frequency at which different data types are accessed within a preset unit time, and the first access frequency refers to the frequency at which historical data is accessed within a preset unit time, the first access frequency of historical data belonging to the same data type is summed up, and the result of the operation is the second access frequency corresponding to the data type.

[0079] To further explain, when predicting the access frequency of each data set based on the data proportion of historical data corresponding to different data types in each data set, and the second access frequency corresponding to different data types, it can specifically include the following contents: for a certain data set, determine the data proportion corresponding to different data types in the data set, and use the data proportion as the weight value of different data types for the data set; perform weighted operation on the second access frequencies corresponding to different data types according to each weight value, and the obtained operation result is the expected access frequency corresponding to the data set.

[0080] For example, if there are three different data types in total, the three data types are data type A, data type B, and data type C. In a certain data set, the data proportions corresponding to the three data types are 30% for data type A, 30% for data type B, and 40% for data type C; and the second access frequency of data type A is m; the second access frequency of data type B is n; and the second access frequency of data type C is q; therefore, the expected access frequency corresponding to the data set is m*30%+n*30%+q*40%.

[0081] According to the above content, when it is necessary to summarize and process each data query table based on the expected access frequency corresponding to each data set to obtain a target query table, the following contents may be included: based on the expected access frequency corresponding to each data set, determine the arrangement position of each data set in the target query table; according to the arrangement position of each data set, summarize and process each data query table to obtain the target query table.

[0082] Specifically, after determining the expected access frequency corresponding to each data set, sort each data set in order from most to least according to the expected access frequency corresponding to each data set. The position of each data set after sorting is the arrangement position of each data set in the target query table; according to the arrangement position of each data set in the target query table, summarize and splice each data query table in turn to obtain the target query table.

[0083] The above-mentioned data query method, by determining the first access frequency of each historical data, predicts the access frequency of the data set according to the first access frequency of each historical data, and obtains the expected access frequency corresponding to the data set, which provides a data basis for the subsequent determination of the target query table, and ensures that the target query table can be used to query the data in each data set in the subsequent process, thereby further reducing the time and computing power required for querying the data to be queried, and improving the query efficiency of the data to be queried.

[0084] In one embodiment, if Figure 5 As shown, when it is necessary to divide the order data of at least one target order to obtain at least one data set after division, the following contents may be specifically included:

[0085] S501, determining the set type corresponding to each data set and the set subtype corresponding to each set type.

[0086] It should be noted that when it is necessary to determine the collection type corresponding to each data set and the collection subtype corresponding to each collection type, the collection type corresponding to each data set and the collection subtype corresponding to each collection type can be determined based on the actual situation of the target order and the actual query needs of the user.

[0087] To further illustrate, each order data in the data set belongs to the set type corresponding to the data set; the set type corresponding to the data set is divided to obtain the set subtype corresponding to the set type.

[0088] S502: Divide the order data according to each set type to obtain at least one candidate set after division.

[0089] In one embodiment of the present application, when at least one candidate set is required, the set types to which the order data belongs can be determined respectively, and the order data can be divided into candidate combinations corresponding to the set types to which it belongs, so as to implement data division of the order data according to each set type and obtain at least one candidate set after division.

[0090] S503: divide the data of each candidate set according to each set subtype to obtain at least one divided data set.

[0091] In one embodiment of the present application, when it is necessary to determine at least one data set, the set subtype to which each order data in the candidate set belongs can be determined, and the order data belonging to the same set subtype can be clustered to achieve data division of each candidate set according to each set subtype to obtain at least one data set after division.

[0092] Among them, the order data of the same target order belong to the same data set.

[0093] The above-mentioned data query method, by determining the set type corresponding to each data set and the set subtype corresponding to each set type, realizes data division of the order data of at least one target order according to the set type corresponding to each data set and the set subtype corresponding to each set type, and obtains at least one data set after division, which provides a data basis for subsequent data query on the query data in each data set.

[0094] In one embodiment, if Figure 6 As shown, when it is necessary to perform a data query on the query data in each data set, the following contents may be specifically included:

[0095] S601, determining the set type corresponding to each data set and the set subtype corresponding to each set type.

[0096] S602: Divide the order data according to each set type to obtain at least one candidate set after division.

[0097] S603: divide the data of each candidate set according to each set subtype to obtain at least one divided data set.

[0098] S604: Determine the data query table corresponding to each data set.

[0099] S605: Determine a first access frequency of each historical data according to query records of at least two historical data.

[0100] S606: Determine second access frequencies corresponding to different data types according to the first access frequencies of the historical data and the data types of the historical data.

[0101] S607, predicting the access frequency of each data set according to the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to different data types, to obtain the estimated access frequency corresponding to each data set.

[0102] S608: Determine the arrangement position of each data set in the target query table based on the estimated access frequency corresponding to each data set.

[0103] S609, summarizing and processing each data query table according to the arrangement position of each data set to obtain a target query table.

[0104] S610: Perform data query on the data to be queried in each data set according to the target query table.

[0105] The above data query method divides the order data of at least one target order to obtain at least one data set after division, and summarizes the data query tables corresponding to each data set according to the expected access frequency corresponding to each data set to obtain the target query table, and then, according to the target query table, performs data query on the data to be queried in each data set. According to the above content, it can be seen that when the present application performs data query on the order data, it does not directly perform data query on the order data of each target order, but first divides the order data of each target order, and performs data query on the data to be queried in each data set according to the target query table corresponding to each data set; compared with the process of directly performing data query on the order data of each target order in the prior art, the present application not only effectively reduces the time and computing power required for data query on the order data of each target order through the target query table, but also, the target query table in the present application summarizes the data query tables according to the expected access frequency corresponding to each data set, therefore, the target query table in the present application can further reduce the time and computing power required for data query on the data to be queried, and improves the query efficiency for the data to be queried.

[0106] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0107] Based on the same inventive concept, the embodiment of the present application also provides a data query device for implementing the data query method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data query device embodiments provided below can refer to the limitations on the data query method above, and will not be repeated here.

[0108] In one embodiment, Figure 7 As shown, a data query device is provided, comprising: a division module 10, a summary module 20 and a query module 30, wherein:

[0109] The partitioning module 10 is used to partition the order data of at least one target order to obtain at least one data set after the partition, and a data query table corresponding to each data set; wherein the data query table records the data identifier of each order data in the data set.

[0110] The aggregation module 20 is used to aggregate the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table.

[0111] The query module 30 is used to perform data query on the data to be queried in each data set according to the target query table.

[0112] In one embodiment, the first access frequency of each historical data is determined based on query records of at least two historical data; and the access frequency of the data set is predicted based on the first access frequency of each historical data to obtain an estimated access frequency corresponding to the data set.

[0113] In one embodiment, based on the first access frequency of each historical data and the data type of each historical data, the second access frequency corresponding to the different data types is determined; based on the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to the different data types, the access frequency of each data set is predicted to obtain the expected access frequency corresponding to each data set.

[0114] In one embodiment, the set type corresponding to each data set and the set subtype corresponding to each set type are determined; the order data is partitioned according to each set type to obtain at least one candidate set after the partition; and the candidate sets are partitioned according to each set subtype to obtain at least one data set after the partition.

[0115] In one embodiment, order data of the same target order belongs to the same data set.

[0116] In one embodiment, the arrangement position of each data set in the target query table is determined based on the expected access frequency corresponding to each data set; and the data query tables are aggregated according to the arrangement position of each data set to obtain the target query table.

[0117] The above-mentioned data query device divides the order data of at least one target order to obtain at least one data set after division, and summarizes the data query tables corresponding to each data set according to the expected access frequency corresponding to each data set to obtain the target query table, and then, according to the target query table, performs data query on the data to be queried in each data set. According to the above content, it can be known that when the present application performs data query on the order data, it does not directly perform data query on the order data of each target order, but first divides the order data of each target order, and performs data query on the data to be queried in each data set according to the target query table corresponding to each data set; compared with the process of directly performing data query on the order data of each target order in the prior art, the present application not only effectively reduces the time and computing power required for data query on the order data of each target order through the target query table, but also, the target query table in the present application summarizes the data query tables according to the expected access frequency corresponding to each data set, therefore, the target query table in the present application can further reduce the time and computing power required for data query on the data to be queried, and improves the query efficiency for the data to be queried.

[0118] Each module in the above data query device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0119] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data query method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0120] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0122] Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set;

[0123] Aggregate and process each data query table based on the expected access frequency corresponding to each data set to obtain a target query table;

[0124] According to the target query table, data query is performed on the data to be queried in each data set.

[0125] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0126] Determining a first access frequency of each historical data according to query records of at least two historical data;

[0127] According to the first access frequency of each historical data, the access frequency of the data set is predicted to obtain the estimated access frequency corresponding to the data set.

[0128] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0129] Determining second access frequencies corresponding to different data types according to the first access frequencies of each historical data and the data types of each historical data;

[0130] According to the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to different data types, the access frequency of each data set is predicted to obtain the expected access frequency corresponding to each data set.

[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0132] Determine the collection type corresponding to each data collection, and the collection subtype corresponding to each collection type;

[0133] Divide the order data according to each set type to obtain at least one candidate set after division;

[0134] According to each set subtype, data of each candidate set is divided to obtain at least one divided data set.

[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0136] The order data of the same target order belongs to the same data set.

[0137] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0138] Determine the arrangement position of each data set in the target query table based on the expected access frequency corresponding to each data set;

[0139] According to the arrangement position of each data set, each data query table is aggregated to obtain a target query table.

[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0141] Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set;

[0142] Aggregate and process each data query table based on the expected access frequency corresponding to each data set to obtain a target query table;

[0143] According to the target query table, data query is performed on the data to be queried in each data set.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] Determining a first access frequency of each historical data according to query records of at least two historical data;

[0146] According to the first access frequency of each historical data, the access frequency of the data set is predicted to obtain the estimated access frequency corresponding to the data set.

[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0148] Determining second access frequencies corresponding to different data types according to the first access frequencies of each historical data and the data types of each historical data;

[0149] According to the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to different data types, the access frequency of each data set is predicted to obtain the expected access frequency corresponding to each data set.

[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0151] Determine the collection type corresponding to each data collection, and the collection subtype corresponding to each collection type;

[0152] Divide the order data according to each set type to obtain at least one candidate set after division;

[0153] According to each set subtype, data of each candidate set is divided to obtain at least one divided data set.

[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0155] The order data of the same target order belongs to the same data set.

[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0157] Determine the arrangement position of each data set in the target query table based on the expected access frequency corresponding to each data set;

[0158] According to the arrangement position of each data set, each data query table is aggregated to obtain a target query table.

[0159] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0160] Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set;

[0161] Aggregate and process each data query table based on the expected access frequency corresponding to each data set to obtain a target query table;

[0162] According to the target query table, data query is performed on the data to be queried in each data set.

[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0164] Determining a first access frequency of each historical data according to query records of at least two historical data;

[0165] According to the first access frequency of each historical data, the access frequency of the data set is predicted to obtain the estimated access frequency corresponding to the data set.

[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0167] Determining second access frequencies corresponding to different data types according to the first access frequencies of each historical data and the data types of each historical data;

[0168] According to the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to different data types, the access frequency of each data set is predicted to obtain the expected access frequency corresponding to each data set.

[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0170] Determine the collection type corresponding to each data collection, and the collection subtype corresponding to each collection type;

[0171] Divide the order data according to each set type to obtain at least one candidate set after division;

[0172] According to each set subtype, data of each candidate set is divided to obtain at least one divided data set.

[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0174] The order data of the same target order belongs to the same data set.

[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0176] Determine the arrangement position of each data set in the target query table based on the expected access frequency corresponding to each data set;

[0177] According to the arrangement position of each data set, each data query table is aggregated to obtain a target query table.

[0178] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0179] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0180] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0181] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data query method, characterized in that: The method comprises: Performing data division on the order data of at least one target order to obtain at least one data set after division and a data query table corresponding to each data set; wherein the data query table records a data identifier of each order data in the data set; Aggregating the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table; According to the target query table, data query is performed on the data to be queried in each data set.

2. The method according to claim 1, characterized in that The estimated access frequency corresponding to the data set is determined in the following manner: Determining a first access frequency of each historical data according to query records of at least two historical data; According to the first access frequency of each of the historical data, the access frequency of the data set is predicted to obtain the estimated access frequency corresponding to the data set.

3. The method according to claim 2, characterized in that The step of predicting the access frequency of each data set according to the first access frequency of each historical data to obtain the estimated access frequency corresponding to each data set includes: Determining second access frequencies corresponding to different data types according to the first access frequencies of each of the historical data and the data types of each of the historical data; According to the data proportion of historical data corresponding to different data types in each data set and the second access frequency corresponding to different data types, the access frequency of each data set is predicted to obtain the expected access frequency corresponding to each data set.

4. The method according to claim 1, characterized in that The step of dividing the order data of at least one target order to obtain at least one data set after division includes: Determine a set type corresponding to each data set, and a set subtype corresponding to each set type; Dividing the order data according to each of the set types to obtain at least one candidate set after the division; According to each of the set subtypes, data is divided for each of the candidate sets to obtain at least one divided data set.

5. The method according to claim 4, characterized in that The order data of the same target order belongs to the same data set.

6. The method according to any one of claims 1 to 5, characterized in that: The data query tables are aggregated based on the expected access frequencies corresponding to the data sets to obtain a target query table, including: Determining the arrangement position of each data set in the target query table based on the expected access frequency corresponding to each data set; According to the arrangement position of each data set, each data query table is aggregated to obtain a target query table.

7. A data query device, characterized in that: The device comprises: A partitioning module, used to partition the order data of at least one target order to obtain at least one data set after partitioning, and a data query table corresponding to each data set; wherein the data query table records the data identifier of each order data in the data set; A summarizing module, used for summarizing the data query tables based on the expected access frequencies corresponding to the data sets to obtain a target query table; The query module is used to perform data query on the query data in each data set according to the target query table.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Rapid processing method and device for medical scientific research form data

    CN113903421A

  • Method and system for solving high-concurrency data access

    CN117555933A

  • Data storage method and device, electronic equipment and computer readable medium

    CN117666947A

  • Table partitioning and storage in a database

    US20090300040A1