A secure transmission method for financial transaction data based on blockchain
By constructing the diagram structure of financial transaction data and using the SLPA algorithm to update node labels and edges, the problem of inaccurate financial transaction data category in the existing technology has been solved, and more accurate data classification and encrypted transmission effects are achieved.
Patent Information
- Application Number
- CN202410869031.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-07-01
AI Technical Summary
When classifying financial transaction data, the prior art fails to effectively consider the rapid change characteristics of the data, resulting in large errors in the classification results.
By constructing a graph structure based on financial trading data attribute vector, the SLPA algorithm and similarity update node tags and edges to form the target graph structure, and then more accurately classify and encrypted the financial transaction data.
It improves the accuracy of the classification of financial transaction data, ensures the encryption effect of data, and can better represent the changing trend of financial transaction data.
Smart Images

Figure CN118748610B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method for securely transmitting financial transaction data based on blockchain. Background Art
[0002] Financial transaction data classification helps determine the security level and sensitivity of different data, so as to implement corresponding security measures and privacy protection rules on the blockchain. For example, for high-value financial data, a higher level of encryption and access control mechanism can be adopted.
[0003] Different categories of financial transaction data can reflect market trends from different perspectives, so all collected financial transaction data are first classified, and then different levels of encryption and access control mechanisms are applied to different categories of financial transaction data. SLPA (Community Monitoring Algorithm) is an algorithm that obtains different node categories through label propagation. For the same category of financial transaction data, there are similar changes between the same categories, so financial transaction data is often classified through the SLPA algorithm. The existing classification of financial transaction data does not take into account the rapid changes of financial transaction data, but analyzes financial transaction data as static data, which leads to large errors in the classification results of financial transaction data. Summary of the invention
[0004] In order to solve the problem of inaccurate classification results in the existing methods when classifying financial transaction data, the purpose of the present invention is to provide a method for secure transmission of financial transaction data based on blockchain. The technical solution adopted is as follows:
[0005] The present invention provides a method for securely transmitting financial transaction data based on blockchain, the method comprising the following steps:
[0006] Acquire financial transaction data to be transmitted, wherein the financial transaction data is composed of transaction data of a preset number of dimensions;
[0007] A first graph structure is constructed based on the attribute vectors of all financial transaction data, and a second graph structure corresponding to each dimension is constructed based on all transaction data of each dimension, and similarities between nodes in the first graph structure and each second graph structure are respectively obtained, and initial edge values between nodes are the similarities, wherein initial labels of all attribute vectors are different, and each transaction data has the same initial label as the attribute vector of the corresponding financial transaction data;
[0008] In each second graph structure, the updated label of each node is obtained by using the similarity, and the label of the node is updated a preset number of times to obtain the first label of each node and the historical label sequence of each node; according to the similarity between the historical label sequence of each node and its neighboring nodes, the first label of each node is updated again to obtain the corresponding target label; in combination with the change of the label of each node and its neighboring nodes, the corresponding initial edge value is updated to obtain the target graph structure corresponding to each dimension;
[0009] The nodes in the first graph structure are updated and classified by combining the SLPA algorithm and the target graph structure corresponding to each dimension, and the financial transaction data to be transmitted is encrypted and transmitted based on the classification results.
[0010] Preferably, the constructing of the first graph structure based on the attribute vectors of all financial transaction data includes:
[0011] The attribute vectors of all financial transaction data are used as nodes of the first graph structure. If the similarity between two attribute vectors is greater than a preset similarity threshold, the nodes where the two attribute vectors are located are connected to form an edge to construct the first graph structure.
[0012] Preferably, the step of constructing a second graph structure corresponding to each dimension based on all transaction data of each dimension includes:
[0013] For transaction data of any dimension, all transaction data of this dimension are used as nodes of the second graph structure. If the similarity between two transaction data is greater than a preset similarity threshold, the nodes where the two corresponding transaction data are located are connected to form an edge, thereby constructing the second graph structure corresponding to this dimension.
[0014] Preferably, obtaining an updated label of each node using the similarity, and updating the label of the node a preset number of times to obtain a first label of each node includes:
[0015] For any node in the candidate graph structure: sort all nodes except this node in descending order of similarity with this node to obtain the reference sequence of this node;
[0016] The initial label of the first node in the reference sequence of each node in the candidate graph structure is used as the updated label of each node, and the initial label of each node is updated to obtain a new graph structure; the initial label of the second node in the reference sequence of each node in the candidate graph structure is used as the new updated label of each node, and the label of each node is updated to obtain a new graph structure; and so on, until the number of updates of the node label reaches a preset number, the finally obtained label is used as the first label;
[0017] The candidate graph structure is any second graph structure.
[0018] Preferably, obtaining the historical label sequence of each node in the candidate graph structure includes:
[0019] Sort the initial labels and updated labels of the candidate nodes in the order of update time to obtain the historical label sequence of the candidate nodes;
[0020] The candidate node is any node in the candidate graph structure.
[0021] Preferably, the step of updating the first label of each node again to obtain the corresponding target label according to the similarity between the historical label sequences of each node and its neighboring nodes includes:
[0022] Calculate the similarity index of the historical label sequence of the candidate node and each of its neighbor nodes respectively; take the first label of the neighbor node corresponding to the largest similarity index as the target label of the candidate node.
[0023] Preferably, the updating of the corresponding initial edge value in combination with the change of the labels of each node and its neighboring nodes to obtain the target graph structure corresponding to each dimension includes:
[0024] For a candidate node, determine whether the two nodes corresponding to each two adjacent labels in the candidate node's historical label sequence are connected in the second graph structure; if connected, set the feature value between the corresponding two adjacent labels in the candidate node's historical label sequence to the corresponding similarity; if not connected, set the feature value between the corresponding two adjacent labels in the candidate node's historical label sequence to 0; all feature values between each two adjacent labels in the candidate node's historical label sequence constitute an edge value change sequence of the candidate node;
[0025] By utilizing the similarity of the edge value change sequences between each node and its neighboring nodes, the initial edge value between every two nodes is updated to obtain the target graph structure corresponding to each dimension.
[0026] Preferably, the method of utilizing the similarity of the edge value change sequence between each node and its neighboring nodes to update the initial edge value between every two nodes and obtain the target graph structure corresponding to each dimension includes:
[0027] Calculate the similarity between the edge value change sequence of each node and the edge value change sequence of each of its neighboring nodes respectively, and record it as the first similarity value between each node and each of its neighboring nodes; select the largest first similarity value from the first similarity values between each node and all its neighboring nodes as the reference value of each node;
[0028] Any two connected nodes in the second graph structure are respectively recorded as the first node and the second node; using the reference value of the first node, the reference value of the second node, and the similarity between the edge value change sequence of the first node and the edge value change sequence of the second node, the updated edge value between the first node and the second node is obtained, and the initial edge value between the first node and the second node is updated to obtain the corresponding target graph structure.
[0029] Preferably, obtaining the updated edge value between the first node and the second node by using the reference value of the first node, the reference value of the second node, and the similarity between the edge value change sequence of the first node and the edge value change sequence of the second node includes:
[0030] Obtaining a maximum value between a reference value of the first node and a reference value of the second node;
[0031] Determine the ratio between the similarity between the edge value change sequence of the first node and the edge value change sequence of the second node and the maximum value as an adjustment coefficient;
[0032] The initial edge value between the first node and the second node is updated using the adjustment coefficient to obtain an updated edge value.
[0033] Preferably, the updating and classification of the nodes in the first graph structure in combination with the SLPA algorithm and the target graph structure corresponding to each dimension, and the encrypted transmission of the financial transaction data to be transmitted based on the classification result, include:
[0034] For any financial transaction data in the first graph structure: taking the target label that appears most frequently in all the transaction data corresponding to the financial transaction data in all the target graph structures as the final label of the node of the financial transaction data in the first graph structure, and updating the label of the financial transaction data in the first graph structure to obtain an updated first graph structure;
[0035] The SLPA algorithm is used to classify the final labels of all nodes in the updated first graph structure, and the blockchain technology is used to encrypt and transmit the financial transaction data of each category respectively.
[0036] The present invention has at least the following beneficial effects:
[0037] The present invention first constructs a first graph structure based on the attribute vectors of all financial transaction data. The first graph structure can characterize the correlation between financial transaction data as a whole, and then analyzes each dimension separately, that is, constructs a second graph structure corresponding to each dimension based on the transaction data of each dimension, and updates the labels of the nodes based on the similarity between the nodes in the second graph structure to avoid the data change characteristics of the financial transaction data in different dimensions from being submerged, and obtains the corresponding historical label sequence, and further updates the initial edge values between the nodes to obtain the target graph structure corresponding to each dimension, and combines the SLPA algorithm to update and classify the nodes in the first graph structure, so that each category finally divided can better represent the change trend of a similar type of financial transaction data, and the classification result is more accurate, thereby ensuring the encryption effect of the financial transaction data. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flowchart of a method for securely transmitting financial transaction data based on blockchain provided by an embodiment of the present invention;
[0040] Figure 2 is a schematic diagram of a second graph structure corresponding to any dimension;
[0041] Figure 3 is a flowchart of a method for obtaining a target graph structure;
[0042] Figure 4 A schematic diagram of a blockchain-based financial transaction data secure transmission system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, a method for secure transmission of financial transaction data based on blockchain proposed by the present invention is described in detail below in combination with the accompanying drawings and preferred embodiments.
[0044] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0045] The following is a detailed description of a specific scheme of a method for securely transmitting financial transaction data based on blockchain provided by the present invention in conjunction with the accompanying drawings.
[0046] An embodiment of a method for securely transmitting financial transaction data based on blockchain:
[0047] The specific scenario targeted by this embodiment is: in the process of encoding and transmitting financial transaction data within a time period, data with high similarity is often encrypted as the same category using blockchain technology and then transmitted. However, the same transaction data often contains information in multiple dimensions. This embodiment divides the financial transaction data into multiple dimensions, and constructs a graph structure corresponding to each dimension based on the transaction data of each dimension, and constructs a graph structure based on all financial transaction data. The similarity of different financial transaction data in all dimensions is comprehensively analyzed, and the overall similarity of all dimensions of financial transaction data is evaluated. The labels of nodes and the edge values between nodes are updated, and the financial transaction data is classified in combination with the SLPA algorithm. Based on the classification results, the financial transaction data of each category is encrypted and transmitted using blockchain technology.
[0048] This embodiment proposes a method for securely transmitting financial transaction data based on blockchain, such as Figure 1 As shown, a method for securely transmitting financial transaction data based on blockchain in this embodiment includes the following steps:
[0049] Step S1, obtaining financial transaction data to be transmitted, wherein the financial transaction data is composed of transaction data of a preset number of dimensions.
[0050] First, all financial transaction data to be transmitted within the preset time period are collected. The format of financial transaction data is: transaction time, transaction amount, type of financial product traded, and other information. These data form a vector data. Each element in the vector can be represented by a real number. For example, the transaction time can be represented by 20240531063302, year, month, day, hour, minute, and second. The type of financial product can be represented by different labels. The types of financial products with adjacent labels are similar. The specific label implementers can set it according to the specific situation. The preset time period is a set consisting of all historical moments whose time interval with the current moment is less than or equal to the preset time length. The preset time length in this embodiment is a set consisting of all historical moments whose time interval with the current moment is less than or equal to the preset time length. In this embodiment, the preset time length is 1 month, which means that all financial transaction data to be transmitted within the past month are collected; each financial transaction data includes transaction data of multiple dimensions, such as transaction time, transaction amount, type of financial product traded, etc., transaction time is one dimension of data, transaction amount is one dimension of data, and type of financial product traded is one dimension of transaction data. The preset number in this embodiment is 3. In specific applications, the implementer can set it according to the specific situation.
[0051] So far, multiple pieces of financial transaction data and multiple pieces of transaction data corresponding to each piece of financial transaction data have been acquired.
[0052] Step S2, constructing a first graph structure based on the attribute vectors of all financial transaction data, constructing a second graph structure corresponding to each dimension based on all transaction data of each dimension, and obtaining the similarity between the nodes in the first graph structure and each second graph structure, wherein the initial labels of all attribute vectors are different, and the initial label of each transaction data is the same as the attribute vector of its corresponding financial transaction data.
[0053] After obtaining all financial transaction data and transaction data of each dimension corresponding to each financial transaction data, the transaction time in each financial transaction data is removed respectively, and all remaining elements constitute an attribute vector, that is, the attribute vector of each financial transaction data is obtained, and the attribute vector of each financial transaction data is used as a node. The higher the similarity between the attribute vectors of the financial transaction data, the stronger the correlation between the corresponding two financial transaction data, and the more edges should exist between the corresponding two attribute vectors in the graph structure. Therefore, the similarity between the attribute vectors of each two financial transaction data is calculated respectively. If the similarity between the two attribute vectors is greater than the preset similarity threshold, the nodes where the two attribute vectors are located are connected to form an edge, and the similarity between the two attribute vectors is used as the initial edge value between the two nodes to construct the first graph structure. Each node is assigned a different initial label according to the time information, for example: the initial label of the attribute vector of the earliest financial transaction data is 1, and the initial label of the attribute vector of the second earliest financial transaction data is 2, and so on, to obtain the initial label of the attribute vector of each financial transaction data. Each financial transaction data corresponds to an initial label, and the initial labels of all financial transaction data are different.
[0054] The similarity between two attribute vectors can be represented by cosine similarity, by a negative correlation mapping value of a dynamic time warping distance, by a correlation coefficient and other indicators. In this embodiment, cosine similarity is used to represent the similarity between attribute vectors, that is, the cosine similarity between two attribute vectors is used as the similarity between the two attribute vectors.
[0055] Furthermore, a graph structure corresponding to each dimension is constructed based on the transaction data of each dimension, and the graph structure corresponding to each dimension is recorded as a second graph structure. Specifically, for transaction data of any dimension: the transaction data of this dimension is used as a node of the second graph structure. If the similarity between two transaction data is greater than a preset similarity threshold, the nodes where the two corresponding transaction data are located are connected to form an edge, and the similarity between the two transaction data is used as the initial edge value between the two nodes to construct the second graph structure corresponding to the dimension. For one transaction data, there is one initial label. Each transaction data has the same initial label as the attribute vector of its corresponding financial transaction data, that is, there is a one-to-one correspondence between the initial label of the node in the second graph structure and the initial label in the first graph structure, such as Figure 2 As shown, the figure is a schematic diagram of the second graph structure corresponding to any dimension, where 1, 2, 3, 4 and 5 respectively represent the initial labels of the nodes, a1 represents the transaction data of the first node under the dimension, a2 represents the transaction data of the second node under the dimension, a3 represents the transaction data of the third node under the dimension, a4 represents the transaction data of the fourth node under the dimension, and a5 represents the transaction data of the fifth node under the dimension.
[0056] The similarity between two transaction data can be represented by cosine similarity, negative correlation mapping value of dynamic time warping distance, correlation coefficient and other indicators. In this embodiment, cosine similarity is used to represent the similarity between transaction data, that is, the cosine similarity between two transaction data is used as the similarity between the two transaction data. In this embodiment, the preset similarity threshold is 0.4. In specific applications, the implementer can set it according to specific circumstances.
[0057] So far, a first graph structure and multiple second graph structures are constructed using the above method.
[0058] Step S3, in each second graph structure, use the similarity to obtain the updated label of each node, and update the node label a preset number of times to obtain the first label of each node and the historical label sequence of each node; based on the similarity between the historical label sequences of each node and its neighboring nodes, update the first label of each node again to obtain the corresponding target label; update the corresponding initial edge value in combination with the change in the label of each node and its neighboring nodes to obtain the target graph structure corresponding to each dimension.
[0059] The working process of the SLPA algorithm includes labeling all members with different tags, then traversing the members and scanning the tags of the members associated with each member. Through this process, the tag with the most occurrences is recorded as a candidate tag for the member. Finally, the tag with the most occurrences among the candidate tags becomes the current community name of the member. The SLPA algorithm makes the division of the community clearer by traversing the members multiple times. This embodiment will use the SLPA algorithm to divide the community, and based on the division results, the financial transaction data will be encrypted and stored in combination with blockchain technology.
[0060] The traditional SLPA algorithm performs label conversion by calculating which label in the neighboring nodes has the highest frequency of occurrence, and then converting its own label into the label with the highest probability of occurrence. This method does not take into account the rapid changes in financial transaction data, making the final division result inaccurate. This embodiment will update the node label based on the similarity between nodes and then perform division.
[0061] Step S31, in each second graph structure, using the similarity to obtain an updated label of each node, and updating the label of the node a preset number of times to obtain a first label of each node and a historical label sequence of each node.
[0062] A second graph structure is taken as an example for description, and other second graph structures can be processed using the method provided in this embodiment.
[0063] Specifically, any second graph structure is recorded as a candidate graph structure, and for any node in the candidate graph structure: all nodes except the node are sorted in descending order of similarity with the node to obtain the reference sequence of the node; the initial label of the first node in the reference sequence of each node in the candidate graph structure is used as the updated label of each node, and the updated label is used to replace the initial label, that is, the update of the initial label of each node is completed, and a new graph structure is obtained; then the initial label of the second node in the reference sequence of each node in the candidate graph structure is used as the new updated label of each node, and the label of each node is updated to obtain a new graph structure; then the initial label of the third node in the reference sequence of each node in the candidate graph structure is used as the new updated label of each node, and the label of each node is updated to obtain a new graph structure; and so on, until the number of updates of the node label reaches the preset number, the final label obtained after the final label update is completed is used as the first label. In this embodiment, the preset number of times is 3 times, and in specific applications, the implementer can set it according to specific circumstances.
[0064] Any node in the candidate graph structure is recorded as a candidate node, and the initial labels and updated labels of the candidate nodes are sorted in the order of update time, and the sequence obtained at this time is used as the historical label sequence of the candidate node.
[0065] By adopting the above method, the historical label sequence of each node in each second graph structure can be obtained.
[0066] Step S32: based on the similarity between the historical label sequences of each node and its neighboring nodes, the first label of each node is updated again to obtain the corresponding target label.
[0067] After obtaining the historical label sequence of each node in the second graph structure, in order to improve the accuracy of the community division result, the first label of each node in the second graph structure is updated again based on the similarity between the historical label sequences of each node and its neighboring nodes.
[0068] In this embodiment, the candidate node is still used as an example for explanation. Specifically, the similarity index of the historical label sequence of the candidate node and each of its neighbor nodes is calculated respectively; the first label of the neighbor node corresponding to the largest similarity index is used as the target label of the candidate node. It should be noted that: in this embodiment, for any node, its neighbor node is the node directly connected to the node, that is, the node with an edge.
[0069] Among them, the similarity index of two historical label sequences can be represented by cosine similarity, by the negative correlation mapping value of the dynamic time warping distance, by a correlation coefficient and other indicators. In this embodiment, cosine similarity is still used to represent the similarity index of two historical label sequences, that is, the cosine similarity between the two historical label sequences is used as the similarity index of the two historical label sequences.
[0070] By adopting the above method, the target label corresponding to each node in each second graph structure can be obtained.
[0071] Step S33, update the corresponding initial edge value in combination with the change of the label of each node and its neighboring nodes, and obtain the target graph structure corresponding to each dimension.
[0072] Taking the candidate node as an example, other nodes in the second graph structure may be processed using the method provided in this embodiment.
[0073] Specifically, for a candidate node, determine whether the two nodes corresponding to each two adjacent labels in the candidate node's historical label sequence are connected in the second graph structure. If connected, set the feature value between the corresponding two adjacent labels in the candidate node's historical label sequence to the corresponding similarity; if not connected, set the feature value between the corresponding two adjacent labels in the candidate node's historical label sequence to 0. The feature values between each two adjacent labels in the candidate node's historical label sequence constitute the edge value change sequence of the candidate node. It should be noted that: the elements in the edge value change sequence in this embodiment are arranged according to the order of the elements in the historical label sequence.
[0074] For example: the historical label sequence of the candidate node is {2, 3, 5}. In the original second graph structure, the node with label 2 is connected to the node with label 3, and the node with label 3 is not connected to the node with label 5. Therefore, the feature value between the first two adjacent labels in the historical label sequence of the candidate node is the similarity between the node with label 3 and the node with label 5 in the original second graph structure, and the feature value between the last two adjacent labels in the historical label sequence of the candidate node is 0.
[0075] Calculate the similarity between the edge value change sequence of each node and the edge value change sequence of each of its neighboring nodes, and record it as the first similarity value of each node and each of its neighboring nodes; select the largest first similarity value from the first similarity values of each node and all of its neighboring nodes as the reference value of each node. Record any two connected nodes in the second graph structure as the first node and the second node respectively; obtain the maximum value of the reference value of the first node and the reference value of the second node; determine the ratio between the similarity between the edge value change sequence of the first node and the edge value change sequence of the second node and the maximum value as the adjustment coefficient; use the product of the adjustment coefficient and the initial edge value between the first node and the second node as the updated edge value between the first node and the second node, and use the updated edge value to replace the initial edge value between the first node and the second node, so as to complete the update of the edge value.
[0076] The similarity between edge value change sequences can be represented by cosine similarity, by negative correlation mapping value of dynamic time warping distance, or by correlation coefficient and other indicators. In this embodiment, cosine similarity is used to represent the similarity between transaction data, that is, the cosine similarity between two edge value change sequences is used as the similarity between the two edge value change sequences.
[0077] Using the above method, the edge value of each node in each second graph structure is updated respectively, and the graph structure after the update is recorded as the target graph structure, that is, each dimension obtains a target graph structure, such as Figure 3 As shown, the figure is a flow chart of the method for obtaining the target graph structure.
[0078] Step S4, combining the SLPA algorithm and the target graph structure corresponding to each dimension to update and classify the nodes in the first graph structure, and encrypt and transmit the financial transaction data to be transmitted based on the classification result.
[0079] For any financial transaction data in the first graph structure: the target label that appears the most times in all target graph structures for all transaction data corresponding to the financial transaction data is used as the final label of the node of the financial transaction data in the first graph structure, and the label of the financial transaction data in the first graph structure is updated to obtain an updated first graph structure.
[0080] This embodiment uses the SLPA algorithm to perform community division, and obtains multiple data categories through multiple iterations. That is, in combination with the SLPA algorithm, the final labels of all nodes in the updated first graph structure are classified through multiple iterations to obtain multiple categories.
[0081] After the financial transaction data is classified, blockchain technology can be used to encrypt the financial transaction data to ensure the security and transparency of the data. Blockchain is a distributed database technology. Data is encrypted and stored on the blockchain, and each data block contains the information of the previous data block, forming an unalterable chain structure. In this embodiment, by converting financial transaction data into data blocks on the blockchain, data with different trend change patterns can be ensured not to be tampered with during transmission; at the same time, the decentralized nature of the blockchain can ensure the security of data transmission and prevent data from being maliciously tampered with or stolen; in addition, blockchain technology can also provide transparency to ensure the authenticity and traceability of data. Further, the encrypted data is transmitted.
[0082] At this point, after classifying all financial transaction data based on the different trend change patterns of financial transaction data, this embodiment combines blockchain technology to ensure the secure transmission and protection of data, thereby improving the credibility and transparency of financial transaction data.
[0083] This embodiment first constructs a first graph structure based on the attribute vectors of all financial transaction data. The first graph structure can characterize the correlation between financial transaction data as a whole, and then analyzes each dimension separately, that is, constructs a second graph structure corresponding to each dimension based on the transaction data of each dimension, and updates the labels of the nodes based on the similarity between the nodes in the second graph structure to avoid the data change characteristics of the financial transaction data in different dimensions from being submerged, and obtains the corresponding historical label sequence, and further updates the initial edge values between the nodes to obtain the target graph structure corresponding to each dimension, and combines the SLPA algorithm to update and classify the nodes in the first graph structure, so that each category finally divided can better represent the change trend of a similar type of financial transaction data, and the classification result is more accurate, thereby ensuring the encryption effect of the financial transaction data.
[0084] In other embodiments, a blockchain-based financial transaction data secure transmission system is also provided, which may include a data acquisition module, a graph structure construction module, a target graph structure acquisition module and a data classification module.
[0085] The data acquisition module is used to acquire the financial transaction data to be transmitted, wherein the financial transaction data is composed of transaction data of a preset number of dimensions;
[0086] A graph structure construction module, used to construct a first graph structure based on the attribute vectors of all financial transaction data, respectively construct a second graph structure corresponding to each dimension based on all transaction data of each dimension, and respectively obtain the similarity between the nodes in the first graph structure and each second graph structure, wherein the initial labels of all attribute vectors are different, and each transaction data has the same initial label as the attribute vector of its corresponding financial transaction data;
[0087] The target graph structure acquisition module is used to obtain the updated label of each node in each second graph structure by using the similarity, and update the node label a preset number of times to obtain the first label of each node and the historical label sequence of each node; according to the similarity between the historical label sequence of each node and its neighboring nodes, update the first label of each node again to obtain the corresponding target label; update the corresponding initial edge value in combination with the change of the label of each node and its neighboring nodes, and obtain the target graph structure corresponding to each dimension;
[0088] The data classification module is used to update and classify the nodes in the first graph structure in combination with the SLPA algorithm and the target graph structure corresponding to each dimension, and encrypt and transmit the financial transaction data to be transmitted based on the classification results.
[0089] It should be understood that Figure 4The structural block diagram of a blockchain-based financial transaction data security transmission system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or a dedicated design hardware. Those skilled in the art can understand that the above-mentioned methods and systems can be implemented using computer executable instructions and / or included in processor control codes, such as carrier media such as disks, CDs or DVD-ROMs, programmable memories such as read-only memories (firmware), or data carriers such as optical or electronic signal carriers. Such codes are provided on. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software (for example, firmware).
[0090] For more details about the above modules, please refer to other places in this manual (for example Figure 1 , Figure 2 , Figure 3 part and its related description), which will not be repeated here.
[0091] In other embodiments, a device is also provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the above-mentioned method for secure transmission of financial transaction data based on blockchain. The device can be specifically a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the above-mentioned method for secure transmission of financial transaction data based on blockchain provided in the above embodiment.
[0092] In other embodiments, a computer program product is also provided. When the computer program product is run on a computer, the computer executes the above-mentioned related steps to implement a blockchain-based financial transaction data secure transmission method provided in the above embodiment.
[0093] In other embodiments, a computer-readable storage medium is also provided, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a blockchain-based financial transaction data secure transmission method provided in the above embodiment.
[0094] Among them, the provided systems, devices, computer program products, and computer-readable storage media are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0095] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for secure transmission of financial transaction data based on blockchain, characterized in that: The method comprises the following steps: Acquire financial transaction data to be transmitted, wherein the financial transaction data is composed of transaction data of a preset number of dimensions; A first graph structure is constructed based on the attribute vectors of all financial transaction data, and a second graph structure corresponding to each dimension is constructed based on all transaction data of each dimension, and similarities between nodes in the first graph structure and each second graph structure are respectively obtained, and initial edge values between nodes are the similarities, wherein initial labels of all attribute vectors are different, and each transaction data has the same initial label as the attribute vector of the corresponding financial transaction data; In each second graph structure, the updated label of each node is obtained by using the similarity, and the label of the node is updated a preset number of times to obtain the first label of each node and the historical label sequence of each node; according to the similarity between the historical label sequence of each node and its neighboring nodes, the first label of each node is updated again to obtain the corresponding target label; in combination with the change of the label of each node and its neighboring nodes, the corresponding initial edge value is updated to obtain the target graph structure corresponding to each dimension; The nodes in the first graph structure are updated and classified by combining the SLPA algorithm and the target graph structure corresponding to each dimension, and the financial transaction data to be transmitted is encrypted and transmitted based on the classification results.
2. According to a blockchain-based financial transaction data secure transmission method according to claim 1, it is characterized in that: The step of constructing a first graph structure based on the attribute vectors of all financial transaction data includes: The attribute vectors of all financial transaction data are used as nodes of the first graph structure. If the similarity between two attribute vectors is greater than a preset similarity threshold, the nodes where the two attribute vectors are located are connected to form an edge to construct the first graph structure.
3. According to a blockchain-based financial transaction data secure transmission method according to claim 1, it is characterized in that: The step of constructing a second graph structure corresponding to each dimension based on all transaction data of each dimension includes: For transaction data of any dimension, all transaction data of this dimension are used as nodes of the second graph structure. If the similarity between two transaction data is greater than a preset similarity threshold, the nodes where the two corresponding transaction data are located are connected to form an edge, thereby constructing the second graph structure corresponding to this dimension.
4. According to a method for secure transmission of financial transaction data based on blockchain according to claim 2, it is characterized in that: Obtaining an updated label of each node using the similarity, and updating the label of the node a preset number of times to obtain a first label of each node, including: For any node in the candidate graph structure: sort all nodes except this node in descending order of similarity with this node to obtain the reference sequence of this node; The initial label of the first node in the reference sequence of each node in the candidate graph structure is used as the updated label of each node, and the initial label of each node is updated to obtain a new graph structure; the initial label of the second node in the reference sequence of each node in the candidate graph structure is used as the new updated label of each node, and the label of each node is updated to obtain a new graph structure; and so on, until the number of updates of the node label reaches a preset number, the finally obtained label is used as the first label; The candidate graph structure is any second graph structure.
5. A method for securely transmitting financial transaction data based on blockchain according to claim 4, characterized in that: The acquisition of the historical label sequence of each node in the candidate graph structure includes: Sort the initial labels and updated labels of the candidate nodes in the order of update time to obtain the historical label sequence of the candidate nodes; The candidate node is any node in the candidate graph structure.
6. A method for securely transmitting financial transaction data based on blockchain according to claim 5, characterized in that: The method of updating the first label of each node again to obtain the corresponding target label according to the similarity between the historical label sequences of each node and its neighboring nodes includes: Calculate the similarity index of the historical label sequence of the candidate node and each of its neighbor nodes respectively; take the first label of the neighbor node corresponding to the largest similarity index as the target label of the candidate node.
7. A method for securely transmitting financial transaction data based on blockchain according to claim 5, characterized in that: The updating of the corresponding initial edge value in combination with the change of the labels of each node and its neighboring nodes to obtain the target graph structure corresponding to each dimension includes: For a candidate node, determine whether the two nodes corresponding to each two adjacent labels in the candidate node's historical label sequence are connected in the second graph structure; if connected, set the feature value between the corresponding two adjacent labels in the candidate node's historical label sequence to the corresponding similarity; if not connected, set the feature value between the corresponding two adjacent labels in the candidate node's historical label sequence to 0; all feature values between each two adjacent labels in the candidate node's historical label sequence constitute an edge value change sequence of the candidate node; By utilizing the similarity of the edge value change sequences between each node and its neighboring nodes, the initial edge value between every two nodes is updated to obtain the target graph structure corresponding to each dimension.
8. A method for securely transmitting financial transaction data based on blockchain according to claim 7, characterized in that: The method utilizes the similarity of the edge value change sequence between each node and its neighboring nodes to update the initial edge value between every two nodes and obtain the target graph structure corresponding to each dimension, including: Calculate the similarity between the edge value change sequence of each node and the edge value change sequence of each of its neighboring nodes respectively, and record it as the first similarity value between each node and each of its neighboring nodes; select the largest first similarity value from the first similarity values between each node and all its neighboring nodes as the reference value of each node; Any two connected nodes in the second graph structure are respectively recorded as the first node and the second node; using the reference value of the first node, the reference value of the second node, and the similarity between the edge value change sequence of the first node and the edge value change sequence of the second node, the updated edge value between the first node and the second node is obtained, and the initial edge value between the first node and the second node is updated to obtain the corresponding target graph structure.
9. A method for securely transmitting financial transaction data based on blockchain according to claim 8, characterized in that: The method of obtaining an updated edge value between the first node and the second node by using the reference value of the first node, the reference value of the second node, and the similarity between the edge value change sequence of the first node and the edge value change sequence of the second node comprises: Obtaining a maximum value between a reference value of the first node and a reference value of the second node; Determine the ratio between the similarity between the edge value change sequence of the first node and the edge value change sequence of the second node and the maximum value as an adjustment coefficient; The initial edge value between the first node and the second node is updated using the adjustment coefficient to obtain an updated edge value.
10. A method for securely transmitting financial transaction data based on blockchain according to claim 1, characterized in that: The updating and classification of the nodes in the first graph structure by combining the SLPA algorithm and the target graph structure corresponding to each dimension, and encrypting and transmitting the financial transaction data to be transmitted based on the classification result, include: For any financial transaction data in the first graph structure: taking the target label that appears most frequently in all the transaction data corresponding to the financial transaction data in all the target graph structures as the final label of the node of the financial transaction data in the first graph structure, and updating the label of the financial transaction data in the first graph structure to obtain an updated first graph structure; The SLPA algorithm is used to classify the final labels of all nodes in the updated first graph structure, and the blockchain technology is used to encrypt and transmit the financial transaction data of each category respectively.
Citation Information
Patent Citations
Community discovery method, device, equipment and readable storage medium
CN110880150A
Financial user data security protection method based on block chain
CN117788174A