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

By setting up multi-level storage space in the ERP system and using the target customer identification and target product identification for layer-by-layer query, the problem of low data query efficiency in the ERP system is solved, and efficient query and resource conservation are achieved.

CN119782624APending Publication Date: 2025-04-08KINGDEE DEEKING CLOUDCOMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411985883.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In ERP products, with the development of business, the number of documents increases, resulting in the extension of the response time of data query and the inefficient query efficiency.

Method used

By setting up multi-level storage spaces, the transaction information during the target time period, the transaction information during the customer's last transaction, and the transaction information during each transaction of the customer, the target customer logo and the target product logo are used for layer-by-layer query to improve query efficiency.

Benefits of technology

It realizes efficient query of product introduction, reduces dependence on the third-level storage space, and reduces query load and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782624A_ABST
    Figure CN119782624A_ABST
Patent Text Reader

Abstract

The present application relates to a data query method, device, computer equipment, computer-readable storage medium and computer program product. The method comprises: querying the product introduction from the first-level storage space based on the target customer identification and target product identification of the product introduction query request; the first-level storage space includes the transaction information of the product that generated transactions within the target time period and the customer during the last transaction within the target time period; when the query fails, querying the product introduction from the second-level storage space based on the target customer identification and the target product identification; the second-level storage space includes the transaction information of each product during the last transaction with the customer; when the query fails again, querying the product introduction from the third-level storage space based on the target customer identification and the target product identification; the third-level storage space includes the transaction information of each product during each transaction with the customer; and returning the product introduction to the terminal. The use of this method can improve the efficiency of data query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In ERP (Enterprise Resource Planning) products, as business develops, the number of documents generated increases. When querying required document data, all documents are sorted according to specified rules for query, resulting in longer and longer query response times and low data query efficiency. Summary of the invention

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

[0004] In a first aspect, the present application provides a data query method, comprising:

[0005] Obtain a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier;

[0006] Based on the target customer identifier and the target product identifier, the corresponding product description is searched from the first-level storage space; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, the customer identifier and the product description;

[0007] When the query fails, the corresponding product introduction is queried from the second-level storage space based on the target customer identifier and the target product identifier; the second-level storage space includes the transaction information of each product at the last transaction with the customer;

[0008] When the second query fails, the corresponding product introduction is queried from the third-level storage space based on the target customer identifier and the target product identifier; the third-level storage space includes the transaction information of each product during each transaction with the customer;

[0009] Return the queried product introduction to the terminal corresponding to the product introduction query request.

[0010] In a second aspect, the present application also provides a data query device, comprising:

[0011] A request acquisition module is used to acquire a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier;

[0012] The first query module is used to query the corresponding product introduction from the first-level storage space based on the target customer identification and the target product identification; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identification, the customer identification and the product introduction;

[0013] The second query module is used to query the corresponding product introduction from the second-level storage space based on the target customer identifier and the target product identifier when the query fails; the second-level storage space includes the transaction information of each product at the last transaction with the customer;

[0014] The third query module is used to query the corresponding product introduction from the third-level storage space based on the target customer identifier and the target product identifier when the second query fails; the third-level storage space includes the transaction information of each product in each transaction with the customer

[0015] The result sending module is used to return the queried product introduction to the terminal corresponding to the product introduction query request.

[0016] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0017] Obtain a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier;

[0018] Based on the target customer identifier and the target product identifier, the corresponding product description is searched from the first-level storage space; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, the customer identifier and the product description;

[0019] When the query fails, the corresponding product introduction is queried from the second-level storage space based on the target customer identifier and the target product identifier; the second-level storage space includes the transaction information of each product at the last transaction with the customer;

[0020] When the second query fails, the corresponding product introduction is queried from the third-level storage space based on the target customer identifier and the target product identifier; the third-level storage space includes the transaction information of each product during each transaction with the customer;

[0021] Return the queried product introduction to the terminal corresponding to the product introduction query request.

[0022] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0023] Obtain a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier;

[0024] Based on the target customer identifier and the target product identifier, the corresponding product description is searched from the first-level storage space; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, the customer identifier and the product description;

[0025] When the query fails, the corresponding product introduction is queried from the second-level storage space based on the target customer identifier and the target product identifier; the second-level storage space includes the transaction information of each product at the last transaction with the customer;

[0026] When the second query fails, the corresponding product introduction is queried from the third-level storage space based on the target customer identifier and the target product identifier; the third-level storage space includes the transaction information of each product during each transaction with the customer;

[0027] Return the queried product introduction to the terminal corresponding to the product introduction query request.

[0028] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0029] Obtain a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier;

[0030] Based on the target customer identifier and the target product identifier, the corresponding product description is searched from the first-level storage space; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, the customer identifier and the product description;

[0031] When the query fails, the corresponding product introduction is queried from the second-level storage space based on the target customer identifier and the target product identifier; the second-level storage space includes the transaction information of each product at the last transaction with the customer;

[0032] When the second query fails, the corresponding product introduction is queried from the third-level storage space based on the target customer identifier and the target product identifier; the third-level storage space includes the transaction information of each product during each transaction with the customer;

[0033] Return the queried product introduction to the terminal corresponding to the product introduction query request.

[0034] The above-mentioned data query method, device, computer equipment, computer-readable storage medium and computer program product, by setting a first-level storage space, a second-level storage space and a third-level storage space, use the first-level storage space to store the transaction information of the goods generated in the target time period when the goods were last traded with the customer during the target time period, use the second storage space to store the transaction information of each commodity when the goods were last traded with the customer, and use the third storage space to store the transaction information of each commodity when the goods were traded with the customer each time, thereby realizing the layer-by-layer refinement of the specified transaction information in the transaction information of each commodity and the multi-level storage of each storage space; by using the target customer identifier and the target commodity identifier as filtering conditions, the corresponding commodity introduction is queried from the first-level storage space, the second-level storage space and the third-level storage space, without the need to query data from the third-level storage space every time, thereby improving the query efficiency of the commodity introduction, and at the same time reducing the load generated by querying data from the third-level storage space each time, saving data query resources. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0036] Figure 1 An application environment diagram of a data query method in an embodiment;

[0037] Figure 2 A schematic diagram of a data query method in one embodiment;

[0038] Figure 3 A schematic diagram of a flow chart of a data query step in an embodiment;

[0039] Figure 4 is a schematic diagram of a storage structure of a first storage space in an embodiment;

[0040] Figure 5 A schematic diagram of a historical latest price query process in one embodiment;

[0041] Figure 6 A schematic diagram of a multi-level storage update process in one embodiment;

[0042] Figure 7 is a structural block diagram of a data query device in an embodiment;

[0043] Figure 8 is an internal structure diagram of a computer device in one embodiment;

[0044] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0045] 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.

[0046] The data query method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. In an exemplary embodiment, the server 104 obtains a product introduction query request sent by the terminal 102; the product introduction query request carries a target customer identifier and a target product identifier; the server 104 queries the corresponding product introduction from the first-level storage space based on the target customer identifier and the target product identifier; the first-level storage space includes transaction information of the product that generated transactions within the target time period when it last traded with the customer within the target time period; the transaction information includes the product identifier, the customer identifier and the product introduction; when the query fails, the server 104 queries the corresponding product introduction from the second-level storage space based on the target customer identifier and the target product identifier; the second-level storage space includes transaction information of each product when it last traded with the customer; when the query fails again, the server 104 queries the corresponding product introduction from the third-level storage space based on the target customer identifier and the target product identifier; the third-level storage space includes transaction information of each product during each transaction with the customer; the server 104 returns the queried product introduction to the terminal 102 corresponding to the product introduction query request. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0047] In an exemplary embodiment, Figure 2As shown, a data query method is provided, which is applied to Figure 1 The server in the example is used for explanation. It can be understood that the method can also be applied to the server, and can also be applied to the system including the terminal and the server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0048] Step 202, obtaining a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier.

[0049] Step 204, based on the target customer identifier and the target product identifier, query the corresponding product introduction from the first-level storage space; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, customer identifier and product introduction.

[0050] Among them, the product introduction query request refers to a request to query the product introduction of the product that has been traded or is to be traded with the specified customer. The target customer identifier refers to the customer identifier of the specified customer carried in the product introduction request. The target product identifier refers to the product identifier of the product introduction to be queried. The target time period refers to the time range of transaction information that can be stored in the first-level storage space, that is, the first-level storage space only stores transaction information that occurs within the target time period. Product introduction refers to the description information of the product when the product is traded, such as the product (transaction) price, product picture, product instructions, etc.

[0051] Exemplarily, a plurality of storage spaces are deployed in the server, including a first-level storage space, a second-level storage space, and a third-level storage space. Each storage space is used to store the transaction information when each commodity is traded with a customer, and the transaction information includes commodity introduction, transaction object information (customer information), transaction date, etc. There is an access order between each storage space. For example, the access priority of the first-level storage space is higher than that of the second-level storage space, and the access priority of the second-level storage space is higher than that of the third-level storage space. Among them, the first-level storage space is used to store the transaction information of the commodity generated in the target time period when the commodity is traded with the customer during the target time period. It can be understood that the first-level storage space stores the latest transaction information when each commodity is traded with each customer during the target time period. For example, commodity A has traded with customer 1 twice within three days before the current time, and the transaction information of the second transaction is stored in the first-level storage space. Specifically, the first-level storage space also stores the transaction information of the last transaction between the same commodity and different customers.

[0052] The server receives a product introduction query request sent by the terminal, which carries the target customer ID and the target product ID. The server preferentially searches for the corresponding transaction information in the first-level storage space based on the target customer ID and the target product ID, indicating that it is necessary to search the first-level storage space for the transaction information of the target product corresponding to the target product ID and the target customer corresponding to the target customer ID during the target time period. If the server finds the corresponding transaction information in the first-level storage space, it returns the product introduction in the transaction information to the terminal corresponding to the product introduction query request.

[0053] In an exemplary embodiment, the access order between the storage spaces can be determined according to the storage capacity of each storage space. For example, the smaller the storage capacity, the higher the access priority. The storage spaces can also be determined according to the type of data stored. For example, the storage space that stores high-frequency data has a higher access priority.

[0054] Step 206, when the query fails, query the corresponding product introduction from the second-level storage space based on the target customer identifier and the target product identifier; the second-level storage space includes the transaction information of each product at the time of the last transaction with the customer.

[0055] Exemplarily, when the server fails to find the corresponding transaction information in the first-level storage space according to the target customer identifier and the target product identifier, it indicates that no transaction has occurred between the target product and the target customer within the target time period, and then searches for the corresponding transaction information in the second-level storage space according to the target customer identifier and the target product identifier. The second-level storage space is used to store the transaction information of the last transaction between each product and the customer, and also includes the transaction information of the last transaction between the same product and different customers, for example, the transaction information of the last transaction between product A and customer 1 and the transaction information of the last transaction between product A and customer 2 as of the current moment. If the server finds the corresponding transaction information in the second-level storage space, it returns the product introduction in the transaction information to the terminal corresponding to the product introduction query request.

[0056] Step 208, when the second query fails, query the corresponding product introduction from the third-level storage space based on the target customer identifier and the target product identifier; the third-level storage space includes the transaction information of each product in each transaction with the customer.

[0057] Step 210: Return the retrieved product introduction to the terminal corresponding to the product introduction query request.

[0058] Exemplarily, when the server fails to find the corresponding transaction information in the second-level storage space, it means that the target product has not been traded with the target customer, or the target product has been traded with the target customer but the transaction information at the time of the transaction has not been synchronized to the second-level storage space in a timely manner. The server queries the corresponding transaction information in the third-level storage space based on the target customer identifier and the target product identifier. The third-level storage space is used to store the transaction information of each transaction between each product and the customer, and also includes the transaction information of multiple transactions between the same product and different customers, that is, the third-level storage space can be used as a storage space for storing the full amount of transaction information. The server returns the product introduction in the transaction information queried in the third-level storage space to the terminal corresponding to the product introduction query request.

[0059] In the above data query method, by setting the first-level storage space, the second-level storage space and the third-level storage space, the first-level storage space is used to store the transaction information of the goods generated in the target time period when the goods were last traded with the customer during the target time period, the second storage space is used to store the transaction information of each commodity when the goods were last traded with the customer, and the third storage space is used to store the transaction information of each commodity when the goods were traded with the customer each time, thereby realizing the layer-by-layer refinement of the specified transaction information in the transaction information of each commodity and the multi-level storage of each storage space; by using the target customer identifier and the target commodity identifier as filtering conditions, the corresponding commodity introduction is queried from the first-level storage space, the second-level storage space and the third-level storage space, without the need to query data from the third-level storage space every time the query is made, thereby improving the query efficiency of the commodity introduction, and at the same time reducing the load caused by querying data from the third-level storage space, saving data query resources.

[0060] In an exemplary embodiment, a new lower-level storage space may be created based on the data storage capacity of an existing storage space. Generally, the storage space that stores the full amount of data is the highest-level storage space. The server may determine the applicable data storage requirements for the data type based on the data type of the data stored in the existing storage space. The data storage requirements refer to the requirements for storing data that can realize the data usage corresponding to the data type. Different data types may have different applicable data storage requirements. For example, for a transaction data type of transaction information, the applicable data storage requirements may be requirements for commodity pricing requirements and commodity transaction purposes for commodity promotion; for a data type that only stores backups, the applicable data storage requirements may be requirements for storage resource optimization purposes such as data classification and data deduplication.

[0061] Then, the data filtering dimension corresponding to the lower-level storage space is determined in the data filtering dimension set corresponding to the data storage requirement. According to the data filtering dimension, the storage data in the existing storage space is filtered, and the filtered target data is stored in the lower-level storage space. Different data storage requirements correspond to different data filtering dimension sets, and the data filtering dimensions corresponding to storage spaces of different levels can be the same or different.

[0062] In an exemplary embodiment, the second-level storage space is a lower-level storage space of the third-level storage space, and the first-level storage space is a lower-level storage space of the second-level storage space.

[0063] When the data storage capacity of the third-level storage space reaches a preset threshold, a second-level storage space is created according to the storage structure of the third-level storage space. According to the transaction data type of the transaction information stored in the third-level storage space, the data storage requirement applicable to the transaction data type is determined to be the commodity pricing requirement. In the data filtering dimension set corresponding to the commodity pricing requirement, the second data filtering dimension of the corresponding level of the second-level storage space is determined to be "last transaction". According to the second data filtering dimension, the number of transactions between each commodity and each customer is traversed in the third-level storage space, and the transaction information at the last transaction is extracted to obtain the transaction information at the last transaction between each commodity and each customer. The extracted transaction information set is stored in the second-level storage space, and the second-level storage space is synchronously updated according to the transaction information at the last transaction of the newly added commodity in the third-level storage space.

[0064] Then, when the data storage volume of the second-level storage space reaches a preset threshold, the first-level storage space is created, and the first data screening dimension corresponding to the first-level storage space is determined to be "last transaction" and "target time period" in the data screening dimension set corresponding to the data storage demand. According to the first data screening dimension, the transaction time of each commodity and each customer is traversed in the second-level storage space, and the transaction information within the target time period is stored in the first-level storage space, and the first-level storage space is synchronously updated according to the transaction information of the last transaction of the newly added commodity in the third-level storage space.

[0065] In this embodiment, when the data storage capacity in the third-level storage space or the second-level storage space reaches a preset threshold, the data filtering dimension of the data storage demand is determined according to the data type of the transaction information, and data is extracted from the upper-level storage space according to the data filtering dimension. Dynamic adjustment of data hierarchical storage can be achieved according to the data storage demand and the data filtering dimension, thereby improving the flexibility and necessity of data storage.

[0066] In an exemplary embodiment, Figure 3 As shown, the data query method further includes:

[0067] Step 302, obtaining the transaction information to be stored; the transaction information to be stored carries the customer ID to be stored, the commodity ID to be stored and the transaction date to be stored;

[0068] Step 304, storing the transaction information to be stored in the third-level storage space;

[0069] Step 306, based on the to-be-stored customer identifier and the to-be-stored commodity identifier, query the third-level storage space for the historical transaction dates of the commodity corresponding to the to-be-stored commodity identifier during each transaction of the customer corresponding to the to-be-stored customer identifier;

[0070] Step 308, when the transaction date to be stored is later than the historical transaction date, synchronizing the transaction information to be stored to the second-level storage space;

[0071] Step 310: When the transaction date to be stored is later than the historical transaction date and the transaction date to be stored belongs to the target time period, the transaction information to be stored is synchronized to the first-level storage space.

[0072] The transaction information to be stored refers to the transaction information currently to be stored in the third-level storage space.

[0073] Exemplarily, the server obtains the transaction information to be stored sent by the terminal, and preferentially stores the transaction information to be stored in the third-level storage space, and then determines whether the transaction information to be stored is synchronized to the first-level storage space and the second-level storage space based on the transaction date to be stored in the transaction information to be stored and the historical transaction date of the same product identifier and the same customer identifier in the third storage space.

[0074] Specifically, the transaction information of the commodity corresponding to the commodity identification to be stored and the customer corresponding to the customer identification to be stored in each transaction may be queried in the third-level storage space according to the customer identification to be stored and the commodity identification to be stored, and the historical transaction dates of the commodity with the commodity identification to be stored and the customer with the customer identification to be stored in each transaction may be obtained from the queried transaction information, and the transaction date to be stored in the transaction information to be stored may be compared with the obtained historical transaction dates.

[0075] If, among all the historical transaction dates, there is a historical transaction date that is later than the transaction date to be stored, it means that the transaction information to be stored is not the latest transaction information between the commodity identified by the commodity to be stored and the customer identified by the customer to be stored at the time of the last transaction, and there is no need to synchronize the transaction information to be stored to the second-level storage space and the first-level storage space.

[0076] If the transaction date to be stored is later than any historical transaction date, the transaction information to be stored will be synchronized to the second-level storage space. Then, it is determined whether the transaction date to be stored is within the target time period corresponding to the first storage space. If so, the transaction information to be stored will be synchronized to the first-level storage space; if not, there is no need to synchronize the transaction information to the first-level storage space.

[0077] In an exemplary embodiment, the transaction information to be stored also includes the transaction review date to be stored and the transaction record date to be stored, and each historical transaction date also includes the historical transaction review date and the historical transaction record date. The transaction review date to be stored refers to the date of the compliance review of the commodity transaction. The transaction record date to be stored is the record date when the commodity transaction is recorded, and may refer to the document generation date of the document corresponding to the commodity transaction. The transaction date to be stored, the transaction review date to be stored, and the transaction record date to be stored are stored in a matching order.

[0078] Generally, when the server detects that a historical transaction date is consistent with a transaction date to be stored, it uses the review date of the transaction to be stored to compare with each historical transaction review date. If a historical transaction review date is consistent with the review date of the transaction to be stored, it uses the record date of the transaction to be stored and each historical transaction record date until it obtains a judgment result on whether to synchronize the transaction information to be stored to the first-level storage space and the second-level storage space.

[0079] In this embodiment, by determining whether the transaction information to be stored is synchronized to the second-level storage space and the first-level storage space after storing the transaction information to be stored in the third-level storage space, the accuracy of data hierarchical storage is ensured, and the data accuracy of the second-level storage space and the first-level storage space is also ensured.

[0080] In an exemplary embodiment, step 308, synchronizing the transaction information to be stored to the second-level storage space, includes:

[0081] Extracting the dimension transaction information corresponding to each grouping dimension from the transaction information to be stored, and replacing the corresponding historical dimension transaction information based on the dimension transaction information in the second-level storage space;

[0082] Step 310, synchronizing the transaction information to be stored to the first-level storage space, includes:

[0083] Determine a primary key dimension and a primary key value dimension in each grouping dimension, generate a primary key to be stored based on dimension transaction information corresponding to the primary key dimension, generate a primary key value to be stored based on dimension transaction information corresponding to the primary key value dimension, and generate a key-value pair to be stored based on the primary key to be stored and the primary key value to be stored;

[0084] In the first-level storage space, the corresponding historical key-value pairs are replaced based on the key-value pairs to be stored; the primary key dimensions include customer ID, product ID, product attributes and product transaction units, and the primary key value dimensions include product introduction, transaction date, transaction review date and transaction record date.

[0085] Among them, the grouping dimension refers to the category of each sub-information to be stored in the transaction information, such as the product identification dimension, the customer identification dimension, etc. The dimension transaction information refers to the specific value of the grouping dimension, such as the dimension transaction information corresponding to the product identification dimension is "Product ID: XXX". The primary key dimension refers to the grouping dimension of the dimension transaction information used as the primary key (key). The primary key value dimension refers to the grouping dimension of the dimension transaction information used as the primary key value (value). Product attributes refer to the attributes that describe the appearance of the product, such as size, color, etc. The transaction review date refers to the date of the compliance review of the product transaction. The transaction record date refers to the record date when the product transaction is recorded, which can refer to the document generation date of the document corresponding to the product transaction. The product transaction unit refers to the quantity unit of the product traded, such as one box, one piece, etc.

[0086] Exemplarily, the transaction information specifically includes customer identification, commodity identification, commodity attributes, commodity transaction unit, commodity introduction, transaction date, transaction review date, and transaction record date. The server determines the primary key dimension and the primary key value dimension in each grouping dimension according to the configuration information, wherein the primary key dimension includes customer identification, commodity identification, commodity attributes, and commodity transaction unit, and the primary key value dimension includes commodity introduction, transaction date, transaction review date, and transaction record date.

[0087] The server then obtains the dimensional transaction information corresponding to each grouping dimension from the transaction information, and uses the newly obtained dimensional transaction information to replace the corresponding historical dimensional transaction information in the second-level storage space. For example, in the second-level storage space, the transaction information between commodity A and customer 1 in the last transaction is replaced with the transaction information in the current transaction (replacing the dimensional transaction information according to the grouping dimension). The server then obtains the dimensional transaction information corresponding to each primary key dimension and each primary key value dimension from the transaction information, splices the dimensional transaction information of each primary key dimension, generates the primary key to be stored based on the spliced ​​dimensional transaction information, and converts the format of the dimensional transaction information corresponding to each key value dimension, such as converting it into a JSON string to obtain the primary key value to be stored. Based on the primary key to be stored and the primary key value to be stored, a key-value pair to be stored is generated, and then the key-value pair to be stored is used to replace the corresponding historical key-value pair in the first-level storage space.

[0088] In an exemplary embodiment, Figure 4 A schematic diagram of the storage structure of the first storage space is shown.

[0089] The first-level storage space can be a Redis database. Redis is an in-memory database that can provide millisecond-level query responses. Redis uses a single-threaded model to ensure that each request is an atomic operation. Use the Hash data type as the data storage structure of the first-level storage space. Hash is a key-value pair storage structure. Determine the various grouping dimensions of transaction information in advance according to business rules, such as: customer id, product id, product transaction unit, product attributes. Figure 4 In the example, the primary key Key to be stored is generated by concatenating the dimension transaction information corresponding to the primary key dimension in the grouping dimension: 123#234#345#456, and the primary key value Value to be stored is generated in the form of a JSON string according to the dimension transaction information corresponding to the primary key value dimension.

[0090] In this embodiment, by generating key-value pairs to be stored according to the primary key dimension and the primary key value dimension and storing them in the first-level storage space, data compression of the data stored in the first-level storage space is achieved, storage resources of the first-level storage space are saved, and data query efficiency is improved through key-value pairs.

[0091] In an exemplary embodiment, the third-level storage space includes a transaction information table; step 208, based on the target customer identifier and the target product identifier, querying the corresponding product introduction from the third-level storage space includes:

[0092] Generate a joint query index based on the query sequence between the target customer identifier and the target product identifier;

[0093] In the third-level storage space, the corresponding product introduction is queried from the transaction information table based on the query order corresponding to the joint query index.

[0094] The query order refers to the query order in which the target customer ID and the target product ID are prioritized as query conditions for data query. The joint query index refers to query index information that uses the target customer ID and the target product ID as a whole as query conditions.

[0095] For example, the data storage form in the second-level storage space and the third-level storage space is a data storage table, which includes a transaction information table, which records the customer ID, product ID, transaction product unit ID, product attribute ID, product description (latest price: the transaction price at the last transaction), document date (transaction record date), review date and transaction date. The transaction information table (T_LAST_PRICE) is shown as follows:

[0096] CREATE TABLE T_LAST_PRICE(

[0097] FID INT NOT NULL,

[0098] FCustomer ID INT NOT NULL, ——Customer ID

[0099] FMaterial ID INT NOT NULL, ——Product ID

[0100] FUnit ID INT NOT NULL, ——Transaction commodity unit ID

[0101] FauxproID INT NOT NULL, ——Product attribute ID

[0102] FLastprice DECIMAL(20,10) NOT NULL, ——Latest price

[0103] FBillDate Date NOT NULL, ——Document date

[0104] FAuditTime DATETIME NOT NULL, ——Audit date

[0105] FCrestionTine DATETIME NOT NULL, ——Transaction date

[0106] PRIMARY KEY (FID), —— table primary key

[0107] UNIQUE INDEX idx_unique transaction(FCustomer ID, FMaterial ID, FUnitID, FauxproID) - Displays the declared joint unique index );

[0109] The transaction information table is shown in Table 1:

[0110] Table 1

[0111]

[0112] In the transaction information table of the second-level storage space and the third-level storage space, the fields of the information to be stored in each grouping dimension are set. According to the query frequency of each grouping dimension, the target customer ID and the target product ID are determined as high-frequency query fields. According to the query sequence between the target customer ID and the target product ID, a joint query index is generated. For example, the customer ID and product ID are used as filtering conditions, and the most recent price (the transaction price at the time of the last transaction) stored in the transaction information table is queried in the second-level storage space or the third-level storage space through the standard SQL syntax: select * from t_last_pricewhere fcustomerid=123 and fmaterialid=234.

[0113] In this embodiment, data query is performed on the transaction information table by using a joint query index, thereby improving data query efficiency.

[0114] In an exemplary embodiment, the data query method further includes:

[0115] When receiving a storage request for the target historical price of each specified commodity, a fourth-level storage space is created based on the storage structure of the first-level storage space;

[0116] Obtain the transaction customer ID and transaction commodity ID corresponding to each specified commodity;

[0117] Based on the transaction customer ID and the transaction commodity ID, query the historical transaction prices corresponding to each designated commodity in the third-level storage space;

[0118] Determine the target historical price corresponding to each designated commodity based on each historical transaction price;

[0119] According to the storage structure, the transaction customer identification, transaction commodity identification and target historical price corresponding to each designated commodity are stored in the fourth-level storage space.

[0120] The target historical price refers to the target historical price that is specified to be stored additionally in each historical price of commodity transactions, which can be the highest historical price. The fourth-level storage space is used to store the target historical transaction prices corresponding to each commodity. The designated commodity refers to the commodity for which the target historical price needs to be stored additionally.

[0121] Exemplarily, when the server receives a storage request for the target historical price of each specified commodity (which can be understood as a storage request for the specified price of the specified commodity), it creates a fourth-level storage space based on the storage structure of the first-level storage space, or it allocates a blank storage area in the first-level storage space as the fourth-level storage space, and then obtains the transaction customer identifier and transaction commodity identifier corresponding to each specified commodity.

[0122] A joint query index is generated according to the transaction client identifier and transaction commodity identifier carried by the storage request. The transaction client identifier can be one or more. Generally, there are multiple transaction client identifiers. The server uses the generated joint query index to query each historical transaction price corresponding to each designated commodity and the corresponding customer identifier in the third-level storage space, and determines the target historical price from each historical transaction price. It can be to sort each historical transaction price from large to small, obtain the first historical transaction price as the target historical transaction price, and obtain the target historical transaction price corresponding to each designated commodity and the corresponding transaction client identifier, such as the highest price a in each transaction between commodity A and customer 1, the highest price b in each transaction between commodity A and customer 2, etc., the highest price c in each transaction between commodity B and customer 4, the highest price d in each transaction between commodity B and customer 5, etc.; it can also be determined from the target historical transaction prices corresponding to each designated commodity and the corresponding transaction client identifier, the unique historical transaction price corresponding to each designated commodity is determined, such as in the highest price a and the highest price b corresponding to commodity A, when a>b, the highest price a is used as the unique historical transaction price corresponding to commodity A. Then, according to the storage structure, the transaction customer identification, transaction commodity identification and target historical price corresponding to each designated commodity are stored in the fourth-level storage space.

[0123] In this embodiment, when a storage request for the target historical price of each specified commodity is received, a fourth-level storage space is created according to the storage structure of the first-level storage space, and the queried target historical price is stored in the fourth-level storage space, thereby achieving the flexibility of hierarchical storage.

[0124] In an exemplary embodiment, a product introduction query request is a query request for a reference price of a target product generated when pricing is performed on a target product corresponding to a target product identifier to be traded by a target customer corresponding to the target customer identifier; the reference price is the transaction price in the queried product introduction, and the reference price is the transaction price of the target product at the time of the last transaction with the target customer.

[0125] Exemplarily, when a user needs to price a target product and triggers a price reference control for the target product, the terminal can generate a query request for the reference price of the target product based on the target customer identifier and target product identifier input by the user, i.e., a product introduction query request, and the terminal sends the product introduction query request to the server.

[0126] In response to the product introduction query request, the server searches for the corresponding transaction information in each storage space, obtains the transaction price of the target product at the time of the last transaction with the target customer from the product introduction in the transaction information, uses the queried transaction price as the reference price corresponding to the target product, and returns it to the terminal so that the terminal can display the received reference price of the target product.

[0127] In an exemplary embodiment, Figure 5 As shown, a schematic diagram of the historical latest price query process is provided. The historical latest price refers to the transaction price of the transaction (the last transaction) closest to the current moment among all the historical transactions between the product and the customer before the current moment. The specific steps are as follows:

[0128] After the user places an order and selects the customer and product, the system is triggered to query the execution logic of the latest price.

[0129] The customer ID and product ID entered on the interface are concatenated into the Key required for the Redis (first-level storage space) query. According to the storage characteristics of HashMap, the Value is obtained according to the Key. If the result is found, it is returned to the caller. If not found, the price table (transaction information table) of the second-level storage space is queried.

[0130] If no data is found in the first-level storage space, the customer ID and product ID are used as filtering conditions, and the standard SQL syntax is used to query the price table in the second-level storage space to find the most recent price stored (select * from t_last_price where fcustomerid=123 and fmaterialid=234;). Since the data is stored according to the grouping dimension of limited fields, the data volume is significantly smaller than the original document table (the original transaction information table in the third-level storage space), and the query speed is faster. If the query result is found, it is returned to the caller. If not, the query is made to the original document table in the third-level storage space.

[0131] If no data is found in the second-level storage space, the customer ID and product ID are used as filtering conditions, and the original document table in the third-level storage space is queried for the latest price stored through standard SQL syntax; if the data is found, the result is returned; if not found, the unit price of zero is returned.

[0132] In an exemplary embodiment, Figure 6 As shown, a schematic diagram of a multi-level storage update process is provided. The specific steps are as follows:

[0133] When a new commodity transaction document is received, the latest price update is triggered.

[0134] The customer ID, product ID and other fields of the document are obtained to query the original price list in the third-level storage space, and the transaction date, review time (transaction review date), document generation date (transaction record date) are compared with the date stored in the original price list, where the transaction date, review time and document generation date can be collectively referred to as the document time. If the document time is closer to the current time, the latest price and transaction date, review time, document generation date and other fields of the price list in the second-level storage space are updated, otherwise they are not updated.

[0135] Then compare it with the most recent price in Redis (first-level storage space), concatenate fields such as customer ID and product ID into a key, obtain the most recent price stored in Redis, and compare it with the document time. If the document time is closer to the current time, update the most recent price and transaction date, review time, document generation date and other fields stored in Redis, otherwise do not update.

[0136] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned 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 does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can 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 to be 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.

[0137] 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.

[0138] In an exemplary embodiment, Figure 7 As shown, a data query device 700 is provided, comprising: a request acquisition module 702, a first query module 704, a second query module 706, a third query module 708 and a result sending module 710, wherein:

[0139] The request acquisition module 702 is used to acquire a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier;

[0140] The first query module 704 is used to query the corresponding product introduction from the first-level storage space based on the target customer identifier and the target product identifier; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, the customer identifier and the product introduction;

[0141] The second query module 706 is used to query the corresponding product introduction from the second-level storage space based on the target customer identifier and the target product identifier when the query fails; the second-level storage space includes the transaction information of each product at the last transaction with the customer;

[0142] The third query module 708 is used to query the corresponding product introduction from the third-level storage space based on the target customer identifier and the target product identifier when the second query fails; the third-level storage space includes the transaction information of each product in each transaction with the customer.

[0143] The result sending module 710 is used to return the retrieved product introduction to the terminal corresponding to the product introduction query request.

[0144] In an exemplary embodiment, the data query device 700 is also used to obtain transaction information to be stored; the transaction information to be stored carries the customer identifier to be stored, the commodity identifier to be stored and the transaction date to be stored; the transaction information to be stored is stored in the third-level storage space; based on the customer identifier to be stored and the commodity identifier to be stored, the historical transaction dates of the commodity corresponding to the commodity identifier to be stored in each transaction of the customer corresponding to the customer identifier to be stored are queried in the third-level storage space; when the transaction date to be stored is later than the historical transaction date, the transaction information to be stored is synchronized to the second-level storage space; when the transaction date to be stored is later than the historical transaction date and the transaction date to be stored belongs to the target time period, the transaction information to be stored is synchronized to the first-level storage space.

[0145] In an exemplary embodiment, the data query device 700 is also used to extract dimensional transaction information corresponding to each grouping dimension from the transaction information to be stored, and replace the corresponding historical dimensional transaction information in the second-level storage space based on the dimensional transaction information; synchronize the transaction information to be stored to the first-level storage space, including: determining the primary key dimension and the primary key value dimension in each grouping dimension, generating the primary key to be stored based on the dimensional transaction information corresponding to the primary key dimension, generating the primary key value to be stored based on the dimensional transaction information corresponding to the primary key value dimension, and generating the key-value pair to be stored based on the primary key to be stored and the primary key value to be stored; in the first-level storage space, replacing the corresponding historical key-value pair based on the key-value pair to be stored; the primary key dimensions include customer identification, product identification, product attributes and product transaction units, and the primary key value dimensions include product introduction, transaction date, transaction review date and transaction record date.

[0146] In an exemplary embodiment, the third-level storage space includes a transaction information table; the third query module 708 is also used to generate a joint query index based on the query order between the target customer identifier and the target product identifier; in the third-level storage space, the corresponding product introduction is queried from the transaction information table based on the query order corresponding to the joint query index.

[0147] In an exemplary embodiment, the data query device 700 is also used to create a fourth-level storage space based on the storage structure of the first-level storage space when a storage request for a target historical price of each designated commodity is received; obtain the transaction customer identifier and transaction commodity identifier corresponding to each designated commodity; based on the transaction customer identifier and the transaction commodity identifier, query the respective historical transaction prices corresponding to each designated commodity in the third-level storage space; determine the target historical price corresponding to each designated commodity based on each historical transaction price; and store the transaction customer identifier, transaction commodity identifier and target historical price corresponding to each designated commodity in the fourth-level storage space according to the storage structure.

[0148] In an exemplary embodiment, a product introduction query request is a query request for a reference price of a target product generated when pricing is performed on a target product corresponding to a target product identifier to be traded by a target customer corresponding to the target customer identifier; the reference price is the transaction price in the queried product introduction, and the reference price is the transaction price of the target product at the time of the last transaction with the target customer.

[0149] 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.

[0150] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as transaction information. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data query method is implemented.

[0151] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, 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. Among them, 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 implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, an XXX method is implemented. 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.

[0152] Those skilled in the art will understand that Figure 8-Figure 9The 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.

[0153] In an exemplary embodiment, in one embodiment, a computer device is further 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 steps in the above-mentioned method embodiments are implemented.

[0154] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0155] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0156] 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 regulations.

[0157] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method 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 the present application can include at least one of non-volatile memory 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), magnetic 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, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0158] 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 application.

[0159] The above-described 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: Obtaining a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier; Based on the target customer identifier and the target product identifier, query the corresponding product introduction from the first-level storage space; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, the customer identifier and the product introduction; When the query fails, based on the target customer identifier and the target product identifier, the corresponding product introduction is queried from the second-level storage space; the second-level storage space includes the transaction information of each product at the last transaction with the customer; When the query fails again, based on the target customer identifier and the target product identifier, the corresponding product introduction is queried from the third-level storage space; the third-level storage space includes the transaction information of each product in each transaction with the customer; The retrieved product introduction is returned to the terminal corresponding to the product introduction query request.

2. The method according to claim 1, characterized in that The method further comprises: Acquire transaction information to be stored; the transaction information to be stored carries a customer identifier to be stored, a commodity identifier to be stored, and a transaction date to be stored; Storing the transaction information to be stored in the third-level storage space; Based on the to-be-stored customer identifier and the to-be-stored commodity identifier, querying the third-level storage space for historical transaction dates of the commodity corresponding to the to-be-stored commodity identifier during each transaction by the customer corresponding to the to-be-stored customer identifier; When the transaction date to be stored is later than the historical transaction date, synchronizing the transaction information to be stored to the second-level storage space; When the transaction date to be stored is later than the historical transaction date and the transaction date to be stored belongs to the target time period, the transaction information to be stored is synchronized to the first-level storage space.

3. The method according to claim 2, characterized in that The step of synchronizing the transaction information to be stored to the second-level storage space includes: Extracting dimensional transaction information corresponding to each grouping dimension from the transaction information to be stored, and replacing corresponding historical dimensional transaction information based on the dimensional transaction information in the second-level storage space; The step of synchronizing the transaction information to be stored to the first-level storage space includes: Determine a primary key dimension and a primary key value dimension in each of the grouping dimensions, generate a primary key to be stored based on dimension transaction information corresponding to the primary key dimension, generate a primary key value to be stored based on dimension transaction information corresponding to the primary key value dimension, and generate a key-value pair to be stored based on the primary key to be stored and the primary key value to be stored; In the first-level storage space, the corresponding historical key-value pairs are replaced based on the key-value pairs to be stored; the primary key dimensions include customer ID, product ID, product attributes and product transaction units, and the primary key value dimensions include product introduction, transaction date, transaction review date and transaction record date.

4. The method according to claim 1, characterized in that The third-level storage space includes a transaction information table; the querying of the corresponding product introduction from the third-level storage space based on the target customer identifier and the target product identifier includes: generating a joint query index based on a query sequence between the target customer identifier and the target product identifier; In the third-level storage space, the corresponding product introduction is queried from the transaction information table based on the query order corresponding to the joint query index.

5. The method according to claim 1, characterized in that The method further comprises: When receiving a storage request for the target historical price of each designated commodity, creating a fourth-level storage space based on the storage structure of the first-level storage space; Obtaining the transaction customer identifier and transaction commodity identifier corresponding to each of the specified commodities; Based on the transaction customer identifier and the transaction commodity identifier, querying the respective historical transaction prices corresponding to the respective designated commodities in the third-level storage space; Determining target historical prices corresponding to the respective designated commodities based on the respective historical transaction prices; According to the storage structure, the transaction customer identifier, transaction commodity identifier and target historical price corresponding to each designated commodity are stored in the fourth-level storage space.

6. The method according to claim 1, characterized in that The commodity introduction query request is a query request for a reference price of the target commodity generated when pricing the target commodity corresponding to the target commodity identifier to be traded by the target customer corresponding to the target customer identifier; The reference price is the transaction price in the queried product introduction, and the reference price is the transaction price of the target product at the last transaction with the target customer.

7. A data query device, characterized in that: The device comprises: A request acquisition module, used to acquire a product introduction query request; the product introduction query request carries a target customer identifier and a target product identifier; A first query module is used to query the corresponding product introduction from the first-level storage space based on the target customer identifier and the target product identifier; the first-level storage space includes the transaction information of the last transaction between the product generated in the target time period and the customer in the target time period; the transaction information includes the product identifier, the customer identifier and the product introduction; A second query module is used to query the corresponding product introduction from the second-level storage space based on the target customer identifier and the target product identifier when the query fails; the second-level storage space includes transaction information of each product at the time of the last transaction with the customer; The third query module is used to query the corresponding product introduction from the third-level storage space based on the target customer identifier and the target product identifier when the second query fails; the third-level storage space includes the transaction information of each product in each transaction with the customer. The result sending module is used to return the queried product introduction to the terminal corresponding to the product introduction query request.

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.