Information query method and device, storage medium and electronic equipment

By determining the storage location and payment status identifier of the target order based on the query identifier in the order storage area, the database latency problem caused by frequent user queries is solved, achieving fast response and efficient transaction status query.

CN121901280APending Publication Date: 2026-04-21CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2025-12-12
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, frequent user requests for payment code status information lead to increased database read and write operations, reduced query response speed, and disruption to the normal operation of the transaction process.

Method used

By determining the storage location of the target order from the order storage area based on the query identifier, and using the order information and payment status identifier arranged by order generation time, the target payment status identifier can be directly obtained and sent to the user, reducing resource consumption in the query process.

Benefits of technology

It improves query response speed, reduces query latency, ensures the normal operation of the transaction process, and only stores order identifiers and status identifiers within the validity period, thus occupying a small amount of storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901280A_ABST
    Figure CN121901280A_ABST
Patent Text Reader

Abstract

The invention discloses an information query method and device, a storage medium and electronic equipment, and relates to the technical field of data processing, and the method comprises the steps: obtaining a query identifier of a target order in response to a query request of a user for the target order; determining a storage position of the target order from an order storage area based on the query identifier, the order storage area storing order information and payment state identifiers of a plurality of orders arranged according to order generation time, and the plurality of orders being orders within an order validity period; determining a target payment state identifier of the target order based on the storage position; and sending a target payment state identifier to the user, wherein the target payment state identifier is used for the user to determine the payment state of the target order. The target payment state identifier of the target order is determined based on the storage position, the state information is directly obtained from the order storage area, resource consumption in the query process is reduced, delay of the query process is reduced, the query response speed is increased, and normal proceeding of the transaction process is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to an information retrieval method, apparatus, storage medium and electronic device. Background Technology

[0002] QR code payment has been widely used in various transaction scenarios such as offline self-service equipment and online e-commerce platforms. Users need to check the payment status information of the dynamic QR code in real time to display the transaction result. The QR code status information query is the key to ensuring the integrity of the transaction process.

[0003] Currently, when a user initiates a status query request, the payment platform retrieves the corresponding order's payment code status information from the order information stored in the database based on the order number queried by the user and returns it to the user.

[0004] However, because users need to frequently initiate requests to query the status information of the payment code, a large number of database read and write operations will increase the latency of the query process, resulting in a slower query response speed, which in turn will affect the normal progress of the transaction process. Summary of the Invention

[0005] In view of this, this application provides an information query method, apparatus, storage medium, and electronic device, the main purpose of which is to improve the technical problem in the prior art where users need to frequently initiate query requests for payment code status information, and a large number of database read and write operations increase the delay of the query process, resulting in a decrease in query response speed, and thus affecting the normal operation of the transaction process.

[0006] Firstly, this application provides an information retrieval method, including: In response to a user's query request for a target order, obtain the query identifier of the target order; Based on the query identifier, the storage location of the target order is determined from the order storage area, wherein the order storage area stores order information and payment status identifiers of multiple orders arranged according to the order generation time, and the multiple orders are orders within the order validity period; The target payment status identifier of the target order is determined based on the storage location; The target payment status identifier is sent to the user, and the target payment status identifier is used by the user to determine the payment status of the target order.

[0007] Optionally, determining the storage location of the target order from the order storage area based on the query identifier includes: The storage location index of the target order is determined based on the query identifier, and the storage location index is determined based on the generation time of the target order during the generation process of the target order; The storage location is determined based on the mapping relationship between the storage location index and the order storage area.

[0008] Optionally, determining the storage location based on the mapping relationship between the storage location index and the order storage area includes: The storage location index is mapped to the row index in the order storage area based on the first time component in the generation time of the target order, wherein the first time component is determined based on a first time unit; The storage location index is mapped to the column index in the order storage area based on the second time component in the generation time of the target order. The second time component is determined based on a second time unit, which is smaller than the first time unit. The storage location is determined based on the row index and the column index.

[0009] Optionally, determining the target payment status identifier of the target order based on the storage location includes: Based on the storage location, the order identifier of the target order is queried in the order storage area. The order identifier is an identifier stored in the order information of the target order during the generation of the target order. If the order identifier of the target order exists in the order storage area, obtain the target payment status identifier corresponding to the target order; If the order identifier of the target order does not exist in the order storage area, the target order is identified as an expired order that has exceeded its validity period.

[0010] Optionally, before obtaining the query identifier of the target order in response to a user's query request for the target order, the method further includes: In response to the request to generate the target order, the target order identifier and the target initial state identifier are stored in the storage location.

[0011] Optionally, the method further includes: In response to the storage duration of the target storage location in the order storage area reaching the storage validity period corresponding to the order validity period, the target storage location is determined as a storage location to be cleared; The storage location to be cleared is then cleared.

[0012] Secondly, this application provides an information query device, comprising: The acquisition module is configured to acquire the query identifier of the target order in response to a user's query request for the target order; The determination module is configured to determine the storage location of the target order from the order storage area based on the query identifier, wherein the order storage area stores order information and payment status identifiers of multiple orders arranged according to the order generation time, and the multiple orders are orders within the order validity period; The determining module is also configured to determine the target payment status identifier of the target order based on the storage location; The sending module is configured to send the target payment status identifier to the user, the target payment status identifier being used by the user to determine the payment status of the target order.

[0013] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the information query method described in the first aspect.

[0014] Fourthly, this application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the information query method described in the first aspect.

[0015] Fifthly, this application provides a computer program product, which includes a computer program that, when executed by a processor, implements the information query method described in the first aspect.

[0016] By employing the above technical solutions, this application provides an information query method, apparatus, storage medium, and electronic device that, in response to a user's query request for a target order, obtains a query identifier for the target order; determines the storage location of the target order from an order storage area based on the query identifier, wherein the order storage area stores order information and payment status identifiers of multiple orders arranged according to their order generation time, and the multiple orders are orders within their validity period; determines a target payment status identifier for the target order based on the storage location; and sends the target payment status identifier to the user, the target payment status identifier being used by the user to determine the payment status of the target order. Compared with existing technologies, this application improves query response speed by determining the storage location of the target order from an order storage area that stores valid order information and payment status identifiers arranged by order generation time, based on the query identifier; it also improves query response speed by determining the target payment status identifier of the target order based on the storage location, directly obtaining status information from the order storage area, reducing resource consumption in the query process; and it enables users to quickly determine the payment status of the target order by sending the target payment status identifier to the user, reducing query delays and improving query response speed, thus ensuring the normal operation of the transaction process. Based on the short validity period of orders, this application only needs to store valid order identifiers and payment status identifiers, requiring less storage space, and can improve the feasibility of storing short-term orders in an order storage area with fast access speed but limited storage space. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating an information query method provided in an embodiment of this application is shown. Figure 2 This illustration shows a schematic diagram of an order storage area provided in an embodiment of this application; Figure 3 A flowchart illustrating an information query method provided in an embodiment of this application is shown. Figure 4 This illustration shows a flowchart of a process for querying the order identifier of a target order according to an embodiment of this application; Figure 5 This illustration shows a flowchart of a scheduled task for clearing expired orders, provided in an embodiment of this application. Figure 6 This illustration shows a flowchart of a payment platform receiving a QR code payment request, according to an embodiment of this application. Figure 7 A schematic diagram of a state update process provided in an embodiment of this application is shown; Figure 8 A schematic diagram of a state update process provided in an embodiment of this application is shown; Figure 9 This paper shows a schematic diagram of the structure of an information query device provided in an embodiment of this application; Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0020] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0021] To address the technical problem in existing technologies where frequent user requests for payment code status information lead to increased database read / write operations, resulting in slower query response times and hindering normal transaction processing, this embodiment provides an information query method, such as... Figure 1 As shown, the method includes: Step 101: In response to the user's query request for the target order, obtain the query identifier of the target order.

[0022] In this embodiment, the target order can be an order created by the payment platform after the merchant initiates a generation request in a QR code payment scenario, containing information such as order number and transaction amount. For example, in this embodiment, the target order can specifically be an order corresponding to a merchant's dynamic QR code scanned by the customer. Such orders have a short validity period, generally not exceeding 5 minutes.

[0023] In this embodiment of the application, the user can be a merchant who initiates an order inquiry request to the payment platform.

[0024] In this embodiment of the application, the query request may be a request initiated by the user to the payment platform to obtain the payment status of the target order in order to synchronously display the payment result on the acceptance terminal interface.

[0025] For the embodiments of this application, the acceptance terminal may include offline self-service equipment (such as vending machines) or online computer websites (such as e-commerce shopping websites).

[0026] In the embodiments of this application, the query identifier can be an identifier used to determine the storage location of the target order in the order storage area. The query identifier can be in string form, and the generation rule of the query identifier can be associated with the order's generation time. The query identifier can be used to quickly locate the storage location of the target order.

[0027] For example, the query identifier in this application embodiment can be a 4-character string. The 4-character string can be composed of the row index and column index corresponding to the generation time of the target order. If the row index and column index are less than two characters, they can be padded with 0s in front. The 4-character string can be directly associated with the specific storage location of the target order in the order storage area.

[0028] Step 102: Determine the storage location of the target order from the order storage area based on the query identifier.

[0029] The order storage area contains order information and payment status identifiers for multiple orders arranged according to their order generation time. These orders are all within their validity period.

[0030] In this embodiment of the application, the order storage area can be a storage area for storing information related to multiple orders that are within their validity period. The storage structure of the order storage area can be set according to the actual application scenario. For example, the order storage area in this embodiment of the application can specifically be a two-dimensional array structure. The size of the two-dimensional array can be determined by the duration of the order validity period, which allows the storage area to store only order information within the current validity period, avoiding invalid data occupying storage resources.

[0031] In the embodiments of this application, order information may include order identifier, transaction amount, generation time and other order-related information. The order identifier may be a string that uniquely identifies an order. Specifically, the order identifier may be an order number, which is composed of numbers, letters and other elements and can uniquely distinguish different orders.

[0032] In this embodiment, the payment status identifier can be identification information used to indicate the current payment progress of an order. For example, the payment status identifier in this embodiment may specifically include a generated identifier, a scanned identifier, a paid identifier, etc., and different payment status identifiers may correspond to different payment stages of the order.

[0033] In this embodiment of the application, arranging multiple orders according to their order generation time can be achieved by storing orders generated at the same time in the same storage unit of the order storage area, and storing orders generated at different times in their corresponding storage units in chronological order.

[0034] In this embodiment of the application, an order within its validity period can be an order whose time difference between the order generation time and the current time does not exceed a preset order validity period. For example, the order validity period can be set according to business needs, generally not exceeding 5 minutes, and the set order validity period in minutes M must satisfy the condition that 60 is divisible by M, for example, M can be 1 minute, 2 minutes, 3 minutes, 5 minutes, etc.

[0035] In this embodiment of the application, determining the storage location of a target order from the order storage area based on a query identifier can be achieved by locking the specific storage unit where the target order is located through the association between the query identifier and the order storage area.

[0036] For example, if the order storage area has a two-dimensional array structure, the order storage area can be as follows: Figure 2 As shown, Figure 2 The two-dimensional array in the query can include row indexes and column indexes. The query identifier can be a 4-character string. The first two characters correspond to the row index of the two-dimensional array, and the last two characters correspond to the column index. The row index and column index can be obtained by parsing the query identifier, and then the specific location of the target order in the two-dimensional array can be determined.

[0037] Step 103: Determine the target payment status identifier of the target order based on the storage location.

[0038] In this embodiment of the application, determining the target payment status identifier of the target order based on the storage location can be done by reading the payment status identifier information corresponding to the target order from the storage location. The target payment status identifier can be found by searching in the storage location using the order identifier (such as the order number) of the target order and finding the payment status identifier associated with the order identifier.

[0039] For example, if the order identifier of the target order is not found in the storage location, it means that the target order has exceeded its validity period, the relevant information of the target order has been cleared from the order storage area, and the payment status of the target order can be determined to be invalid.

[0040] Step 104: Send the target payment status identifier to the user.

[0041] The target payment status identifier is used by users to determine the payment status of the target order.

[0042] In this embodiment of the application, the user can determine the current payment status of the target order based on the target payment status identifier, and then display it to the customer on the acceptance terminal interface. The user can be the merchant who initiates the query request. After determining the target payment status identifier, the payment platform returns the target payment status identifier to the merchant system through a preset interface. After receiving the target payment status identifier, the merchant system converts the target payment status identifier into status information that the customer can understand (such as generated, scanned, paid, expired) and displays it on the terminal interface, allowing the customer to understand the payment progress in real time.

[0043] Compared with existing technologies, this application's embodiments determine the storage location of the target order from an order storage area that stores valid order information and payment status identifiers arranged by order generation time based on the query identifier, thereby improving query response speed; by determining the target payment status identifier of the target order based on the storage location, status information is directly obtained from the order storage area, reducing resource consumption in the query process; by sending the target payment status identifier to the user, the user can quickly determine the payment status of the target order, reducing query delay and improving query response speed, thus ensuring the normal operation of the transaction process. Based on the short validity period of orders, this application only needs to store the valid order identifier and payment status identifier, occupying a small amount of storage, which can improve the feasibility of storing short-term orders in an order storage area with fast access speed but limited storage space.

[0044] As an optional approach, when performing the "determine the storage location of the target order from the order storage area based on the query identifier" function, the following methods can be used, but are not limited to them: Figure 3 As shown, the method includes: Step 201: Determine the storage location index of the target order based on the query identifier.

[0045] The storage location index is determined based on the generation time of the target order during the target order generation process.

[0046] In the embodiments of this application, the storage location index may be index information used to identify the storage location of the target order in the order storage area, and the generation of the storage location index may be closely related to the generation time of the target order.

[0047] In this embodiment of the application, when the target order is generated, the payment platform can record the order generation time (accurate to minutes and seconds) and generate a storage location index based on the generation time according to preset rules. The storage location index can correspond to a storage location in the order storage area.

[0048] For example, if the order generation time is hh hours mm minutes ss seconds and the order validity period is M minutes (60 is divisible by M), then the row index can be calculated by modulo operation, i.e., mm' = mm%M, and the column index is ss. Then, the row index mm' and the column index ss are concatenated into a fixed four-character string (padded with 0s if less than two characters). This string can then be used as the storage location index.

[0049] Step 202: Determine the storage location based on the mapping relationship between the storage location index and the order storage area.

[0050] In this embodiment, the mapping relationship between the storage location index and the order storage area can be used to clarify that different storage location indices correspond to different specific storage units in the order storage area. If the order storage area is a two-dimensional array (which can be denoted as QrCode[M]

[60] , where M is the number of minutes of the order validity period and 60 is the number of seconds), then the mapping relationship can be that the first two digits of the storage location index correspond to the row index of the two-dimensional array and the last two digits correspond to the column index of the two-dimensional array. Through this mapping relationship, the storage location index can be converted into the row and column coordinates in the two-dimensional array, thereby determining the storage location of the target order.

[0051] For example, if the storage location index is 0152, the corresponding row index can be 1, the corresponding column index can be 52, and the storage location of the target order can be the storage unit corresponding to the two-dimensional array QrCode[1]

[52] .

[0052] It should be noted that the order storage area can also be other storage structures with row and column index features, not limited to two-dimensional arrays, as long as a one-to-one correspondence between storage location index and storage unit can be established. This application embodiment does not make specific limitations in this regard.

[0053] As an optional approach, when performing the "determining the storage location based on the mapping relationship between the storage location index and the order storage area", the following method can be used, but is not limited to: mapping the storage location index to the row index in the order storage area based on a first time component in the generation time of the target order, wherein the first time component is determined based on a first time unit; mapping the storage location index to the column index in the order storage area based on a second time component in the generation time of the target order, wherein the second time component is determined based on a second time unit, wherein the second time unit is less than the first time unit; and determining the storage location based on the row index and the column index.

[0054] In this embodiment, the first time unit can be a larger time unit used to divide the order generation time. For example, the first time unit in this embodiment can be a minute, and the first time component corresponding to the first time unit can be the minute component of the order generation time.

[0055] In this embodiment, the second time unit can be a smaller time unit used to divide the order generation time, and the second time unit can be smaller than the first time unit. For example, in this embodiment, the second time unit can specifically be a second, and the second time component corresponding to the second time unit can be the second component of the order generation time.

[0056] In the embodiments of this application, the process of mapping the storage location index to the row index can be achieved by performing a modulo operation on the first time component (minutes mm), i.e., row index mm' = mm%M, where M is the number of minutes of the order validity period. The modulo operation can limit the number of minutes to the range of 0 to M-1, ensuring that the row index does not exceed the range of the number of rows in the order storage area.

[0057] In the embodiments of this application, the process of mapping the storage location index to the column index can be to use the second time component (seconds ss) as the column index. Since the range of the number of seconds is 0 to 59, the range of the column index can also be 0 to 59, which perfectly matches the number of columns (60 columns) in the order storage area, without the need for additional conversion operations.

[0058] In this embodiment of the application, determining the storage location based on the row index and column index can be achieved by combining the row index and column index to determine the specific storage unit of the target order in the order storage area. For example, if the order storage area in this embodiment of the application is a two-dimensional array QrCode[M]

[60] , the row index can be mm' and the column index can be ss, then the corresponding storage location can be QrCode[mm'][ss]. QrCode[mm'][ss] can store relevant information of all orders generated when the order generation time is mm minutes and ss seconds.

[0059] It should be noted that other operation methods that can map the first time component to the row index range can also be used, not limited to modulo operation, as long as it can be ensured that the mapped row index does not exceed the row limit of the order storage area. This application embodiment does not make specific limitations in this regard.

[0060] As an optional approach, when performing the "determining the target payment status identifier of the target order based on storage location", the following method can be used, but is not limited to: querying the order identifier of the target order in the order storage area based on the storage location, wherein the order identifier is an identifier stored in the order information of the target order during the generation process of the target order; if the order identifier of the target order exists in the order storage area, obtaining the target payment status identifier corresponding to the target order; if the order identifier of the target order does not exist in the order storage area, determining the target order as an expired order that has exceeded its validity period.

[0061] In this embodiment of the application, the order identifier can be information that identifies the target order. Specifically, the order identifier can be an order number, and the order identifier can be composed of numbers or letters.

[0062] In this embodiment, querying the order identifier of a target order based on its storage location can be achieved by first locating the storage unit corresponding to that storage location. This storage unit stores information about multiple orders, which can be stored as strings. Information about different orders within these strings can be separated by a preset connector. The order identifier and payment status identifier of the same order can also be associated using another preset connector. The preset connector can be characters that do not appear in the order number, specifically including "". " and ", where " "Can be used to connect order identifier and corresponding payment status identifier," and "," can be used to separate information from different orders. Information from multiple orders can be stored in the order storage area in a format such as order number 1. Status 1, Order No. 2 Status 2,... Order No. N State N. For example, the string stored in location QrCode[1]

[52] could be aaaa. P,bbbb S,cccc G, where aaaa, bbbb, and cccc can represent order identifiers, and P, S, and G can represent payment status identifiers.

[0063] In this embodiment, querying the order identifier of a target order in the order storage area based on its storage location involves parsing the string in the storage unit, splitting it into information fragments of each order according to the delimiter ",", and then separating each information fragment according to the concatenation operator ". "The order identifier and payment status identifier are separated, and then the separated order identifier is compared with the order identifier of the target order."

[0064] For the embodiments of this application, the flowchart for querying the order identifier of the target order can be as follows: Figure 4 As shown, in Figure 4 If the order identifier of the target order exists in the order storage area, the corresponding payment status identifier can be the target payment status identifier; if no matching order identifier is found after traversing all information fragments, it can be said that the storage time of the target order has reached the order validity period, and the relevant information of the target order has been cleared from the order storage area. Therefore, it can be determined that the target order is an expired order.

[0065] In the embodiments of this application, the payment status identifier may include a generated identifier G, a scanned identifier S, and a paid identifier P, where G may indicate that the order has been generated but the customer has not yet scanned the code, S may indicate that the customer has scanned the code but has not yet completed the payment, and P may indicate that the customer has completed the payment.

[0066] For example, if the order identifier of the target order is cccc, the corresponding information fragment found in the storage unit is cccc. G, then the target payment status identifier G can indicate that the order is in the generated state; if the queried information fragment is cccc S, then the target payment status identifier S can indicate that the order is in the scanned state; if the retrieved information fragment is cccc If P is the target payment status identifier, then P can indicate that the order is in a paid state.

[0067] As an optional approach, before executing "receiving the query identifier of the target order in response to the user's query request for the target order", the following method may be used, but not limited to: in response to the generation request of the target order, storing the target order identifier and the target initial status identifier in a storage location.

[0068] In this embodiment of the application, the request to generate the target order can be a request initiated by the merchant to the payment platform to create an order corresponding to the dynamic payment code in order to initiate a transaction. When the merchant initiates the generation request, he will send the order number, transaction amount, etc. to the payment platform. After receiving the generation request, the payment platform can first create the target order, generate the corresponding dynamic payment code data string, and determine the initial status identifier of the target order. The initial status identifier can be the generated identifier G.

[0069] In this embodiment, storing the target order identifier and the target initial state identifier in the storage location can be achieved by concatenating the target order identifier and the target initial state identifier into an information fragment according to a preset format (order identifier|initial state identifier), and then appending the information fragment to the end of the string corresponding to the storage location; if the string corresponding to the storage location is empty, the information fragment can be written into the string; if the string already stores information of other orders, the information fragment can be appended after adding a delimiter "," to the end of the string.

[0070] For example, if the current string in the storage location QrCode[1]

[52] is empty, the target order identifier is dddd, and the initial state identifier is G, then the string after concatenating the target order identifier and the target initial state identifier into an information fragment according to the format of order identifier|initial state identifier can be dddd. G; If the string is aaaa P,bbbb S,cccc G, then concatenating the target order identifier and the target initial state identifier into a string of information fragments in the format of order identifier|initial state identifier can result in aaaa P,bbbb S,cccc G,dddd G.

[0071] In this embodiment of the application, the payment platform can return the generated dynamic QR code data string and 4-digit order index (i.e., storage location index) to the merchant. The merchant can convert the dynamic QR code data string into a two-dimensional matrix graphic (i.e., dynamic QR code) and display it on the acceptance terminal interface for customers to scan and pay. The payment platform can also write the QR code data string, order index, order number, transaction amount and other elements into the order information table of the database for subsequent fund clearing, transaction record query and other operations.

[0072] As an optional approach, embodiments of this application may also employ the following method, but not limited thereto: the method includes: in response to the storage duration of the target storage location in the order storage area reaching the storage validity duration corresponding to the order validity period, determining the target storage location as a storage location to be cleared; and performing clearing processing on the storage location to be cleared.

[0073] In this embodiment, the storage location to be cleared can be a storage location in the order storage area that meets the condition that the storage duration reaches the order validity period. The storage location to be cleared can be determined based on the ring structure characteristics of the order storage area combined with the current time and the order validity period.

[0074] In this embodiment of the application, the storage duration can be the time difference from the order generation time to the current time. When the time difference reaches the order validity period of M minutes, the order can become an invalid order, and invalid orders can be cleared.

[0075] Optionally, invalid orders can be cleared by creating a scheduled task. A flowchart illustrating the process of clearing invalid orders using a scheduled task is shown below. Figure 5 As shown, Figure 5The scheduled task can run once per second. When the scheduled task runs, it can first obtain the current time of the payment platform server (hh hour mm minute ss second), and calculate the row index mm'=mm%M and column index ss corresponding to the current time. Then, it calculates the next position of the current position through circular logic. The next position can be the storage position to be cleared. If the current column index ss is not equal to 59, the row index of the storage position to be cleared can be mm', and the column index can be ss+1, that is, the storage position to be cleared can be QrCode[mm'][ss+1]. If the current column index ss is equal to 59 and the current row index mm' is not equal to M-1, the row index of the storage position to be cleared can be mm'+1, and the column index can be 0, that is, the storage position to be cleared can be QrCode[mm'+1][0]. If the current column index ss is equal to 59 and the current row index mm' is equal to M-1, the row index of the storage position to be cleared can be 0, and the column index is 0, that is, the storage position to be cleared can be QrCode[0][0].

[0076] As an alternative, if the payment platform experiences downtime maintenance (such as releasing a new version, replacing hardware, or upgrading the system), the server restart will cause all order storage data in memory to be cleared. At this time, the order information still stored in memory within the validity period will result in data loss. To address this, the server can stop receiving requests for generating payment codes initiated by merchants X minutes in advance (X is greater than the number of minutes the order is valid) before the scheduled downtime maintenance. Requests that have already been initiated can be diverted to other servers that do not require downtime for processing.

[0077] As an optional approach, this application embodiment also provides an example of a payment platform receiving a QR code payment request. A flowchart illustrating the process of a payment platform receiving a QR code payment request is shown below. Figure 6 As shown, when the payment platform receives a QR code payment request initiated by a customer through the payment app, it can obtain the corresponding order number and order index based on the QR code data string sent by the app. Then, it parses the order index to obtain the row index mm' and column index ss, locates QrCode[mm'][ss] in the order storage area, finds the information fragment corresponding to the order number, and updates the status identifier from G to S (scanned). The status update process is illustrated in the diagram below. Figure 7 As shown, the status in the order information table of the database is updated synchronously; after the customer completes the payment, the payment platform can locate the storage location again and update the status identifier from S to P (paid). The status update process is illustrated in the diagram below. Figure 8 As shown, the fund transfer for the payment order is completed simultaneously, and the order transaction table in the database is updated.

[0078] Compared with existing technologies, the embodiments of this application improve the accuracy of storage location positioning by determining the storage location index of the target order based on the query identifier and determining the storage location according to the mapping relationship between the storage location index and the order storage area; by mapping the storage location index to a row index based on the first time component of the generation time and to a column index based on the second time component, and then combining the row index and column index to determine the storage location, the mapping logic of the storage location is clarified, improving the positioning efficiency; by querying the order identifier of the target order in the storage location, the target payment status identifier is obtained if it exists, and it is determined to be an expired order if it does not exist, ensuring the accuracy of status determination; by responding to the generation request of the target order, the target order identifier and the target initial status identifier are stored in the corresponding storage location, providing complete data support for subsequent queries and status updates; by determining the storage location corresponding to the order whose storage time has reached the order validity period as the location to be cleared and clearing the information, the order storage area is maintained to store only orders within the validity period, ensuring the efficient operation of the storage area.

[0079] Furthermore, as Figure 1 and Figure 3 The specific implementation of the method shown in this embodiment provides an information query device, such as... Figure 9 As shown, the device includes: an acquisition module 31, a determination module 32, and a transmission module 33.

[0080] The acquisition module 31 is configured to acquire the query identifier of the target order in response to a user's query request for the target order; The determination module 32 is configured to determine the storage location of the target order from the order storage area based on the query identifier. The order storage area stores order information and payment status identifiers of multiple orders arranged according to the order generation time. The multiple orders are orders within their validity period. The determination module 32 is also configured to determine the target payment status identifier of the target order based on the storage location; Sending module 33 is configured to send a target payment status identifier to the user, which is used by the user to determine the payment status of the target order.

[0081] In some examples of this embodiment, the determining module 32 is specifically configured to determine the storage location index of the target order based on the query identifier. The storage location index is determined based on the generation time of the target order during the generation process of the target order. The storage location is determined based on the mapping relationship between the storage location index and the order storage area.

[0082] In some examples of this embodiment, the determining module 32 is further configured to map the storage location index to a row index in the order storage area based on a first time component in the generation time of the target order, wherein the first time component is determined based on a first time unit; map the storage location index to a column index in the order storage area based on a second time component in the generation time of the target order, wherein the second time component is determined based on a second time unit, wherein the second time unit is less than the first time unit; and determine the storage location based on the row index and the column index.

[0083] In some examples of this embodiment, the determining module 32 is further configured to query the order identifier of the target order in the order storage area based on the storage location. The order identifier is an identifier stored in the order information of the target order during the generation of the target order. If the order identifier of the target order exists in the order storage area, the target payment status identifier corresponding to the target order is obtained. If the order identifier of the target order does not exist in the order storage area, the target order is determined as an expired order that has exceeded its validity period.

[0084] In some examples of this embodiment, the acquisition module 31 is specifically configured to store the target order identifier and the target initial state identifier in a storage location in response to the target order generation request.

[0085] In some examples of this embodiment, the determining module 32 is further configured to determine the target storage location as a storage location to be cleared in response to the storage duration of the target storage location in the order storage area reaching the storage validity duration corresponding to the order validity period; and to perform clearing processing on the storage location to be cleared.

[0086] It should be noted that other corresponding descriptions of the functional units involved in the information query device provided in this embodiment can be found in [reference needed]. Figure 1 and Figure 3 The corresponding description in [the document] will not be repeated here.

[0087] Based on the above, Figure 1 and Figure 3 Accordingly, this embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figure 1 and Figure 3 The method shown.

[0088] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.

[0089] like Figure 10 The diagram shown is a hardware structure schematic of an electronic device according to the present invention, comprising: At least one processor 401; and, Memory 402 is communicatively connected to at least one processor 401; wherein, The memory 402 stores instructions that can be executed by at least one processor, which enables the at least one processor to perform the information query method as described above.

[0090] Figure 10 Take a processor 401 as an example.

[0091] The electronic device may also include an input device 403 and an output device 404.

[0092] The processor 401, memory 402, input device 403, and output device 404 can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.

[0093] Memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the information query method in the embodiments of this application, for example, Figure 1 and Figure 3 The method flow is shown. The processor 401 executes various functional applications and data processing by running non-volatile software programs, instructions, and modules stored in the memory 402, thereby realizing the information query method in the above embodiments.

[0094] Memory 402 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created according to the use of the information query method. Furthermore, memory 402 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 402 may optionally include memory remotely located relative to processor 401, and these remote memories may be connected via a network to the apparatus performing the information query method. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0095] Input device 403 can receive user clicks and generate signal inputs related to user settings and function control for information query methods. Output device 404 may include display devices such as a display screen.

[0096] One or more modules are stored in memory 402, and when run by one or more processors 401, the information query method in any of the above method embodiments is executed.

[0097] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.

[0098] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0099] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.

[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or it can be implemented by hardware. By applying the solution of this embodiment, compared with related technologies, this application embodiment determines the storage location of the target order from the order storage area, which stores valid order information and payment status identifiers arranged by order generation time, based on a query identifier, thereby improving the query response speed; by determining the target payment status identifier of the target order based on the storage location, the status information is directly obtained from the order storage area, reducing resource consumption in the query process; by sending the target payment status identifier to the user, the user can quickly determine the payment status of the target order, reducing the delay in the query process, improving the query response speed, and ensuring the normal operation of the transaction process; based on the short validity period of the orders, only the valid order identifier and payment status identifier need to be stored, occupying a small amount of storage, which can improve the feasibility of storing short-term orders in the order storage area with fast access speed but limited storage space; by determining the storage location of the target order based on the query identifier... The system establishes an index and determines the storage location based on the mapping relationship between the storage location index and the order storage area, improving the accuracy of storage location positioning. It clarifies the mapping logic of the storage location by mapping the storage location index to a row index based on the first time component of the generation time and to a column index based on the second time component, and then combining the row and column indexes to determine the storage location, thus improving positioning efficiency. It ensures the accuracy of status determination by querying the target order's order identifier at the storage location, obtaining the target payment status identifier if it exists, and determining it as an expired order if it does not exist. It stores the target order identifier and the target initial status identifier in the corresponding storage location in response to the target order's generation request, providing complete data support for subsequent queries and status updates. Finally, it maintains the order storage area by identifying the storage location corresponding to orders whose storage duration has reached the order validity period as the location to be cleared and clearing the information, ensuring that the order storage area only stores orders within their validity period, thus guaranteeing the efficient operation of the storage area.

[0101] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0102] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. An information retrieval method, characterized in that, include: In response to a user's query request for a target order, obtain the query identifier of the target order; Based on the query identifier, the storage location of the target order is determined from the order storage area, wherein the order storage area stores order information and payment status identifiers of multiple orders arranged according to the order generation time, and the multiple orders are orders within the order validity period; The target payment status identifier of the target order is determined based on the storage location; The target payment status identifier is sent to the user, and the target payment status identifier is used by the user to determine the payment status of the target order.

2. The method according to claim 1, characterized in that, Determining the storage location of the target order from the order storage area based on the query identifier includes: The storage location index of the target order is determined based on the query identifier, and the storage location index is determined based on the generation time of the target order during the generation process of the target order; The storage location is determined based on the mapping relationship between the storage location index and the order storage area.

3. The method according to claim 2, characterized in that, Determining the storage location based on the mapping relationship between the storage location index and the order storage area includes: The storage location index is mapped to the row index in the order storage area based on the first time component in the generation time of the target order, wherein the first time component is determined based on a first time unit; The storage location index is mapped to the column index in the order storage area based on the second time component in the generation time of the target order. The second time component is determined based on a second time unit, which is smaller than the first time unit. The storage location is determined based on the row index and the column index.

4. The method according to claim 1, characterized in that, Determining the target payment status identifier of the target order based on the storage location includes: Based on the storage location, the order identifier of the target order is queried in the order storage area. The order identifier is an identifier stored in the order information of the target order during the generation of the target order. If the order identifier of the target order exists in the order storage area, obtain the target payment status identifier corresponding to the target order; If the order identifier of the target order does not exist in the order storage area, the target order is identified as an expired order that has exceeded its validity period.

5. The method according to claim 1, characterized in that, Before obtaining the query identifier of the target order in response to a user's query request for the target order, the method further includes: In response to the request to generate the target order, the target order identifier and the target initial state identifier are stored in the storage location.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: In response to the storage duration of the target storage location in the order storage area reaching the storage validity period corresponding to the order validity period, the target storage location is determined as a storage location to be cleared; The storage location to be cleared is then cleared.

7. An information query device, characterized in that, include: The acquisition module is configured to acquire the query identifier of the target order in response to a user's query request for the target order; The determination module is configured to determine the storage location of the target order from the order storage area based on the query identifier, wherein the order storage area stores order information and payment status identifiers of multiple orders arranged according to the order generation time, and the multiple orders are orders within the order validity period; The determining module is also configured to determine the target payment status identifier of the target order based on the storage location; The sending module is configured to send the target payment status identifier to the user, the target payment status identifier being used by the user to determine the payment status of the target order.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.

9. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.

10. A computer program product, the computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.