Multi-code symbiosis automatic identification method and device and electronic equipment

By using regular expressions and numerical calculation verification mechanisms, combined with public and private key signature verification, the convenience and security issues of multi-code recognition in existing payment systems are resolved, achieving automatic recognition of multiple codes and efficient and secure payment processes.

CN121883005APending Publication Date: 2026-04-17中国移动通信集团云南有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
中国移动通信集团云南有限公司
Filing Date
2025-12-29
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing payment systems only support single payment code recognition, requiring users to manually switch payment codes, which limits convenience and cannot guarantee the security of payment data and results in low recognition efficiency.

Method used

A dual verification mechanism using regular expressions and numerical operations is employed. By receiving and processing the string length of the payment code data, the payment type is determined, and the recipient's public and private keys are used to sign and verify the payment code data, ensuring the uniqueness and immutability of the payment code.

Benefits of technology

It enables automatic recognition of multiple codes, improving the accuracy, security, and efficiency of the payment process, enhancing the user payment experience, and avoiding manual intervention and input errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883005A_ABST
    Figure CN121883005A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-code symbiosis automatic identification method and device and electronic equipment, and is applied to the technical field of data processing. The method comprises the steps of receiving first payment code data and determining a corresponding character string length; determining a first payment type of the first payment code data by adopting a regular expression verification mode, processing the character string length and the first payment code data based on a numerical calculation verification mode, and determining a second payment type; when the first payment type is the same as the second payment type, processing the first payment code data based on the sequence of a first private key of the first receiver and a first public key of the second receiver to obtain first signature data; in response to the event of receiving the target payment data, the second payment code data is obtained by performing signature verification processing on the first signature data, and when the second payment code data and the first payment code data meet requirements, target payment code identification is completed and the target payment data is paid, so that the accuracy, security and efficiency of the payment process are ensured, and the payment efficiency is improved. And the user payment experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an automatic identification method, apparatus, and electronic device for multiple codes coexisting. Background Technology

[0002] In daily life, people typically use electronic payment methods to make payments. During electronic payment, it is usually necessary to recognize the payment code to ensure a smooth transaction.

[0003] Currently, existing payment systems, such as medical payment systems, typically only support the recognition and payment of a single payment code. In this case, users need to manually switch payment codes based on the actual payment options available to them, significantly limiting payment convenience and failing to meet diverse user needs. Furthermore, existing payment systems cannot guarantee the security of received payment code data, and their recognition efficiency is relatively low. Summary of the Invention

[0004] This invention provides an automatic identification method, device, and electronic device for multiple coexisting codes, which ensures the accuracy, security, and efficiency of the payment process and improves the user payment experience.

[0005] According to one aspect of the present invention, an automatic identification method for multiple coexisting codes is provided, the method comprising:

[0006] Receive the first payment code data recognized by the target machine, and calculate the length of the string corresponding to the first payment code data;

[0007] The first payment type corresponding to the first payment code data is determined by using regular expression validation, and the second payment type is determined by processing the string length and the first payment code data based on numerical calculation validation.

[0008] When the first payment type and the second payment type are the same, the first payment code data is processed based on the first private key of the first recipient and the first public key of the second recipient in sequence to obtain the first signature data corresponding to the first payment code data.

[0009] In response to the receipt of target payment data, the system performs signature verification on the first signature data to obtain the second payment code data from the first signature data. If the second payment code data and the first payment code data meet the requirements, the system completes the identification of the target payment code and pays the target payment data.

[0010] According to another aspect of the present invention, an automatic identification device for multiple code coexistence is provided, the device comprising:

[0011] The data receiving and statistics module is used to receive the first payment code data recognized by the target machine and to count the string length corresponding to the first payment code data.

[0012] The payment type determination module is used to determine the first payment type corresponding to the first payment code data by using regular expression validation, and to determine the second payment type by processing the string length and the first payment code data based on numerical calculation validation.

[0013] The signature data determination module is used to process the first payment code data based on the first private key of the first recipient and the first public key of the second recipient when the first payment type and the second payment type are the same, so as to obtain the first signature data corresponding to the first payment code data.

[0014] The data verification module is used to respond to the event of receiving target payment data, obtain the second payment code data in the first signature data by verifying the first signature data, and complete the target payment code identification and payment of the target payment data if the second payment code data and the first payment code data meet the requirements.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory that is communicatively connected to at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the automatic identification method for multi-code coexistence according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided that stores computer instructions for causing a processor to execute and implement the automatic identification method for multi-code coexistence of any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, characterized in that, when executed by a processor, the computer program implements an automatic identification method for multi-code coexistence as in any embodiment of the present invention.

[0021] The technical solution of this invention involves receiving first payment code data identified by a target machine and determining the string length corresponding to the first payment code data. Regular expression verification is used to process the first payment code data to determine a first payment type. Numerical calculation verification is used to process the string length and the first payment code data to determine a second payment type. By using both regular expressions and numerical calculations to determine the payment type of the payment code scanned by the target machine, rapid filtering and identification of payment types are achieved, reducing errors in subsequent processing. If the first and second payment types are the same, the first payment code data is processed according to the first private key received and the first public key of the second recipient to obtain first signature data corresponding to the first payment code data, ensuring the uniqueness and immutability of the first payment code data corresponding to the first signature data. In response to the receipt of target payment data, the first signature data is verified to obtain second payment code data. If the second payment code data and the first payment code data meet the requirements, the interaction process of target payment code identification and payment of the target payment data is completed. By verifying the first signature data, its validity can be confirmed, thus ensuring the authenticity of the payment code data and completing the identification of the target payment code and the payment interaction process. This invention solves the problems of low payment convenience, inadequate payment security, and low payment efficiency in existing technologies. Through a dual verification mechanism of regular expressions and numerical calculations, it ensures rapid and accurate identification of the payment code, avoiding manual intervention and input errors. By using the public and private keys of the first and second recipients to sign and verify the payment code data, the security and immutability of the payment code data are guaranteed, ensuring the uniqueness and integrity of each transaction. Based on the above, this invention ensures the accuracy, security, and efficiency of the payment process, improving the user payment experience.

[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart of an automatic identification method for multiple code coexistence provided in an embodiment of the present invention;

[0025] Figure 2 This is a flowchart of an automatic identification method for multiple code coexistence provided in an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of the structure of an automatic identification device with multiple coexisting codes provided in an embodiment of the present invention;

[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the automatic identification method for multi-code co-occurrence according to embodiments of the present invention. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] Example 1

[0031] Figure 1 This is a flowchart of an automatic identification method for multiple coexisting codes provided in Embodiment 1 of the present invention. This embodiment is applicable to the identification and verification of payment code data to complete payments based on the payment code data. This method can be executed by an automatic identification device for multiple coexisting codes, which can be implemented in hardware and / or software. This automatic identification device for multiple coexisting codes can be configured in electronic devices such as mobile phones, computers, or servers. Figure 1 As shown, the method includes:

[0032] S110. Receive the first payment code data recognized by the target machine and count the string length corresponding to the first payment code data.

[0033] The target machine can be a device used to scan and obtain payment code data. Optionally, in the context of medical insurance payment, the target machine can be a medical insurance machine. Accordingly, the target machine scans the corresponding payment code using a scanning head sensor to obtain first payment code data. The first payment code data can be string data obtained by scanning a payment code provided by a corresponding application. Optionally, the first payment code data can be numbers or characters of a fixed string length. Different applications provide different payment types. For example, if the target machine scans a payment code provided by application A, then the first payment code data is payment code data of payment type A. Similarly, if the target machine scans a payment code provided by application B, then the first payment code data is payment code data of payment type B. The string length can be the length of all characters in the first payment code data, representing the total number of characters in the first payment code data.

[0034] Specifically, the system receives the first payment code data recognized by the target machine, counts the characters in the first payment code data, and determines the string length of the first payment code data.

[0035] In this embodiment of the invention, the method for receiving the first payment code data and determining the corresponding string length may be: receiving the first payment code data fed back by the scanning head sensor; wherein the first payment code data is related to the payment type identified by the scanning head sensor; and determining the string length of the first payment code data according to the start character and end character in the first payment code data.

[0036] The scanning head sensor, which is the target machine or a component within it, is used to scan the payment code corresponding to the payment type to obtain the first payment code data. The payment type may be related to the corresponding application that provides the payment code. The start character can be the first character in the first payment code data. The end character can be the last character in the first payment code data.

[0037] Specifically, a scanning head sensor scans the payment code provided by the user based on the corresponding application to obtain the first payment code data. Different applications provide different payment types for their payment codes. The string length of the first payment code data is determined based on the start and end characters of the determined first payment code data.

[0038] For example, taking a medical insurance payment scenario as an example, a user can place any one of the payment codes of type A provided by application A, type B provided by application B, or type C provided by application C at a preset position corresponding to the scanning head sensor of the medical insurance machine. This allows the scanning head sensor to scan the payment code and determine a number of a fixed string length corresponding to the payment code, thus obtaining the first payment code data. Simultaneously, the string length corresponding to this first payment code data is determined and denoted as sum.

[0039] S120. The first payment type corresponding to the first payment code data is determined by using regular expression verification, and the second payment type is determined by processing the string length and the first payment code data based on numerical calculation verification.

[0040] The regular expression validation method involves processing the first payment code data using regular expressions to determine its payment type. Different payment types correspond to different regular expressions. The first payment type can be the payment type of the first payment code data determined by the regular expression validation method.

[0041] Numerical verification can be performed to validate the first payment code data through numerical calculations to determine which payment type the first payment code data belongs to. The second payment type can be the payment type corresponding to the first payment code data determined by the numerical verification method.

[0042] Specifically, a regular expression validation method is used, that is, the first payment code data is validated based on the regular expressions corresponding to different payment types to determine the first payment type corresponding to the first payment code data. A numerical calculation validation method is used to validate the characters in the first payment code data to determine the second payment type corresponding to the first payment code data.

[0043] Based on the above, by comparing and determining the payment type of the scanned first payment code data through both regular expressions and numerical operations, the payment type can be quickly identified, the data source of the first payment code data can be determined, the authenticity of the first payment code data can be guaranteed, and errors in subsequent processing can be reduced.

[0044] In this embodiment of the invention, the method of determining the first payment type of the first payment code data by regular expression verification can be as follows: based on a pre-defined regular expression corresponding to each payment type, the first payment type corresponding to the first payment code data is determined; wherein, the first value at the first position in the first payment code data is used to represent the payment type, and the second value at the second position is used to represent the payment type; the first payment type is used to represent the payment type determined after the first payment code data is identified; the regular expression includes a first expression of a first type, a second expression of a second type, a third expression of a third type, and a fourth expression of a fourth type, the third value displayed at the first position of the first expression, the second expression, the third expression, and the fourth expression represents the payment type, and the fourth value at the second position is used to represent the payment type.

[0045] For regular expression validation, pre-defined regular expressions are provided for different payment types. Optionally, there are four payment types: Type 1, Type 2, Type 3, and Type 4. Correspondingly, the regular expressions are: the first expression for Type 1, the second expression for Type 2, the third expression for Type 3, and the fourth expression for Type 4. In the first, second, third, and fourth expressions, the third value displayed at the first position represents the payment type, and the fourth value at the second position represents the payment type. The first position can be the first character position to be validated in the first payment code data. The third value can be the standard value of the first character to be validated under the corresponding payment type. The second position can be the second character position to be validated in the first payment code data. The fourth value can be the standard value of the second character to be validated under the corresponding payment type.

[0046] The first payment code data can be a string of fixed length. The first position of the first payment code data can be the position of the first character to be verified within the first payment code data. The first value can be the numerical value corresponding to the character at the first position. The second position can be the position of the second character to be verified within the first payment code data. The second value can be the numerical value corresponding to the character at the second position.

[0047] Specifically, based on the pre-defined regular expressions corresponding to each payment type, the first value at the first position and the second value at the second position in the first payment code data are validated to determine the first payment type corresponding to the first payment code data.

[0048] Optionally, for each pre-defined regular expression corresponding to a payment type, the first expression for the first type can be represented as: "1[0-5]\\d{" + len + "}$", where len represents sum-2, and sum represents the string length. 1 is the third value displayed in the first position of the first expression. [0-5] is the fourth value in the second position of the first expression. The meaning of the above first expression is: match a string where the first digit is 1, the second digit is any number from 0 to 5 (inclusive), followed by len arbitrary digits (\\d{+len +} represents len digits), and finally ends with a string ($ representing the end of the string). If the first value in the first position of the first payment code data is 1, the second value in the second position is any number from 0 to 5, and the subsequent numbers and characters meet the requirements mentioned in the first expression, then the first payment code data is the payment code data of the first type, and the first type is used as the first payment type. It should be noted that the len parameter can be extracted, which is helpful for later maintenance.

[0049] The second expression of the second type can be represented as: "2[5-9]\\d{" + len + "}$", where len represents sum-2, and sum represents the string length. 2 is the third value displayed in the first position of the second expression. [5-9] is the fourth value corresponding to the second position of the second expression. The meaning of the above second expression is: match a string whose first digit is 2, the second digit is any number from 5 to 9 (inclusive), followed by len arbitrary digits (\\d{+len +} represents len digits), and finally ends with a string ($ represents the end of the string). If the first value of the first position of the first payment code data is 2, the second value of the second position is any number from 5 to 9, and the subsequent numbers and characters meet the requirements mentioned in the second expression, then the first payment code data is the second type of payment code data, and the second type is used as the first payment type.

[0050] The third expression for the third type can be represented as: "30\\d{" + len + "}$", where len represents sum-2, and sum represents the string length. 3 is the third value displayed at the first position of the third expression. 0 is the fourth value corresponding to the second position of the third expression. The meaning of the above third expression is: match a string where the first digit is 3, the second digit is 0, followed by len arbitrary digits (\\d{+len +} represents len digits), and finally ends with a string ($ representing the end of the string). If the first value at the first position of the first payment code data is 3, the second value at the second position is 0, and the subsequent numbers and characters meet the requirements mentioned in the third expression, then the first payment code data is of the third type, and the third type is used as the first payment type. Optionally, the third type can be the payment type of an invalid payment code.

[0051] The fourth expression of the fourth type can be represented as: "4243\\d{" + len + "}$", where len represents sum-4, and sum represents the string length. 42 is the third value displayed in the first position of the fourth expression, and 43 is the fourth value displayed in the second position of the fourth expression. The meaning of the above fourth expression is: match a string where the first position is 42, the second position is 43, followed by len arbitrary digits (\\d{+len +} represents len digits), and finally ends with a string ($ representing the end of the string). If the first value of the first payment code data is 42 in the first position and the second value is 43 in the second position, and the subsequent numbers and characters meet the requirements mentioned in the fourth expression, then the first payment code data is the fourth type of payment code data, and the fourth type is used as the first payment type. It should be noted that in the medical insurance payment scenario, the fourth type can correspond to the medical insurance payment payment type.

[0052] It should be noted that a custom payment code algorithm interface can be reserved to adapt to future payment types or technical requirements, ensuring the system's flexible maintenance and scalability.

[0053] In this embodiment of the invention, the method for determining the second payment type based on the numerical calculation verification method to process the string length and the first payment code data can be as follows: the first payment code data is processed by rounding down the fifth numerical value to obtain the first digit; the first payment code data is processed by subtracting one from the string length and then rounding down the sixth numerical value to obtain the second digit; the second payment type is determined based on the first digit, the second digit, and the first payment code data.

[0054] Among them, the numerical calculation verification method can be to determine the value at the corresponding position of the first payment code data by using integer division and modulo operations, so as to verify the payment type of the first payment code data.

[0055] The fifth value can be used to process the first payment code data to determine its first digit. This fifth value is related to the string length. Subtracting one from the string length of the first payment code data can be understood as removing the first digit. The sixth value can be used to remove the first digit from the first payment code data to determine its second digit.

[0056] Specifically, by dividing the first payment code data by the fifth value, the first digit of the first payment code data can be obtained. Correspondingly, the string length of the first payment code data is reduced by one to remove the first digit. Dividing the first payment code data with the first digit removed by the sixth value yields the first digit of the first payment code data, which is the second digit of the first payment code data. Based on this, the first two digits of the first payment code data are obtained. Based on the first and second digits and the first payment code data, the second payment type of the first payment code data is determined.

[0057] For example, the string length is denoted as sum (the total number of characters in the first payment code data).

[0058] Divide the first payment code data by the fifth value. This yields the first digit. The first digit is then removed from the first payment code data, and the data after removing the first digit is then divided by the sixth value. The first digit of the first payment code data is obtained by removing the first digit, which is the second digit of the entire first payment code data. Based on the first digit, the second digit, and the first payment code data, the second payment type of the first payment code data is determined.

[0059] For example, if the first payment code data is 256789, and sum=6, then divide the first payment code data 256789 by the fifth value. This yields the first digit, 2, of the first payment code data. Subtracting one from the string length of the first payment code data 256789 results in 56789. Finally, dividing the first payment code data 56789 (with the first digit removed) by the sixth value... We get the second digit as 5.

[0060] Optionally, the first digit is obtained by dividing the first payment code data by the fifth value. The second digit is obtained by dividing the first payment code data by the sixth value and taking the remainder after dividing by 10.

[0061] Specifically, the first payment code data is divided by... This yields the first digit. Then, divide the first payment code data by... Then, take the remainder when dividing by 10 to obtain the second digit.

[0062] For example, if the first payment code data is 256789, and sum=6, then divide the first payment code data 256789 by the fifth value. This yields the first digit, 2, of the first payment code data. Correspondingly, the first payment code data 256789 is divided by the sixth value. We get 25. Taking the remainder of 25 divided by 10, we get the second digit 5.

[0063] For example, in conjunction with the above example, if the first digit of the first payment code data is 1 and the second digit is any number between 0 and 5, then the payment type of the first payment code data is determined to be the first type, and the first type is used as the second payment type.

[0064] If the first digit of the first payment code data is 2 and the second digit is any number between 5 and 9, then the payment type of the first payment code data is determined to be the second type, and the second type is used as the second payment type.

[0065] If the first digit of the first payment code is 3 and the second digit is 0, then the payment type of the first payment code is determined to be the third type, and this third type will be used as the second payment type. The third type is the payment type corresponding to an invalid payment code.

[0066] Optionally, if the first digit is the seventh value and the second digit is the eighth value, the method further includes: subtracting two from the string length of the first payment code data and then rounding the value of the ninth value to obtain the third digit; if the third digit meets the preset conditions, subtracting three from the string length of the first payment code data and then rounding the value of the tenth value to obtain the fourth digit.

[0067] The seventh value can be a first preset value. Optionally, in a medical insurance payment scenario, the seventh value can be 4. The eighth value can also be a second preset value. Optionally, in a medical insurance payment scenario, the eighth value can be 2.

[0068] Subtracting two from the string length of the first payment code data removes the first and second digits. The ninth value can be used to process the first payment code data to determine the third digit. This ninth value is related to the string length.

[0069] The third digit meets a preset condition, which means the third digit matches a third preset value. The third preset value can be 4. Subtracting three from the string length of the first payment code data can remove the first, second, and third digits. The tenth value is used to process the first payment code data to determine the fourth digit. The tenth value is related to the string length.

[0070] Specifically, if the first digit of the first payment code data is the seventh value and the second digit is the eighth value, the string length of the first payment code data is reduced by two to obtain the first payment code data after removing the first and second digits. Dividing the first payment code data after removing the first and second digits by the ninth value yields the first digit of the first payment code data after removing the first and second digits, which is the third digit of the overall first payment code data. If the third digit matches a third preset value, then the third digit satisfies the preset condition. At this point, the string length of the first payment code data is reduced by three again to obtain the first payment code data after removing the first, second, and third digits. This is then divided by the tenth value to obtain the fourth digit, which is used to determine the second payment type based on the first, second, third, and fourth digits.

[0071] Optionally, by dividing the first payment code data by the ninth value. Then, take the remainder after dividing by 100 to obtain the third digit. Divide the first payment code data by the tenth value. The remainder of 1000 is then used to obtain the fourth digit, which is used to determine the second payment type based on the first, second, third, and fourth digits.

[0072] The second payment type is determined based on the first digit, the second digit, and the first payment code data, including: determining the second payment type based on the first digit, the second digit, the third digit, and the fourth digit.

[0073] Specifically, the second payment type corresponding to the first payment code data is determined based on the first, second, third, and fourth digits.

[0074] For example, if the first digit of the first payment code data is 4 (seventh value) and the second digit is 2 (eighth value), then the third and fourth digits are determined according to the above method. If the third digit is 4 and the fourth digit is 3, then the payment type of the first payment code data is determined to be the fourth type, and the fourth type is used as the second payment type.

[0075] S130. If the first payment type and the second payment type are the same, the first payment code data is processed based on the first private key of the first recipient and the first public key of the second recipient to obtain the first signature data corresponding to the first payment code data.

[0076] If the first payment type and the second payment type are the same, it means that the first payment code data belongs to the corresponding first payment type or second payment type. If the first payment type and the second payment type are different, it means that the first payment code data is invalid or has been tampered with. Optionally, if the first payment type and the second payment type are different, a rescan prompt message can be generated, allowing the user to rescan the payment code or check the payment information at the preset position of the scanning head sensor based on the rescan prompt message.

[0077] The first recipient can be an object that provides a first private key. The first private key is used to encrypt the first payment code data. The second recipient can be an object that provides a first public key. The first public key is used to sign the first private key. The first signature data can be the signature data corresponding to the first payment code data.

[0078] Specifically, when the first payment type and the second payment type are the same, the first payment code data is processed sequentially according to the first private key of the first recipient and the first public key of the second recipient to determine the first signature data corresponding to the first payment code data, so as to ensure the uniqueness and immutability of the first payment code data.

[0079] S140. In response to the event of receiving target payment data, the system performs signature verification on the first signature data to obtain the second payment code data in the first signature data. If the second payment code data and the first payment code data meet the requirements, the system completes the identification of the target payment code and pays the target payment data.

[0080] The target payment data can be the payment data corresponding to the payment code data. The target payment data can be used to represent the payment amount corresponding to the user. The second payment code data can be the payment code data parsed from the first signature data after verification. The second payment code data and the first payment code data must meet the requirement that the second payment code data is consistent with the first payment code data. The target payment code can be a payment code corresponding to either the first payment code data or the second payment code data.

[0081] Specifically, upon detecting user payment target data, the system verifies the first signature data to determine the second payment code data within it. If the first and second payment code data match, the system identifies the target payment code corresponding to either the first or second payment code data, enabling payment interaction processing of the target payment data. The received target payment data is then uploaded to the corresponding target settlement system.

[0082] The technical solution of this embodiment receives first payment code data recognized by the target machine and determines the string length corresponding to the first payment code data. Regular expression verification is used to process the first payment code data to determine the first payment type. Numerical calculation verification is used to process the string length and the first payment code data to determine the second payment type. By using both regular expressions and data calculations to determine the payment type of the payment code scanned by the target machine, rapid filtering and identification of payment types are achieved, reducing errors in subsequent processing. If the first and second payment types are the same, the first payment code data is processed according to the first private key received and the first public key of the second recipient to obtain first signature data corresponding to the first payment code data, ensuring the uniqueness and immutability of the first payment code data corresponding to the first signature data. In response to the event of receiving target payment data, the first signature data is verified to obtain second payment code data. If the second payment code data and the first payment code data meet the requirements, the interaction process of target payment code recognition and payment of target payment data is completed. By verifying the first signature data, its validity can be confirmed, thus ensuring the authenticity of the payment code data and completing the identification of the target payment code and the payment interaction process. This invention solves the problems of low payment convenience, inadequate payment security, and low payment efficiency in existing technologies. Through a dual verification mechanism of regular expressions and numerical calculations, it ensures rapid and accurate identification of the payment code, avoiding manual intervention and input errors. By using the public and private keys of the first and second recipients to sign and verify the payment code data, the security and immutability of the payment code data are guaranteed, ensuring the uniqueness and integrity of each transaction. Based on the above, this invention ensures the accuracy, security, and efficiency of the payment process, improving the user payment experience.

[0083] Example 2

[0084] Figure 2 This is a flowchart of an automatic identification method for multiple code coexistence provided in Embodiment 2 of the present invention. This embodiment is a preferred embodiment of the above embodiments. For specific implementation details, please refer to the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 2 As shown, the method includes:

[0085] S210. Receive the first payment code data identified by the target machine and count the string length corresponding to the first payment code data.

[0086] S220. The first payment type corresponding to the first payment code data is determined by using regular expression verification, and the second payment type is determined by processing the string length and the first payment code data based on numerical calculation verification.

[0087] S230, if the first payment type and the second payment type are the same, the first payment code data and the first random string are encrypted based on the first private key of the first recipient to obtain encrypted data.

[0088] The first random string can be a randomly generated string corresponding to the first payment code data. Using the first random string increases the uniqueness and security of the first signature data, preventing the payment code from being tampered with through simple hash reverse engineering. The encrypted data can be the data obtained by encrypting the first payment code data and the first random string. Optionally, the first payment code data and the first random string can be encrypted using a hash algorithm. Accordingly, the encrypted data can be the hash value corresponding to the first payment code data and the first random string.

[0089] Specifically, a first random string is randomly generated, and the first payment code data and the first random string are encrypted using the first private key of the first recipient to obtain encrypted data.

[0090] S240. Sign the first private key based on the first public key of the second recipient to obtain the first signature data.

[0091] The first signature data may be data determined by signing the first private key. The first signature data is related to the encrypted data.

[0092] Specifically, the first private key is signed based on the first public key of the second recipient to determine the first signature data.

[0093] Optionally, taking a medical insurance payment scenario as an example, the first private key of the first recipient can be a medical insurance working private key certificate, and the first public key of the second recipient can be a medical insurance root public key certificate. It should be noted that the medical insurance root public key certificate is issued by the State Administration of Healthcare Security and represents the unique identity of the State Administration. All terminal manufacturers must pre-install this root public key or root certificate in the secure area of ​​the terminal to ensure the trust foundation of the system. Multiple medical insurance working public key certificates can be issued from the medical insurance root public key certificate. Each medical insurance working public key certificate represents a legitimate signer and contains the signer's information, ensuring that the payment code data can be traced back to the specific signer and ensuring its legitimacy.

[0094] If the first payment type and the second payment type are the same, the first payment code data will be... The first random string is then signed using the medical insurance work private key certificate; specifically, the encrypted data corresponding to the first payment code data is calculated using the SHA-256 hash algorithm. SHA-256 is an irreversible hash algorithm that transforms input data into a fixed-length 256-bit binary value. This hash algorithm generates a digest of the data during the signing process, ensuring data integrity and tamper-proofness.

[0095] Specifically: ;

[0096] in, This indicates the first payment code data. This represents the first random string (a randomly generated string that is updated and appended with each signature). (Store together). This represents the signature result of encrypted data after processing with the SHA-256 hash algorithm, which is a 256-bit hash value.

[0097] The medical insurance root public key certificate is used to sign the medical insurance working private key certificate to obtain the first signed data. By jointly signing the first payment code data with the medical insurance root public key certificate and the medical insurance working private key certificate, the uniqueness and immutability of the first payment code data can be ensured, further guaranteeing the security of the payment process and the effectiveness of authentication.

[0098] S250. Cache the first payment code data and the first random string, so that when the target payment data is received, retrieve the first payment code data and the first random string from the cache to determine whether the first payment code data and the second payment code data meet the requirements.

[0099] Specifically, the first payment code data and the first random string are cached. When the target payment data is received, the first payment code data and the first random string are retrieved from the cache to determine whether the first payment code data and the second payment code data meet the requirements, thereby realizing the signature verification process of the first payment code data.

[0100] S260. Verify the signature of the first private key based on the second private key of the second recipient.

[0101] The second private key can be the private key corresponding to the first public key of the second recipient. Optionally, in the context of medical insurance payment, the second private key can be the medical insurance root private key certificate, and the first private key can be the medical insurance working private key certificate.

[0102] Specifically, the first signature data is processed based on the second private key of the second recipient to verify the signature using the first private key and obtain a verification result. If the verification result is successful, the encrypted data is then processed for signature verification based on the public key of the first recipient.

[0103] S270. Verify the encrypted data based on the public key of the first recipient to obtain the second payment code data and the second random string in the first signature data, and hash the second payment code data and the second random string to obtain the first hash value.

[0104] The public key of the first recipient can be a public key corresponding to the private key of the first recipient. Optionally, in the context of medical insurance payment, the public key of the first recipient can be a medical insurance working public key certificate. The second payment code data and the second random string can be determined by parsing and processing the encrypted data. The first hash value can be determined by hashing the second payment code data and the second random string.

[0105] Specifically, the encrypted data is verified using the public key of the first recipient to determine the second payment code data and the second random string within the first signature data. The second payment code data and the second random string are then hashed to obtain the first hash value corresponding to the second payment code data.

[0106] For example, in conjunction with the above example, the second private key of the second recipient is used as the medical insurance root private key certificate, and the first private key is used as the medical insurance working private key certificate. The public key of the first recipient is used as the medical insurance working public key certificate.

[0107] The medical insurance root private key certificate is used to verify the medical insurance working private key certificate. After successful verification, the medical insurance working public key certificate is used to verify the signature of the encrypted data, thereby verifying the medical insurance working private key certificate corresponding to the encrypted data. After successful verification, the second payment code data and the second random string corresponding to the encrypted data are determined. A hash operation is performed on the second payment code data and the second random string to determine the first hash value. Specifically:

[0108] ;

[0109] in, This refers to the second payment code data, that is, the payment code data parsed from the encrypted data. This represents the second random string. This represents the first hash value.

[0110] S280. By retrieving the first payment code data and the first random string from the cache and performing hash processing, a second hash value is obtained.

[0111] The second hash value is determined based on the first payment code data and the first random string.

[0112] Specifically, the first payment code data and the first random string are retrieved from the cache, and the retrieved first payment code data and the first random string are hashed based on a hash algorithm to determine the second hash value.

[0113] Optionally, if the encrypted data is a hash value determined by hashing the first payment code data and the first random string, then when caching the first payment code data and the first random string, the encrypted data can also be cached accordingly, so as to facilitate subsequent direct verification of the accuracy of the first hash value based on the encrypted data.

[0114] For example, when a user makes a payment, the second payment code data is determined. Second random string Then, the second payment code data and the second random string are hashed, and the first hash value is calculated as follows:

[0115]

[0116] That is, obtain the first hash value. .

[0117] Retrieve the first payment code data from the cache. The first random string is Then, the first payment code data and the first random string are concatenated to obtain the concatenated data. The concatenated data is hashed to determine the second hash value. The second hash value, which is 256 bits, is obtained: 7c4a8d09ca3762af61e59520943dc26494f8941b.

[0118] S290, if the first hash value and the second hash value are the same, complete the identification of the target payment code and pay the target payment data.

[0119] Specifically, if the first hash value and the second hash value are the same, the identification and processing of the target payment code corresponding to the first payment code data or the second payment code data is completed, the payment interaction processing of the target payment data is realized, and the received target payment data is uploaded to the corresponding target settlement system.

[0120] For example, in conjunction with the above examples, in If the verification is successful, it means that the payment code data has not been tampered with and is valid, and the payment process can continue.

[0121] like If the verification fails, the system can automatically identify the erroneous data, terminate the payment process, and prompt the user that the payment code is invalid or the payment data has been tampered with, allowing the user to rescan the payment code or check the payment information.

[0122] The technical solution of this embodiment involves receiving first payment code data recognized by the target machine and determining the string length corresponding to the first payment code data. Regular expression validation is used to process the first payment code data to determine the first payment type. Numerical calculation validation is used to process the string length and the first payment code data to determine the second payment type. By using both regular expressions and numerical calculations to determine the payment type of the payment code scanned by the target machine, rapid filtering and identification of payment types can be achieved, reducing errors in subsequent processing. If the first and second payment types are the same, the first payment code data and a first random string are encrypted using the first private key of the first recipient to obtain encrypted data. The first private key is signed using the first public key of the second recipient to obtain first signed data. The first payment code data and the first random string are cached so that when the target payment data is received, the first payment code data and the first random string are retrieved from the cache to determine whether the first and second payment code data meet the requirements. Verification of the first private key using the second private key of the second recipient and verification of the encrypted data using the first recipient's public key yields the second payment code data and the second random string within the first signature data. The second payment code data and the second random string are then hashed to obtain the first hash value. By retrieving the first payment code data and hashing the first random string from the cache to obtain the second hash value, the target payment code identification and payment data interaction process is completed when the first and second hash values ​​match. Verification of the first signature data confirms its validity, thus ensuring the authenticity of the payment code data and completing the target payment code identification and payment interaction process. This invention solves the problems of low payment convenience, inadequate payment security, and low payment efficiency in existing technologies. Through a dual verification mechanism of regular expressions and numerical calculations, it ensures rapid and accurate identification of payment codes, avoiding manual intervention and input errors. Automatic matching of payment types based on payment code characteristics enables "pay upon display of code," significantly shortening payment time, especially in high-traffic scenarios such as hospitals, greatly improving settlement efficiency. By signing and verifying the payment code data using the public and private keys of the first and second recipients, the security and immutability of the payment code data are guaranteed, ensuring the uniqueness, integrity, and reliability of each transaction. This invention supports the co-recognition of payment codes for multiple payment types, eliminating the need for users to frequently switch payment tools during the payment process and greatly simplifying the payment operation. Based on the above, this invention ensures the accuracy, security, and efficiency of the payment process, improving the user payment experience.

[0123] Example 3

[0124] Figure 3This is a schematic diagram of the structure of an automatic identification device with multiple co-occurring codes provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a data receiving and statistics module 310, a payment type determination module 320, a signature data determination module 330, and a data verification module 340.

[0125] The data receiving and statistics module 310 is used to receive the first payment code data identified by the target machine and count the string length corresponding to the first payment code data; the payment type determination module 320 is used to determine the first payment type corresponding to the first payment code data using regular expression verification, and to process the string length and the first payment code data based on numerical calculation verification to determine the second payment type; the signature data determination module 330 is used to process the first payment code data based on the first private key of the first recipient and the first public key of the second recipient when the first payment type and the second payment type are the same to obtain the first signature data corresponding to the first payment code data; the data signature verification module 340 is used to respond to the event of receiving target payment data, to obtain the second payment code data in the first signature data by verifying the first signature data, and to complete the target payment code identification and payment of the target payment data when the second payment code data and the first payment code data meet the requirements.

[0126] The technical solution of this embodiment receives first payment code data recognized by the target machine and determines the string length corresponding to the first payment code data. Regular expression verification is used to process the first payment code data to determine the first payment type. Numerical calculation verification is used to process the string length and the first payment code data to determine the second payment type. By using both regular expressions and data calculations to determine the payment type of the payment code scanned by the target machine, rapid filtering and identification of payment types are achieved, reducing errors in subsequent processing. If the first and second payment types are the same, the first payment code data is processed according to the first private key received and the first public key of the second recipient to obtain first signature data corresponding to the first payment code data, ensuring the uniqueness and immutability of the first payment code data corresponding to the first signature data. In response to the event of receiving target payment data, the first signature data is verified to obtain second payment code data. If the second payment code data and the first payment code data meet the requirements, the interaction process of target payment code recognition and payment of target payment data is completed. By verifying the first signature data, its validity can be confirmed, thus ensuring the authenticity of the payment code data and completing the identification of the target payment code and the payment interaction process. This invention solves the problems of low payment convenience, inadequate payment security, and low payment efficiency in existing technologies. Through a dual verification mechanism of regular expressions and numerical calculations, it ensures rapid and accurate identification of the payment code, avoiding manual intervention and input errors. By using the public and private keys of the first and second recipients to sign and verify the payment code data, the security and immutability of the payment code data are guaranteed, ensuring the uniqueness and integrity of each transaction. Based on the above, this invention ensures the accuracy, security, and efficiency of the payment process, improving the user payment experience.

[0127] Based on the above embodiments, optionally, a data receiving and statistics module is used to receive the first payment code data fed back by the scanning head sensor; wherein, the first payment code data is related to the payment type identified by the scanning head sensor; and the string length of the first payment code data is determined according to the start character and end character in the first payment code data.

[0128] Optionally, the payment type determination module includes: a first payment type determination unit, used to determine the first payment type corresponding to the first payment code data based on a pre-defined regular expression corresponding to each payment type; wherein, a first value at a first position in the first payment code data is used to represent the payment type, and a second value at a second position is used to represent the payment type; the first payment type is used to represent the payment type determined after recognizing the first payment code data; the regular expression includes a first expression of a first type, a second expression of a second type, a third expression of a third type, and a fourth expression of a fourth type, wherein the third value displayed at the first position of the first expression, the second expression, the third expression, and the fourth expression represents the payment type, and the fourth value at the second position represents the payment type.

[0129] Optionally, the payment type determination module includes: a second payment type determination unit, comprising: a first digit determination subunit, used to obtain the first digit by rounding the first payment code data according to a fifth value; a second digit determination subunit, used to obtain the second digit by subtracting one from the string length of the first payment code data and then rounding it according to a sixth value; and a second payment type determination subunit, used to determine the second payment type based on the first digit, the second digit, and the first payment code data.

[0130] Optionally, when the first digit is the seventh value and the second digit is the eighth value, the second payment type determination unit further includes: a third digit determination subunit, used to obtain the third digit by subtracting two from the string length of the first payment code data and then rounding the value of the ninth value; a fourth digit determination subunit, used to obtain the fourth digit by subtracting three from the string length of the first payment code data and then rounding the value of the tenth value when the third digit meets a preset condition; and the second payment type determination subunit is specifically used to determine the second payment type based on the first digit, the second digit, the third digit, and the fourth digit.

[0131] Optionally, the signature data determination module is used to encrypt the first payment code data and the first random string based on the first private key of the first recipient to obtain encrypted data; and to sign the first private key based on the first public key of the second recipient to obtain the first signature data.

[0132] Optionally, the device further includes a payment code data caching module, configured to cache the first payment code data and the first random string, so as to retrieve the first payment code data and the first random string from the cache when an event of receiving target payment data is received, in order to determine whether the first payment code data and the second payment code data meet the requirements.

[0133] Optionally, a data verification module is used to verify the first private key based on the second private key of the second recipient; to verify the encrypted data based on the public key of the first recipient, to obtain the second payment code data and the second random string in the first signature data, and to hash the second payment code data and the second random string to obtain a first hash value; to obtain a second hash value by retrieving the first payment code data and the first random string from the cache and hashing them; and to complete the target payment code identification and pay the target payment data if the first hash value and the second hash value are the same.

[0134] The automatic identification device for multi-code coexistence provided in the embodiments of the present invention can execute the automatic identification method for multi-code coexistence provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0135] Example 4

[0136] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0137] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0138] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0139] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the automatic identification method of multi-code coexistence.

[0140] In some embodiments, the automatic identification method for multi-code coexistence can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the automatic identification method for multi-code coexistence described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the automatic identification method for multi-code coexistence by any other suitable means (e.g., by means of firmware).

[0141] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0142] Computer programs for implementing the automatic identification method of multi-code coexistence of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0143] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0144] Example 5

[0145] Embodiment 5 of the present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute an automatic identification method for multiple code coexistence, the method comprising:

[0146] The system receives first payment code data identified by the target machine and calculates the string length corresponding to the first payment code data. It then uses regular expression verification to determine the first payment type corresponding to the first payment code data, and processes the string length and the first payment code data based on numerical calculation verification to determine the second payment type. If the first payment type and the second payment type are the same, the system processes the first payment code data sequentially based on the first private key of the first recipient and the first public key of the second recipient to obtain first signature data corresponding to the first payment code data. In response to an event of receiving target payment data, the system verifies the first signature data to obtain second payment code data from the first signature data. If the second payment code data and the first payment code data meet the requirements, the system completes target payment code identification and pays the target payment data.

[0147] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0148] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0149] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0150] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0151] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0152] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for automatic recognition of polycode symbiosis, characterized by, include: Receive the first payment code data recognized by the target machine, and count the length of the string corresponding to the first payment code data; The first payment type corresponding to the first payment code data is determined by using regular expression validation, and the second payment type is determined by processing the string length and the first payment code data based on numerical calculation validation. When the first payment type and the second payment type are the same, the first payment code data is processed in sequence based on the first private key of the first recipient and the first public key of the second recipient to obtain the first signature data corresponding to the first payment code data. In response to the receipt of target payment data, the system performs signature verification on the first signature data to obtain the second payment code data from the first signature data. If the second payment code data and the first payment code data meet the requirements, the system completes the identification of the target payment code and pays the target payment data.

2. The method of claim 1, wherein, The step of receiving the first payment code data identified by the target machine and calculating the string length corresponding to the first payment code data includes: Receive first payment code data fed back by the scanning head sensor; wherein the first payment code data is related to the payment type identified by the scanning head sensor; The string length of the first payment code data is determined based on the start and end characters in the first payment code data.

3. The method of claim 1, wherein, The step of determining the first payment type corresponding to the first payment code data using regular expression validation includes: Based on the pre-defined regular expressions corresponding to each payment type, the first payment type corresponding to the first payment code data is determined; Wherein, the first value at the first position in the first payment code data is used to represent the payment type, and the second value at the second position is used to represent the payment type; the first payment type is used to represent the payment type determined after recognizing the first payment code data; the regular expression includes a first expression of a first type, a second expression of a second type, a third expression of a third type, and a fourth expression of a fourth type, the third value displayed at the first position of the first expression, the second expression, the third expression, and the fourth expression represents the payment type, and the fourth value at the second position is used to represent the payment type.

4. The method of claim 1, wherein, The step of processing the string length and the first payment code data using a numerical calculation verification method to determine the second payment type includes: The first digit is obtained by rounding the first payment code data according to the fifth value. The second digit is obtained by subtracting one from the string length of the first payment code data and then taking the integer part of the sixth value. The second payment type is determined based on the first digit, the second digit, and the first payment code data.

5. The method of claim 4, wherein, When the first digit is the seventh value and the second digit is the eighth value, the method further includes: The third digit is obtained by subtracting two from the string length of the first payment code data and then rounding the ninth value. If the third digit meets the preset conditions, the fourth digit is obtained by subtracting three from the string length of the first payment code data and then rounding the tenth value. Determining the second payment type based on the first digit, the second digit, and the first payment code data includes: The second payment type is determined by the first digit, the second digit, the third digit, and the fourth digit.

6. The method of claim 1, wherein, The first payment code data is processed sequentially based on the first private key of the first recipient and the first public key of the second recipient to obtain first signature data corresponding to the first payment code data, including: The first payment code data and the first random string are encrypted based on the first private key of the first recipient to obtain encrypted data. The first private key is signed based on the first public key of the second recipient to obtain the first signature data.

7. The method of claim 6, wherein, The method further includes: The first payment code data and the first random string are cached so that when the target payment data is received, the first payment code data and the first random string are retrieved from the cache to determine whether the first payment code data and the second payment code data meet the requirements.

8. The method of claim 7, wherein, The step of obtaining second payment code data from the first signature data through signature verification processing, and completing target payment code identification and payment when the second payment code data and the first payment code data meet the requirements, includes: The signature is verified based on the second private key of the second recipient; The encrypted data is verified using the public key of the first recipient to obtain the second payment code data and the second random string in the first signature data. The second payment code data and the second random string are then hashed to obtain the first hash value. The second hash value is obtained by retrieving the first payment code data and the first random string from the cache and performing hash processing. If the first hash value and the second hash value are the same, the target payment code is identified and the target payment data is paid.

9. A multi-code symbology automatic identification device, characterized by, include: The data receiving and statistics module is used to receive the first payment code data recognized by the target machine and to count the string length corresponding to the first payment code data. The payment type determination module is used to determine the first payment type corresponding to the first payment code data by using regular expression verification, and to process the string length and the first payment code data based on numerical calculation verification to determine the second payment type; The signature data determination module is used to process the first payment code data based on the first private key of the first recipient and the first public key of the second recipient when the first payment type and the second payment type are the same, so as to obtain the first signature data corresponding to the first payment code data. The data verification module is used to respond to the event of receiving target payment data, obtain the second payment code data in the first signature data by verifying the first signature data, and complete the target payment code identification and payment of the target payment data if the second payment code data and the first payment code data meet the requirements.

10. An electronic device, comprising: The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the automatic identification method for multi-code coexistence as described in any one of claims 1-8.