Identification code generation method, identification code processing method, device, equipment and medium
By obtaining local cache generation elements in the payment terminal and updating them, and generating offline identification codes, the payment restriction problem in the traditional mobile payment interruption network state is solved, and reliable and secure mobile payment in the offline state is achieved.
Patent Information
- Application Number
- CN202111399667.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-11-19
AI Technical Summary
In traditional mobile payment technology, the identification code generation process requires network support, and the identification code cannot be generated when the payment terminal is in a state of disconnection or the network is not smooth, resulting in limited payment function.
By obtaining the local cache generation elements, using the latest push messages to update the historical generation elements, generate identification codes, realize the identification code generation in offline state, and initiate payment after the legality verification is passed.
It expands the application scenarios of mobile payment, ensures the reliability and security of identification code generation in offline state, avoids user status information errors, and improves the reliability and security of mobile payment.
Smart Images

Figure CN114219474B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of big data resource scheduling, and in particular to an identification code generation method, an identification code processing method, an apparatus, a computer device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of communication technology, mobile payment has emerged. Mobile payment, also known as mobile phone payment, involves a payment terminal using a mobile payment app to generate an identification code. The receiving terminal then scans this identification code and sends a payment instruction directly or indirectly to a bank or financial institution, thereby generating a monetary payment and transferring funds.
[0003] In traditional mobile payment technology, the identification code generation process requires network support. If the payment terminal is disconnected or the network is not smooth, the identification code cannot be generated, and payment cannot be made. Therefore, traditional identification code generation methods have the disadvantage of limited application scenarios. Summary of the Invention
[0004] Based on this, it is necessary to provide an identification code generation method, identification code processing method, device, computer equipment and storage medium that can be applicable even when the payment terminal is disconnected or the network is not smooth, so as to expand the application scenarios of the identification code generation method.
[0005] In a first aspect, the present application provides a method for generating an identification code. The method for generating an identification code comprises:
[0006] Obtaining an identification code generation instruction, wherein the identification code generation instruction is used to instruct generation of an identification code;
[0007] If the offline code generation conditions are met, obtain the locally cached generation elements; the generation elements are obtained by updating the historical generation elements based on the latest push message, and the latest push message is the message actively pushed by the server after the current user completes the last payment;
[0008] An identification code is generated according to the generation factor.
[0009] In one embodiment, if the offline code generation condition is met, obtaining the locally cached generation elements includes:
[0010] If the offline code generation condition is met and the local cache has the latest push message in a valid state, the historical generation element is updated according to the latest push message to obtain the generation element of the local cache.
[0011] In one embodiment, after generating the identification code according to the generation factor, the method further includes:
[0012] Obtain the message that the server actively pushes after payment based on the identification code is completed;
[0013] The locally cached generation elements are updated according to the actively pushed message.
[0014] In one embodiment, the historical generation element includes an element type and corresponding type parameters; the latest push message is a short message whose sending platform identifier is a designated platform identifier and includes the element type and corresponding type parameters.
[0015] In one embodiment, updating the method for obtaining the generation element includes:
[0016] Get the short message whose sending platform identifier is the specified platform identifier;
[0017] Extracting type parameters corresponding to the element type in the short message;
[0018] According to the type parameter corresponding to the element type, the type parameter corresponding to the element type in the historical generated element is updated to obtain the generated element.
[0019] In a second aspect, the present application further provides an identification code processing method. The identification code processing method includes:
[0020] Obtaining identification code scanning information, which is information obtained by scanning a displayed identification code; the displayed identification code is generated by the payment terminal, based on the generation elements cached locally and meeting offline code generation conditions; the generation elements are obtained by updating historical generation elements based on the latest push message, which is a message proactively pushed by the server after the current user completes the previous payment;
[0021] Performing a legitimacy check on the identification code scan information;
[0022] If the legitimacy check passes, payment is initiated based on the identification code scan information.
[0023] In a third aspect, the present application further provides an identification code generating device. The identification code generating device comprises:
[0024] A generation instruction acquisition module, used to acquire an identification code generation instruction, wherein the identification code generation instruction is used to instruct the generation of an identification code;
[0025] A generation factor acquisition module is used to obtain the locally cached generation factors when the offline code generation conditions are met. The generation factors are obtained by updating the historical generation factors based on the latest push message. The latest push message is the message actively pushed by the server after the current user completes the last payment;
[0026] The identification code generation module is used to generate an identification code according to the generation factors.
[0027] In one embodiment, the generation element acquisition module includes:
[0028] A generation factor update component is used to update the historical generation factors according to the latest push message when the offline code generation conditions are met and the latest push message in the local cache is valid;
[0029] The generation element acquisition component is used to obtain the generation elements of the local cache.
[0030] In one embodiment, the identification code generating device further includes:
[0031] A push message acquisition module, used to obtain the message actively pushed by the server after the payment based on the identification code is completed;
[0032] The generating element acquisition module is further configured to update the locally cached generating elements according to the actively pushed message.
[0033] In one embodiment, the historical generation element includes an element type and corresponding type parameters; the latest push message is a short message whose sending platform identifier is a designated platform identifier and includes the element type and corresponding type parameters.
[0034] In one embodiment, the generation factor acquisition module updates the method of obtaining the generation factor, including:
[0035] Get the short message whose sending platform identifier is the specified platform identifier;
[0036] Extracting type parameters corresponding to the element type in the short message;
[0037] According to the type parameter corresponding to the element type, the type parameter corresponding to the element type in the historical generated element is updated to obtain the generated element.
[0038] In a fourth aspect, the present application further provides an identification code processing device. The identification code processing device includes:
[0039] An acquisition module, configured to acquire identification code scan information, the identification code scan information being information obtained by scanning a displayed identification code; the displayed identification code is generated by the payment terminal, subject to offline code generation conditions, by acquiring locally cached generation elements and using the generated elements; the generated elements are obtained by updating historical generation elements based on the latest push message, the latest push message being a message proactively pushed by the server after the current user completes their last payment;
[0040] A verification module, used to verify the legitimacy of the identification code scanning information;
[0041] The sending module is used to initiate payment based on the identification code scanning information when the legitimacy check passes.
[0042] In a fifth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0043] Obtaining an identification code generation instruction, wherein the identification code generation instruction is used to instruct generation of an identification code;
[0044] If the offline code generation conditions are met, obtain the locally cached generation elements; the generation elements are obtained by updating the historical generation elements based on the latest push message, and the latest push message is the message actively pushed by the server after the current user completes the last payment;
[0045] An identification code is generated according to the generation factor.
[0046] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0047] Obtaining an identification code generation instruction, wherein the identification code generation instruction is used to instruct generation of an identification code;
[0048] If the offline code generation conditions are met, obtain the locally cached generation elements; the generation elements are obtained by updating the historical generation elements based on the latest push message, and the latest push message is the message actively pushed by the server after the current user completes the last payment;
[0049] An identification code is generated according to the generation factor.
[0050] In a seventh aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0051] Obtaining an identification code generation instruction, wherein the identification code generation instruction is used to instruct generation of an identification code;
[0052] If the offline code generation conditions are met, obtain the locally cached generation elements; the generation elements are obtained by updating the historical generation elements based on the latest push message, and the latest push message is the message actively pushed by the server after the current user completes the last payment;
[0053] An identification code is generated according to the generation factor.
[0054] The above-mentioned identification code generation method, identification code processing method, device, computer equipment, computer-readable storage medium and computer program product generate the identification code by the payment terminal based on the locally cached generation factors. That is, the identification code generation process does not require network support. The payment terminal can generate the identification code based on the locally cached generation factors in an offline state, thereby realizing mobile payment, which is conducive to expanding the application scenarios of mobile payment methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A diagram of an application environment of an identification code generation and processing method in one embodiment;
[0056] Figure 2 1 is a flow chart of a method for generating an identification code according to an embodiment;
[0057] Figure 3 is a flow chart of a method for generating an identification code according to another embodiment;
[0058] Figure 4 A schematic diagram of a process for updating and obtaining generation elements in one embodiment;
[0059] Figure 5 1 is a flow chart of an identification code processing method according to an embodiment;
[0060] Figure 6 Schematic diagram of a flow chart of a method for generating and processing an identification code in one embodiment;
[0061] Figure 7 is a structural block diagram of an identification code generating device in one embodiment;
[0062] Figure 8 A structural block diagram of a generation element acquisition module in one embodiment;
[0063] Figure 9 is a structural block diagram of an identification code generating device in another embodiment;
[0064] Figure 10 is a structural block diagram of an identification code processing device in one embodiment;
[0065] Figure 11 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0067] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0068] The identification code generation method and identification code processing method provided in this application can be applied to Figure 1 In the application environment shown, a user displays an identification code through a payment terminal 102, and a payment terminal 104 scans the identification code displayed on the payment terminal 102, thereby obtaining identification code scan information. When generating an identification code, the payment terminal 102: obtains an identification code generation instruction, which instructs the generation of an identification code; if the offline code generation conditions are met, obtains a locally cached generation element; the generation element is obtained by updating a historical generation element based on the latest push message, which is a message proactively pushed by the server 106 after the current user completes the previous payment; and generates an identification code based on the generation element. After scanning the identification code scan information, the payment terminal 102 performs a validity check on the identification code scan information and, if the validity check passes, initiates payment based on the identification code scan information. The payment terminal 102 may be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices. The payment terminal 104 may be an electronic device equipped with a code scanning function, such as a personal computer equipped with a code scanning function, or a ticket gate, gate machine, etc.
[0069] In one embodiment, Figure 2 As shown, a method for generating an identification code is provided, which is applied to Figure 1 The payment terminal in the example is used to illustrate the following steps:
[0070] Step S201: Obtain an identification code generation instruction.
[0071] The identification code generation instruction is used to instruct the generation of an identification code. The identification code is a coding method that can be identified by scanning. The specific type of the identification code is not unique, such as a QR code or a barcode.
[0072] Specifically, the user can open the mobile payment client installed on the payment terminal and click on the corresponding location in the mobile payment client interface to generate an identification code generation instruction. For example, when using WeChat or Alipay to make a payment, when clicking "Payment", the user issues the identification code generation instruction, and the payment terminal receives the identification code generation instruction.
[0073] It should be noted that the mobile payment client can also be a specific industry application mobile payment program dedicated to various types of enterprises and industries such as government affairs, transportation and logistics, police, tobacco, medical care, education or sports. Due to the single function of these industry application mobile payment programs, users usually only open them when they need to use them, and they may be used offline. For example, a subway app (application software) dedicated to taking the subway and a campus app dedicated to school cafeteria consumption will only be opened when needed, such as when eating in the cafeteria or entering the subway. There may be no network when needed, and even if there is a network, the application has not been opened. As a result, the payment terminal cannot generate an identification code, or the user status information in the identification code is incorrect, affecting the reliability and security of mobile payment.
[0074] Step S202: If the offline code generation condition is met, obtain the generation elements cached locally.
[0075] The "offline code" refers to an identification code that can be generated offline. Correspondingly, the offline code generation condition requires the payment terminal to be disconnected from the internet, meaning the network signal strength at the payment terminal is less than a preset signal threshold. Furthermore, generation factors include user name information, user status information, balance information, identification code validity period information, and key information. These generation factors are obtained by updating historical generation factors based on the latest push message. The latest push message is a message proactively pushed by the server after the current user's last payment is completed. The specific type of the latest push message is not unique; for example, it can be a broadcast message or a short message.
[0076] Specifically, after the current user completes the last payment, the server updates the status information corresponding to the current user based on the current user's payment status, obtains the latest user information, and generates a push message based on the latest user information and pushes it to the payment terminal. It can be understood that the user information contains the payment terminal identifier to ensure that the server can achieve targeted and accurate push of push messages. Furthermore, the payment terminal receives the latest push message, extracts the feature information related to the generation factor in the latest push message, and updates the historical generation factor based on this feature information to obtain the updated generation factor. In this way, when the offline code generation conditions are met, the generation factor directly obtained by the payment terminal from the local cache is the latest generation factor that matches the latest status information corresponding to the current user.
[0077] In addition, before using the offline code generation function of the mobile payment client, the user must also register for the offline code generation function. Specifically, when the user is online, he or she can enter the user information by operating the corresponding interface in the mobile payment client to activate the offline code generation function. This user information, including but not limited to user device information, user personal information, payment account information, etc., is verified by the server corresponding to the mobile payment client. If the verification is passed, the registration is successful. If the registration is successful, the server will synchronously save this user information and update the user information accordingly after each payment is completed. When the offline code generation conditions are not met, the payment terminal requests the server to generate elements. The server obtains the generation elements based on the user information stored on the server and sends them to the payment terminal.
[0078] Step S203: Generate an identification code according to the generation elements.
[0079] Specifically, the identification code can be generated according to the generation factor and a specific encoding method. The scanning terminal can obtain the identification code scanning information corresponding to the generation factor by scanning the identification code.
[0080] In the above-mentioned identification code generation method, on the one hand, the payment terminal generates the identification code based on the locally cached generation factors, that is, the payment terminal can also generate the identification code in an offline state, thereby realizing mobile payment, which is conducive to expanding the application scenarios of the mobile payment method; on the other hand, since the generation factors are obtained by updating the historical generation factors based on the latest push message, the production factors used by the payment terminal to generate the identification code correspond to the latest user status information, which can avoid the user status information contained in the identification code from being incorrect, and is conducive to improving the reliability and security of mobile payment.
[0081] As mentioned above, the payment terminal needs to update the historical generation factors based on the latest push message to obtain the generation factors, but the specific timing for updating the generation factors is not unique.
[0082] In one embodiment, the payment terminal updates the generation factors after obtaining the identification code generation instruction, that is, step S202 includes: if the offline code generation conditions are met and the local cache has the latest push message in a valid state, updating the historical generation factors according to the latest push message to obtain the locally cached generation factors.
[0083] The latest push message in a valid state refers to the push message with the push time closest to the current time and has not been used to update the generation factor. Specifically, if the offline code generation conditions are met, the payment terminal reads the locally cached push messages, filters the latest push message based on the push time, and determines whether the latest push message is valid. If so, the historical generation factor is updated based on the latest push message to obtain the locally cached generation factor. If not, no update is required and the locally cached generation factor is directly obtained. Furthermore, after updating the historical generation factor based on the latest push message, the status information of the latest push message is modified to invalid.
[0084] In another embodiment, after the payment is completed based on the current identification code, the payment terminal updates the generation element so as to be used to generate the identification code required for the next payment. Figure 3 As shown, after step S203, step S204 and step S205 are also included.
[0085] Step S204: Obtain the message that the server actively pushes after the payment based on the identification code is completed.
[0086] The message actively pushed by the server after the payment based on the identification code is completed can be a broadcast message or a short message. When the message actively pushed by the server is a broadcast message, the payment terminal automatically receives the push message as long as it is connected to the network, that is, the network signal strength is greater than a preset signal threshold, completing the process of obtaining the message actively pushed by the server. Short messages are messages transmitted via a specific SMS channel, and their reception does not require internet access. When the message actively pushed by the server is a short message, the payment terminal automatically receives the push message, regardless of whether it is connected to the network or offline, as long as the SMS channel provided by the corresponding operator is available, completing the process of obtaining the message actively pushed by the server.
[0087] Step S205: updating the locally cached generation elements according to the actively pushed message.
[0088] As mentioned above, the message actively pushed by the server is generated based on the latest user information obtained by the server based on the payment status of the current user and the latest user information updated by the server. Therefore, the push message contains the user information corresponding to the payment terminal. This user information includes but is not limited to user device information, user personal information, payment account information, etc. Among them, user device information includes payment terminal identification, user personal information includes user name information and user status information, and payment account information includes balance information and key information, etc. Specifically, the payment terminal receives the latest push message, extracts the feature information related to the generation element in the latest push message, and based on the feature information, updates the locally cached generation element to obtain the updated generation element that matches the latest user status information, which is used to generate the identification code required for the next payment.
[0089] In the above embodiment, two different generation factor update timings are provided, which is beneficial to improving the flexibility of the identification code generation method.
[0090] In one embodiment, the historical generation element includes an element type and corresponding type parameters; the latest push message is a short message whose sending platform identifier is a specified platform identifier and contains the element type and corresponding type parameters. The element type includes user name, user status, balance, identification code validity period, and identification code generation seed. The sending platform identifier is the platform identifier of the server corresponding to the mobile payment client. Since short messages are transmitted through a specific SMS channel, the reception of short messages does not require Internet support. Therefore, the payment terminal can receive short messages even when it is off-network, which can further ensure that the payment terminal can obtain the latest push messages in a timely manner and update the generation elements based on the latest push messages.
[0091] Furthermore, in one embodiment, Figure 4 As shown, the updated method for obtaining generated elements includes:
[0092] Step S401: Acquire a short message whose sending platform identifier is a designated platform identifier.
[0093] As described above, the sending platform identifier is the platform identifier of the server corresponding to the mobile payment client. Specifically, based on the designated platform identifier, the short messages cached locally are filtered to select the short messages whose sending platform identifier is the designated platform identifier.
[0094] Step S402: extracting the type parameter corresponding to the element type in the short message.
[0095] Element types include user name, user status, balance, identification code validity period, and identification code generation seed. Corresponding type parameters include user name information, user status information, balance information, identification code validity period, and key information. Specifically, the payment terminal reads the field information in the short message and, based on the specific field information, extracts the type parameter corresponding to the element type in the short message. For example, the field following the "user name" field is the user name information, and the field following the "balance" field is the balance information.
[0096] Step S403: Based on the type parameters corresponding to the element type, the type parameters corresponding to the element type in the historical generated element are updated to obtain the generated element.
[0097] Specifically, the type parameters of the historical generated elements are updated based on the type parameters corresponding to the extracted feature types to obtain the latest generated elements. It is understood that, in a similar manner, the type parameters corresponding to the feature types in the locally cached generated elements can also be updated based on the type parameters corresponding to the feature types to obtain updated generated elements.
[0098] In the above embodiment, a process for updating the generation elements when the latest push message is a short message is provided, which can ensure that the generation elements used to generate the identification code are generation elements that match the user's latest status information, which is conducive to improving the accuracy of the identification code and thereby enhancing the security of mobile payment.
[0099] In one embodiment, Figure 5 As shown, a method for processing an identification code is provided, which is applied to Figure 1 The payment terminal in the example is used to illustrate the process, which includes the following steps:
[0100] Step S501: Obtain identification code scanning information.
[0101] The identification code is a code that can be scanned and identified, such as a QR code or barcode. The identification code scan information is information obtained by scanning the displayed identification code. This information can be an image containing the identification code or text containing the generation elements corresponding to the identification code. If the identification code scan information is an image containing the identification code, the payment terminal can analyze the identification code and extract the generation elements used to generate the identification code from the identification code scan information.
[0102] Furthermore, the displayed identification code is generated by the payment terminal based on the generation factors cached locally, provided that the offline code generation conditions are met. The generation factors are obtained by updating the historical generation factors based on the latest push message, which is the message proactively pushed by the server after the current user's last payment is completed.
[0103] Step S502: Perform a validity check on the identification code scanning information.
[0104] Specifically, based on the generation factor corresponding to the identification code, user status information matching the generation factor can be obtained. The corresponding user status information is then verified for legitimacy based on pre-set legitimacy standards, completing the legitimacy verification of the identification code scan information. The legitimacy standards are pushed from the server to the payment terminal and are not unique. These standards can include at least one of the following: whether the user is on a whitelist, whether the identification code is within the set validity period, and whether the balance exceeds the minimum balance requirement.
[0105] Step S503: If the legitimacy check passes, payment is initiated based on the identification code scanning information.
[0106] Specifically, if the legitimacy check fails, it means that the user corresponding to the identification code is in a payment-unavailable state. In this case, the payment terminal will send a payment failure prompt message to the payment terminal. If the legitimacy check passes, it means that the user corresponding to the identification code is in a payment-available state. In this case, the payment terminal will initiate payment based on the identification code scan information.
[0107] In one embodiment, step S503 includes: if the offline payment condition is met, initiating offline payment based on the identification code scanning information. The offline payment condition refers to the payment terminal being in an offline state, that is, the network signal strength of the payment terminal is less than a preset signal threshold. Specifically, there is not only one way for the payment terminal to initiate offline payment based on the identification code scanning information. For example, in a scenario where the user performs a pre-recharge, the payment terminal can directly collect offline payment from the user account, or the payment terminal can periodically update the synchronization key with the server to realize offline payment of the payment terminal. In the above case, mobile payment based on dual offline identification codes can be realized.
[0108] It should be noted that after the payment terminal initiates offline payment, it needs to push the payment result and user status information to the server's message push system so that the server can generate a push message and feedback it to the corresponding payment terminal.
[0109] In the above-mentioned identification code processing method, on the one hand, the payment terminal generates the identification code based on the locally cached generation factors, that is, the payment terminal can also generate the identification code in an offline state, thereby realizing mobile payment, which is conducive to expanding the application scenarios of the mobile payment method; on the other hand, since the generation factors are obtained by updating the historical generation factors based on the latest push message, the production factors used by the payment terminal to generate the identification code correspond to the latest user status information, which can avoid the user status information contained in the identification code from being incorrect, and is conducive to improving the reliability and security of mobile payment.
[0110] For ease of understanding, the following Figure 6 The generation and processing of the identification code of this application is described in detail. Figure 6 As shown, the method implemented in this application mainly involves four systems: an industry application mobile payment program, a mobile payment code scanning terminal, a payment acquiring system, and a message push system. Among them, the industry application mobile payment program is installed on the payment terminal, the mobile payment code scanning terminal is the payment receiving terminal, and the payment acquiring system and message push system are software systems in the server.
[0111] The identification code generation and processing process specifically includes the following steps:
[0112] a) The customer fills in user information in the industry application mobile payment program to activate the offline code generation function;
[0113] b) The industry application mobile payment program determines whether the network is currently disconnected; if not, execute step c); if so, execute step d);
[0114] c) The mobile payment program directly connects to the Internet and generates and displays an identification code based on the latest generation factors; then proceeds to step h);
[0115] d) Check whether there is a valid latest push message cached locally; if not, go to step e); if so, go to step f);
[0116] e) Generate an identification code using locally cached generation factors (offline code seed, balance, user status, etc.); go to step g);
[0117] f) updating the locally cached generation factors according to the latest push message, and generating an identification code according to the updated generation factors; and proceeding to step g);
[0118] g) Scanning the QR code with a mobile payment terminal to obtain identification code scanning information;
[0119] h) The mobile payment scanning terminal verifies the legitimacy of the identification code scan information;
[0120] i) If not passed, it will show payment failed;
[0121] j) If approved, a payment request (including payment identification code, amount, transaction time, transaction goods, acquiring merchant, etc.) is initiated when the mobile payment scanning terminal and the acquiring system are connected;
[0122] k) After receiving the payment request, the acquiring system performs operations such as deducting payment and sends the payment result and user status information (including account balance, user status, identification code seed, etc.) to the message push system;
[0123] l) After the message push system obtains the payment result and user status information, it generates a corresponding push message based on the payment result and user status information, and pushes the push message to the industry application mobile payment program in a targeted and accurate manner.
[0124] The above-mentioned identification code generation and processing method, on the one hand, generates the identification code by the payment terminal based on the locally cached generation factors, that is, the payment terminal can also generate the identification code in an offline state, thereby realizing mobile payment, which is conducive to expanding the application scenarios of the mobile payment method; on the other hand, since the generation factors are obtained by updating the historical generation factors based on the latest push message, that is, the production factors used by the payment terminal to generate the identification code correspond to the latest user status information, it can avoid the occurrence of incorrect user status information contained in the identification code, which is conducive to improving the reliability and security of mobile payment and avoiding the risk of being fleeced.
[0125] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0126] Based on the same inventive concept, the present application also provides an identification code generation device for implementing the identification code generation method mentioned above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of one or more identification code generation device embodiments provided below can be referred to the limitations of the identification code generation method above and will not be repeated here.
[0127] In one embodiment, Figure 7 As shown, an identification code generating device 700 is provided, comprising: a generation instruction acquisition module 701, a generation element acquisition module 702 and an identification code generating module 703, wherein:
[0128] A generation instruction acquisition module 701 is used to acquire an identification code generation instruction, where the identification code generation instruction is used to instruct the generation of an identification code;
[0129] The generation factor acquisition module 702 is used to obtain the locally cached generation factor when the offline code generation conditions are met. The generation factor is obtained by updating the historical generation factor based on the latest push message. The latest push message is the message actively pushed by the server after the current user completes the last payment;
[0130] The identification code generation module 703 is used to generate an identification code according to the generation factors.
[0131] In one embodiment, Figure 8 As shown, the generation factor acquisition module 702 includes a generation factor update component 801 and a generation factor acquisition component 802, wherein:
[0132] The generation factor update component 801 is used to update the historical generation factors according to the latest push message when the offline code generation conditions are met and the latest push message in the local cache is valid;
[0133] The generation element acquisition component 802 is used to obtain the generation elements cached locally.
[0134] In one embodiment, Figure 9 As shown, the identification code generating device 700 also includes a push message acquisition module 704, which is used to obtain the message actively pushed by the server after the payment based on the identification code is completed; the generation element acquisition module 702 is also used to update the locally cached generation elements according to the actively pushed message.
[0135] In one embodiment, the historical generated elements include element types and corresponding type parameters; the latest push message is a short message whose sending platform identifier is a designated platform identifier and includes the element type and corresponding type parameters.
[0136] In one embodiment, the generation element acquisition module 702 updates the method for obtaining the generation element, including: obtaining a short message whose sending platform identifier is a specified platform identifier; extracting the type parameters corresponding to the element type in the short message; and updating the type parameters corresponding to the element type in the historical generation element according to the type parameters corresponding to the element type to obtain the generation element.
[0137] Based on the same inventive concept, the present application also provides an identification code processing device for implementing the identification code processing method mentioned above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more identification code processing device embodiments provided below can be found in the above-mentioned limitations of the identification code processing method and will not be repeated here.
[0138] In one embodiment, Figure 10As shown, an identification code processing device 1000 is provided, comprising: an acquisition module 1001, a verification module 1002 and a sending module 1003, wherein:
[0139] Acquisition module 1001 is used to obtain identification code scan information, which is image information obtained by scanning a displayed identification code. The displayed identification code is generated by the payment terminal, if offline code generation conditions are met, by obtaining locally cached generation elements and then using these generation elements. These generation elements are obtained by updating historical generation elements based on the latest push message, which is a message actively pushed by the server after the current user completes the previous payment.
[0140] Verification module 1002, used to verify the legitimacy of the identification code scan information;
[0141] The sending module 1003 is used to initiate payment based on the identification code scanning information when the legitimacy check passes.
[0142] Each module in the above-mentioned identification code generation device and identification code processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0143] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 11 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a three-dimensional model display method based on holographic projection is implemented. The display screen of the computer device can be a liquid crystal display or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0144] Those skilled in the art will understand that Figure 11The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0145] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0146] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0147] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0148] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0149] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0150] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for generating an identification code, characterized in that: Applied to a payment terminal, the method includes: When in an online state, in response to a registration event of an offline code generation function initiated by a mobile payment client, obtaining and sending user information to a server corresponding to the mobile payment client; the mobile payment client is a single-function industry application mobile payment program; If the user information passes the verification of the server, determining that the offline code generation function is successfully registered; Obtaining an identification code generation instruction, wherein the identification code generation instruction is used to instruct generation of an identification code; If the offline code generation conditions are met and there is a latest push message in a valid state in the local cache, the historical generation elements are updated according to the latest push message, the locally cached generation elements are obtained, and the status information of the latest push message is modified to an invalid state; the generation elements are obtained by updating the historical generation elements based on the latest push message. The latest push message is a message actively pushed by the server after the current user completes the last payment if the offline code generation function is successfully registered; the latest push message includes a short message that does not require Internet support; An identification code is generated according to the generation factor.
2. The identification code generation method according to claim 1, characterized in that: After generating the identification code according to the generation factor, the method further includes: Obtain the message that the server actively pushes after payment based on the identification code is completed; The locally cached generation elements are updated according to the actively pushed message.
3. The identification code generation method according to claim 1, wherein: The historical generation element includes an element type and a corresponding type parameter; the latest push message is a short message whose sending platform identifier is a designated platform identifier and includes the element type and the corresponding type parameter.
4. The identification code generation method according to claim 3, characterized in that: The method of updating the generation element includes: Get the short message whose sending platform identifier is the specified platform identifier; Extracting type parameters corresponding to the element type in the short message; According to the type parameter corresponding to the element type, the type parameter corresponding to the element type in the historical generated element is updated to obtain the generated element.
5. A method for processing an identification code, characterized in that: Applied to a payment terminal, the method includes: Obtaining identification code scanning information, wherein the identification code scanning information is information obtained by scanning a displayed identification code; the displayed identification code is obtained by the payment terminal when the offline code generation function is successfully registered, offline code generation conditions are met, and there is a valid latest push message in the local cache, updating the historical generation elements according to the latest push message, obtaining the locally cached generation elements, and modifying the status information of the latest push message to an invalid state, and generating according to the generation elements; the generation elements are obtained by updating the historical generation elements based on the latest push message, and the latest push message is a message actively pushed by the server after the current user completes the last payment; the latest push message includes a short message that does not require Internet support; when the payment terminal is in an online state, in response to a registration event for the offline code generation function initiated by the mobile payment client, obtaining and sending user information to the server corresponding to the mobile payment client; when the user information passes the verification of the server, it is determined that the offline code generation function registration is successful; the mobile payment client is a single-function industry application mobile payment program; Performing a legitimacy check on the identification code scan information; If the legitimacy check passes, payment is initiated based on the identification code scan information.
6. An identification code generating device, characterized in that: Applicable to payment terminals, including: a function registration module configured to, while in an online state, in response to a registration event for an offline code generation function initiated by a mobile payment client, obtain and transmit user information to a server corresponding to the mobile payment client; and determine that registration of the offline code generation function is successful if the user information passes verification by the server; the mobile payment client is a single-function industry application mobile payment program; A generation instruction acquisition module, used to acquire an identification code generation instruction, wherein the identification code generation instruction is used to instruct the generation of an identification code; A generation element acquisition module is configured to, if offline code generation conditions are met and a recently pushed message is in a valid state in the local cache, update the historical generation elements based on the latest push message, obtain the locally cached generation elements, and modify the status information of the latest push message to an invalid state; the generation elements are obtained by updating the historical generation elements based on the latest push message; the latest push message is a message proactively pushed by the server after the current user completes the last payment, if the offline code generation function is successfully registered; the latest push message includes a short message that does not require internet access; The identification code generation module is used to generate an identification code according to the generation factors.
7. The identification code generating device according to claim 6, characterized in that Also includes: A push message acquisition module, used to obtain the message actively pushed by the server after the payment based on the identification code is completed; The generating element acquisition module is further configured to update the locally cached generating elements according to the actively pushed message.
8. The identification code generating device according to claim 6, wherein: The historical generation element includes an element type and a corresponding type parameter; the latest push message is a short message whose sending platform identifier is a designated platform identifier and includes the element type and the corresponding type parameter.
9. The identification code generating device according to claim 8, characterized in that The generation factor acquisition module updates the method for obtaining the generation factor, including: Get the short message whose sending platform identifier is the specified platform identifier; Extracting type parameters corresponding to the element type in the short message; According to the type parameter corresponding to the element type, the type parameter corresponding to the element type in the historical generated element is updated to obtain the generated element.
10. An identification code processing device, characterized in that: include: An acquisition module, configured to acquire identification code scanning information, wherein the identification code scanning information is information obtained by scanning the displayed identification code; The displayed identification code is generated by the payment terminal by updating the historical generation elements based on the latest push message, if the offline code generation conditions are met and there is a valid latest push message in the local cache, and then modifying the status information of the latest push message to an invalid state, and generating it based on the generation elements; the generation elements are obtained by updating the historical generation elements based on the latest push message, and the latest push message is a message actively pushed by the server after the current user completes the last payment; the latest push message includes a short message that does not require Internet support; when the payment terminal is in an online state, in response to a registration event of the offline code generation function initiated by the mobile payment client, it obtains and sends user information to the server corresponding to the mobile payment client; If the user information passes the verification of the server, it is determined that the offline code generation function is successfully registered; the mobile payment client is a single-function industry application mobile payment program; A verification module, used to verify the legitimacy of the identification code scanning information; The sending module is used to initiate payment based on the identification code scanning information when the legitimacy check passes.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Information identification code generation method and device, electronic equipment and computer storage medium
CN110012048A