A method for managing card secret data

By verifying the real -time login images of payment orders, and building an encryption model based on the transaction information, the card dense data is generated for payment orders, and the problem of data leakage is easily leaked during the storage and transmission process of the card. Safety.

CN119130470BActive Publication Date: 2025-01-24CHENGDU BLUE BROTHERS NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411621685.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-01-24
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

In an e-commerce environment, card-secret data is susceptible to data leakage risks during storage and transmission, and there is a lack of effective encryption measures.

Method used

Through the real -time login image of the payment order to verify, if the verification is passed, the transaction information is obtained and the encryption model is determined based on the transaction information to generate card dense data for the transaction information and transmit it to the user terminal for preservation.

Benefits of technology

The security of payment orders has been improved. Through face recognition verification and specific encryption model construction, the protection of card secret data has been enhanced to prevent information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130470B_ABST
    Figure CN119130470B_ABST
Patent Text Reader

Abstract

The present invention discloses a card secret data management method, which belongs to the field of data management technology, and includes the following steps: S1, obtaining a real-time login image of a payment order, and verifying the real-time login image; S2, obtaining transaction information of the payment order after the real-time login image is verified; S3, determining an encryption model of the payment order according to the transaction information of the payment order; S4, using the encryption model of the payment order, generating card secret data for the transaction information of the payment order, and transmitting the card secret data to a user terminal for storage. The present invention generates card secret data for transaction data, which is used to verify the authority of subsequent users to view payment orders, further improves the security of payment transaction orders, and prevents information leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data management, and in particular relates to a method for managing card secret data. Background Art

[0002] In the current e-commerce environment, card secret business, as a common form of commodity transaction, is widely used in many fields such as software authorization, game recharge, and membership services. The core of the card secret business lies in the generation, management, distribution, and subsequent use verification of card secret information. Many payment orders have appeared in the Internet system, which have certain commodity value. In order to ensure the security of payment orders, card secret data is generally generated for payment orders. The card secret refers to a password combination composed of a series of separate character strings. The card secrets of different payment orders are unique. When users query the payment order, they need to enter the correct card secret to obtain query permissions. However, as sensitive data, card secret information is prone to data leakage risks if effective encryption measures are not taken during storage and transmission. Summary of the invention

[0003] In order to solve the above problems, the present invention proposes a method for managing card secret data.

[0004] The technical solution of the present invention is: a card secret data management method comprises the following steps:

[0005] S1. Obtain a real-time login image of the payment order and verify the real-time login image;

[0006] S2. After the real-time login image verification is passed, the transaction information of the payment order is obtained;

[0007] S3. Determine an encryption model of the payment order based on the transaction information of the payment order;

[0008] S4. Generate card secret data for the transaction information of the payment order using the encryption model of the payment order, and transmit the card secret data to the user terminal for storage.

[0009] Furthermore, S1 includes the following sub-steps:

[0010] S11, obtaining a real-time login image of the payment order, and obtaining a number of anti-counterfeiting login images corresponding to the payment order from a database;

[0011] S12, calculating the login feature degree between the real-time login image and each anti-counterfeiting login image;

[0012] S13, using the anti-counterfeiting login image with the highest login feature as the verification login image;

[0013] S14, extracting the ROI area of ​​the real-time login image and the ROI area of ​​the verification login image respectively;

[0014] S15. Calculate the pixel distribution range corresponding to the ROI area of ​​the verification login image, and determine whether the grayscale value mean of all pixels in the ROI area of ​​the real-time login image belongs to the pixel distribution range. If so, the real-time login image verification passes, otherwise the real-time login image verification fails.

[0015] The beneficial effect of the above further scheme is: in the present invention, when the user views the payment order, he needs to perform face recognition verification first. Therefore, the present invention collects the user's real-time login image (i.e., face image) and compares and verifies it with several anti-counterfeiting login images with login authority pre-stored in the database. If the verification is passed, the user is allowed to obtain the transaction information of the payment order. The present invention first preliminarily screens the real-time login image and each anti-counterfeiting login image, that is, preliminarily screens out an image with the highest similarity to the real-time login image by calculating the login feature degree for further comparison. When the comparison between the verified login image and the real-time login image is completed, the ROI area of ​​the two images is first extracted. In the field of image processing, the ROI area (region of interest) is an image area selected from the image. This area is the focus of image analysis, and the area is circled for further processing. Then the pixel points in the ROI area are analyzed and calculated to determine whether the verification is passed. When the present invention performs image verification, it is divided into a preliminary selection verification login image stage and a pixel point comparison and analysis stage in the ROI area, which can reduce image processing time and increase verification accuracy. In addition, various operators and functions can be used in machine vision software such as Halcon, OpenCV and Matlab to obtain the ROI area.

[0016] Furthermore, in S12, the login feature degree between the real-time login image and the anti-counterfeiting login image Y The calculation formula is: ; In the formula, G m Indicates the real-time login image. m The mean gray value of all pixels in the row, G n Indicates the real-time login image. n The mean gray value of all pixels in the column, G i Indicates the first i The mean gray value of all pixels in the row, G j Indicates the first j The mean gray value of all pixels in the column, M Indicates the number of rows of real-time login images. N Indicates the number of columns of the real-time login image. IIndicates the number of rows of the anti-counterfeiting login image. J Indicates the number of columns of the anti-counterfeiting login image. e Represents an exponent.

[0017] Furthermore, in S15, the minimum value of the pixel distribution range is F min The calculation formula is: ; In the formula, K Indicates the number of pixels in the ROI area of ​​the verified login image. G k Indicates the first k The gray value of a pixel, G max_1 Indicates the maximum grayscale value of the pixel in the verification login image. G min_1 Indicates the minimum grayscale value of the pixel in the verification login image. G max_0 Indicates the maximum grayscale value of the pixels in the ROI area of ​​the verified login image. G min_0 Indicates the minimum grayscale value of the pixels in the ROI area of ​​the verified login image;

[0018] In S15, the maximum value of the pixel distribution range F max The calculation formula is: .

[0019] Furthermore, in S2, the transaction information of the payment order includes transaction duration, transaction amount and transaction text.

[0020] Furthermore, S3 includes the following sub-steps:

[0021] S31, pre-processing the transaction duration and the transaction amount to obtain the optimal transaction duration and the optimal transaction amount;

[0022] S32, taking the word vector of the word with the highest word frequency in the transaction text as the initial word vector, and calculating the word exchange coefficient between the word vectors of the remaining words in the transaction text and the initial word vector;

[0023] S33. Construct a verification model for the payment order based on the optimal transaction duration, the optimal transaction amount, and all word exchange coefficients;

[0024] S34. Construct an encryption model based on the verification model of the payment order.

[0025] The beneficial effect of the above further scheme is that in the present invention, the transaction duration and the transaction amount are rounded up. On the one hand, the integer form facilitates the construction of the verification model in the subsequent steps. On the other hand, the result of rounding up can increase the value of the verification model and improve the encryption degree. According to the comparison between the transaction duration and the preset transaction duration and the comparison between the transaction amount and the preset transaction amount, combined with the word vector and word frequency of the transaction text, a specific verification model is constructed, and then the encryption model is determined according to the verification model. The encryption function of the encryption model can adopt an existing hash function, etc.

[0026] Furthermore, in S31, the optimal transaction duration T The calculation formula is: ; In the formula, t Indicates the transaction duration. Indicates rounding up operation;

[0027] In S31, the best transaction amount O The calculation formula is: ; In the formula, o Indicates the transaction amount.

[0028] Further, in S32, the transaction text h The word exchange coefficient between the word vector of the word and the initial word vector X h The calculation formula is: ; In the formula, A represents the initial word vector, B h Indicates the transaction text h The word vector of each word, C h Indicates the transaction text h The frequency of words, c Indicates the highest word frequency in the transaction text, H Indicates the number of words in the transaction text, cos (·) indicates cosine calculation.

[0029] Further, in S33, the verification model of the payment order Z The expression is: ; In the formula, T Indicates the best trading time. O represents the optimal transaction amount, Indicates the preset transaction duration. Indicates the preset transaction amount. H Indicates the number of words in the transaction text. X h Indicates the transaction text h The word exchange coefficient between the word vector of the word and the initial word vector,e represents the exponent, σ represents the standard deviation of all word exchange coefficients, X max represents the maximum word exchange coefficient, X min represents the minimum word exchange coefficient, Represents the product operation.

[0030] Furthermore, in S34, the encryption model of the payment order D The expression is: ; In the formula, Z Represents the verification model of the payment order, f (·) represents an encryption function.

[0031] In S4, the encrypted value obtained by the encryption model is rounded up and converted into binary form, and the encrypted value corresponding to the binary code and the encryption model is used as the card secret data and stored in the user terminal.

[0032] The beneficial effects of the present invention are as follows: the present invention discloses a method for managing card secret data, which verifies users who can pay for order transaction information by performing pixel analysis on a real-time login image of a user (such as an administrator), thereby ensuring the security of the payment order; at the same time, after the user verification is passed, the present invention constructs a verification model for payment orders of different amounts and different transaction durations, and determines an encryption model based on the verification model, generates card secret data for the transaction data, and is used to verify the authority of subsequent users (such as ordinary users) to view the payment order, thereby further improving the security of the payment transaction order and preventing information leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 The present invention is a flowchart of a method for managing card secret data. DETAILED DESCRIPTION

[0034] The embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

[0035] like Figure 1 As shown, the present invention provides a method for managing card secret data, comprising the following steps:

[0036] S1. Obtain a real-time login image of the payment order and verify the real-time login image;

[0037] S2. After the real-time login image verification is passed, the transaction information of the payment order is obtained;

[0038] S3. Determine an encryption model of the payment order based on the transaction information of the payment order;

[0039] S4. Generate card secret data for the transaction information of the payment order using the encryption model of the payment order, and transmit the card secret data to the user terminal for storage.

[0040] In this embodiment of the present invention, S1 includes the following sub-steps:

[0041] S11, obtaining a real-time login image of the payment order, and obtaining a number of anti-counterfeiting login images corresponding to the payment order from a database;

[0042] S12, calculating the login feature degree between the real-time login image and each anti-counterfeiting login image;

[0043] S13, using the anti-counterfeiting login image with the highest login feature as the verification login image;

[0044] S14, extracting the ROI area of ​​the real-time login image and the ROI area of ​​the verification login image respectively;

[0045] S15. Calculate the pixel distribution range corresponding to the ROI area of ​​the verification login image, and determine whether the grayscale value mean of all pixels in the ROI area of ​​the real-time login image belongs to the pixel distribution range. If so, the real-time login image verification passes, otherwise the real-time login image verification fails.

[0046] In the present invention, when the user views the payment order, the face recognition verification is required first. Therefore, the present invention collects the user's real-time login image (i.e., face image) and compares and verifies it with several anti-counterfeiting login images with login permissions pre-stored in the database. If the verification is passed, the user is allowed to obtain the transaction information of the payment order. The present invention first preliminarily screens the real-time login image and each anti-counterfeiting login image, that is, preliminarily screens out an image with the highest similarity to the real-time login image by calculating the login feature degree, which is used for comparison in the embodiment of the present invention. When the comparison between the verified login image and the real-time login image is completed, the ROI area of ​​the two images is first extracted. In the field of image processing, the ROI area (region of interest) is an image area selected from the image. This area is the focus of image analysis, and the area is circled for further processing. Then the pixel points in the ROI area are analyzed and calculated to determine whether the verification is passed. When the present invention performs image verification, it is divided into a preliminary selection verification login image stage and a pixel point comparison and analysis stage in the ROI area, which can reduce image processing time and increase verification accuracy. In addition, various operators and functions can be used in machine vision software such as Halcon, OpenCV and Matlab to obtain the ROI area.

[0047] In the embodiment of the present invention, in S12, the login feature degree between the real-time login image and the anti-counterfeiting login image is Y The calculation formula is: ; In the formula, G m Indicates the real-time login image. m The mean gray value of all pixels in the row, G n Indicates the real-time login image. n The mean gray value of all pixels in the column, G i Indicates the first i The mean gray value of all pixels in the row, G j Indicates the first j The mean gray value of all pixels in the column, M Indicates the number of rows of real-time login images. N Indicates the number of columns of the real-time login image. I Indicates the number of rows of the anti-counterfeiting login image. J Indicates the number of columns of the anti-counterfeiting login image. e Represents an exponent.

[0048] In the embodiment of the present invention, in S15, the minimum value of the pixel distribution range F min The calculation formula is: ; In the formula, K Indicates the number of pixels in the ROI area of ​​the verified login image. G k Indicates the first k The gray value of a pixel, G max_1 Indicates the maximum grayscale value of the pixel in the verification login image. G min_1 Indicates the minimum grayscale value of the pixel in the verification login image. G max_0 Indicates the maximum grayscale value of the pixels in the ROI area of ​​the verified login image. G min_0 Indicates the minimum grayscale value of the pixels in the ROI area of ​​the verified login image;

[0049] In S15, the maximum value of the pixel distribution range F max The calculation formula is: .

[0050] In the embodiment of the present invention, in S2, the transaction information of the payment order includes transaction duration, transaction amount and transaction text.

[0051] In this embodiment of the present invention, S3 includes the following sub-steps:

[0052] S31, pre-processing the transaction duration and the transaction amount to obtain the optimal transaction duration and the optimal transaction amount;

[0053] S32, taking the word vector of the word with the highest word frequency in the transaction text as the initial word vector, and calculating the word exchange coefficient between the word vectors of the remaining words in the transaction text and the initial word vector;

[0054] S33. Construct a verification model for the payment order based on the optimal transaction duration, the optimal transaction amount, and all word exchange coefficients;

[0055] S34. Construct an encryption model based on the verification model of the payment order.

[0056] In the present invention, the transaction duration and transaction amount are rounded up. On the one hand, the integer form is convenient for the construction of the verification model in the subsequent steps. On the other hand, the result of rounding up can increase the value of the verification model and improve the degree of encryption. According to the comparison between the transaction duration and the preset transaction duration and the comparison between the transaction amount and the preset transaction amount, combined with the word vector and word frequency of the transaction text, a specific verification model is constructed, and then the encryption model is determined according to the verification model. The encryption function of the encryption model can adopt an existing hash function, etc.

[0057] In the embodiment of the present invention, in S31, the optimal transaction duration T The calculation formula is: ; In the formula, t Indicates the transaction duration. Indicates rounding up operation;

[0058] In S31, the best transaction amount O The calculation formula is: ; In the formula, o Indicates the transaction amount.

[0059] In the embodiment of the present invention, in S32, the transaction text h The word exchange coefficient between the word vector of the word and the initial word vector X h The calculation formula is: ; In the formula, A represents the initial word vector, B h Indicates the transaction text h The word vector of each word, C h Indicates the transaction text h The frequency of words, c Indicates the highest word frequency in the transaction text, H Indicates the number of words in the transaction text, cos (·) indicates cosine calculation.

[0060] In the embodiment of the present invention, in S33, the verification model of the payment order Z The expression is: ; In the formula, T Indicates the best trading time. O represents the optimal transaction amount, Indicates the preset transaction duration. Indicates the preset transaction amount. H Indicates the number of words in the transaction text. X h Indicates the transaction text h The word exchange coefficient between the word vector of the word and the initial word vector, e represents the exponent, σ represents the standard deviation of all word exchange coefficients, X max represents the maximum word exchange coefficient, X min represents the minimum word exchange coefficient, Represents the product operation.

[0061] In the embodiment of the present invention, in S34, the encryption model of the payment order D The expression is: ; In the formula, Z Represents the verification model of the payment order, f (·) represents an encryption function.

[0062] In S4, the encrypted value obtained by the encryption model is rounded up and converted into binary form, and the encrypted value corresponding to the binary code and the encryption model is used as the card secret data and stored in the user terminal.

[0063] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A card secret data management method, characterized in that: The following steps are involved: S1. Obtain a real-time login image of the payment order and verify the real-time login image; S2. After the real-time login image verification is passed, the transaction information of the payment order is obtained; S3. Determine an encryption model of the payment order based on the transaction information of the payment order; S4. Generate card secret data for the transaction information of the payment order using the encryption model of the payment order, and transmit the card secret data to the user terminal for storage; In S2, the transaction information of the payment order includes transaction duration, transaction amount and transaction text; The S3 comprises the following sub-steps: S31, pre-processing the transaction duration and the transaction amount to obtain the optimal transaction duration and the optimal transaction amount; S32, taking the word vector of the word with the highest word frequency in the transaction text as the initial word vector, and calculating the word exchange coefficient between the word vectors of the remaining words in the transaction text and the initial word vector; S33. Construct a verification model for the payment order based on the optimal transaction duration, the optimal transaction amount, and all word exchange coefficients; S34. Construct an encryption model according to the verification model of the payment order; In S31, the calculation formula for the optimal transaction duration T is: In the formula, t represents the transaction duration, Indicates rounding up operation; In S31, the calculation formula for the optimal transaction amount O is: In the formula, o represents the transaction amount; In S32, the word exchange coefficient X between the word vector of the hth word in the transaction text and the initial word vector h The calculation formula is: In the formula, A represents the initial word vector, B h Represents the word vector of the hth word in the transaction text, C h represents the frequency of the hth word in the transaction text, c represents the highest word frequency in the transaction text, H represents the number of words in the transaction text, and cos(·) represents the cosine calculation; In S33, the expression of the verification model Z of the payment order is: In the formula, T represents the optimal transaction time, O represents the optimal transaction amount, T′ represents the preset transaction time, O′ represents the preset transaction amount, H represents the number of words in the transaction text, and X h represents the word exchange coefficient between the word vector of the hth word in the transaction text and the initial word vector, e represents the exponent, σ represents the standard deviation of all word exchange coefficients, X max represents the maximum word exchange coefficient, X min represents the minimum word exchange coefficient, and Π represents the product operation; In S34, the expression of the encryption model D of the payment order is: Where Z represents the verification model of the payment order, and f(·) represents the encryption function.

2. The card secret data management method according to claim 1, characterized in that: The S1 comprises the following sub-steps: S11, obtaining a real-time login image of the payment order, and obtaining a number of anti-counterfeiting login images corresponding to the payment order from a database; S12, calculating the login feature degree between the real-time login image and each anti-counterfeiting login image; S13, using the anti-counterfeiting login image with the highest login feature as the verification login image; S14, extracting the ROI area of ​​the real-time login image and the ROI area of ​​the verification login image respectively; S15. Calculate the pixel distribution range corresponding to the ROI area of ​​the verification login image, and determine whether the grayscale value mean of all pixels in the ROI area of ​​the real-time login image belongs to the pixel distribution range. If so, the real-time login image verification passes, otherwise the real-time login image verification fails.

3. The card secret data management method according to claim 2, characterized in that: In S12, the calculation formula of the login feature degree Y between the real-time login image and the anti-counterfeiting login image is: In the formula, G m represents the mean gray value of all pixels in the mth row of the real-time login image, G n Represents the mean grayscale value of all pixels in the nth column of the real-time login image, G i represents the mean gray value of all pixels in the ith row of the anti-counterfeiting login image, G j It represents the mean gray value of all pixels in the jth column of the anti-counterfeiting login image, M represents the number of rows of the real-time login image, N represents the number of columns of the real-time login image, I represents the number of rows of the anti-counterfeiting login image, J represents the number of columns of the anti-counterfeiting login image, and e represents the exponent.

4. The card secret data management method according to claim 2, characterized in that: In S15, the minimum value F of the pixel distribution range min The calculation formula is: Where K represents the number of pixels in the ROI area of ​​the verified login image, G k Represents the gray value of the kth pixel in the ROI area of ​​the verified login image, G max_1 Indicates the maximum gray value of the pixel in the verification login image, G min_1 Indicates the minimum grayscale value of the pixel in the verification login image, G max_0 Indicates the maximum grayscale value of the pixels in the ROI area of ​​the verified login image, G min_0 Indicates the minimum grayscale value of the pixels in the ROI area of ​​the verified login image; In S15, the maximum value F of the pixel distribution range max The calculation formula is:

Citation Information

Patent Citations

  • Face payment method and device, electronic equipment and storage medium

    CN114519579A

  • Order payment management method and device, equipment and storage medium

    CN118297588A