Order query method and device, storage medium and electronic device

CN116244350BActive Publication Date: 2026-02-27HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211676026.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2026-02-27
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

[0004]本发明实施例提供了一种订单查询方法和装置、存储介质和电子装置,以至少解决现有订单查询方式的查询效率较低的技术问题

Benefits of technology

[0015] In the embodiments of the present application, an order query request is received; in the case that a time interval parameter is carried in the order query request, the target order information is searched in a first order data set and/or a second order data set according to the time interval parameter; and a target order list matched with the order query request is sent, so that the order information required by a user is searched from two data sets divided according to order information generation time according to the order query request sent by the user. It can be understood that, since the second order data set stores a collection of order information after the target time point, the data amount of the second order data set can be significantly smaller than that of the first order data set, thereby reducing data processing amount, reducing searching time, improving order information searching efficiency, and further solving the technical problem of low order query efficiency of the existing order query method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116244350B_ABST
    Figure CN116244350B_ABST
Patent Text Reader

Abstract

The application discloses an order query method and device, a storage medium and an electronic device, relates to the technical field of smart home, and the method comprises the following steps: receiving an order query request, the order query request is used for querying a target order list, and the target order list comprises at least one piece of target order information; in the case that a time interval parameter is carried in the order query request, the target order information is found in a first order data set and / or a second order data set according to the time interval parameter, the time interval parameter is used for indicating a time interval in which information generation time of the target order information to be queried is located, order data before a target time point is stored in the first order data set, and order data after the target time point is stored in the second order data set; the found target order information is combined into the target order list; and the target order list matched with the order query request is sent. The application solves the technical problem of low query efficiency of the existing order query mode.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of smart home / smart home, in particular to an order query method and device, a storage medium and an electronic device. BACKGROUND

[0002] In an online mall system, all user order data usually needs to be saved, so as to query the historical orders of the user in response to the query request of the user. Since the user order data generated by the online mall is usually large, there is a technical problem of low query efficiency in querying the target order data requested by the user in a large amount of data.

[0003] At present, no effective solution has been proposed for the above problems. SUMMARY

[0004] The embodiments of the present application provide an order query method and device, a storage medium and an electronic device, to at least solve the technical problem of low query efficiency of the existing order query method.

[0005] According to an aspect of the embodiments of the present application, an order query method is provided, comprising: receiving an order query request, wherein the order query request is used to query a target order list, and the target order list includes at least one target order information; in the case that a time interval parameter is carried in the order query request, searching the target order information in a first order data set and / or a second order data set according to the time interval parameter, wherein the time interval parameter is used to indicate the time interval in which the information generation time of the target order information to be queried is located, the first order data set saves the order data before a target time point, and the second order data set saves the order data after the target time point; combining the searched target order information into the target order list; and sending the target order list matched with the order query request.

[0006] Optionally, in the case that the time interval parameter is carried in the order query request, searching the target order information in the first order data set and / or the second order data set according to the time interval parameter comprises: in the case that the target time point is after the time interval, searching the target order information from the first order data set; in the case that the target time point is before the time interval, searching the target order information from the second order data set; and in the case that the target time point is between the time interval, searching the target order information from the first order data set and the second order data set.

[0007] Optionally, in the case that the target time point is between the time intervals, the target order information is searched from the first order data set and the second order data set, and the method further comprises: taking order information in the first order data set and / or the second order data set, the information generation time of which is between the time intervals, as the target order information.

[0008] Optionally, before the target order information searched is combined into the target order list, the method further comprises: in the case that the order query request carries an order number parameter, obtaining the order number parameter, wherein the order number parameter is obtained by processing a user object identifier and an information generation time by an encryption algorithm; parsing the order number parameter to obtain the information generation time of the target order information matched with the order query request; and searching the target order information from the first order data set and / or the second order data set according to the information generation time and the order number parameter.

[0009] Optionally, before the target order list matched with the order query request is sent, the method further comprises: in the case that the order query request carries an order page sequence number, obtaining the order page sequence number, wherein the order page sequence number is used to query a target order list composed of a fixed number of target order information, each target order information in the target order list is arranged in descending order of the corresponding information generation time, and each target order information corresponds to an order sequence number which is arranged in ascending order of the information generation time; obtaining a reference order sequence number and a page capacity parameter from the order query request, wherein the reference order sequence number is the order sequence number of the last order information in the target order list corresponding to a reference order query request, the reference order query request is the last order query request carrying the order page sequence number, and the page capacity parameter indicates the number of target order information in the target order list; searching the target order information from the first order data set and / or the second order data set based on the order sequence number and the page capacity parameter; and arranging the target order information searched in descending order of the corresponding order sequence number to obtain the target order list.

[0010] Optionally, the searching the target order information from the first order data set and / or the second order data set based on the order sequence number and the page capacity parameter comprises: determining a reference order sequence number sequence in which the order sequence number value is less than the reference order sequence number value; obtaining the first N reference order sequence numbers in the reference order sequence number sequence, wherein N corresponds to the page capacity parameter; and searching the target order information corresponding to the N reference order sequence numbers from the first order data set and / or the second order data set.

[0011] Optionally, before receiving the order query request, the method further comprises: obtaining the target time point; and updating the first order data set and the second order data set according to a preset update frequency, comprising: transferring order data in the second order data set, whose information generation time is before the target time point, to the first order data set.

[0012] According to another aspect of the embodiments of the present application, an order query device is further provided, comprising: a receiving unit configured to receive an order query request, wherein the order query request is used to query a target order list, and the target order list comprises at least one target order information; a searching unit configured to search the target order information in a first order data set and / or a second order data set according to a time interval parameter carried in the order query request, wherein the time interval parameter is used to indicate a time interval in which information generation time of the target order information to be queried is located, the first order data set stores order data before a target time point, and the second order data set stores order data after the target time point; a combining unit configured to combine the searched target order information into the target order list; and a sending unit configured to send the target order list matched with the order query request.

[0013] According to still another aspect of the embodiments of the present application, a computer readable storage medium is further provided, wherein the computer readable storage medium stores a computer program, and the computer program is configured to execute the order query method when running.

[0014] According to still another aspect of the embodiments of the present application, an electronic device is further provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the order query method through the computer program.

[0015] In the embodiments of the present application, an order query request is received; in the case that a time interval parameter is carried in the order query request, the target order information is searched in a first order data set and / or a second order data set according to the time interval parameter; and a target order list matched with the order query request is sent, so that the order information required by a user is searched from two data sets divided according to order information generation time according to the order query request sent by the user. It can be understood that, since the second order data set stores a collection of order information after the target time point, the data amount of the second order data set can be significantly smaller than that of the first order data set, thereby reducing data processing amount, reducing searching time, improving order information searching efficiency, and further solving the technical problem of low order query efficiency of the existing order query method. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0017] Figure 1 is a schematic diagram of a hardware environment of an optional order query method according to an embodiment of the application;

[0018] Figure 2 is a flow chart of an optional order query method according to an embodiment of the application;

[0019] Figure 3 is a schematic diagram of an optional order query method according to an embodiment of the application;

[0020] Figure 4 is a flow chart of another optional order query method according to an embodiment of the application;

[0021] Figure 5 is a structural schematic diagram of an optional order query device according to an embodiment of the application;

[0022] Figure 6 is a structural schematic diagram of an optional electronic device according to an embodiment of the application. DETAILED DESCRIPTION

[0023] In order to make the technical personnel of the art better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should be within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to an aspect of the embodiments of the present application, an order query method is provided. The order query method can be widely applied to smart home, smart home, smart home device ecology, intelligence house ecology, and other whole-house intelligent digital control application scenarios. Optionally, in the present embodiment, the order query method can be applied to the hardware environment composed of the terminal device 102 and the server 104 as shown in Figure 1 As shown in Figure 1 The server 104 is connected with the terminal device 102 through the network, which can be used to provide services (such as order query services) for the terminal or the client installed on the terminal, and a database can be set on the server or independently of the server, which is used to provide data storage services for the server 104, for example, it can store an order set, including a first order data set that saves order data before a target time point, and a second order data set that saves order data after the target time point; In addition, cloud computing and / or edge computing services can also be configured on the server or independently of the server, which are used to provide data operation services for the server 104, and specifically, the operation services can be used to query orders from the order set.

[0026] The network can include but is not limited to at least one of the following: wired network, wireless network. The wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart oven, smart refrigerator, smart oven, smart oven, smart washing machine, smart water heater, smart washing device, smart dishwasher, smart projection device, smart television, smart clothesline, smart curtain, smart audio and video, smart socket, smart sound, smart sound box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.

[0027] As an optional implementation manner, as shown in Figure 2 The order query method includes the following steps:

[0028] S202, receiving an order query request, wherein the order query request is used to query a target order list, and the target order list includes at least one target order information;

[0029] S204, in the case that the time interval parameter is carried in the order query request, the target order information is found in the first order data set and / or the second order data set according to the time interval parameter, wherein the time interval parameter is used to indicate the time interval in which the information generation time of the queried target order information is located, the first order data set saves order data before the target time point, and the second order data set saves order data after the target time point;

[0030] S206, the target order information found is combined into a target order list;

[0031] S208, the target order list matched with the order query request is sent.

[0032] It can be understood that in the above step S202, the order query request can be a request sent by the client for querying the target order information. After the target order information is found in the database in response to the order query request, an order list composed of the target order information is returned to the client. Optionally, in the case that the number of target order information corresponding to the order request is one, the returned order list can include one piece of target order information; in the case that the number of target order information corresponding to the order request is multiple, the returned order list can include multiple pieces of target order information.

[0033] The target order information requested in the above step S202 can include but is not limited to order number information, order serial number information used to uniquely indicate an order information, and can also include order payment information, commodity information, order information generation time information, etc. Among them, the order number information can be a number information uniquely determined according to the user account identifier and the order information generation time, for example, the order number "011020221111" can be determined by splicing operation according to the account identifier "0110" and the order generation time "20221111"; in another optional way, the order number can also be obtained by encryption algorithm calculation operation according to the account identifier "0110" and the order generation time "20221111". The above order serial number information can be serial number information used to indicate the order generation sequence. For example, assuming that the account identifier of user A is "0110", the serial number of the first shopping order in B e-commerce market can be "01100001", the serial number of the second shopping order in B e-commerce market can be "01100002"…… and so on. It should be noted that the contents included in the above order information in this embodiment are only examples and do not limit the specific implementation of this embodiment.

[0034] The time interval parameter in step S204 can include, but is not limited to, time period information indicating the order generation time of the target order information. For example, the parameter "2022" can be used to indicate all order information generated by the user in the e-commerce platform in 2022; the parameter "January 2022" can be used to indicate all order information generated by the user in the e-commerce platform in January 2022.

[0035] The first order data set stores order data before the target time point, and the second order data set stores order data after the target time point. It should be noted that the target time point is a predetermined time point, which can be a fixed time point determined for the entire order data set. For example, for all order data in B e-commerce platform, January 1, 2015 is determined as the target time point, and all order data in B e-commerce platform is divided into two parts, the first part stores order data generated before January 1, 2015, and the second part stores order data generated after January 1, 2015.

[0036] Alternatively, the target time point can also be a variable time point determined for the entire order data set. For example, the target time point is determined as the time point corresponding to 5 years before the current time point. In the case where the current time is January 1, 2022, the target time point is determined as January 1, 2017, and all order data in B e-commerce platform is divided into two parts, the first part stores order data generated before January 1, 2017, and the second part stores order data generated after January 1, 2017. In the case where the current time is January 2, 2022, the target time point is determined as January 2, 2017, and all order data in B e-commerce platform is divided into two parts, the first part stores order data generated before January 2, 2017, and the second part stores order data generated after January 2, 2017.

[0037] Alternatively, the target time point can also be different time points determined for different users. For example, user a has 100 order data in B e-commerce platform, and the generation time of the 10th order information of user a is determined as the target time point corresponding to user a. User b has 10 order data in B e-commerce platform, and the generation time of the 1st order information of user b is determined as the target time point corresponding to user b. Then, the first order data set of B e-commerce platform stores the first 10 order data of user a and the 1st order data of user b, and the second order data set of B e-commerce platform stores the 11th order data to the 100th order data of user a and the 2nd data to the 10th order data of user b.

[0038] It can be understood that according to the query rule and processing rule of the electronic order, the probability of the order being queried or processed is smaller if the order is generated farther away from the current time point. Therefore, two data sets can be determined according to the order generation time. In the first data set, order data generated relatively far away from the current time is saved. In the second data set, order data generated relatively close to the current time is saved. Therefore, when the order query request is received, the order query is performed in the second data set first. Since the data amount of the second data set is significantly smaller than the total data amount, the order query efficiency can be significantly improved. In addition, when the data structure of the order data needs to be adjusted, the data structure can be adjusted in the second data set first, so that the structure of all order table data is avoided to be modified, and the convenience of modifying the data structure of the order data is improved.

[0039] It should be noted that the above method of determining the target time point is only exemplary and does not limit the specific implementation of the above method.

[0040] Further, after the target order information is found from the first order data set and / or the second order data set, the found target order information can be combined to obtain a target order list. In the case that there is only one piece of target order information, the above combination method is to directly determine the target order information as the target order list. In the case that there are multiple pieces of target order information, the above combination method is to directly combine the multiple pieces of target order information in a preset order to determine the target order list. For example, in the case that the received order query request carries a display order request element, the preset order can be determined according to the display order request element carried in the order query request, such as time order, order amount order, relevance order, etc. The above combination method is only exemplary and does not limit the combination method in actual application.

[0041] According to the above embodiments of the present application, the order query request is received. In the case that the order query request carries a time interval parameter, the target order information is found in the first order data set and / or the second order data set according to the time interval parameter. The target order list matched with the order query request is sent, so that the order information required by the user is found from the two data sets divided according to the order information generation time according to the order query request sent by the user. It can be understood that since the second order data set saves the order information set after the target time point, the data amount of the second order data set can be significantly smaller than the total data amount of the first order data set and the second order data set, thereby reducing the data processing amount, reducing the search time, improving the order information search efficiency, and solving the technical problem of low query efficiency of the existing order query method.

[0042] As an optional implementation, in the case that the time interval parameter is carried in the order query request, the target order information is found in the first order data set and / or the second order data set according to the time interval parameter, including:

[0043] S1, in the case that the target time point is after the time interval, the target order information is found from the first order data set;

[0044] S2, in the case that the target time point is before the time interval, the target order information is found from the second order data set;

[0045] S3, in the case that the target time point is between the time interval, the target order information is found from the first order data set and the second order data set.

[0046] Specifically, assuming that the above target time point is January 1, 2015, in the case that the time interval carried in the order query request is “2019”, it is determined that the above target time point is before the above time interval parameter, and then the above target order information is queried in the second order data set; in the case that the time interval carried in the order query request is “2014”, it is determined that the above target time point is after the above time interval parameter, and then the above target order information is queried in the first order data set; in the case that the time interval carried in the order query request is “2014-2015”, it is determined that the above target time point is between the above time interval parameter, and then the above target order information is queried in the first order data set and the second order data set.

[0047] Through the above implementation of the present application, in the case that the target time point is after the time interval, the target order information is found from the first order data set; in the case that the target time point is before the time interval, the target order information is found from the second order data set; in the case that the target time point is between the time interval, the target order information is found from the first order data set and the second order data set, so that the target order information is found from the corresponding order data set according to the time interval parameter carried in the query request, avoiding data searching from all order data, thereby realizing the technical effect of improving the searching efficiency.

[0048] As an optional implementation, in the case that the target time point is between the time interval, the target order information is found from the first order data set and the second order data set, further including: taking the order information in the first order data set and / or the second order data set whose information generation time is between the time interval as the target order information.

[0049] It can be understood that in the present embodiment, after the data set for searching the target order information is determined in the above manner, the corresponding order information in the corresponding order data set is determined as the target order information according to the above time interval parameter.

[0050] As an optional embodiment, the above combining the found target order information into the target order list further includes:

[0051] S1, in the case that the order query request carries the order number parameter, obtaining the order number parameter, wherein the order number parameter is obtained by processing the user object identifier and the information generation time through an encryption algorithm;

[0052] S2, parsing the order number parameter to obtain the information generation time of the target order information matched with the order query request;

[0053] S3, searching the target order information in the first order data set and / or the second order data set according to the information generation time and the order number parameter.

[0054] It should be noted that in the present embodiment, corresponding to the operation of the client querying the order according to the order number parameter, in the case that the order number parameter is obtained, the information generation time of the target order information can be further parsed according to the order number, and the order query can be further performed in the corresponding order data set according to the information generation time.

[0055] For example, in the case that the order number information is obtained by splicing the user account identifier and the order generation time, the received order number is "011020221111", and the order generation time "November 11, 2022" is parsed therefrom; it is assumed that in the present embodiment, the target time point is January 1, 2015, and the order information is determined to be queried in the second order data set.

[0056] In another way, the order number information is obtained according to the user account identifier and the order generation time according to the encryption algorithm agreed between the server and the client, in the case that the order number "1122334459" is obtained, the order generation time corresponding to the order number is determined by parsing the order number according to the agreed decryption algorithm, and the order information is queried in the corresponding order data set.

[0057] According to the above-mentioned embodiments of the present application, in the case that the order number parameter is carried in the order query request, the order number parameter is obtained, wherein the order number parameter is obtained by processing the user object identifier and the information generation time by an encryption algorithm; the order number parameter is parsed to obtain the information generation time of the target order information matched with the order query request; and the target order information is searched in the first order data set and / or the second order data set according to the information generation time and the order number parameter, so that in the case that the order query operation according to the order number information is initiated on the client side, the order query is performed in the corresponding order data set according to the time information parsed from the order number information, and thus the order query in the set including all orders is avoided, and the order query efficiency is significantly improved.

[0058] As an optional embodiment, before the above-mentioned sending the target order list matched with the order query request, the following steps are further included:

[0059] S1, in the case that the order page serial number is carried in the order query request, the order page serial number is obtained, wherein the order page serial number is used to query the target order list composed of a fixed number of target order information, and each target order information in the target order list is arranged in descending order according to the respective information generation time, and each target order information respectively matches an order serial number which is arranged in ascending order according to the information generation time;

[0060] S2, the reference order serial number and the page capacity parameter are obtained from the order query request, wherein the reference order serial number is the order serial number of the last order information in the target order list corresponding to the reference order query request, the reference order query request is the last order query request carrying the order page serial number, and the page capacity parameter indicates the number of target order information in the target order list;

[0061] S3, the target order information is searched in the first order data set and / or the second order data set based on the order serial number and the page capacity parameter;

[0062] S4, the searched target order information is arranged in descending order according to the respective order serial number to obtain the target order list.

[0063] It can be understood that the above-mentioned manner is a method for the server to respond to a browsing request to obtain an order page to be displayed when the client provides page-by-page browsing of orders. In the above-mentioned manner, the order page needs to be the serial number of the currently requested order page, for example, the first page of orders, the second page of orders, where 1 and 2 are the serial numbers of the order page. It can be understood that the above-mentioned query manner can be a scenario in which the user queries all historical orders on the client side. In the case where the user selects the first order page and determines that the page capacity of an order page is 10, the server returns an order list composed of the latest 10 order information, and displays the 10 order information in reverse chronological order.

[0064] The order serial number information and the order number information related to the same order are further described below. The order serial number information can be serial number information used to uniquely indicate the order generation sequence. For example, assuming that the account identifier of user A is "0110", the serial number of the first shopping order in B e-commerce can be "01100001", and the serial number of the second shopping order in B e-commerce can be "01100002". In contrast, the order number information can be a number determined uniquely according to the user account identifier and the order information generation time, for example, the order number "011020221111" determined by splicing operation according to the account identifier "0110" and the order generation time "20221111". In another optional manner, the order number can also be obtained by encryption algorithm calculation operation according to the account identifier "0110" and the order generation time "20221111". It can be seen that the order serial number information and the order number information can both uniquely identify the order information. In the present embodiment, the target order information to be queried can be determined by the order serial number information.

[0065] Further, in the present embodiment, after obtaining the order page serial number, it is determined that the client requests an order page composed of a fixed number of order information, and then the reference order serial number and the page capacity parameter included in the order query request are further obtained. Alternatively, in the present embodiment, the reference order serial number is the order serial number corresponding to the last target order information corresponding to the previous page query request.

[0066] As an optional embodiment, the above-mentioned finding of the target order information based on the order serial number and the page capacity parameter in the first order data set and / or the second order data set includes:

[0067] S1, determining a reference order serial number sequence with an order serial number value less than a reference order serial number value;

[0068] S2, obtaining the first N reference order serial numbers in the reference order serial number sequence, wherein the N corresponds to a page capacity parameter;

[0069] S3, searching for target order information corresponding to the N reference order serial numbers in the first order data set and / or the second order data set.

[0070] The above method is further described in combination with a specific manner. For example, in the case that a user requests order information of a first page order page, the server obtains the user's latest ten order information, with order serial numbers 01100100, 01100099,..., 01100091 respectively. It can be understood that the order serial numbers are generated in descending order of order generation time, wherein 01100100 can be used to indicate the user's 100th order information, 01100099 can be used to indicate the user's 99th order information, and so on. Further, in the case that the user requests order information of a second page order page, the order serial number of the last order in the last query request and the order page capacity can be obtained, which are 01100091 and 10 respectively. Then, the order serial numbers of the order information to be queried are determined according to 01100091 and 10, which can be specifically obtained by subtracting the page capacity 10 from the reference order serial number 0110091, and then the order serial number with the smallest serial number in the order serial numbers to be queried is 01100081. Then, the order serial numbers in the order list to be queried are determined as 01100090, 01100089, 01100088,..., 01100081. Then, the corresponding target order can be uniquely determined according to the order serial number of each order in the above second page, that is, the target order information can be searched in the first order data set and / or the second order data set.

[0071] Specifically, in the case that the order sequence number corresponding to each order information in the above-mentioned order sequence is 01100090, 01100089, 01100088, …, 01100081 respectively, the order number corresponding to each order sequence number in the above-mentioned order sequence is obtained in turn, for example, the order number of the order information corresponding to the above-mentioned order sequence number 01100090 is “011020221111”, and then the order generation time of the order is parsed according to the order number as November 11, 2022, and after the target time point is January 1, 2015, the order information corresponding to the above-mentioned order number in the second order data set can be found; assuming that the order number corresponding to the order sequence number 01100081 is “011020141111”, and then the order generation time of the order is parsed according to the order number as November 11, 2014, and before the target time point is January 1, 2015, the order information corresponding to the above-mentioned order number in the first order data set can be found. That is, in the embodiment, the order sequence number of each order in the order sequence to be queried is determined by taking the smallest order sequence number value in the last query result as the reference order sequence number value and based on the reference order sequence number value and the page capacity, and the order generation time of each order is determined according to the correspondence between the order sequence number and the order number, and then each target order information is found in the first order data set and / or the second order data set.

[0072] According to the above-mentioned embodiments of the present application, in the case that the order page sequence number is carried in the order query request, the order page sequence number is obtained; the reference order sequence number and the page capacity parameter are obtained from the order query request; the target order information is found in the first order data set and / or the second order data set based on the order sequence number and the page capacity parameter; and the found target order information is arranged in reverse order based on the respective corresponding order sequence number to obtain a target order list, so as to perform efficient order query according to the order sequence number and the page capacity, avoid the mode in the prior art that in the case that the number of queried pages is large, all the orders queried need to be traversed to perform subsequent order query, and instead, the order sequence number is quickly determined according to the reference order parameter passing mode, and efficient order query is performed in combination with the first order data set and the second order data set, so as to achieve the technical effect of improving order query efficiency.

[0073] As an optional embodiment, the above-mentioned order query method comprises:

[0074] S1, obtaining a target time point;

[0075] S2, updating the first order data set and the second order data set according to a preset update frequency, comprising: transferring the order data in the second order data set whose information generation time is before the target time point to the first order data set.

[0076] In the embodiment, the order data in the first order data set and the second order data set can be periodically updated.

[0077] It can be understood that, in a specific manner, according to order query logic, the reverse cannot be initiated after the order is closed for at most 15 days, the evaluation and follow-up evaluation cannot be performed after the order is closed for 90 days, and the order query is most frequent within six months. Therefore, the time extension is set to 200 days as the order watershed, and the system migrates the order whose end time reaches 200 days to the historical order table.

[0078] As shown in Figure 3 In the embodiment, in order to solve the technical problem of too much order data, the orders are divided into an order table (i.e., the second order data set) and a historical order table (i.e., the first order data set) according to the time dimension. A timing task is executed once a day in the early morning, and the order whose life cycle has been completed for more than 200 days is migrated to the historical order table.

[0079] According to the above embodiment of the present application, the target time point is obtained; the first order data set and the second order data set are updated according to the preset update frequency, including: the order data in the second order data set whose information generation time is before the target time point is transferred to the first order data set, so as to split the order data according to time, reduce the data volume of the order table, facilitate the modification of the table structure of the new demand of the order table, and improve the query efficiency of the data.

[0080] The specific manner of the present application is further described below. Figure 4 As shown in

[0081] As shown in Figure 4 When the operation type is an order data adding and updating operation such as order entry, order cancellation, order deletion, timing task, and refund, the server directly processes it in the order table (i.e., the second order data set).

[0082] When it is determined that the current operation type is an order list query, the event parameters in the order query request are further obtained. It can be understood that, in the client, the user can select one month, three months, six months, this year, and 2021, 2020, etc. calculated and displayed according to the current time, or the user can select a certain time range, and the system will determine the difference between the time range of the query and the number of days of the current time point according to the time parameter.

[0083] Further, according to the time range of the query and the day difference from the current time point, data is queried in different tables: the order table is queried only when the time is within 200 days; when the time is before or after 200 days, the order table is queried first, and then the historical order table (i.e., the first order data set) is queried; when the time is after 200 days, only the historical order table is queried.

[0084] It can be understood that, in the case of initiating the order detail query operation by the client, the order details can be queried according to the order number (i.e., the order number). Because the order number is generated by the system calculation, the time is also involved in the operation, and the time of placing an order can be found by reverse operation, and the day difference from the current time point can be calculated according to the time of placing an order. Then, the order table is queried only when the time is within 200 days; when the time is after 200 days, only the historical order table is queried.

[0085] Further, the embodiment also provides a page query method, which does not use the traditional page number and page capacity query method, but uses the page capacity and order id (i.e., order serial number) method. The order id is stored in the database according to the time of the self-increasing sequence, so it meets the reverse ordering of the order time and can improve the query efficiency of the database. The specific way is that the first page does not need to transmit the order id, and every page after that transmits the last order id returned in the previous page. When the database is queried, the number of page capacities is returned after the order id is less than the parameter.

[0086] It can be understood that, when the database table base is too large and the order volume increases rapidly, the query efficiency is low and the interface response time is long. According to the time splitting, the orders that do not have business processing are classified into the historical table, which facilitates the modification of the order table structure for new order query requirements. The new paging method greatly improves the query efficiency.

[0087] Through the above-mentioned embodiments of the present application, the time is divided into the current business order table and the historical order table, and the order table or the historical table can be queried according to the time. In addition, in the paging query process, the order id+page capacity method is used to improve the query efficiency.

[0088] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0089] According to another aspect of the embodiments of the present application, there is also provided an order query device for implementing the above-mentioned order query method. As shown in Figure 5 The device comprises:

[0090] The receiving unit 502 is configured to receive an order query request, wherein the order query request is used to query a target order list, and the target order list comprises at least one piece of target order information.

[0091] The searching unit 504 is configured to search for the target order information in the first order data set and / or the second order data set according to a time interval parameter in the case that the order query request carries the time interval parameter, wherein the time interval parameter is used to indicate a time interval in which information generation time of the target order information to be queried is located, the first order data set stores order data before a target time point, and the second order data set stores order data after the target time point.

[0092] The combining unit 506 is configured to combine the searched target order information into the target order list.

[0093] The sending unit 508 is configured to send the target order list matched with the order query request.

[0094] Optionally, in the present embodiment, the embodiments implemented by each unit module described above can refer to the above-mentioned method embodiments, which will not be repeated here.

[0095] According to still another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above-mentioned order query method. The electronic device can be a terminal device or a server as shown in Figure 6 The electronic device comprises a memory 602 and a processor 604, the memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any one of the above-mentioned method embodiments by the computer program. Figure 6

[0096] Optionally, in the present embodiment, the above-mentioned electronic device can be located in at least one network device of a plurality of network devices of a computer network.

[0097] Optionally, in the present embodiment, the above-mentioned processor can be configured to execute the following steps by the computer program:

[0098] S1, receiving an order query request, wherein the order query request is used to query a target order list, and the target order list comprises at least one piece of target order information;

[0099] ​S2, in the case that the time interval parameter is carried in the order query request, searching the target order information in the first order data set and / or the second order data set according to the time interval parameter, wherein the time interval parameter is used to indicate the time interval in which the information generation time of the target order information to be queried is located, the first order data set stores the order data before the target time point, and the second order data set stores the order data after the target time point;

[0100] S3, combining the target order information searched into a target order list;

[0101] S4, sending the target order list matched with the order query request.

[0102] Optionally, those skilled in the art can understand that, Figure 6 The structure shown is only schematic, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like. Figure 6 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device can further include more or less components (such as a network interface, etc.) than those shown in Figure 6 , or have a different configuration from Figure 6 .

[0103] The memory 602 can be used to store software programs and modules, such as program instructions / modules corresponding to the order query method and device in the embodiments of the present application. The processor 604 executes various functions and data processing by running the software programs and modules stored in the memory 602, that is, implements the above-mentioned order query method. The memory 602 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 602 can further include a memory remotely arranged with respect to the processor 604, which can be connected to the terminal through 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 a combination thereof. The memory 602 can be used to store, but is not limited to, attribute information of a virtual role, order query information, and the like. As an example, as shown in Figure 6 , the above-mentioned memory 602 can include, but is not limited to, the receiving unit 502, the query unit 504, the combination unit 506, and the sending unit 508 in the order query device. In addition, other module units in the order query device can also be included, but not limited to, which will not be described in detail in this example.

[0104] Optionally, the transmission device 606 is configured to receive or send data via a network. Examples of the network include a wired network and a wireless network. In an example, the transmission device 606 includes a network interface controller (NIC) which can be connected to other network devices and routers through a network cable to communicate with the Internet or a local area network. In an example, the transmission device 606 is a radio frequency (RF) module which is configured to communicate with the Internet in a wireless manner.

[0105] In addition, the electronic device further includes a display 608 configured to display an order query operation interface, and a connection bus 610 configured to connect various module components in the electronic device.

[0106] In other embodiments, the terminal device or the server can be a node in a distributed system, and the distributed system can be a blockchain system. The blockchain system can be a distributed system formed by the plurality of nodes connected through network communication. The nodes can form a peer-to-peer (P2P) network, and any computing device, such as a server or a terminal, can become a node in the blockchain system by joining the P2P network.

[0107] According to an aspect of the present application, a computer program product is provided, which includes computer programs / instructions containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a detachable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.

[0108] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0109] According to an aspect of the present application, a computer readable storage medium is provided, and a processor of a computer device reads computer instructions from the computer readable storage medium. The processor executes the computer instructions, so that the computer device executes the order query method.

[0110] Optionally, in the present embodiment, the computer readable storage medium can be configured to store computer programs for executing the following steps:

[0111] S1, receiving an order query request, wherein the order query request is used to query a target order list, and the target order list includes at least one target order information;

[0112] S2, in the case that the time interval parameter is carried in the order query request, the target order information is found in the first order data set and / or the second order data set according to the time interval parameter, wherein the time interval parameter is used to indicate the time interval in which the information generation time of the target order information queried is located, the first order data set saves the order data before the target time point, and the second order data set saves the order data after the target time point;

[0113] S3, the target order information found is combined into a target order list;

[0114] S4, the target order list matched with the order query request is sent.

[0115] Optionally, in the embodiment, all or part of the steps in the various methods of the above embodiment can be understood by those skilled in the art as being completed by the program instructing the hardware related to the terminal device, and the program can be stored in a computer readable storage medium, and the storage medium can include a flash disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc.

[0116] The integrated units in the above embodiment, if realized in the form of a software function unit and sold or used as an independent product, can be stored in the above computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the above-mentioned method of each embodiment of the present application.

[0117] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0118] In several embodiments provided in the present application, it should be understood that the disclosed client can be implemented by other manners. Among them, the device embodiment described above is only schematic, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, units or modules, and can be electrical or other forms.

[0119] The units described as separate components above can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0120] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0121] The above description is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. An order query method, characterized in that, include: Receive an order query request, wherein the order query request is used to query a target order list, the target order list including at least one target order information; When the order query request carries a time interval parameter, the target order information is searched in the first order dataset and / or the second order dataset according to the time interval parameter. The time interval parameter is used to indicate the time interval in which the information of the target order information is generated. The first order dataset stores order data before the target time point, and the second order dataset stores order data after the target time point. The found target order information is combined into the target order list; Send the list of target orders that match the order query request; Prior to sending the target order list that matches the order query request, the method further includes: If the order query request carries an order page number, the order page number is obtained. The order page number is used to query a target order list consisting of a fixed number of target order information. Each target order information in the target order list is arranged in reverse order according to its corresponding information generation time. Each target order information is matched with an order number that increases in order of information generation time. Obtain the reference order number and page capacity parameter from the order query request, wherein the reference order number is the order number of the last order information in the target order list corresponding to the reference order query request, the reference order query request is the previous order query request carrying the order page number, and the page capacity parameter indicates the number of target order information in the target order list; Based on the reference order number and the page capacity parameter, the order number of each order in the order sequence to be queried is determined, and the order generation time of each order is determined according to the correspondence between the order number and the order number parameter. The order number parameter is obtained by processing the user object identifier and the information generation time through an encryption algorithm. The target order information is searched in the first order dataset and / or the second order dataset according to the order generation time of each order, and the searched target order information is sorted in reverse order based on the corresponding order number to obtain the target order list.

2. The method according to claim 1, characterized in that, When the order query request carries a time interval parameter, searching for the target order information in the first order dataset and / or the second order dataset based on the time interval parameter includes: If the target time point is after the time interval, the target order information is retrieved from the first order dataset; If the target time point is before the time interval, the target order information is retrieved from the second order dataset; If the target time point falls within the time interval, the target order information is retrieved from the first order dataset and the second order dataset.

3. The method according to claim 2, characterized in that, If the target time point falls within the time interval, retrieving the target order information from the first order dataset and the second order dataset further includes: Orders whose information generation time falls within the time interval in the first order dataset and / or the second order dataset are used as the target order information.

4. The method according to claim 1, characterized in that, Before combining the found target order information into the target order list, the following steps are also included: If the order query request includes an order number parameter, the order number parameter is obtained. Parse the order number parameter to obtain the information generation time of the target order information that matches the order query request; The target order information is searched in the first order dataset and / or the second order dataset based on the information generation time and the order number parameter.

5. The method according to claim 1, characterized in that, The step of searching for the target order information in the first order dataset and / or the second order dataset based on the order sequence number and the page capacity parameter includes: Determine the sequence of reference order numbers whose order number values ​​are less than the reference order number value; Obtain the first N reference order numbers from the reference order number sequence, where N corresponds to the page capacity parameter; Search for the target order information corresponding to the N reference order numbers in the first order dataset and / or the second order dataset.

6. The method according to any one of claims 1 to 5, characterized in that, Before receiving order inquiries, it also includes: Obtain the target time point; Updating the first order dataset and the second order dataset according to a preset update frequency includes: transferring order data in the second order dataset whose information generation time is before the target time point to the first order dataset.

7. An order inquiry device, characterized in that, include: A receiving unit is configured to receive an order query request, wherein the order query request is used to query a target order list, and the target order list includes at least one target order information; The search unit is configured to, when the order query request carries a time interval parameter, search for the target order information in a first order dataset and / or a second order dataset according to the time interval parameter, wherein the time interval parameter is used to indicate the time interval in which the information of the target order information being queried is generated, the first order dataset stores order data before the target time point, and the second order dataset stores order data after the target time point; A combination unit is used to combine the found target order information into the target order list; A sending unit is used to send the list of target orders that match the order query request; The search unit is further configured to: obtain the order page number when the order query request carries the order page number, wherein the order page number is used to query a target order list consisting of a fixed number of target order information, wherein each target order information in the target order list is arranged in reverse order according to its corresponding information generation time, and each target order information is matched with an order number that increments according to the information generation time; Obtain the reference order number and page capacity parameter from the order query request, wherein the reference order number is the order number of the last order information in the target order list corresponding to the reference order query request, the reference order query request is the previous order query request carrying the order page number, and the page capacity parameter indicates the number of target order information in the target order list; Based on the reference order number and the page capacity parameter, the order number of each order in the order sequence to be queried is determined, and the order generation time of each order is determined according to the correspondence between the order number and the order number parameter. The order number parameter is obtained by processing the user object identifier and the information generation time through an encryption algorithm. The target order information is searched in the first order dataset and / or the second order dataset according to the order generation time of each order, and the searched target order information is sorted in reverse order based on the corresponding order number to obtain the target order list.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Order information acquisition method and device, computer equipment and storage medium

    CN112132652A

  • Order query method and device, storage medium and electronic device

    CN114328520A