Payment data security protection method, device, electronic device and storage medium

By detecting and dividing payment data chains in the payment platform, identifying node characteristics and updating keys, the security issues of network payment data under complex transaction nodes are solved, and flexible and reliable data protection is achieved.

CN115001683BActive Publication Date: 2024-10-25SZ KMY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210768707.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2024-10-25
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

When transaction nodes are complex and changeable, existing network payment data is vulnerable to illegal attacks, leading to data leakage and unable to effectively protect data security.

Method used

Detect transaction payment events in the pre-built payment platform, extract payment data packets, divide payment data chains, identify node characteristics, determine the security level through the trained classifier, and randomly generate key seeds for initial update at low-level nodes Key, using key expansion algorithm for data encryption.

Benefits of technology

It improves the data processing efficiency, clarifies the node security level, enhances the security privacy of low-level node data, and ensures the security of payment data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115001683B_ABST
    Figure CN115001683B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of security, and discloses a method, device, electronic device and storage medium for protecting payment data. The method comprises: detecting a transaction payment event in a pre-built payment platform, extracting a payment data packet of the transaction payment event, and dividing the payment data chain of the payment data packet; identifying the payment feature of each payment node in the payment data chain, and detecting the node category of the payment node corresponding to the payment feature by a classifier according to the payment feature to determine the security level of each payment node in the payment data chain; when there is a low security level, querying the encrypted data and the corresponding initial key of the low-level corresponding payment node, and randomly generating a key seed for the encrypted data; according to the key seed, updating the initial key to obtain an updated key, and according to the updated key, encrypting the encrypted data using a preset key expansion algorithm to obtain an encryption result. The present invention can ensure the security of payment data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of security, and in particular to a payment data security protection method, device, electronic device and storage medium. Background Art

[0002] With the continuous development of information technology, online payment has gradually become a mainstream means of daily life transactions. Online payment can greatly shorten the transaction time between buyers and sellers and improve the transaction efficiency of both parties. However, while online payment facilitates people's daily lives, it also brings great security risks, such as the leakage of transaction data. Therefore, how to ensure the security of data generated through online payment is particularly important.

[0003] At present, online payment data is usually encrypted and protected based on encryption algorithms. However, in actual business scenarios, the transaction objects involved in online payment data are complex and changeable, resulting in a large number of transaction nodes. This makes it easy for a transaction node to be attacked by illegal means (such as viruses, Trojans and other programs), resulting in the theft of online payment data, making it impossible to ensure the security of online payment data. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a payment data security protection method, device, electronic device and storage medium, which can ensure the security of payment data.

[0005] In a first aspect, the present invention provides a payment data security protection method, comprising:

[0006] Detecting a transaction payment event in a pre-built payment platform, extracting a payment data packet of the transaction payment event, and dividing a payment data chain of the payment data packet;

[0007] Identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics through the trained classifier according to the payment characteristics, and determine the security level of each payment node in the payment data chain according to the node category;

[0008] When there is a low security level, query the to-be-encrypted data and the corresponding initial key of the payment node corresponding to the low level, and randomly generate a key seed for the to-be-encrypted data;

[0009] The initial key is updated according to the key seed to obtain an updated key, and the data to be encrypted is encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted.

[0010] In a possible implementation manner of the first aspect, the dividing the payment data chain of the payment data packet includes:

[0011] querying a data attribute of each payment data in the payment data packet, and identifying a data type of each payment data in the payment data packet according to the data attribute;

[0012] According to the data type, divide the payment data into payment center points;

[0013] According to the payment center point, each payment data in the payment data packet is clustered to obtain clustered payment data, and a payment node of the clustered payment data is constructed to generate a payment data chain of the payment data packet.

[0014] In a possible implementation of the first aspect, clustering each payment data in the payment data packet according to the payment center point to obtain clustered payment data includes:

[0015] The preset category distance d between each payment data in the payment data packet and the payment center point is calculated using the following formula:

[0016]

[0017] in, Represents the vector form of the i-th payment center point, Represents the vector form of the i-th payment data, represents the distance function;

[0018] When the preset category distance is less than a preset distance threshold, the payment data corresponding to the preset category distance is clustered into the payment center point to obtain the clustered payment data.

[0019] In a possible implementation manner of the first aspect, the identifying the payment feature of each payment node in the payment data chain includes:

[0020] Obtain the node data set of each payment node in the payment data chain, and use the following formula to calculate the information weight of each node data in the node data set at the payment node:

[0021]

[0022] in, It represents the information weight of the j-th node data in the payment node, Represents the jth node data in the node data set, represents the covariance of the jth node data in the node data set, trace() represents the filtering function;

[0023] When the information weight is greater than a preset weight, the node data corresponding to the information weight is used as the payment feature of the payment node.

[0024] In a possible implementation manner of the first aspect, detecting, by the trained classifier, a node category of a payment node corresponding to the payment feature, includes:

[0025] Using the encoding layer in the trained classifier to position encode the payment feature to obtain a position encoding feature;

[0026] Extracting a feature vector of the position encoding feature using a self-attention module in the classifier;

[0027] The class probability of the feature vector is calculated using the following activation function in the classifier:

[0028]

[0029] Among them, p represents the category probability of the feature vector, k represents the number of node categories, represents the regression function, represents the vth node category, represents the kth node category, and e represents an infinite non-repeating decimal;

[0030] The node category of the payment node corresponding to the payment feature is obtained and output according to the category probability.

[0031] In a possible implementation manner of the first aspect, updating the initial key according to the key seed to obtain an updated key includes:

[0032] Identify the data formats of the key seed and the initial key;

[0033] When the data formats of the key seed and the initial key are consistent, the key seed and the initial key are pieced together using pieced characters to obtain the updated key;

[0034] When the data formats of the key seed and the initial key are inconsistent, after the data format of the key seed is converted into the data format of the initial key, the key seed and the initial key are pieced together using pieced characters to obtain the updated key.

[0035] In a possible implementation manner of the first aspect, encrypting the data to be encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted includes:

[0036] Determine the encrypted ciphertext of the data to be encrypted according to the updated key, and construct an encryption round function for each character in the encrypted ciphertext using the preset key expansion algorithm;

[0037] According to the update key and the encryption round function, a key expansion is performed on each character in the encrypted ciphertext to obtain an expanded key for each character in the encrypted ciphertext;

[0038] The extended keys are integrated to obtain the encryption result of the data to be encrypted.

[0039] In a second aspect, the present invention provides a payment data security protection device, the device comprising:

[0040] A data chain division module, used to detect a transaction payment event in a pre-built payment platform, extract a payment data packet of the transaction payment event, and divide the payment data chain of the payment data packet;

[0041] A security level identification module, used to identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics according to the payment characteristics through a trained classifier, and determine the security level of each payment node in the payment data chain according to the node category;

[0042] A data key processing module, used for, when there is a security level at a low level, querying the to-be-encrypted data and the corresponding initial key of the payment node corresponding to the low level, and randomly generating a key seed for the to-be-encrypted data;

[0043] The data encryption module is used to update the initial key according to the key seed to obtain an updated key, and to encrypt the data to be encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted.

[0044] In a third aspect, the present invention provides an electronic device, comprising:

[0045] at least one processor; and a memory communicatively coupled to the at least one processor;

[0046] The memory stores a computer program executable by the at least one processor, so that the at least one processor can execute the payment data security protection method as described in any one of the first aspects above.

[0047] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the payment data security protection method as described in any one of the first aspects above.

[0048] Compared with the prior art, the technical principle and beneficial effects of this solution are:

[0049] The embodiment of the present invention firstly detects transaction payment events in a pre-built payment platform, extracts payment data packets of transaction payment events, obtains specific transaction content in the pre-built payment platform, divides the payment data chain of the payment data packet, and can classify the transaction process of the payment data packet, so as to facilitate the subsequent classification when performing data security protection, thereby ensuring the flexibility and reliability when performing data security protection; secondly, the embodiment of the present invention can determine the data characteristics of each payment node in the payment data chain by identifying the payment characteristics of each payment node in the payment data chain, thereby reducing the subsequent data volume calculation complexity of each payment node in the payment data chain, thereby ensuring the processing efficiency of subsequent data, and detecting the node category of the payment node corresponding to the payment characteristic through the trained classifier to determine the security level of each payment node in the payment data chain, and clearly classifying each payment node in the payment data chain. The security level of the payment node can be determined, so that a data security protection mechanism can be formulated for subsequent low-level payment nodes, making data security protection more flexible and reliable; further, when the security level is at a low level, the embodiment of the present invention queries the encrypted data and the corresponding initial key of the low-level corresponding payment node, randomly generates a key seed for the encrypted data, and updates the initial key to obtain an updated key, which can change the state sequence value of the initial key, enhance the security privacy and non-theft of the data corresponding to the initial key, and according to the updated key, use a preset key expansion algorithm to encrypt the encrypted data to obtain the encryption result of the encrypted data, and further update the initial ciphertext of the encrypted data, so as to further realize the security protection of the encrypted data, so that when the encrypted data is in a low-level payment node, its own data security can be guaranteed. Therefore, a payment data security protection method, device, electronic device and storage medium proposed in the embodiment of the present invention can ensure the security of payment data. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0052] Figure 1A schematic diagram of a flow chart of a payment data security protection method provided by an embodiment of the present invention;

[0053] Figure 2 In one embodiment of the present invention Figure 1 A flowchart of one step of a method for providing security protection of payment data is provided;

[0054] Figure 3 In one embodiment of the present invention Figure 1 A flowchart of another step of a method for providing security protection of payment data is provided;

[0055] Figure 4 A schematic diagram of a module of a payment data security protection device provided by an embodiment of the present invention;

[0056] Figure 5 A schematic diagram of the internal structure of an electronic device for implementing a method for securely protecting payment data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0058] The embodiment of the present invention provides a method for the security protection of payment data, and the execution subject of the method for the security protection of payment data includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the method for the security protection of payment data can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0059] See also Figure 1 FIG. 1 is a flow chart of a payment data security protection method provided by an embodiment of the present invention. Figure 1 The payment data security protection methods described in include:

[0060] S1. Detecting a transaction payment event in a pre-built payment platform, extracting a payment data packet of the transaction payment event, and dividing the payment data chain of the payment data packet.

[0061] In an embodiment of the present invention, the pre-built payment platform can be understood as a platform for supporting the transaction process between buyers and sellers, such as the Alipay payment platform, WeChat payment platform, and Tenpay payment platform, etc. The transaction payment event refers to a payment event initiated by a user in the payment platform, such as an order payment event.

[0062] As an embodiment of the present invention, the detection of a transaction payment event in a pre-built payment platform includes: obtaining a transaction object in the pre-built payment platform, detecting a transaction operation instruction of the transaction object in the pre-built payment platform, and generating the transaction payment event according to the transaction operation instruction.

[0063] The transaction object refers to the transaction parties in the pre-built payment platform, and the transaction operation instruction refers to a command for triggering the transaction parties to conduct a transaction. Optionally, the transaction operation instruction can be detected by a preset tracking tool, and the preset tracking tool can be constructed by tracking technology.

[0064] Furthermore, the embodiment of the present invention obtains the specific transaction content in the pre-built payment platform by extracting the payment data packet of the transaction payment event. The payment data packet includes user data and business data, wherein the user data refers to the specific transaction data generated by the transaction parties in the pre-built payment platform, such as user account, transaction product and transaction conditions, and the business data refers to the data used to ensure the successful transaction between the transaction parties in the pre-built payment platform, such as transaction interface, transaction address and transaction method. Optionally, the payment data packet of the transaction payment event can be implemented by a preset automated extraction tool, and the preset automated extraction tool can be compiled by a scripting language, such as JS scripting language.

[0065] Furthermore, the embodiment of the present invention divides the payment data chain of the payment data packet to clarify the transaction process of the payment data packet, facilitates the subsequent classification during data security protection, and ensures the flexibility and reliability of the subsequent data security protection.

[0066] As an embodiment of the present invention, participating Figure 2 As shown, the payment data chain for dividing the payment data packets includes:

[0067] S201, querying the data attribute of each payment data in the payment data packet, and identifying the data type of each payment data in the payment data packet according to the data attribute;

[0068] S202, dividing the payment data into payment center points according to the data type;

[0069] S203. Cluster each payment data in the payment data packet according to the payment center point to obtain clustered payment data, and construct a payment node of the clustered payment data to generate a payment data chain of the payment data packet.

[0070] Among them, the data attributes can be understood as the dimensional characteristics used to describe each payment data in the payment data packet, such as identity, time, location and other attributes, and the data type can be understood as the payment identity information used to characterize each payment data in the payment data packet.

[0071] Furthermore, in an optional embodiment of the present invention, the data attribute of each payment data in the payment data packet can be obtained by querying the data field of the payment data through an SQL statement, and the data type can be realized by identifying the attribute ID corresponding to the data attribute.

[0072] In detail, dividing the payment center point of the payment data according to the data type includes: identifying the field ID of the data type, and using the field ID as the payment center point of the payment data. The field ID refers to an information identifier used to characterize the data type.

[0073] Furthermore, in an optional embodiment of the present invention, clustering each payment data in the payment data packet according to the payment center point to obtain clustered payment data includes: calculating a preset category distance between each payment data in the payment data packet and the payment center point, and when the preset category distance is less than a preset distance threshold, clustering the payment data corresponding to the preset category distance into the payment center point to obtain the clustered payment data. It should be noted that, before calculating the preset category distance between each payment data in the payment data packet and the payment center point, the embodiment of the present invention also includes: converting each payment data in the payment data packet and the payment center point into corresponding vector forms respectively, so as to ensure the premise for calculating the subsequent preset category distance.

[0074] In the embodiment of the present invention, the preset type distance may include cosine distance, Manhattan distance, etc.

[0075] For example, in an optional embodiment of the present invention, the preset category distance between each payment data in the payment data packet and the payment center point may be calculated using the following formula:

[0076]

[0077] Where d represents the preset category distance, Represents the vector form of the i-th payment center point, Represents the vector form of the i-th payment data, Represents the distance function.

[0078] Furthermore, in yet another optional embodiment of the present invention, the preset distance threshold may be set to 0.25, or may be set according to an actual business scenario.

[0079] S2. Identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics through the trained classifier according to the payment characteristics, and determine the security level of each payment node in the payment data chain according to the node category.

[0080] The embodiment of the present invention identifies the payment characteristics of each payment node in the payment data chain to determine the data characteristics of each payment node in the payment data chain, thereby reducing the subsequent data volume calculation complexity of each payment node in the payment data chain and ensuring the processing efficiency of subsequent data.

[0081] The payment feature refers to the node data feature information used to characterize each payment node in the payment data chain. If the payment node is a buyer's payment node, the payment feature of the node may be features such as buyer information, payment method, and payment amount.

[0082] As an embodiment of the present invention, the identifying the payment characteristics of each payment node in the payment data chain includes: obtaining a node data set of each payment node in the payment data chain, calculating the information weight of each node data in the node data set at the payment node, and selecting the node data whose information weight is greater than a preset weight threshold as the payment characteristic of the payment node.

[0083] The information weight can be understood as the information importance of the node data in the payment node. Optionally, the information weight of each node data in the node data set in the payment node is calculated using the following formula:

[0084]

[0085] in, It represents the information weight of the j-th node data in the payment node, Represents the jth node data in the node data set, represents the covariance of the j-th node data in the node data set, and trace() represents the filtering function.

[0086] Furthermore, the embodiment of the present invention inputs the payment feature into a trained classifier to detect the node category of the payment node corresponding to the payment feature through the trained classifier, thereby ensuring the premise of security level classification for each payment node, wherein the classifier is used to determine the category to which a new observation sample belongs based on the training data with marked categories. In the present invention, the trained classifier refers to a node category for detecting the payment node corresponding to the payment feature obtained by training based on a large amount of training data of historical payment features, and the node category can be set based on the actual business scenario, such as low-level category, medium-level category and high-level category.

[0087] As an embodiment of the present invention, see Figure 3 As shown, the trained classifier detects the node category of the payment node corresponding to the payment feature according to the payment feature, including:

[0088] S301, using the encoding layer in the trained classifier to position encode the payment feature to obtain a position encoding feature;

[0089] S302, extracting a feature vector of the position coding feature using a self-attention module in the classifier;

[0090] S303: Calculate the category probability of the feature vector using the activation function in the classifier to obtain and output the node category of the payment node corresponding to the payment feature.

[0091] Among them, the position coding of the payment feature is used to determine the position semantic information of each feature in the payment feature, to ensure the subsequent contextual semantic association of each feature in the payment feature, which can be encoded by a position coding algorithm, such as the PE algorithm, and the feature vector of the position coding feature is used to characterize the key semantic information of the payment feature, to ensure the premise of subsequent category probability calculation.

[0092] Optionally, the process of extracting the feature vector of the position coding feature using the self-attention module in the classifier includes: using the encoder in the self-attention module to bidirectionally encode the position coding feature to obtain a bidirectional coding feature, using the decoder in the self-attention module to semantically decode the bidirectional coding feature to obtain a decoded feature, and using the fully connected layer in the self-attention module to detect the semantic sequence of the decoded feature to output the feature vector of the position coding feature.

[0093] Furthermore, in an optional embodiment of the present invention, the activation function includes:

[0094]

[0095] Among them, p represents the category probability of the feature vector, k represents the number of node categories, represents the regression function, represents the vth node category, represents the kth node category, and e represents an infinite non-repeating decimal.

[0096] Furthermore, the embodiment of the present invention determines the security level of each payment node in the payment data chain according to the node category through a preset mapping relationship between the node category and the security level, so as to clarify the security level of each payment node in the payment data chain, so that a data security protection mechanism can be formulated for subsequent low-level payment nodes, making data security protection more flexible and reliable.

[0097] Optionally, the security level of each payment node in the payment data chain is determined according to the node category, that is, the security level of the payment node corresponding to the node category being in the low category is classified as a low level, the security level of the payment node corresponding to the node category being in the medium category is classified as a medium level, and the security level of the payment node corresponding to the node category being in the high category is classified as a high level.

[0098] S3. When there is a security level at a low level, query the data to be encrypted and the corresponding initial key of the payment node corresponding to the low level, and randomly generate a key seed for the data to be encrypted.

[0099] It should be understood that when there is a low security level, it means that the payment node corresponding to the security level has certain risks. Therefore, the embodiment of the present invention queries the data to be encrypted and the corresponding initial key of the payment node corresponding to the low level to ensure the data security protection premise of the payment node in the future. Among them, the data to be encrypted refers to the sensitive data in the payment node corresponding to the low level, such as transaction account number, transaction amount and payment password, etc. The initial key refers to the initial key encrypted when the data to be encrypted is generated, which can be obtained by querying the encryption algorithm used in the initial encryption process of the data to be encrypted.

[0100] Furthermore, an embodiment of the present invention randomly generates a key seed for the data to be encrypted to ensure the subsequent update prerequisite of the initial key, wherein the key seed is used to start the initial key of the key update process or the key generation process. Optionally, the key seed can be randomly generated by an encryption algorithm, and the encryption algorithm includes a symmetric encryption algorithm, an asymmetric encryption algorithm, etc.

[0101] S4. According to the key seed, the initial key is updated to obtain an updated key, and according to the updated key, the data to be encrypted is encrypted using a preset key expansion algorithm to obtain an encryption result of the data to be encrypted.

[0102] The embodiment of the present invention updates the initial key according to the key seed to change the state sequence value of the initial key, thereby enhancing the security, privacy and non-theft of the data corresponding to the initial key. Optionally, the updating of the initial key according to the key seed to obtain the updated key includes: identifying the data format of the key seed and the initial key, and when the data format of the key seed and the initial key are consistent, using patchwork characters to patch the key seed and the initial key to obtain the updated key; when the data format of the key seed and the initial key are inconsistent, converting the data format of the key seed to the data format of the initial key, and then using patchwork characters to patch the key seed and the initial key to obtain the updated key.

[0103] The data format is used to express the key seed and the initial key in a presentation form, such as binary, octal, and hexadecimal formats, and the patchwork characters include a “+” character.

[0104] Furthermore, the embodiment of the present invention encrypts the data to be encrypted using a preset key expansion algorithm according to the updated key to further update the initial ciphertext of the data to be encrypted, thereby further realizing security protection of the data to be encrypted, so that when the data to be encrypted is in a low-level payment node, its own data security can be guaranteed.

[0105] Optionally, the data to be encrypted is encrypted according to the updated key using a preset key expansion algorithm to obtain an encryption result of the data to be encrypted, including: determining the encrypted ciphertext of the data to be encrypted according to the updated key, constructing an encryption round function for each character in the encrypted ciphertext using the preset key expansion algorithm, performing key expansion on each character in the encrypted ciphertext according to the updated key and the encryption round function to obtain an expanded key for each character in the encrypted ciphertext, and integrating the expanded keys to obtain the encryption result of the data to be encrypted.

[0106] Among them, the encrypted ciphertext refers to the data plaintext in the data to be encrypted, the encryption round function refers to the encryption function used to expand the key of each character in the encrypted ciphertext, and the expansion key refers to the encryption key corresponding to each character in the encrypted ciphertext.

[0107] Optionally, the preset key expansion algorithm includes an SM4 algorithm, and the integration of the extended keys is to connect the extended keys in sequence according to the order of characters corresponding to the extended keys to obtain an encryption result of the data to be encrypted.

[0108] It can be seen that the embodiment of the present invention firstly detects transaction payment events in a pre-built payment platform, extracts payment data packets of transaction payment events, obtains specific transaction content in the pre-built payment platform, divides the payment data chain of the payment data packet, and can classify the transaction process of the payment data packet, which is convenient for subsequent classification during data security protection, thereby ensuring flexibility and reliability during subsequent data security protection; secondly, the embodiment of the present invention can determine the data characteristics of each payment node in the payment data chain by identifying the payment characteristics of each payment node in the payment data chain, thereby reducing the subsequent data volume calculation complexity of each payment node in the payment data chain, thereby ensuring the processing efficiency of subsequent data, and detecting the node category of the payment node corresponding to the payment characteristic through the trained classifier to determine the security level of each payment node in the payment data chain, and clearly defining the payment characteristics of each payment node in the payment data chain. The security level of each payment node can be determined, so that a data security protection mechanism can be formulated for subsequent low-level payment nodes, making data security protection more flexible and reliable; further, when the security level is at a low level, the embodiment of the present invention queries the encrypted data and the corresponding initial key of the low-level corresponding payment node, randomly generates a key seed for the encrypted data, updates the initial key, obtains an updated key, can change the state sequence value of the initial key, enhances the security privacy and non-theft of the data corresponding to the initial key, and according to the updated key, uses a preset key expansion algorithm to encrypt the encrypted data to obtain the encryption result of the encrypted data, and can further update the initial ciphertext of the encrypted data, so as to further realize the security protection of the encrypted data, so that when the encrypted data is in a low-level payment node, its own data security can be guaranteed. Therefore, a payment data security protection method proposed in an embodiment of the present invention can guarantee the security of payment data.

[0109] like Figure 4 The figure shows a functional module diagram of the payment data security protection device of the present invention.

[0110] The payment data security protection device 400 of the present invention can be installed in an electronic device. According to the functions to be implemented, the payment data security protection device can include a data chain division module 401, a security level identification module 402, a data key processing module 403 and a data encryption module 404. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0111] In the embodiment of the present invention, the functions of each module / unit are as follows:

[0112] The data chain division module 401 is used to detect a transaction payment event in a pre-built payment platform, extract a payment data packet of the transaction payment event, and divide the payment data chain of the payment data packet;

[0113] The security level identification module 402 is used to identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics according to the payment characteristics through the trained classifier, and determine the security level of each payment node in the payment data chain according to the node category;

[0114] The data key processing module 403 is used to query the to-be-encrypted data and the corresponding initial key of the payment node corresponding to the low level when there is a security level at a low level, and randomly generate a key seed for the to-be-encrypted data;

[0115] The data encryption module 404 is used to update the initial key according to the key seed to obtain an updated key, and to encrypt the data to be encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted.

[0116] In detail, each module in the payment data security protection device 400 in the embodiment of the present invention adopts the same method as above when in use. Figures 1 to 3 The technical means are the same as the security protection method for payment data described in , and can produce the same technical effects, so they will not be repeated here.

[0117] like Figure 5 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing the payment data security protection method of the present invention.

[0118] The electronic device may include a processor 50, a memory 51, a communication bus 52, and a communication interface 53, and may also include a computer program stored in the memory 51 and executable on the processor 50, such as a payment data security protection program.

[0119] The processor 50 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 50 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory 51 (for example, executing a security protection program for payment data, etc.), and calling data stored in the memory 51.

[0120] The memory 51 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 51 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 51 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 51 may also include both an internal storage unit of the electronic device and an external storage device. The memory 51 may not only be used to store application software and various types of data installed in the electronic device, such as the code of the database configuration connection program, but also be used to temporarily store data that has been output or is to be output.

[0121] The communication bus 52 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 51 and at least one processor 50, etc.

[0122] The communication interface 53 is used for communication between the above-mentioned electronic device 5 and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0123] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0124] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 50 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0125] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.

[0126] The database configuration connection program stored in the memory 51 in the electronic device is a combination of multiple computer programs. When running in the processor 50, it can achieve:

[0127] Detecting a transaction payment event in a pre-built payment platform, extracting a payment data packet of the transaction payment event, and dividing a payment data chain of the payment data packet;

[0128] Identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics through the trained classifier according to the payment characteristics, and determine the security level of each payment node in the payment data chain according to the node category;

[0129] When there is a low security level, query the to-be-encrypted data and the corresponding initial key of the payment node corresponding to the low level, and randomly generate a key seed for the to-be-encrypted data;

[0130] The initial key is updated according to the key seed to obtain an updated key, and the data to be encrypted is encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted.

[0131] Specifically, the specific implementation method of the processor 50 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0132] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0133] The present invention further provides a storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0134] Detecting a transaction payment event in a pre-built payment platform, extracting a payment data packet of the transaction payment event, and dividing a payment data chain of the payment data packet;

[0135] Identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics through the trained classifier according to the payment characteristics, and determine the security level of each payment node in the payment data chain according to the node category;

[0136] When there is a low security level, query the to-be-encrypted data and the corresponding initial key of the payment node corresponding to the low level, and randomly generate a key seed for the to-be-encrypted data;

[0137] The initial key is updated according to the key seed to obtain an updated key, and the data to be encrypted is encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted.

[0138] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0139] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0141] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0142] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0143] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0144] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A payment data security protection method, characterized in that: The method comprises: Detecting a transaction payment event in a pre-built payment platform, extracting a payment data packet of the transaction payment event, and dividing a payment data chain of the payment data packet; Identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics through the trained classifier according to the payment characteristics, and determine the security level of each payment node in the payment data chain according to the node category; When there is a low security level, query the to-be-encrypted data and the corresponding initial key of the payment node corresponding to the low level, and randomly generate a key seed for the to-be-encrypted data; The initial key is updated according to the key seed to obtain an updated key, and the data to be encrypted is encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted.

2. The method according to claim 1, characterized in that The payment data chain for dividing the payment data packets includes: querying a data attribute of each payment data in the payment data packet, and identifying a data type of each payment data in the payment data packet according to the data attribute; According to the data type, divide the payment data into payment center points; According to the payment center point, each payment data in the payment data packet is clustered to obtain clustered payment data, and a payment node of the clustered payment data is constructed to generate a payment data chain of the payment data packet.

3. The method according to claim 2, characterized in that The step of clustering each payment data in the payment data packet according to the payment center point to obtain clustered payment data includes: The preset category distance d between each payment data in the payment data packet and the payment center point is calculated using the following formula: Among them, X i Represents the vector form of the i-th payment center point, Y i represents the vector form of the i-th payment data, and sqrt represents the distance function; When the preset category distance is less than a preset distance threshold, the payment data corresponding to the preset category distance is clustered into the payment center point to obtain the clustered payment data.

4. The method according to claim 1, characterized in that: The identifying the payment characteristics of each payment node in the payment data chain includes: Obtain the node data set of each payment node in the payment data chain, and use the following formula to calculate the information weight of each node data in the node data set at the payment node: Among them, E j represents the information weight of the jth node data in the payment node, X j Represents the jth node data in the node data set, represents the covariance of the jth node data in the node data set, and trace() represents the filtering function; When the information weight is greater than a preset weight, the node data corresponding to the information weight is used as the payment feature of the payment node.

5. The method according to claim 1, characterized in that The detecting, by the trained classifier, the node category of the payment node corresponding to the payment feature according to the payment feature includes: Using the encoding layer in the trained classifier to position encode the payment feature to obtain a position encoding feature; Extracting a feature vector of the position encoding feature using a self-attention module in the classifier; The class probability of the feature vector is calculated using the following activation function in the classifier: Among them, p represents the category probability of the feature vector, k represents the number of node categories, and w δ represents the regression function, o v represents the vth node category, o i represents the i-th node category, and e represents an infinite non-repeating decimal; The node category of the payment node corresponding to the payment feature is obtained and output according to the category probability.

6. The method according to claim 1, characterized in that The updating of the initial key according to the key seed to obtain an updated key includes: Identify the data formats of the key seed and the initial key; When the data formats of the key seed and the initial key are consistent, the key seed and the initial key are pieced together using pieced characters to obtain the updated key; When the data formats of the key seed and the initial key are inconsistent, after the data format of the key seed is converted into the data format of the initial key, the key seed and the initial key are pieced together using pieced characters to obtain the updated key.

7. The method according to any one of claims 1 to 6, characterized in that: The step of encrypting the data to be encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted includes: Determine the encrypted ciphertext of the data to be encrypted according to the updated key, and construct an encryption round function for each character in the encrypted ciphertext using a preset key expansion algorithm; According to the update key and the encryption round function, each character in the encrypted ciphertext is key expanded to obtain an expanded key for each character in the encrypted ciphertext; The extended keys are integrated to obtain the encryption result of the data to be encrypted.

8. A payment data security protection device, characterized in that: The device comprises: A data chain division module, used to detect a transaction payment event in a pre-built payment platform, extract a payment data packet of the transaction payment event, and divide the payment data chain of the payment data packet; A security level identification module, used to identify the payment characteristics of each payment node in the payment data chain, and detect the node category of the payment node corresponding to the payment characteristics according to the payment characteristics through a trained classifier, and determine the security level of each payment node in the payment data chain according to the node category; A data key processing module, used for, when there is a security level at a low level, querying the to-be-encrypted data and the corresponding initial key of the payment node corresponding to the low level, and randomly generating a key seed for the to-be-encrypted data; The data encryption module is used to update the initial key according to the key seed to obtain an updated key, and to encrypt the data to be encrypted using a preset key expansion algorithm according to the updated key to obtain an encryption result of the data to be encrypted.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the payment data security protection method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the payment data security protection method according to any one of claims 1 to 7 is implemented.