Item information query method, device, electronic device and readable storage medium
By sending the first transaction parameter modification information and the second transaction parameter modification information to the terminal in the item information query, the terminal can perform cross-matching on its own, solving the problems of high server performance load and high number of data interactions in the existing technology, and improving Improve query efficiency.
Patent Information
- Application Number
- CN202010793593.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-10
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-08-10
AI Technical Summary
In the existing technology, during item information query, the server needs to perform a cross-matching operation, resulting in a high load on server performance and an increase in the number of data interactions between the terminal and the server.
By obtaining the item query request of the user ID and the target item ID, the server separately queries and sends the first transaction parameter modification information and the second transaction parameter modification information to the terminal, so that the terminal can perform cross-matching on its own, and the cross-matching operation between the two Does not need to be performed by the server.
Significantly reduces server performance load, reduces the number of data interactions between the terminal and the server, and improves query efficiency.
Smart Images

Figure CN112307300B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data query technology, and in particular, to the field of item information query technology. Background Art
[0002] With the widespread use of smart mobile terminals and the rise of e-commerce, users often need to query and purchase some items through e-commerce applications on mobile terminals. When purchasing items, transaction parameter modification information such as coupons, points redemption, and promotional activities is the focus of users.
[0003] The current method for querying target item information is to start with the transaction parameter modification information that the user already has, and to determine whether the transaction parameter modification information that the user already has is applicable to the target item through reverse query. Summary of the invention
[0004] The embodiments of the present application provide an item information query method, device, electronic device, and computer-readable storage medium.
[0005] In a first aspect, an embodiment of the present application proposes an item information query method, including: obtaining an item query request including a user identifier and a target item identifier; wherein the target item identifier is an identifier of the target item; querying to obtain first transaction parameter modification information corresponding to the user identifier; querying to obtain second transaction parameter modification information of the target item identifier under at least one preset attribute dimension; and sending the first transaction parameter modification information and the second transaction parameter modification information to a terminal that initiates the item query request.
[0006] In some embodiments, querying to obtain the second transaction parameter modification information of the target item identification under at least one preset attribute dimension includes: taking each preset attribute dimension under the target item identification as a query condition, and searching for the second transaction parameter modification information corresponding to each query condition in a preset database; wherein the database stores data in the form of key-value pairs with the preset attribute dimension as the key and the corresponding transaction parameter modification information as the value.
[0007] In some embodiments, searching for the second transaction parameter modification information corresponding to each query condition in a preset database includes: searching for the second transaction parameter modification information corresponding to each query condition in a preset cache database.
[0008] In some embodiments, the item information query method also includes: obtaining the correspondence information between the newly created item identification in at least one preset attribute dimension and the corresponding transaction parameter information, and writing the correspondence information into a persistent storage database using a structured query language; in response to monitoring the newly added correspondence information in the persistent storage database, converting the newly added correspondence information into key-value pairs, and storing the converted key-value pairs in a cache database.
[0009] In the second aspect, an embodiment of the present application proposes an item information query device, including: an item query request acquisition unit, configured to acquire an item query request including a user identifier and a target item identifier; wherein the target item identifier is an identifier of the target item; a first transaction parameter modification information query unit, configured to query first transaction parameter modification information corresponding to the user identifier; a second transaction parameter modification information query unit, configured to query second transaction parameter modification information of the target item identifier under at least one preset attribute dimension; and a transaction parameter modification information sending unit, configured to send the first transaction parameter modification information and the second transaction parameter modification information to a terminal that initiates the item query request.
[0010] In some embodiments, the second transaction parameter modification information query unit includes: a key-value pair query sub-unit, which is configured to use each preset attribute dimension under the target item identification as a query condition, and search for the second transaction parameter modification information corresponding to each query condition in a preset database; wherein the database stores data in the form of key-value pairs with the preset attribute dimension as the key and the corresponding transaction parameter modification information as the value.
[0011] In some embodiments, the key-value pair query subunit is further configured to: search for the second transaction parameter modification information corresponding to each query condition in a preset cache database.
[0012] In some embodiments, the item information query device also includes: a corresponding relationship persistent storage unit, configured to obtain the corresponding relationship information between the newly created item identification in at least one preset attribute dimension and the corresponding transaction parameter information, and write the corresponding relationship information into a persistent storage database using a structured query language; a corresponding relationship cache unit, configured to respond to monitoring the newly added corresponding relationship information in the persistent storage database, convert the newly added corresponding relationship information into key-value pairs, and store the converted key-value pairs into a cache database.
[0013] In a third aspect, an embodiment of the present application proposes an item information query method, comprising: initiating an item query request including a user identifier and a target item identifier based on the item query information transmitted by the user; wherein the target item identifier is the identifier of the target item; receiving first transaction parameter modification information corresponding to the user and second transaction parameter modification information corresponding to the target item; wherein the first transaction parameter modification information corresponds to the user identifier, and the second transaction parameter modification information corresponds to at least one preset attribute dimension of the target item identifier; cross-matching the first transaction parameter modification information and the second transaction parameter modification information, and marking the matched part of the transaction parameter modification information as the user's available transaction parameter modification information for the target item.
[0014] In some embodiments, cross-matching the first transaction parameter modification information and the second transaction parameter modification information includes: determining the user's current query requirements based on the item query information; determining a target cross-matching range between the first transaction parameter modification information and the second transaction parameter modification information based on the current query requirements; and cross-matching the first transaction parameter modification information and the second transaction parameter modification information within the target cross-matching range.
[0015] In a fourth aspect, an embodiment of the present application provides an item information query device, comprising: an item query request initiating unit, configured to initiate an item query request including a user identifier and a target item identifier based on the item query information transmitted by the user; wherein the target item identifier is the identifier of the target item; a transaction parameter modification information receiving unit, configured to receive first transaction parameter modification information corresponding to the user and second transaction parameter modification information corresponding to the target item; wherein the first transaction parameter modification information corresponds to the user identifier, and the second transaction parameter modification information corresponds to at least one preset attribute dimension of the target item identifier; a cross-matching unit, cross-matching the first transaction parameter modification information and the second transaction parameter modification information, and marking the matched part of the transaction parameter modification information as the user's available transaction parameter modification information for the target item.
[0016] In some embodiments, the cross-matching unit is further configured to: determine the user's current query requirements based on the item query information; determine the target cross-matching range between the first transaction parameter modification information and the second transaction parameter modification information based on the current query requirements; and cross-match the first transaction parameter modification information and the second transaction parameter modification information within the target cross-matching range.
[0017] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that when the at least one processor executes, it can implement the item information query method described in any implementation manner in the first aspect or implement the item information query method described in any implementation manner in the third aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the item information query method described in any of the implementation methods in the first and third aspects when executed.
[0019] The item information query method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application first obtain an item query request including a user identifier and a target item identifier; wherein the target item identifier is an identifier of the target item; then, query and obtain first transaction parameter modification information corresponding to the user identifier; then, query and obtain second transaction parameter modification information of the target item identifier under at least one preset attribute dimension; finally, send the first transaction parameter modification information and the second transaction parameter modification information to the terminal that initiates the item query request.
[0020] Compared with the prior art, the server in the solution provided by the present application can query the first transaction parameter modification information and the second transaction parameter modification information respectively according to the user identification and the target item identification contained in the item query request, and these modification information can be transmitted to the terminal through at least one data interaction, so that the terminal can cross-match itself according to these information and the actual query needs of the user. Since the first transaction parameter modification information owned by the user in this solution and the second transaction parameter modification information modification under each preset attribute dimension with the target item identification exist independently and are not cross-matched like the prior art, the cross-matching operation between the two does not necessarily need to be performed by the server, which significantly reduces the impact on the server performance and also reduces the number of data interactions between the terminal and the server.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0023] Figure 1 is an exemplary system architecture in which the present application may be applied;
[0024] Figure 2 is a flow chart of an embodiment of an item information query method according to the present application;
[0025] Figure 3 is a flow chart of another embodiment of the item information query method according to the present application;
[0026] Figure 4 is a timing diagram of the item information query method according to the present application;
[0027] Figure 5 is a structural block diagram of an embodiment of an item information query device according to the present application;
[0028] Figure 6 is a structural block diagram of another embodiment of an item information query device according to the present application;
[0029] Figure 7 It is a block diagram of an electronic device suitable for implementing the item query method of an embodiment of the present application. DETAILED DESCRIPTION
[0030] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0031] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0032] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the item information query method, apparatus, electronic device, and computer-readable storage medium of the present application can be applied.
[0033] like Figure 1 As shown, system architecture 100 may include terminals 101, 102, 103, network 104 and server 105. Network 104 is used to provide a medium for communication links between terminals 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0034] The user can use the terminal 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. For example, the user initiates an information query request for a certain item to the server 105 through the network 104 through the terminal 101. Various applications for realizing information communication between the terminals 101, 102, 103 and the server 105 can be installed, such as online shopping applications, item discount information query applications, instant messaging applications, etc.
[0035] Terminals 101, 102, 103 and server 105 can be hardware or software. When terminals 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc.; when terminals 101, 102, 103 are software, they can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here. When server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0036] The terminals 101, 102, 103 and the server 105 can provide various services through various built-in applications. Taking an online shopping application that can provide an item information query service as an example, the server 105 can achieve the following effects when running the online shopping application: first, an item query request including a user identifier and a target item identifier is obtained, where the target item identifier is the identifier of the target item; then, the first transaction parameter modification information corresponding to the user identifier is obtained by query; then, the second transaction parameter modification information of the target item identifier under at least one preset attribute dimension is obtained by query; finally, the first transaction parameter modification information and the second transaction parameter modification information are sent to the terminal that initiates the item query request.
[0037] Correspondingly, the terminals 101, 102, and 103 can achieve the following effects when running the online shopping application: first, based on the item query information transmitted by the user, an item query request containing the user identifier and the target item identifier is initiated; then, the first transaction parameter modification information corresponding to the user and the second transaction parameter modification information corresponding to the target item are received; then, the first transaction parameter modification information and the second transaction parameter modification information are cross-matched, and the matched part of the transaction parameter modification information is marked as the user's available transaction parameter modification information for the target item.
[0038] That is, the server 105 responds to the item query request sent by the terminal 101, 102, 103 under the user's operation, and returns the first transaction parameter modification information actually owned by the user and the second transaction parameter modification information of the queried target item to the terminal 101, 102, 103. The terminal 101, 102, 103 can determine which first transaction parameter modification information can be directly used by the user to purchase the target item through cross-matching based on the received transaction parameter modification information.
[0039] It should be understood that Figure 1 The number of terminals, networks and servers in the embodiment is only for illustration. Any number of terminals, networks and servers may be provided according to the implementation requirements.
[0040] Continue to refer Figure 2 , which shows an implementation process 200 of an embodiment of an item information query method provided by the present application, including:
[0041] Step 201: obtaining an item query request including a user ID and a target item ID;
[0042] This step is intended to be performed by the execution subject of the item information query method (for example Figure 1 The server 105 shown in the figure obtains an item query request including a user identifier and a target item identifier.
[0043] Among them, the user identifier is an identifier that represents the corresponding user. Specifically, the user identifier can be specifically expressed as a unique user identity ID, ID number, account number used to log in to an online shopping application, nickname, etc.; the target item identifier is a unique identifier of the target item. The target item is the item among all items that the user wants to find its related transaction parameter modification information through the item query request. Specifically, the target item identifier can be specifically expressed as a unique string, which can be obtained based on the string generation rules formulated in the actual application scenario. For example, the production time, production number, etc. of an item that can uniquely represent the attribute information of the item are calculated through a hash algorithm to calculate the characteristic value, and the characteristic value is used as the identifier of the item.
[0044] Of course, the item query request may also include other information besides the user ID and the target item ID, such as the terminal type, the version of the online shopping application actually used by the terminal, the terminal operating system, etc. The types of information included in the item query request may be flexibly set according to all possible special requirements in actual situations, so that the server can achieve corresponding purposes based on the specific types of information contained therein, such as returning a data file in a format recognizable by the corresponding operating system according to the terminal operating system, determining whether an additional operation needs to be performed according to the terminal operating system, and so on.
[0045] Step 202: query and obtain first transaction parameter modification information corresponding to the user identifier;
[0046] On the basis of step 201, this step aims to query and obtain the first transaction parameter modification information corresponding to the user identifier. It should be understood that the reason why the execution subject of this embodiment can obtain the first transaction parameter modification information through this step is that the correspondence between the user identifier and the transaction parameter modification information is pre-recorded, and the correspondence is pre-stored in a location that can be accessed by the server and perform query operations (for example, a data storage module of the server itself). Specifically, the correspondence can include multiple forms such as key-value pairs and regular expressions. For example, the user identifier is used as the key (Key) in the key-value pair, and the corresponding transaction parameter modification information is used as the value (Value) in the key-value pair. Therefore, the server can use the received user identifier as the Key to query and obtain the corresponding Value.
[0047] According to the method of obtaining the first transaction parameter modification information, it can be known that the first transaction parameter modification information is transaction parameter modification information associated with the user represented by the user identifier, for example, transaction parameter modification information belonging to the user and having the right to use by the user. Among them, all information that may modify the parameters involved in the transaction process of item selection can be called transaction parameter modification information, which can be specifically manifested as point deduction information, coupons, discount coupons, prepayment (or deposit) inflation information, etc. When the transaction parameter modification information is specifically manifested as a coupon, the first transaction parameter modification information can be understood as a coupon owned or received by the user.
[0048] Step 203: query and obtain the second transaction parameter modification information of the target item identifier under at least one preset attribute dimension;
[0049] Based on step 201, this step aims to query and obtain the second transaction parameter modification information of the target item identification under at least one preset attribute dimension. In the solution provided in this application, it is recorded in advance which second transaction parameter modification information the item identification has under different preset attribute dimensions, that is, a corresponding relationship between different attribute dimensions of the item identification and the second transaction parameter modification information is described, and the corresponding relationship is pre-stored in a location that can be accessed by the execution subject of this embodiment and perform the query operation.
[0050] Among them, the preset attribute dimension refers to the possible division method when an item appears on an online shopping platform, or it can be understood as some collections to which it belongs. For example, different commodities can be divided into brand dimensions according to the brands they belong to, production batch dimensions according to production batches, store dimensions according to the stores they are listed on, and seller location dimensions according to the seller's location. The reason why the corresponding transaction parameter modification information is queried according to the target item in different preset attribute dimensions is that the uncertainty of the source of the transaction parameter modification information makes it impossible to determine in which attribute dimension the target item will have transaction parameter modification information. The transaction parameter modification information of different items can appear in different attribute dimensions. For example, in order to help sellers in a certain place better sell the backlog of goods, the corresponding transaction parameter modification information (such as special subsidy coupons) can be set according to the dimension of the seller's location.
[0051] It should be understood that the preset attribute dimensions are usually universal, that is, for all items. Of course, there are also some special attribute dimensions specially set up for certain types of special items. For example, a small number of imported items may have an additional dimension of foreign origin compared to other non-imported items, so that transaction parameter modification information for items imported from a certain country can be established or cancelled based on this dimension. Therefore, when the server obtains the item query request from the item query request, it will determine which preset attribute dimensions exist under it according to the target item identifier, and obtain the transaction parameter modification information under all preset attribute dimensions through the same number of queries as the number of existing preset attribute dimensions.
[0052] According to the method of obtaining the second transaction parameter modification information, it can be known that the second transaction parameter modification information is the transaction parameter modification information that exists in a different preset attribute dimension than the target item identifier, and it is only related to the target item and has nothing to do with the user. Therefore, it can be known that when the transaction parameter modification information is specifically expressed as a coupon, if the first transaction parameter modification information is a coupon owned or received by the user, the second transaction parameter modification information corresponds to all existing coupons for the items that the user wants to purchase. In other words, the intersection of the first transaction parameter modification information and the second transaction parameter modification information is the coupon that can be directly used by the user to purchase the target item without the need for a collection operation.
[0053] In order to facilitate understanding of how to query the second transaction parameter modification information in this step, an implementation method including but not limited to is also provided here:
[0054] Each preset attribute dimension under the target item identification is used as a query condition;
[0055] The second transaction parameter modification information corresponding to each query condition is searched in a preset database; wherein the database stores data in the form of key-value pairs with a preset attribute dimension as a key and the corresponding transaction parameter modification information as a value.
[0056] The above implementation method is based on recording the corresponding relationship in the form of key-value pairs. Specifically, the database recording the key-value pairs can be a cache database on the server, such as a Redis database, so as to make full use of the high read-write characteristics of the cache to achieve high-speed query.
[0057] Furthermore, considering that the personnel who create the corresponding relationship in the actual operation level often do not have the programming skills to directly write it as a key-value pair, it is more likely that the corresponding relationship is created in the form of text or other forms with low operation difficulty and high recognition. Therefore, a two-layer design implementation method is also given, including the following steps:
[0058] Obtaining the correspondence relationship information between at least one preset attribute dimension of the newly created item identifier and the corresponding transaction parameter information, and writing the correspondence relationship information into a persistent storage database using a structured query language;
[0059] In response to monitoring newly added corresponding relationship information in the persistent storage database, the newly added corresponding relationship information is converted into a key-value pair, and the converted key-value pair is stored in the cache database.
[0060] That is, the corresponding relationship creator first creates the corresponding relationship with low operation difficulty and high recognition in the persistent storage database (such as MySql database), and then through the monitoring mechanism, each newly added corresponding relationship in the persistent storage database is directly stored in the cache database in the form of key-value pairs after key-value pair conversion. Specifically, the above operation can be achieved through the Canal (an open source project, pure Java development, based on database incremental log analysis, providing incremental data subscription and consumption, and supporting MySQL) platform.
[0061] Step 204: Send the first transaction parameter modification information and the second transaction parameter modification information to the terminal that initiates the item query request.
[0062] On the basis of step 202 and step 203, this step aims at having the server send the first transaction parameter modification information and the second transaction parameter modification information obtained by query to the terminal that initiates the item query request.
[0063] Please refer to Figure 3 , which shows an implementation process 300 of another embodiment of the item information query method provided by the present application, including:
[0064] Step 301: Initiate an item query request including a user ID and a target item ID according to the item query information input by the user;
[0065] This step is intended to be performed by the execution subject of the item information query method (for example Figure 1 The terminals 101, 102, 103 shown in the figure initiate an item query request including a user identifier and a target item identifier to a server according to the item query information input by the user thereon.
[0066] Step 302: receiving first transaction parameter modification information corresponding to the user and second transaction parameter modification information corresponding to the target item;
[0067] This step follows Figure 2 Step 204 in the process 200 is to receive Figure 2 The execution subject of the method shown sends first transaction parameter modification information corresponding to the user and second transaction parameter modification information corresponding to the target item.
[0068] Step 303: cross-match the first transaction parameter modification information and the second transaction parameter modification information, and mark the matched part of the transaction parameter modification information as the user's available transaction parameter modification information for the target item.
[0069] In order to achieve the purpose of presenting a "coupon" to the user of the terminal which can be used directly by the user to purchase the target item without having to go through the collection operation, this step is intended to enable the executor of this embodiment to cross-match the first transaction parameter modification information and the second transaction parameter modification information, and mark the matched part of the transaction parameter modification information as the user's available transaction parameter modification information for the target item.
[0070] The reason why "coupons" that can be used by users to purchase target items directly without having to go through the collection operation is specially presented is out of consideration for the convenience of user operating habits. This is because the coupons that can be collected but are not owned may require the user to meet some pre-requirements, such as following a certain store, prepaying a deposit, etc. In other words, the user may have spent energy and some operations in the early stage in order to obtain the first transaction parameter modification information. Here, "coupons" that can be used by users to purchase target items directly without having to go through the collection operation are quickly presented to users through cross-matching. This aims to prevent users from spending unnecessary energy in the process of collecting a coupon that they do not have, and to provide users with a preferred solution, which is especially suitable for scenarios such as "product flash sales" and "limited-time purchases".
[0071] Compared with the prior art, the server in the solution provided by the present application can query the first transaction parameter modification information and the second transaction parameter modification information respectively according to the user identification and the target item identification contained in the item query request, and these modification information can be transmitted to the terminal through at least one data interaction, so that the terminal can cross-match itself according to these information and the actual query needs of the user. Since the first transaction parameter modification information owned by the user in this solution and the second transaction parameter modification information modification under each preset attribute dimension with the target item identification exist independently and are not cross-matched like the prior art, the cross-matching operation between the two does not necessarily need to be performed by the server, which significantly reduces the impact on the server performance and also reduces the number of data interactions between the terminal and the server.
[0072] The above Figure 2 The process 200 shown and Figure 3 The process 300 shown is equivalent to describing the operations performed by the server and the terminal from their respective perspectives. In order to more clearly describe the entire implementation process, this embodiment also uses the following example Figure 4 The timing diagram shown gives a more specific implementation scheme that reflects the execution subjects on both the terminal and the server:
[0073] Step 401: The terminal sends an item query request to the server;
[0074] The item query request includes a user ID and a target item ID.
[0075] Step 402: the server queries the first transaction parameter modification information corresponding to the user identifier;
[0076] Step 403: the server queries the second transaction parameter modification information of the target item identifier under at least one preset attribute dimension;
[0077] Step 404: the server returns the first transaction parameter modification information and the second transaction parameter modification information to the terminal;
[0078] Step 401 to step 404 are the same as step 201 to step 204 and step 301 to step 302, and will not be repeated here. For detailed description and instructions, please refer to the specific content of the corresponding step.
[0079] Step 405: The terminal determines the user's current query demand based on the item query information;
[0080] Step 406: The terminal determines a target cross-matching range between the first transaction parameter modification information and the second transaction parameter modification information according to the current query requirement;
[0081] Step 407: The terminal cross-matches the first transaction parameter modification information and the second transaction parameter modification information within the target cross-matching range, and presents the matching result to the user.
[0082] Different from step 303, this embodiment provides a specific and preferred cross-matching solution through step 405 to fully combine the actual operation of the user. When the user initiates a query request for multiple target items to the terminal based on the relationship between keywords, the returned first transaction parameter modification information and the second transaction parameter modification information should also correspond to multiple target items. However, when the user is actually shopping, he can only focus on one target item at the same time. Therefore, in combination with this actual situation, only the transaction parameter modification information of a few target items corresponding to the current query requirements is cross-matched according to the current query requirements of the user, thereby reducing the instantaneous computing amount required by the terminal as much as possible.
[0083] Moreover, this point also makes it easier to see the difference between this solution and the prior art. The prior art starts with the coupons owned by the user, and determines in turn whether each coupon owned by the user can be used on each target item. The above calculation can only be done by the server, and the server needs to complete it at one time, which brings great pressure to the server's cache database.
[0084] To deepen understanding, this application also provides a specific implementation scheme in combination with a specific application scenario. The scenario is that user A uses an online shopping platform installed on his smartphone. User A already has 10 coupons. On a certain day, he performs a product information query operation with the keyword "X microwave oven". For microwave oven products, the online shopping platform presets three attribute dimensions for them, namely, the product category dimension, the store dimension, and the seller's location dimension.
[0085] After receiving the product information query request, the server of the online shopping platform extracts the user ID: A and the target product ID: X microwave oven. According to A, 10 coupons owned by the user are queried. According to X microwave oven, 3 alternative options are queried, which are numbered 01, 02 and 03 respectively.
[0086] Among them, the product category of X Microwave Oven with number 01 is household appliances, the store is X Microwave Oven Flagship Store, and the seller is located in Jiangxi Province;
[0087] The product category of X Microwave Oven with the number 02 is household appliances, the store is X Microwave Oven First Branch, and the seller is located in Hubei Province;
[0088] The X microwave oven with the number 03 belongs to the category of household appliances, the gasket is sold by X microwave oven second branch, and the seller is located in Zhejiang Province.
[0089] In its cached data, the server queries all existing coupons according to the corresponding identification representations of numbers 01, 02, and 03 in their specific three dimensions. Among them, it is found that there are 15 coupons belonging to the household appliances category for numbers 01, 02, and 03; number 01 also has 3 exclusive coupons because of its X microwave flagship store; number 02 also has 5 exclusive coupons because its seller is located in Hubei Province. That is, the server queries the three options of numbers 01, 02, and 03 three times in three dimensions, and finds that there are 18 coupons for number 01 (that is, the corresponding coupons for the product of number 01 are not found in the dimension of the seller's location), 20 coupons for number 02 (that is, the corresponding coupons for the product of number 02 are not found in the dimension of the store), and 15 coupons for number 03 (that is, the corresponding coupons for the product of number 03 are not found in the dimension of the store and the dimension of the seller's location).
[0090] The server returns the 10 coupons owned by user A and the 53 coupons numbered 01, 02, and 03 to the online shopping application installed on the smartphone used by user A.
[0091] The online shopping application installed on the smartphone of user A detects that user A immediately issued specific coupon information for the product numbered 01, and performs a cross-match between the 10 coupons owned by user A and the 18 coupons corresponding to numbered 01, and marks 5 of the matching coupons as directly usable coupons and presents them to user A;
[0092] The online shopping application installed on the smartphone of user A detects that user A has issued specific coupon information viewing operation information for the product numbered 02 at the second time, and performs a cross-match between the 10 coupons owned by user A and the 20 coupons corresponding to numbered 02, and marks 6 of the matching coupons as directly usable coupons and presents them to user A;
[0093] The online shopping application installed on the smartphone of user A detects that user A has issued specific coupon information viewing operation information for product number 03 at the third time, and cross-matches the 10 coupons owned by user A with the 15 coupons corresponding to number 03, and marks 4 of the matched coupons as directly usable coupons as results and presents them to user A.
[0094] After the above comparison, user A finally selects a target coupon with the greatest discount among the 6 coupons that match the 20 coupons corresponding to number 02, and uses the target coupon to purchase the X microwave oven with number 02.
[0095] Further references Figure 5 , as a counter Figure 2 In order to realize the item information query method shown in the figure, the present application provides an embodiment of a corresponding item information query device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0096] like Figure 5 As shown, the item information query device 500 of this embodiment may include: an item query request acquisition unit 501, a first transaction parameter modification information query unit 502, a second transaction parameter modification information query unit 503, and a transaction parameter modification information sending unit 504. The item query request acquisition unit 501 is configured to acquire an item query request including a user identifier and a target item identifier; wherein the target item identifier is an identifier of the target item; the first transaction parameter modification information query unit 502 is configured to query the first transaction parameter modification information corresponding to the user identifier; the second transaction parameter modification information query unit 503 is configured to query the second transaction parameter modification information of the target item identifier under at least one preset attribute dimension; the transaction parameter modification information sending unit 504 is configured to send the first transaction parameter modification information and the second transaction parameter modification information to the terminal that initiates the item query request.
[0097] In this embodiment, the specific processing of the item query request acquisition unit 501, the first transaction parameter modification information query unit 502, the second transaction parameter modification information query unit 503 and the transaction parameter modification information sending unit 504 in the item information query device 500 and the technical effects thereof can be referred to respectively. Figure 2 The relevant descriptions of steps 201 - 204 in the corresponding embodiment are not repeated here.
[0098] In some optional implementations of the present embodiment, the second transaction parameter modification information query unit 503 may include: a key-value pair query subunit, configured to use each preset attribute dimension under the target item identification as a query condition, and search for the second transaction parameter modification information corresponding to each query condition in a preset database; wherein the database stores data in the form of key-value pairs with the preset attribute dimension as the key and the corresponding transaction parameter modification information as the value.
[0099] In some embodiments, the key-value pair query subunit is further configured to: search for the second transaction parameter modification information corresponding to each query condition in a preset cache database.
[0100] In some embodiments, the item information query device 500 may also include: a corresponding relationship persistent storage unit, configured to obtain the corresponding relationship information between the newly created item identification in at least one preset attribute dimension and the corresponding transaction parameter information, and write the corresponding relationship information into a persistent storage database using a structured query language; a corresponding relationship cache unit, configured to respond to monitoring the newly added corresponding relationship information in the persistent storage database, convert the newly added corresponding relationship information into key-value pairs, and store the converted key-value pairs into a cache database.
[0101] Further references Figure 6 , as a counter Figure 3 In order to realize the item information query method shown in the figure, the present application provides an embodiment of a corresponding item information query device. Figure 3 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0102] like Figure 6 As shown, the item information query device 600 of this embodiment may include: an item query request initiating unit 601, a transaction parameter modification information receiving unit 602, and a cross-matching unit 603. The item query request initiating unit 601 is configured to initiate an item query request including a user identifier and a target item identifier according to the item query information input by the user; wherein the target item identifier is the identifier of the target item; the transaction parameter modification information receiving unit 602 is configured to receive first transaction parameter modification information corresponding to the user and second transaction parameter modification information corresponding to the target item; wherein the first transaction parameter modification information corresponds to the user identifier, and the second transaction parameter modification information corresponds to at least one preset attribute dimension of the target item identifier; the cross-matching unit 603 cross-matches the first transaction parameter modification information and the second transaction parameter modification information, and marks the matched part of the transaction parameter modification information as the user's available transaction parameter modification information for the target item.
[0103] In this embodiment, the specific processing of the item query request initiating unit 601, the transaction parameter modification information receiving unit 602, and the cross matching unit 603 in the item information query device 600 and the technical effects thereof can be referred to in Figure 3 The relevant descriptions of steps 301 - 304 in the corresponding embodiment are not repeated here.
[0104] In some optional implementations of this embodiment, the cross-matching unit 603 can be further configured to: determine the user's current query requirements based on the item query information; determine the target cross-matching range between the first transaction parameter modification information and the second transaction parameter modification information based on the current query requirements; and cross-match the first transaction parameter modification information and the second transaction parameter modification information within the target cross-matching range.
[0105] This embodiment exists as a device embodiment corresponding to the above method embodiment. The item information query device provided by this embodiment, compared with the prior art, the server in the scheme provided by this embodiment can query the first transaction parameter modification information and the second transaction parameter modification information respectively according to the user identification and the target item identification contained in the item query request, and these modification information can be transmitted to the terminal through at least one data interaction, so that the terminal can cross-match itself according to these information combined with the user's actual query needs. Since the first transaction parameter modification information owned by the user in this scheme and the second transaction parameter modification information modification with the target item identification under each preset attribute dimension exist independently and are not cross-matched like the prior art, the cross-matching operation between the two does not necessarily need to be performed by the server, which significantly reduces the impact on the server performance, and also reduces the number of data interactions between the terminal and the server.
[0106] According to an embodiment of the present application, the present application also provides an electronic device and a computer-readable storage medium.
[0107] Figure 7 A block diagram of an electronic device suitable for implementing an item information query method of an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0108] like Figure 7As shown, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 701 is taken as an example.
[0109] The memory 702 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable at least one processor to perform the item information query method provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the item information query method provided in the present application.
[0110] The memory 702 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the item information query method provided in the embodiment of the present application (for example, the attached Figure 5 The item query request obtaining unit 501, the first transaction parameter modification information query unit 502, the second transaction parameter modification information query unit 503 and the transaction parameter modification information sending unit 504 are shown, and the attached Figure 6 The processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, the item information query method provided by the above method embodiment is implemented.
[0111] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store various types of data created by the electronic device when executing the item information query method, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to an electronic device suitable for executing the item information query method via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0112] The electronic device suitable for executing the item information query method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0113] The input device 703 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device suitable for executing the item information query method, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
[0114] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0118] A computer system may include terminals and servers. The terminals and servers are generally remote from each other and usually interact through a communication network. The relationship between the terminal and the server is generated by computer programs running on the respective computers and having a terminal-server relationship to each other.
[0119] According to the technical solution of the embodiment of the present application, compared with the prior art, the server in the solution provided by the present embodiment can query the first transaction parameter modification information and the second transaction parameter modification information respectively according to the user identification and the target item identification contained in the item query request, and these modification information can be transmitted to the terminal through at least one data interaction, so that the terminal can cross-match itself according to these information combined with the actual query needs of the user. Since the first transaction parameter modification information owned by the user in this solution and the second transaction parameter modification information modification under each preset attribute dimension with the target item identification exist independently and are not cross-matched like the prior art, the cross-matching operation between the two does not necessarily need to be performed by the server, which significantly reduces the impact on the server performance and also reduces the number of data interactions between the terminal and the server.
[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0121] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for querying item information, comprising: Obtaining an item query request including a user identifier and a target item identifier; wherein the target item identifier is an identifier of the target item; querying and obtaining first transaction parameter modification information corresponding to the user identifier; The query obtains second transaction parameter modification information of the target item identifier under at least one preset attribute dimension; wherein the second transaction parameter modification information is transaction parameter modification information existing under a different preset attribute dimension than the target item identifier, and is only related to the target item and has nothing to do with the user; Sending the first transaction parameter modification information and the second transaction parameter modification information to the client that initiates the item query request; Obtaining corresponding relationship information between at least one preset attribute dimension of the newly created item identifier and corresponding transaction parameter information, and writing the corresponding relationship information into a persistent storage database using a structured query language; In response to monitoring newly added corresponding relationship information in the persistent storage database, the newly added corresponding relationship information is converted into a key-value pair, and the converted key-value pair is stored in the cache database.
2. The method for searching item information according to claim 1, wherein: The querying to obtain the second transaction parameter modification information of the target item identifier under at least one preset attribute dimension includes: Each preset attribute dimension under the target item identification is used as a query condition, and the second transaction parameter modification information corresponding to each query condition is searched in a preset database; wherein the database stores data in the form of key-value pairs with the preset attribute dimension as the key and the corresponding transaction parameter modification information as the value.
3. The method for searching item information according to claim 2, wherein: The step of searching the preset database for the second transaction parameter modification information corresponding to each of the query conditions includes: The second transaction parameter modification information corresponding to each of the query conditions is searched in a preset cache database.
4. An item information query device, comprising: An item query request acquisition unit is configured to acquire an item query request including a user identifier and a target item identifier; wherein the target item identifier is an identifier of the target item; A first transaction parameter modification information query unit, configured to query first transaction parameter modification information corresponding to the user identifier; A second transaction parameter modification information query unit is configured to query the second transaction parameter modification information of the target item identifier under at least one preset attribute dimension; wherein the second transaction parameter modification information is transaction parameter modification information existing under a different preset attribute dimension from the target item identifier, and is only related to the target item and has nothing to do with the user; a transaction parameter modification information sending unit, configured to send the first transaction parameter modification information and the second transaction parameter modification information to the client that initiates the item query request; a corresponding relationship persistent storage unit, configured to obtain corresponding relationship information between at least one preset attribute dimension of a newly created item identifier and corresponding transaction parameter information, and write the corresponding relationship information into a persistent storage database using a structured query language; The corresponding relationship cache unit is configured to, in response to monitoring the newly added corresponding relationship information in the persistent storage database, convert the newly added corresponding relationship information into key-value pairs, and store the converted key-value pairs into the cache database.
5. The article information query device according to claim 4, wherein: The second transaction parameter modification information query unit includes: The key-value pair query subunit is configured to use each preset attribute dimension under the target item identification as a query condition, and search for the second transaction parameter modification information corresponding to each query condition in a preset database; wherein the database stores data in the form of key-value pairs with the preset attribute dimension as the key and the corresponding transaction parameter modification information as the value.
6. The article information query device according to claim 5, wherein: The key-value pair query subunit is further configured to: The second transaction parameter modification information corresponding to each of the query conditions is searched in a preset cache database.
7. A method for querying item information, comprising: Initiating an item query request including a user identifier and a target item identifier according to the item query information input by the user; wherein the target item identifier is an identifier of the target item; receiving first transaction parameter modification information corresponding to the user and second transaction parameter modification information corresponding to the target item sent by the server; wherein the first transaction parameter modification information corresponds to the user identifier, the second transaction parameter modification information corresponds to at least one preset attribute dimension of the target item identifier, and the second transaction parameter modification information is transaction parameter modification information existing in a different preset attribute dimension from the target item identifier, which is only related to the target item and has nothing to do with the user, the server obtaining corresponding relationship information between at least one preset attribute dimension of the newly created item identifier and the corresponding transaction parameter information, and writing the corresponding relationship information into a persistent storage database using a structured query language, and in response to detecting newly added corresponding relationship information in the persistent storage database, converting the newly added corresponding relationship information into key-value pairs, and storing the converted key-value pairs into a cache database; The first transaction parameter modification information and the second transaction parameter modification information are cross-matched, and the matched part of the transaction parameter modification information is marked as the available transaction parameter modification information of the user for the target item.
8. The method for searching item information according to claim 7, wherein: The cross-matching of the first transaction parameter modification information and the second transaction parameter modification information includes: Determining the user's current query demand according to the item query information; Determine a target cross-matching range between the first transaction parameter modification information and the second transaction parameter modification information according to the current query requirement; Cross-matching is performed on the first transaction parameter modification information and the second transaction parameter modification information within the target cross-matching range.
9. An item information query device, comprising: The item query request initiating unit is configured to initiate an item query request including a user identifier and a target item identifier according to the item query information input by the user; wherein the target item identifier is an identifier of the target item; The transaction parameter modification information receiving unit is configured to receive first transaction parameter modification information corresponding to the user and second transaction parameter modification information corresponding to the target item sent by the server; wherein the first transaction parameter modification information corresponds to the user identifier, the second transaction parameter modification information corresponds to at least one preset attribute dimension of the target item identifier, and the second transaction parameter modification information is transaction parameter modification information existing in a different preset attribute dimension from the target item identifier, which is only related to the target item and has nothing to do with the user, the server obtains the corresponding relationship information between the newly created item identifier and the corresponding transaction parameter information in at least one preset attribute dimension, and writes the corresponding relationship information into a persistent storage database using a structured query language, and in response to monitoring the newly added corresponding relationship information in the persistent storage database, converts the newly added corresponding relationship information into key-value pairs, and stores the converted key-value pairs into a cache database; A cross-matching unit cross-matches the first transaction parameter modification information and the second transaction parameter modification information, and marks the matched part of the transaction parameter modification information as the available transaction parameter modification information of the user for the target item.
10. The article information query device according to claim 9, wherein: The cross matching unit is further configured to: Determining the user's current query demand according to the item query information; Determine a target cross-matching range between the first transaction parameter modification information and the second transaction parameter modification information according to the current query requirement; Cross-matching is performed on the first transaction parameter modification information and the second transaction parameter modification information within the target cross-matching range.
11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the item information query method described in any one of claims 1-3 and 7-8.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the item information query method according to any one of claims 1-3 and 7-8.
