Identity recognition processing method and system based on offline two-dimensional code
By packaging and encrypting user terminal data and QR code image transmission in transaction processing, the synchronization problem of traditional transaction processing when network delay or disconnection is solved, and the continuity of identity authentication and transaction processing in offline state is realized and stability improves user experience and system reliability.
Patent Information
- Application Number
- CN202411149160.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-21
AI Technical Summary
When traditional transaction processing is delayed or disconnected, the payment results are inconsistent with the data synchronization, resulting in the inability to perform identity authentication, order processing and data reporting, which affects the system's business orderliness and data integrity.
By obtaining the target identification data of the user terminal for packaging and encryption, an encrypted data sequence that is adapted to the QR code is converted into a QR code image, and scanning and decryption are performed when the transaction device is offline, completing business logic judgment to ensure identity Continuity and stability of certification and transaction processing.
In the poor or networkless state, maintain the continuity and stability of the identification service, ensure the smooth progress of identity authentication and transaction processing, and improve user experience and system reliability.
Smart Images

Figure CN118674450B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data identification, and in particular to an identity identification processing method and system based on offline two-dimensional code. Background Art
[0002] At present, with the development of Internet of Things technology, many settlement platforms involving payment transactions are highly dependent on Internet access capabilities, and the matching service end conducts real-time interactive communication to achieve the effect of data synchronization;
[0003] However, in traditional transaction processing, there is a problem of inconsistent synchronization between payment results and related data when the network is delayed or the Internet is disconnected. In offline transactions, users and devices may be offline at the same time, resulting in the inability to effectively carry out identity authentication, order processing and subsequent data reporting, affecting the business orderliness and data integrity of the system;
[0004] Therefore, in order to overcome the above technical problems, the present invention provides an identity recognition processing method and system based on offline two-dimensional code. Summary of the invention
[0005] The present invention provides an identity recognition processing method and system based on offline two-dimensional code, which is used to obtain target recognition data of a user terminal for packaging and encryption, which can effectively ensure the security of data and lay a foundation for conversion into a two-dimensional code image by generating an encrypted data sequence adapted to the two-dimensional code, so that the transmission and recognition of the two-dimensional code image in an offline environment can be effectively realized by generating the two-dimensional code image, and then when the transaction device is in an offline state, the two-dimensional code image can be effectively scanned and decrypted by the transaction device, and the obtained original target data to be recognized can be subjected to business logic judgment, thereby effectively ensuring that the continuity and stability of the recognition service are maintained in a poor network environment or in a state without a network, which is conducive to ensuring that identity authentication and transaction processing can be carried out smoothly in an offline state, thereby improving user experience and system reliability.
[0006] An identity recognition processing method based on an offline two-dimensional code comprises:
[0007] Step 1: Obtain the target data to be identified from the user terminal, package and encrypt the target data to be identified, and generate an encrypted data sequence adapted to the QR code;
[0008] Step 2: Convert the encrypted data sequence into a QR code image, obtain a transaction device associated with the user terminal, and transmit the QR code image to the transaction device;
[0009] Step 3: When the transaction device is offline, the QR code image is scanned and decrypted based on the transaction device to obtain the original target data to be identified;
[0010] Step 4: Perform business logic judgment on the target data to be identified based on the transaction device, and complete the identity recognition of the user terminal in the offline state based on the judgment result.
[0011] Preferably, an identity recognition processing method based on an offline two-dimensional code, in step 1, the target data to be recognized of the user terminal is obtained, and the target data to be recognized is packaged and encrypted to generate an encrypted data sequence adapted to the two-dimensional code, including:
[0012] Obtain target data to be identified from the user terminal;
[0013] Packing and encrypting the target data to be identified to obtain a first encrypted data sequence;
[0014] A data format compatible with the two-dimensional code is obtained, and the format of the first encrypted data sequence is converted according to the compatible data format to obtain a second encrypted data sequence, wherein the second encrypted data sequence is an encrypted data sequence compatible with the two-dimensional code.
[0015] Preferably, an identity recognition processing method based on an offline two-dimensional code packages and encrypts the target data to be recognized to obtain a first encrypted data sequence, including:
[0016] Constructing a first encryption key based on the user terminal, and encrypting the target data to be identified according to the first encryption key to obtain ciphertext information of the target data to be identified;
[0017] Building a key pair based on the transaction device, wherein the key pair includes: a public key and a private key;
[0018] Encrypting the first encryption key based on the public key to obtain a second encryption key, and at the same time, saving the private key based on the transaction device;
[0019] The ciphertext information of the target data to be identified is packaged with the second encryption key to obtain a first encrypted data sequence.
[0020] Preferably, an identity recognition processing method based on an offline QR code, in step 2, converting the encrypted data sequence into a QR code image, acquiring a transaction device associated with a user terminal, and transmitting the QR code image to the transaction device, comprises:
[0021] Obtain the obtained encrypted data sequence, call a library function from a QR code related library, and encode the encrypted data sequence based on the library function to obtain the encoded data corresponding to the encrypted data sequence;
[0022] Determine the data object to be displayed in the encrypted data sequence based on the coded data, and mark the location of the data object to be displayed;
[0023] Based on the positioning mark result, the encoded data is logically processed to obtain a visualized two-dimensional code object corresponding to the encrypted data sequence, and the visualized two-dimensional code object is state-represented and adapted based on the preset visual features, and a two-dimensional code image is obtained based on the state-representation adaptation result;
[0024] Access the backend data of the user terminal based on business execution requirements, and extract multi-dimensional transaction information of the user terminal based on the access results;
[0025] Parsing the multi-dimensional transaction information to obtain a multi-dimensional transaction track of the user terminal, and determining a transaction device associated with the user terminal based on the multi-dimensional transaction track;
[0026] Extract the terminal identity of the transaction device and uniquely configure the QR code image based on the terminal identity;
[0027] Obtaining an available communication link of the user terminal, and identifying a unique attribution configuration result of the two-dimensional code image based on the communication protocol of the available communication link, and determining the service flow direction of the two-dimensional code image;
[0028] The QR code image is transmitted to the transaction device based on the service flow.
[0029] Preferably, an identity recognition processing method based on an offline QR code transmits a QR code image to a transaction device based on a service flow, comprising:
[0030] Obtaining source configuration parameters of the two-dimensional code image, and determining an image format of the two-dimensional code image based on the source configuration parameters;
[0031] Matching a local decoding function from a two-dimensional code decoding function library based on the image format, and determining a scanning rule for the two-dimensional code image based on the local decoding function, and at the same time, determining a format and structure of expected data in the two-dimensional code image based on the two-dimensional code source configuration parameters, and determining a local verification rule for the expected data based on the format and structure;
[0032] The scanning rule is bound to the local verification rule, and based on the binding result, the scanning rule and the local verification rule are synchronously transmitted to the transaction device based on the service flow.
[0033] Preferably, an identity recognition processing method based on an offline QR code, based on a binding result, synchronously transmits a scanning rule and a local verification rule to a transaction device based on a service flow, including:
[0034] Based on the two-dimensional code image obtained by the transaction device and the corresponding scanning rules and local verification rules, and based on the information source, a mapping relationship between the two-dimensional code image and the corresponding scanning rules and local verification rules is determined;
[0035] Adding attribution tags to the two-dimensional code image and the corresponding scanning rules and local verification rules based on the mapping relationship, and allocating data cache space in the transaction device based on the adding result;
[0036] The QR code image and the corresponding scanning rules and local verification rules are cached in the data cache space.
[0037] Preferably, an identity recognition processing method based on an offline two-dimensional code, in step 3, when the transaction device is in an offline state, the two-dimensional code image is scanned and decrypted based on the transaction device to obtain the original target data to be identified, including:
[0038] When the transaction device is in an offline state, the scanning rules configured offline for the transaction device are read;
[0039] The scanning rules include a method for scanning the QR code image and a private key for decrypting the QR code image;
[0040] Scanning the QR code image based on the method of scanning the QR code image to obtain ciphertext information and encryption key;
[0041] Performing a first decryption on the encryption key according to the decrypted private key to obtain a target key after decrypting the encryption key;
[0042] The ciphertext information is decrypted for the second time according to the target key to obtain the original target data to be identified.
[0043] Preferably, an identity recognition processing method based on an offline two-dimensional code, in step 2, after converting the encrypted data sequence into a two-dimensional code image, further comprises:
[0044] Read the two-dimensional code image, determine the outline pixel points of the two-dimensional code image, and at the same time, obtain the two-dimensional code image template;
[0045] Mapping the contour pixel points of the two-dimensional code image in the two-dimensional code image template, and determining whether the contour similarity points of the two-dimensional code image can be completely mapped within the contour range of the two-dimensional code image template;
[0046] If the outline pixels of the QR code image can be completely mapped to the outline range of the QR code image template, there is no need to correct the size of the QR code image;
[0047] Otherwise, the target pixel points outside the contour range of the contour pixel points of the two-dimensional code image are obtained, and the target pixel points are corrected based on the contour range of the two-dimensional code image template, and the correction of the two-dimensional code image is completed based on the correction result.
[0048] Preferably, an identity recognition processing method based on an offline QR code, in step 4, a business logic judgment is performed on the target data to be recognized based on the transaction device, and the identity recognition of the user terminal in an offline state is completed based on the judgment result, including:
[0049] Acquire the target data to be identified, and perform serialization processing on the target data to be identified to obtain a sequence of data to be identified;
[0050] Traverse the sequence of data to be identified to obtain the semantic features and key elements of each independent data, and determine the association index between each independent data and the upper and lower data based on the semantic features and key elements, and determine the data logic between adjacent independent data based on the association index;
[0051] Determine the integrity of the target data to be identified based on data logic, and when it is determined that the target data to be identified is complete, obtain the identity information of the user terminal based on the target data to be identified;
[0052] At the same time, extract the timestamp in the target data to be identified, and determine the valid time period of the target data to be identified based on the timestamp;
[0053] The target expiration time node is determined based on the effective time period, and the target expiration time node is compared with the current real-time time node to obtain the validity period of the target data to be identified, thereby completing the identity identification of the user terminal.
[0054] An identity recognition and processing system based on offline two-dimensional code, comprising:
[0055] The packaging and encryption module is used to obtain the target data to be identified from the user terminal, and to package and encrypt the target data to be identified to generate an encrypted data sequence adapted to the QR code;
[0056] A two-dimensional code image conversion module, used to convert the encrypted data sequence into a two-dimensional code image, obtain a transaction device associated with the user terminal, and transmit the two-dimensional code image to the transaction device;
[0057] An offline decryption module is used to scan and decrypt the QR code image based on the transaction device when the transaction device is offline, so as to obtain the original target data to be identified;
[0058] The identity recognition module is used to perform business logic judgment on the target data to be recognized based on the transaction device, and complete the identity recognition of the user terminal in the offline state based on the judgment result.
[0059] Compared with the prior art, the beneficial effects of the present invention are as follows: by obtaining the target identification data of the user terminal and then packaging and encrypting it, the security of the data can be effectively guaranteed, and by generating an encrypted data sequence compatible with the QR code, a foundation is laid for conversion into a QR code image, so that by generating a QR code image, the transmission and identification of the QR code image can be effectively realized in an offline environment, and then when the transaction device is in an offline state, the QR code image can be effectively scanned and decrypted by the transaction device, and the original target data to be identified can be subjected to business logic judgment, thereby effectively guaranteeing the continuity and stability of the identification service in a poor network environment or without a network, which is conducive to ensuring that identity authentication and transaction processing can be carried out smoothly in an offline state, thereby improving user experience and system reliability.
[0060] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in this application document.
[0061] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0063] Figure 1 This is a flow chart of an identity recognition processing method based on an offline two-dimensional code in an embodiment of the present invention;
[0064] Figure 2 This is a flowchart of step 1 in an identity recognition processing method based on an offline two-dimensional code in an embodiment of the present invention;
[0065] Figure 3 The present invention is a structural diagram of an identity recognition processing system based on offline two-dimensional code in an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0067] In one embodiment, this embodiment provides an identity recognition processing method based on an offline two-dimensional code, such as Figure 1 As shown, including:
[0068] Step 1: Obtain the target data to be identified from the user terminal, package and encrypt the target data to be identified, and generate an encrypted data sequence adapted to the QR code;
[0069] Step 2: Convert the encrypted data sequence into a QR code image, obtain a transaction device associated with the user terminal, and transmit the QR code image to the transaction device;
[0070] Step 3: When the transaction device is offline, the QR code image is scanned and decrypted based on the transaction device to obtain the original target data to be identified;
[0071] Step 4: Perform business logic judgment on the target data to be identified based on the transaction device, and complete the identity recognition of the user terminal in the offline state based on the judgment result.
[0072] In this embodiment, the target data to be identified may include the user identity, validity period, etc. of the user terminal.
[0073] In this embodiment, the encrypted data sequence generated to be compatible with the QR code is the result obtained after a series of encryption processing is performed on the target data to be identified through a key, and the result includes the original content corresponding to the target data to be identified and the key information corresponding to the key, wherein the encrypted data sequence can be converted into a QR code image.
[0074] In this embodiment, the encrypted data sequence is converted into a two-dimensional code image for efficient transmission and recognition in an offline environment.
[0075] In this embodiment, the business logic judgment may include information such as the integrity, validity period, and user identity of the verification data.
[0076] The working principle and beneficial effects of the above technical solution are: by obtaining the target identification data of the user terminal and then packaging and encrypting it, the security of the data can be effectively guaranteed, and by generating an encrypted data sequence compatible with the QR code, the foundation is laid for conversion into a QR code image, so that by generating a QR code image, the transmission and identification of the QR code image can be effectively realized in an offline environment, and then when the transaction device is in an offline state, the QR code image can be effectively scanned and decrypted by the transaction device, and the original target data to be identified can be subjected to business logic judgment, thereby effectively ensuring the continuity and stability of the identification service in a poor network environment or without a network, which is conducive to ensuring that identity authentication and transaction processing can be carried out smoothly in an offline state, thereby improving user experience and system reliability.
[0077] In one embodiment, this embodiment provides an identity recognition processing method based on an offline two-dimensional code, such as Figure 2As shown, in step 1, the target data to be identified of the user terminal is obtained, and the target data to be identified is packaged and encrypted to generate an encrypted data sequence adapted to the QR code, including:
[0078] S101: Acquire target data to be identified by the user terminal;
[0079] S102: Pack and encrypt the target data to be identified to obtain a first encrypted data sequence;
[0080] S103: Acquire a data format that is compatible with the two-dimensional code, and convert the format of the first encrypted data sequence according to the compatible data format to obtain a second encrypted data sequence, wherein the second encrypted data sequence is an encrypted data sequence that is compatible with the two-dimensional code.
[0081] In this embodiment, the target data to be identified is packaged and encrypted to obtain a first encrypted data sequence, including: constructing a first encryption key based on a user terminal, and encrypting the target data to be identified according to the first encryption key to obtain ciphertext information of the target data to be identified; constructing a key pair based on a transaction device, wherein the key pair includes: a public key and a private key; encrypting the first encryption key based on the public key to obtain a second encryption key, and at the same time, saving the private key based on the transaction device; packaging the ciphertext information of the target data to be identified and the second encryption key to obtain the first encrypted data sequence;
[0082] In the above embodiment, the first encrypted data sequence is acquired through a key pair, thereby effectively ensuring the validity and security of the first encrypted data sequence.
[0083] In this embodiment, the first encrypted data sequence may be an encrypted data sequence obtained by encrypting the target data to be identified.
[0084] In this embodiment, the second encrypted data sequence may be obtained by converting the first encrypted data sequence according to an adapted data format, wherein the adapted data format is set in advance.
[0085] The working principle and beneficial effects of the above technical solution are: by determining the target identification data of the user terminal, packaging and encrypting it, so as to obtain the first encrypted data sequence, the security of the data can be effectively improved; by converting the format of the first encrypted data sequence, the second encrypted data sequence can be effectively acquired, laying the foundation for conversion into a two-dimensional code image.
[0086] In one embodiment, this embodiment provides an identity recognition processing method based on an offline two-dimensional code. In step 2, the encrypted data sequence is converted into a two-dimensional code image, and a transaction device associated with a user terminal is obtained, and the two-dimensional code image is transmitted to the transaction device, including:
[0087] Obtain the obtained encrypted data sequence, call a library function from a QR code related library, and encode the encrypted data sequence based on the library function to obtain the encoded data corresponding to the encrypted data sequence;
[0088] Determine the data object to be displayed in the encrypted data sequence based on the coded data, and mark the location of the data object to be displayed;
[0089] Based on the positioning mark result, the encoded data is logically processed to obtain a visualized two-dimensional code object corresponding to the encrypted data sequence, and the visualized two-dimensional code object is state-represented and adapted based on the preset visual features, and a two-dimensional code image is obtained based on the state-representation adaptation result;
[0090] Access the backend data of the user terminal based on business execution requirements, and extract multi-dimensional transaction information of the user terminal based on the access results;
[0091] Parsing the multi-dimensional transaction information to obtain a multi-dimensional transaction track of the user terminal, and determining a transaction device associated with the user terminal based on the multi-dimensional transaction track;
[0092] Extract the terminal identity of the transaction device and uniquely configure the QR code image based on the terminal identity;
[0093] Obtaining an available communication link of the user terminal, and identifying a unique attribution configuration result of the two-dimensional code image based on the communication protocol of the available communication link, and determining the service flow direction of the two-dimensional code image;
[0094] The QR code image is transmitted to the transaction device based on the service flow.
[0095] In this embodiment, the two-dimensional code image is transmitted to the transaction device based on the service flow, including: obtaining source configuration parameters of the two-dimensional code image (the source configuration parameters may be set in advance), and determining the image format of the two-dimensional code image based on the source configuration parameters; matching a local decoding function from a two-dimensional code decoding function library (the two-dimensional code decoding function library may be set in advance, and include local decoding functions corresponding to different image formats) based on the image format, and determining a scanning rule for the two-dimensional code image based on the local decoding function, and at the same time, determining the format and structure of the expected data in the two-dimensional code image based on the two-dimensional code source configuration parameters, and determining a local verification rule for the expected data based on the format and structure; binding the scanning rule with the local verification rule, and based on the binding result, synchronously transmitting the scanning rule and the local verification rule to the transaction device based on the service flow.
[0096] As described above, based on the binding results, the scanning rules and local verification rules are synchronously transmitted to the transaction device based on the service flow, including: based on the two-dimensional code image and the corresponding scanning rules and local verification rules obtained by the transaction device, and based on the information source, determining the mapping relationship between the two-dimensional code image and the corresponding scanning rules and local verification rules; adding attribution tags to the two-dimensional code image and the corresponding scanning rules and local verification rules based on the mapping relationship (that is, assigning a specific identifier according to the scanning rules and local verification rules), and allocating data cache space in the transaction device based on the adding results; caching the two-dimensional code image and the corresponding scanning rules and local verification rules in the data cache space. The above technology can be conducive to achieving more efficient and accurate transaction processing and data management.
[0097] In this embodiment, the QR code related library may be pre-set and include library functions for implementing functions for encoding encrypted data sequences, wherein the library functions may be composed of encoding functions, error correction code generation functions, and the like.
[0098] In this embodiment, the data object to be displayed is the specific data object that needs to be displayed in the encrypted data sequence.
[0099] In this embodiment, logical processing of the encoded data based on the positioning marking result may be, for example, combining and arranging the marked data to form basic data of a visual two-dimensional code data object with a specific logical structure.
[0100] In this embodiment, the state representation adaptation of the visualized two-dimensional code object based on the preset visual features can be performed by setting the color, contrast, line thickness, shape and other visual attributes of the two-dimensional code in advance, so that the appearance of the two-dimensional code meets specific requirements and styles. Through the synergy of these processing steps, the encoded data is finally converted into a two-dimensional code image with specific visual features that we can intuitively see, so that it can be presented in a specific form and be recognized and used.
[0101] In this embodiment, the multi-dimensional transaction information may include: time dimension (the specific time point or time period when the transaction occurs), transaction type dimension (different types of transactions such as purchase, sale, and transfer), transaction amount dimension, transaction object dimension (with which objects the transaction is conducted), transaction location dimension (the geographical location where the transaction occurs), etc.
[0102] In this embodiment, uniquely configuring the QR code image can ensure a one-to-one correspondence between the QR code and the transaction device, thereby avoiding confusion and errors.
[0103] In this embodiment, the service flow direction may be the flow direction and path of the two-dimensional code image.
[0104] The working principle and beneficial effects of the above technical solution are as follows: by obtaining the encrypted data sequence and calling the library function to implement the encoding processing, the encoded data can be effectively obtained, and by determining the data object to be displayed and marking it, the visual QR code object can be effectively determined, and by adapting the state representation of the visual QR code object, a high-quality QR code image can be effectively obtained. By extracting multi-dimensional transaction information and trajectories, it is helpful to gain a deep understanding of the behavior patterns of users and transaction devices. By determining the transaction device associated with the user terminal and performing a unique attribution configuration, the system's pertinence and accuracy are improved. Based on the available communication links and protocols, the service flow is identified to ensure that the QR code image is efficiently and accurately transmitted to the transaction device, thereby ensuring operational efficiency during the offline process.
[0105] In one embodiment, this embodiment provides an identity recognition processing method based on an offline two-dimensional code. In step 3, when the transaction device is in an offline state, the two-dimensional code image is scanned and decrypted based on the transaction device to obtain the original target data to be recognized, including:
[0106] When the transaction device is in an offline state, the scanning rules configured offline for the transaction device are read;
[0107] The scanning rules include a method for scanning the QR code image and a private key for decrypting the QR code image;
[0108] Scanning the QR code image based on the method of scanning the QR code image to obtain ciphertext information and encryption key;
[0109] Performing a first decryption on the encryption key according to the decrypted private key to obtain a target key after decrypting the encryption key;
[0110] The ciphertext information is decrypted for the second time according to the target key to obtain the original target data to be identified.
[0111] In this embodiment, the scanning rule may be a specific method for the transaction device to identify the two-dimensional code image so as to obtain a specific parsing rule required for decrypting the two-dimensional code image.
[0112] In this embodiment, the ciphertext information may be the specific encrypted data content represented by the two-dimensional code image.
[0113] In this embodiment, the target key may be the final result obtained by decrypting the encryption key using the decrypted private key.
[0114] In this embodiment, the target data to be identified may be specific data content that is not encrypted and is obtained after decrypting the ciphertext information using the target key.
[0115] The working principle and beneficial effects of the above technical solution are: by determining the scanning rules of the transaction device, accurate and reliable scanning of the QR code image can be achieved according to the scanning rules, thereby achieving accurate and reliable decryption of the QR code image, while ensuring the reliability and accuracy of the acquisition of the target data to be identified and improving the security of the target data to be identified.
[0116] In one embodiment, this embodiment provides an identity recognition processing method based on an offline two-dimensional code. In step 2, after converting the encrypted data sequence into a two-dimensional code image, the method further includes:
[0117] Read the two-dimensional code image, determine the outline pixel points of the two-dimensional code image, and at the same time, obtain the two-dimensional code image template;
[0118] Mapping the contour pixel points of the two-dimensional code image in the two-dimensional code image template, and determining whether the contour similarity points of the two-dimensional code image can be completely mapped within the contour range of the two-dimensional code image template;
[0119] If the outline pixels of the QR code image can be completely mapped to the outline range of the QR code image template, there is no need to correct the size of the QR code image;
[0120] Otherwise, the target pixel points outside the contour range of the contour pixel points of the two-dimensional code image are obtained, and the target pixel points are corrected based on the contour range of the two-dimensional code image template, and the correction of the two-dimensional code image is completed based on the correction result.
[0121] In this embodiment, the two-dimensional code image template may be a two-dimensional code image with a pre-set standard size.
[0122] The working principle and beneficial effects of the above technical solution are: by judging the mapping of contour similarity points, the matching degree between the QR code image and the template is ensured, thereby improving the accuracy of subsequent reading and processing. For incomplete matching situations, the target pixel points can be corrected in a targeted manner to make the QR code image more in line with the standard, and the processing capabilities of QR codes of different sizes or slightly deformed codes are enhanced, which is beneficial to ensuring the stability of the QR code, and then ensuring that identity authentication and transaction processing can be carried out smoothly in an offline state, thereby improving user experience and system reliability.
[0123] In one embodiment, this embodiment provides an identity recognition processing method based on an offline two-dimensional code. In step 4, a business logic judgment is performed on the target data to be recognized based on the transaction device, and the identity recognition of the user terminal in an offline state is completed based on the judgment result, including:
[0124] Acquire the target data to be identified, and perform serialization processing on the target data to be identified to obtain a sequence of data to be identified;
[0125] Traverse the sequence of data to be identified to obtain the semantic features and key elements of each independent data, and determine the association index between each independent data and the upper and lower data based on the semantic features and key elements, and determine the data logic between adjacent independent data based on the association index;
[0126] Determine the integrity of the target data to be identified based on data logic, and when it is determined that the target data to be identified is complete, obtain the identity information of the user terminal based on the target data to be identified;
[0127] At the same time, extract the timestamp in the target data to be identified, and determine the valid time period of the target data to be identified based on the timestamp;
[0128] The target expiration time node is determined based on the effective time period, and the target expiration time node is compared with the current real-time time node to obtain the validity period of the target data to be identified, thereby completing the identity identification of the user terminal.
[0129] In this embodiment, the serialization process may be to split the target data to be identified into specific data corresponding to each unit time, that is, a series of individual data, wherein the sequence of data to be identified is the result of the serialization process.
[0130] In this embodiment, the independent data may be specific data corresponding to each unit time after serialization processing.
[0131] In this embodiment, the semantic feature may be the core theme of each independent data.
[0132] In this embodiment, the key element may be important data information contained in each independent data.
[0133] In this embodiment, the correlation index may be the correlation degree between each independent data and adjacent data. The greater the correlation index value, the greater the correlation degree.
[0134] In this embodiment, the data logic may be used to characterize the completeness of the data content between adjacent independent data, that is, a complete data logic corresponds to a portion of relatively independent data content.
[0135] In this embodiment, the timestamp may be specific time information corresponding to the target data to be identified.
[0136] In this embodiment, the valid time period may be specific time span information indicating that the target data to be identified can be used and has utilization value.
[0137] In this embodiment, the target expiration time node may be the time information when the target data to be identified loses its utilization value and is no longer allowed to be used.
[0138] The working principle and beneficial effects of the above technical solution are: by serializing the target data to be identified and analyzing the data sequence after serialization, the semantic features and key elements of the target data to be identified can be accurately and effectively determined, thereby facilitating accurate and effective judgment of the data logic between the data based on the semantic features and key elements, and locking the integrity of the target data to be identified based on the data logic. Finally, when the target data to be identified is complete, the identity information of the user terminal can be accurately and reliably identified, thereby ensuring the accuracy of the user terminal identity identification.
[0139] In one embodiment, this embodiment provides an identity recognition processing system based on an offline two-dimensional code, such as Figure 3 As shown, including:
[0140] The packaging and encryption module is used to obtain the target data to be identified from the user terminal, and to package and encrypt the target data to be identified to generate an encrypted data sequence adapted to the QR code;
[0141] A two-dimensional code image conversion module, used to convert the encrypted data sequence into a two-dimensional code image, obtain a transaction device associated with the user terminal, and transmit the two-dimensional code image to the transaction device;
[0142] An offline decryption module is used to scan and decrypt the QR code image based on the transaction device when the transaction device is offline, so as to obtain the original target data to be identified;
[0143] The identity recognition module is used to perform business logic judgment on the target data to be recognized based on the transaction device, and complete the identity recognition of the user terminal in the offline state based on the judgment result.
[0144] The working principle and beneficial effects of the above technical solution are: by obtaining the target identification data of the user terminal and then packaging and encrypting it, the security of the data can be effectively guaranteed, and by generating an encrypted data sequence compatible with the QR code, the foundation is laid for conversion into a QR code image, so that by generating a QR code image, the transmission and identification of the QR code image can be effectively realized in an offline environment, and then when the transaction device is in an offline state, the QR code image can be effectively scanned and decrypted by the transaction device, and the original target data to be identified can be subjected to business logic judgment, thereby effectively ensuring the continuity and stability of the identification service in a poor network environment or without a network, which is beneficial to ensure that identity authentication and transaction processing can be carried out smoothly in an offline state, thereby improving user experience and system reliability.
[0145] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An identity recognition processing method based on offline two-dimensional code, characterized in that: include: Step 1: Obtain the target data to be identified from the user terminal, package and encrypt the target data to be identified, and generate an encrypted data sequence adapted to the QR code; Step 2: Convert the encrypted data sequence into a QR code image, obtain a transaction device associated with the user terminal, and transmit the QR code image to the transaction device; Step 3: When the transaction device is offline, the QR code image is scanned and decrypted based on the transaction device to obtain the original target data to be identified; Step 4: Perform business logic judgment on the target data to be identified based on the transaction device, and complete the identity recognition of the user terminal in an offline state based on the judgment result; In step 2, the encrypted data sequence is converted into a QR code image, a transaction device associated with the user terminal is obtained, and the QR code image is transmitted to the transaction device, including: Obtain the obtained encrypted data sequence, call a library function from a QR code related library, and encode the encrypted data sequence based on the library function to obtain the encoded data corresponding to the encrypted data sequence; Determine the data object to be displayed in the encrypted data sequence based on the coded data, and mark the location of the data object to be displayed; Based on the positioning mark result, the encoded data is logically processed to obtain a visualized two-dimensional code object corresponding to the encrypted data sequence, and the visualized two-dimensional code object is state-represented and adapted based on the preset visual features, and a two-dimensional code image is obtained based on the state-representation adaptation result; Access the backend data of the user terminal based on business execution requirements, and extract multi-dimensional transaction information of the user terminal based on the access results; Parsing the multi-dimensional transaction information to obtain a multi-dimensional transaction track of the user terminal, and determining a transaction device associated with the user terminal based on the multi-dimensional transaction track; Extract the terminal identity of the transaction device and uniquely configure the QR code image based on the terminal identity; Obtaining an available communication link of the user terminal, and identifying a unique attribution configuration result of the two-dimensional code image based on the communication protocol of the available communication link, and determining the service flow direction of the two-dimensional code image; The QR code image is transmitted to the transaction device based on the service flow.
2. According to claim 1, the identity recognition processing method based on offline two-dimensional code is characterized in that: In step 1, the target data to be identified of the user terminal is obtained, and the target data to be identified is packaged and encrypted to generate an encrypted data sequence adapted to the QR code, including: Obtain target data to be identified from the user terminal; Packing and encrypting the target data to be identified to obtain a first encrypted data sequence; A data format adapted to the two-dimensional code is obtained, and the format of the first encrypted data sequence is converted according to the adapted data format to obtain a second encrypted data sequence, wherein the second encrypted data sequence is an encrypted data sequence adapted to the two-dimensional code.
3. The identity recognition processing method based on offline two-dimensional code according to claim 2 is characterized in that: Packing and encrypting the target data to be identified to obtain a first encrypted data sequence includes: Constructing a first encryption key based on the user terminal, and encrypting the target data to be identified according to the first encryption key to obtain ciphertext information of the target data to be identified; Building a key pair based on the transaction device, wherein the key pair includes: a public key and a private key; Encrypting the first encryption key based on the public key to obtain a second encryption key, and at the same time, saving the private key based on the transaction device; The ciphertext information of the target data to be identified is packaged with the second encryption key to obtain a first encrypted data sequence.
4. The identity recognition processing method based on offline two-dimensional code according to claim 1 is characterized in that: Transmitting the QR code image to the transaction device based on the service flow, including: Obtaining source configuration parameters of the two-dimensional code image, and determining an image format of the two-dimensional code image based on the source configuration parameters; Matching a local decoding function from a two-dimensional code decoding function library based on the image format, and determining a scanning rule for the two-dimensional code image based on the local decoding function, and at the same time, determining a format and structure of expected data in the two-dimensional code image based on the two-dimensional code source configuration parameters, and determining a local verification rule for the expected data based on the format and structure; The scanning rule is bound to the local verification rule, and based on the binding result, the scanning rule and the local verification rule are synchronously transmitted to the transaction device based on the service flow.
5. The identity recognition processing method based on offline two-dimensional code according to claim 4 is characterized in that: Based on the binding results, the scanning rules and local verification rules are synchronously transmitted to the transaction device based on the service flow, including: Based on the two-dimensional code image obtained by the transaction device and the corresponding scanning rules and local verification rules, and based on the information source, a mapping relationship between the two-dimensional code image and the corresponding scanning rules and local verification rules is determined; Adding attribution tags to the two-dimensional code image and the corresponding scanning rules and local verification rules based on the mapping relationship, and allocating data cache space in the transaction device based on the adding result; The QR code image and the corresponding scanning rules and local verification rules are cached in the data cache space.
6. The identity recognition processing method based on offline two-dimensional code according to claim 1 is characterized in that: In step 3, when the transaction device is in an offline state, the QR code image is scanned and decrypted based on the transaction device to obtain the original target data to be identified, including: When the transaction device is in an offline state, the scanning rules configured offline for the transaction device are read; The scanning rules include a method for scanning the QR code image and a private key for decrypting the QR code image; Scanning the QR code image based on the method of scanning the QR code image to obtain ciphertext information and encryption key; Performing a first decryption on the encryption key according to the decrypted private key to obtain a target key after decrypting the encryption key; The ciphertext information is decrypted for the second time according to the target key to obtain the original target data to be identified.
7. The identity recognition processing method based on offline two-dimensional code according to claim 1 is characterized in that: In step 2, after converting the encrypted data sequence into a QR code image, the following steps are also included: Read the two-dimensional code image, determine the outline pixel points of the two-dimensional code image, and at the same time, obtain the two-dimensional code image template; Mapping the contour pixel points of the two-dimensional code image in the two-dimensional code image template, and determining whether the contour similarity points of the two-dimensional code image can be completely mapped within the contour range of the two-dimensional code image template; If the outline pixels of the QR code image can be completely mapped to the outline range of the QR code image template, there is no need to correct the size of the QR code image; Otherwise, the target pixel points outside the contour range of the contour pixel points of the two-dimensional code image are obtained, and the target pixel points are corrected based on the contour range of the two-dimensional code image template, and the correction of the two-dimensional code image is completed based on the correction result.
8. The identity recognition processing method based on offline two-dimensional code according to claim 1 is characterized in that: In step 4, the target data to be identified is subjected to business logic judgment based on the transaction device, and the identity of the user terminal is identified in an offline state based on the judgment result, including: Acquire the target data to be identified, and perform serialization processing on the target data to be identified to obtain a sequence of data to be identified; Traverse the sequence of data to be identified to obtain the semantic features and key elements of each independent data, and determine the association index between each independent data and the upper and lower data based on the semantic features and key elements, and determine the data logic between adjacent independent data based on the association index; Determine the integrity of the target data to be identified based on data logic, and when it is determined that the target data to be identified is complete, obtain the identity information of the user terminal based on the target data to be identified; At the same time, extract the timestamp in the target data to be identified, and determine the valid time period of the target data to be identified based on the timestamp; The target expiration time node is determined based on the effective time period, and the target expiration time node is compared with the current real-time time node to obtain the validity period of the target data to be identified, thereby completing the identity identification of the user terminal.
9. An identity recognition and processing system based on offline two-dimensional code, characterized in that: include: The packaging and encryption module is used to obtain the target data to be identified from the user terminal, and to package and encrypt the target data to be identified to generate an encrypted data sequence adapted to the QR code; A two-dimensional code image conversion module, used to convert the encrypted data sequence into a two-dimensional code image, obtain a transaction device associated with the user terminal, and transmit the two-dimensional code image to the transaction device; An offline decryption module is used to scan and decrypt the QR code image based on the transaction device when the transaction device is offline, so as to obtain the original target data to be identified; The identity recognition module is used to perform business logic judgment on the target data to be recognized based on the transaction device, and complete the identity recognition of the user terminal in the offline state based on the judgment result; The offline decryption module includes: converting the encrypted data sequence into a QR code image, obtaining a transaction device associated with the user terminal, and transmitting the QR code image to the transaction device, including: Obtain the obtained encrypted data sequence, call a library function from a QR code related library, and encode the encrypted data sequence based on the library function to obtain the encoded data corresponding to the encrypted data sequence; Determine the data object to be displayed in the encrypted data sequence based on the coded data, and mark the location of the data object to be displayed; Based on the positioning mark result, the encoded data is logically processed to obtain a visualized two-dimensional code object corresponding to the encrypted data sequence, and the visualized two-dimensional code object is state-represented and adapted based on the preset visual features, and a two-dimensional code image is obtained based on the state-representation adaptation result; Access the backend data of the user terminal based on business execution requirements, and extract multi-dimensional transaction information of the user terminal based on the access results; Parsing the multi-dimensional transaction information to obtain a multi-dimensional transaction track of the user terminal, and determining a transaction device associated with the user terminal based on the multi-dimensional transaction track; Extract the terminal identity of the transaction device and uniquely configure the QR code image based on the terminal identity; Obtaining an available communication link of the user terminal, and identifying a unique attribution configuration result of the two-dimensional code image based on the communication protocol of the available communication link, and determining the service flow direction of the two-dimensional code image; The QR code image is transmitted to the transaction device based on the service flow.
