Intelligent payment method and device, computer equipment and storage medium
By obtaining encrypted payment information from the blockchain network, conducting cross-chain analysis and decryption processing, building user payment portraits and generating payment contract codes, the problems of transaction information security and personalized payment processes in the existing intelligent payment system are solved, and an efficient, secure and personalized payment experience is achieved.
Patent Information
- Application Number
- CN202411623711.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The existing intelligent payment system cannot effectively ensure the security of user transaction information, and lacks personalized payment process settings, resulting in low payment efficiency and low user satisfaction.
By obtaining encrypted payment information from the blockchain network, conducting cross-chain analysis and decryption processing, building user payment portraits, extracting key features to generate payment contract codes, and deploying and updating them according to preset security requirements, ensuring the security and personalization of payment contracts.
It has achieved high security and personalized payment function settings for users, improved payment efficiency and user experience, and enhanced the reputation and reputation of financial business.
Smart Images

Figure CN119692999A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, specifically to the field of financial technology, and in particular to an intelligent payment method, device, computer equipment and storage medium. Background Art
[0002] In the financial business system, smart payment, as one of the core businesses, always occupies an important position. Through the configured smart payment contract, the system can automatically trigger events and execute corresponding logic to ensure that users can successfully complete payment operations in the system. This automated and intelligent payment method not only improves the processing efficiency of financial business, but also provides users with a more convenient and efficient payment experience.
[0003] However, in the process of smart payment, the security of user transaction information has become increasingly prominent. Since payment information involves the user's financial security and personal privacy, once this information is maliciously obtained or tampered with, the security of smart payment will be greatly reduced. This will not only cause economic losses to users, but also have a serious impact on the credibility and reputation of financial services.
[0004] In addition, smart payment also has shortcomings in personalized services. Each user often has different behavioral habits and preferences when making payments. However, the current smart payment system often lacks sufficient flexibility and cannot simplify and adjust the payment process according to the personalized needs of users. This not only reduces the user's payment efficiency, but may also cause users to feel dissatisfied during use, which in turn affects the user's overall satisfaction with financial services. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose an intelligent payment method, device, computer equipment and storage medium to solve the problem that it is impossible to set up highly secure and personalized payment functions for users to improve payment efficiency.
[0006] In order to solve the above technical problems, the present application embodiment provides a smart payment method, which adopts the following technical solutions:
[0007] Obtain encrypted payment information from the blockchain network;
[0008] Performing cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information;
[0009] Constructing a user payment profile based on the decrypted payment information;
[0010] Extract key features of the user payment profile, and generate a payment contract code based on the extracted payment profile feature vector;
[0011] Determining whether the payment contract code meets preset security requirements;
[0012] If the payment contract code meets the preset security requirements, the payment contract code is deployed to the corresponding blockchain network for payment contract execution;
[0013] If the payment contract code does not meet the preset security requirements, the payment contract code is updated to obtain an updated contract code, and it is re-judged whether the updated contract code meets the preset security requirements, and the updating and security judgment of the updated contract code are continuously repeated until the updated contract code meets the preset security requirements.
[0014] Furthermore, the step of obtaining encrypted payment information from the blockchain network specifically includes:
[0015] Get the list of blockchain networks;
[0016] Obtain transaction record information from the blockchain network corresponding to the blockchain network list;
[0017] Identify the encrypted payment information in the transaction record information and extract the encrypted payment information.
[0018] Furthermore, the step of performing cross-chain analysis and decryption processing on the encrypted payment information to obtain the decrypted payment information specifically includes:
[0019] Extracting features of the encrypted payment information based on a federated learning algorithm to obtain a payment information feature vector;
[0020] Perform cross-chain fusion on the payment information feature vector to construct a cross-chain payment information feature matrix;
[0021] Performing dimensionality reduction processing on the cross-chain payment information feature matrix according to a matrix decomposition algorithm to obtain a low-dimensional payment information feature representation;
[0022] Homomorphically encrypting the low-dimensional payment information feature representation to obtain an encrypted information feature representation;
[0023] Transmitting the encrypted information feature representation across chains in the blockchain network, and homomorphically decrypting the encrypted information feature representation in the blockchain network to obtain a decrypted information feature representation;
[0024] Payment matching is performed in the blockchain network according to the decrypted information feature representation to obtain the decrypted payment information.
[0025] Furthermore, the step of constructing a user payment profile based on the decrypted payment information specifically includes:
[0026] Performing data cleaning on the decrypted payment information to obtain valid payment information;
[0027] Extract payment method information, payment amount information, payment time information, and payment channel information from the valid payment information;
[0028] Constructing a user feature vector according to the payment method information, the payment amount information, the payment time information, and the payment channel information;
[0029] Performing cluster analysis on the user feature vectors according to a preset clustering algorithm to obtain user group labels;
[0030] The user payment profile is constructed according to the user group label and the valid payment information.
[0031] Furthermore, the step of extracting key features from the user payment portrait and generating a payment contract code according to the extracted payment portrait feature vector specifically includes:
[0032] Preprocessing the user payment profile to obtain standard payment profile information;
[0033] Extracting features of the standard payment portrait information based on a natural language processing algorithm to obtain a feature vector of the payment portrait;
[0034] Clustering users according to the payment portrait feature vector to obtain user category groups;
[0035] Extracting a corresponding smart contract template from a preset smart contract template library according to the user category group;
[0036] Matching the key information in the payment portrait feature vector with the parameters of the smart contract template, and filling the key information into the corresponding position of the parameters according to the matching relationship to obtain a smart payment contract;
[0037] Personalized demand information is obtained, and code is generated according to the personalized demand information and the smart payment contract to obtain the payment contract code.
[0038] Furthermore, the step of deploying the payment contract code to the corresponding blockchain network for payment contract execution specifically includes:
[0039] Verifying the payment contract code according to the consensus mechanism and verification rules of the blockchain network;
[0040] Associating the verified payment contract code with the blockchain network;
[0041] Obtaining the trigger conditions and execution logic predefined in the payment contract code;
[0042] The trigger condition is monitored in real time, and when the trigger condition is met, the contract function corresponding to the execution logic is automatically executed.
[0043] Furthermore, the step of updating the payment contract code to obtain an updated contract code specifically includes:
[0044] Identify potential vulnerabilities in payment contract code;
[0045] Searching for a corresponding vulnerability repair solution in a preset repair solution list according to the potential vulnerability;
[0046] The payment contract code is updated according to the vulnerability repair solution to obtain the updated contract code.
[0047] In order to solve the above technical problems, the present application also provides a smart payment device, which adopts the following technical solution:
[0048] Information acquisition module, used to obtain encrypted payment information from the blockchain network;
[0049] An information analysis module, used to perform cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information;
[0050] A portrait building module, used to build a user payment portrait based on the decrypted payment information;
[0051] A contract generation module, used to extract key features of the user payment profile and generate a payment contract code based on the extracted payment profile feature vector;
[0052] A contract judgment module, used to judge whether the payment contract code meets the preset security requirements;
[0053] A contract deployment module, configured to deploy the payment contract code to a corresponding blockchain network for payment contract execution if the payment contract code meets the preset security requirements;
[0054] The contract adjustment module is used to update the payment contract code if the payment contract code does not meet the preset security requirements, obtain an updated contract code, and re-judge whether the updated contract code meets the preset security requirements, and continuously cycle the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements.
[0055] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0056] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of any one of the above-mentioned smart payment methods when executing the computer-readable instructions.
[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0058] A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of any of the above-described smart payment methods.
[0059] Compared with the prior art, the embodiment of the present application has the following beneficial effects: the embodiment obtains encrypted payment information from the blockchain network; performs cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information; constructs a user payment profile according to the decrypted payment information; extracts key features of the user payment profile, and generates a payment contract code according to the extracted payment profile feature vector; determines whether the payment contract code meets the preset security requirements; if the payment contract code meets the preset security requirements, the payment contract code is deployed to the corresponding blockchain network for payment contract execution; if the payment contract code does not meet the preset security requirements, the payment contract code is updated to obtain an updated contract code, and re-determines whether the updated contract code meets the preset security requirements, and continuously cycles the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements. This effectively realizes the highly secure and personalized payment function settings for users to improve payment efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0061] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0062] Figure 2 A flow chart of an embodiment of a smart payment method according to the present application;
[0063] Figure 3 yes Figure 2A flowchart of a specific implementation of step S10;
[0064] Figure 4 yes Figure 2 A flowchart of a specific implementation of step S20;
[0065] Figure 5 yes Figure 2 A flowchart of a specific implementation of step S30;
[0066] Figure 6 yes Figure 2 A flowchart of a specific implementation of step S40;
[0067] Figure 7 yes Figure 2 A flowchart of a specific implementation of step S60;
[0068] Figure 8 yes Figure 2 A flowchart of a specific implementation of step S70;
[0069] Fig. 9 is a schematic diagram of the structure of an embodiment of a smart payment device according to the present application;
[0070] Fig.10 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0072] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor does it refer to non-related or alternative embodiments that are mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0073] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0074] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0075] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0076] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0077] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .
[0078] It should be noted that the smart payment method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the smart payment device is generally set in the server / terminal device.
[0079] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0080] Continue to refer Figure 2 , shows a flow chart of an embodiment of a smart payment method according to the present application. The smart payment method comprises the following steps:
[0081] Step S10, obtaining encrypted payment information from the blockchain network;
[0082] In this embodiment, encrypted payment information is transaction information encrypted using an asymmetric encryption algorithm. A blockchain network refers to a distributed network consisting of multiple nodes (computers or servers) that jointly maintain one or more blockchain databases. In a blockchain network, each node holds a complete or partial copy of the blockchain and follows a specific consensus mechanism to ensure that all nodes in the network have a consensus on the state of the blockchain. When new transactions occur, they are broadcast to all nodes in the network and added to the blockchain through a consensus mechanism. Encrypted payment information refers to specific information related to payment when a transaction is conducted in a blockchain network. This specific information is encrypted to ensure its security and privacy, but can also be decrypted by authorized users or systems for verification, recording, or further processing.
[0083] Step S20, performing cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information;
[0084] In this embodiment, cross-chain analysis refers to analysis and processing between blockchain networks. The cross-chain analysis includes information about both parties to the transaction (blockchain addresses of the sender and the receiver), transaction amount (the amount of currency involved in the transaction), transaction metadata (transaction timestamp, transaction fee, transaction type, and other additional information related to the transaction), digital signature (used to verify the authenticity and integrity of the transaction), etc. Decryption processing refers to decrypting data through homomorphic decryption. Homomorphic decryption is the inverse process of homomorphic encryption (HE), which is used to restore the ciphertext after homomorphic encryption and calculation to plaintext, and obtain the corresponding decrypted payment information through decryption processing.
[0085] Step S30, constructing a user payment profile based on the decrypted payment information;
[0086] In this embodiment, the user payment profile is constructed based on the payment method information, payment amount information, payment time information, and payment channel information extracted from the decrypted payment information. The user payment profile includes: basic user information, payment method preference, payment behavior characteristics, payment risk characteristics, and payment association information. By constructing the user payment profile, personalized payment contract code generation can be effectively performed for different types of users.
[0087] Step S40, extracting key features of the user payment portrait, and generating a payment contract code according to the extracted payment portrait feature vector;
[0088] In this embodiment, users are clustered according to the payment portrait feature vector to obtain user category groups, and then the corresponding smart contract template is searched and extracted in the preset smart contract template library according to the user category group, and the payment portrait feature vector and the smart contract template are merged to generate the payment contract code. Among them, the smart contract template library contains smart contract templates for different user category groups, and each template should be designed according to the characteristics and needs of a specific user group to ensure that the smart contract can meet the payment and transaction needs of different user groups.
[0089] Step S50, determining whether the payment contract code meets the preset security requirements;
[0090] In this embodiment, a formal verification method can be used to perform a security check on the payment contract code, and code auditing and vulnerability detection can be performed at the same time to obtain a security test result, and then the security test result is compared with the preset security requirements to determine whether the payment contract code meets the preset security requirements. The steps of formal verification include establishing a mathematical model for the smart contract corresponding to the payment contract code, including its state, operation and conversion rules; defining the properties that need to be verified, such as funds will not be lost, only specific users can perform certain operations, etc.; using formal verification tools (such as model checkers, theorem provers, etc.) to check whether the contract meets these properties. Code auditing includes analyzing code structure, variable naming, function implementation, etc., finding common security vulnerabilities (such as reentrancy attacks, integer overflows, etc.); by simulating the execution environment of the contract, testing its behavior in different situations, especially edge cases and abnormal situations. Vulnerability detection includes using code automation tools such as code automation tools to scan the payment contract code, matching the detected vulnerabilities with known vulnerability libraries to determine the type and severity of the vulnerabilities.
[0091] Step S60: if the payment contract code meets the preset security requirements, the payment contract code is deployed to the corresponding blockchain network for payment contract execution;
[0092] In this embodiment, before the payment contract code is deployed to the blockchain network, the blockchain network needs to verify the payment contract code through a consensus mechanism and verification rules. When the verification is passed, the blockchain network is determined as the blockchain network corresponding to the payment contract code. In this embodiment, a single payment contract code can correspond to multiple blockchain networks, and the number of corresponding blockchain networks can be set according to actual conditions to perform effective code deployment.
[0093] Step S70: If the payment contract code does not meet the preset security requirements, the payment contract code is updated to obtain an updated contract code, and it is re-judged whether the updated contract code meets the preset security requirements, and the updating and security judgment of the updated contract code are continuously repeated until the updated contract code meets the preset security requirements.
[0094] In this embodiment, the corresponding vulnerability repair solution is obtained according to the potential vulnerability of the payment contract code to perform effective vulnerability repair, realize the update of the payment contract code, and obtain the updated contract code. A rule-based automatic repair program can be used to update the updated contract code according to the code update operation in the blockchain network to realize the cyclic update of the updated contract code. This update step corresponds to the above-mentioned vulnerability repair step.
[0095] This embodiment obtains encrypted payment information from the blockchain network; performs cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information; constructs a user payment profile based on the decrypted payment information; extracts key features of the user payment profile, and generates a payment contract code based on the extracted payment profile feature vector; determines whether the payment contract code meets the preset security requirements; if the payment contract code meets the preset security requirements, the payment contract code is deployed to the corresponding blockchain network for payment contract execution; if the payment contract code does not meet the preset security requirements, the payment contract code is updated to obtain an updated contract code, and re-determines whether the updated contract code meets the preset security requirements, and continuously cycles the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements. This effectively implements the highly secure and personalized payment function settings for users to improve payment efficiency.
[0096] refer to Figure 3 In some optional implementations of this embodiment, step S10 includes the following steps:
[0097] Step S101, obtaining a blockchain network list;
[0098] In this embodiment, a preset blockchain network list can be read from a configuration file or a database, and the list contains necessary information of each blockchain network, such as network name, node address, API interface URL, etc.
[0099] Step S102, obtaining transaction record information from the blockchain network corresponding to the blockchain network list;
[0100] In this embodiment, the blockchain network list is traversed to select all blockchain networks in the list, and from each selected blockchain network, the corresponding transaction record information is queried and extracted using the provided network interface (such as RESTful API, WebSocket, etc.).
[0101] Step S103, identifying the encrypted payment information in the transaction record information, and extracting the encrypted payment information.
[0102] In this embodiment, for each transaction record information, it can be determined whether it contains encrypted payment information by checking its fields (such as transaction description, metadata, notes, etc.), wherein the encrypted payment information can appear in a specific format, keyword or encrypted form. When it is determined that the transaction record information contains encrypted payment information, the encrypted payment information part is extracted to obtain the encrypted payment information.
[0103] In this embodiment, after obtaining the encrypted payment information, a corresponding unique transaction hash value can be generated. The unique transaction hash value can be obtained by performing a hash operation on the encrypted payment information according to a preset hash algorithm, and then the unique transaction hash value and the encrypted payment information are associated and stored to establish a mapping relationship between the unique transaction hash value and the encrypted payment information. During transaction verification, the legitimacy and integrity of the original payment information in the decrypted encrypted payment information can be verified through the unique transaction hash value.
[0104] This embodiment obtains a blockchain network list; obtains transaction record information from the blockchain network corresponding to the blockchain network list; identifies encrypted payment information in the transaction record information, and extracts the encrypted payment information. This effectively achieves secure acquisition of encrypted payment information, facilitating subsequent cross-chain analysis and decryption processing operations.
[0105] refer to Figure 4 In some optional implementations of this embodiment, step S20 includes the following steps:
[0106] Step S201, extracting features of the encrypted payment information based on a federated learning algorithm to obtain a payment information feature vector;
[0107] In this embodiment, the federated learning algorithm is a distributed machine learning paradigm that uses data sets scattered among the participants, integrates multi-party data information through privacy protection technology, and collaboratively constructs a global feature extraction model, and then performs feature extraction operations based on the feature extraction model. In this embodiment, the feature extraction model can use a neural network model. The payment information feature vector includes transaction amount features (transaction amount size and distribution characteristics), transaction time features (timestamp of transaction, transaction frequency, time interval, etc.), transaction party features (address or account identification of transaction parties), transaction type features (transfer, payment, collection, etc. and specific businesses, such as e-commerce, game recharge, financial services, etc.), transaction association features (transaction association and network structure relationship), transaction risk features (suspiciousness and security level of transactions), etc.
[0108] Step S202, cross-chain fusion of the payment information feature vector to construct a cross-chain payment information feature matrix;
[0109] In this embodiment, cross-chain fusion refers to integrating payment information feature vectors from different blockchain networks to form a unified cross-chain payment information feature matrix. The payment information feature vectors of different blockchains are standardized and then integrated in chronological order to form a cross-chain payment information feature matrix.
[0110] Step S203, performing dimensionality reduction processing on the cross-chain payment information feature matrix according to a matrix decomposition algorithm to obtain a low-dimensional payment information feature representation;
[0111] In this embodiment, the matrix decomposition algorithm is a method for decomposing a matrix into the product or sum of multiple smaller matrices, which is used to reduce the dimension of the matrix and retain the important information of the original data. In this embodiment, the matrix decomposition algorithm uses principal component analysis (PCA), which reduces the dimensionality of the data by finding the principal component (i.e., the direction with the largest data change) in the cross-chain payment information feature matrix, thereby achieving effective dimensionality reduction processing to obtain a low-dimensional payment information feature representation.
[0112] Step S204, homomorphically encrypting the low-dimensional payment information feature representation to obtain an encrypted information feature representation;
[0113] In this embodiment, homomorphic encryption is an encryption technology that allows calculations to be performed on encrypted data and encrypted results to be obtained without first decrypting the data. By performing homomorphic encryption on the low-dimensional payment information feature representation, an encrypted information feature representation that can be securely transmitted in the blockchain network is obtained.
[0114] Step S205, transmitting the encrypted information feature representation across chains in the blockchain network, and performing homomorphic decryption on the encrypted information feature representation in the blockchain network to obtain a decrypted information feature representation;
[0115] In this embodiment, cross-chain transmission refers to the process of transmitting information from one blockchain network to another blockchain network. Cross-chain transmission can be achieved through the Axelar Network communication protocol, and the encrypted information feature representation is transmitted across the blockchain network through the Axelar Network communication protocol. Homomorphic decryption is the reverse process of homomorphic encryption. The encrypted information feature representation is decrypted using the same key or decryption algorithm as that used in homomorphic encryption to effectively obtain the decrypted information feature representation.
[0116] Step S206, performing payment matching in the blockchain network according to the decrypted information feature representation to obtain the decrypted payment information.
[0117] In this embodiment, the decrypted information feature representation is matched with the local payment information of the blockchain network, and the similarity is calculated, so as to screen out the decrypted payment information with a similarity higher than a preset threshold. The similarity calculation can be achieved by cosine similarity calculation, by calculating the cosine similarity of the feature vectors corresponding to the decrypted information feature representation and the local payment information, and screening accordingly according to the calculated cosine similarity, so as to obtain the decrypted payment information. In this embodiment, the value range of the cosine similarity is [-1, 1], and the preset threshold for similarity screening is initially 0.8, which can be set and adjusted accordingly according to the actual situation.
[0118] This embodiment extracts features of the encrypted payment information based on a federated learning algorithm to obtain a payment information feature vector; performs cross-chain fusion on the payment information feature vector to construct a cross-chain payment information feature matrix; performs dimensionality reduction processing on the cross-chain payment information feature matrix according to a matrix decomposition algorithm to obtain a low-dimensional payment information feature representation; performs homomorphic encryption on the low-dimensional payment information feature representation to obtain an encrypted information feature representation; transmits the encrypted information feature representation across chains in the blockchain network, and performs homomorphic decryption on the encrypted information feature representation in the blockchain network to obtain a decrypted information feature representation; performs payment matching in the blockchain network according to the decrypted information feature representation, thereby effectively obtaining decrypted payment information that is securely decrypted in the blockchain network, so as to facilitate the subsequent construction of a user payment portrait.
[0119] refer to Figure 5 In some optional implementations of this embodiment, step S30 includes the following steps:
[0120] Step S301, performing data cleaning on the decrypted payment information to obtain valid payment information;
[0121] In this embodiment, data cleaning includes missing value processing, outlier processing, data format conversion, data deduplication, etc., wherein missing value processing is used to check whether there are missing values in the decrypted payment information, and to select methods such as deletion of missing values, filling of missing values (such as using mean, median, mode, etc.) or interpolation for processing according to actual conditions. Outlier processing is used to identify and process outliers in the decrypted payment information, such as unreasonable payment amounts, impossible payment times, etc. Outlier processing can be performed by deletion, replacement or correction. Data format conversion is used to ensure that the data format in the decrypted payment information meets the analysis requirements, such as converting the date and time format to a unified format, converting the amount of a string type to a numeric type, etc. Data deduplication is used to check and delete duplicate records in the decrypted payment information to avoid deviations in subsequent analysis.
[0122] Step S302, extracting payment method information, payment amount information, payment time information, and payment channel information from the valid payment information;
[0123] In this embodiment, payment method information refers to the payment method used by the user, such as bank card payment, Alipay payment, WeChat payment, etc. Payment amount information refers to the payment amount of the user, which can be a single payment amount or a cumulative payment amount within a certain period of time. Payment time information refers to the payment time of the user, which can be a specific date and time or a time period (such as a certain period of time in a day). Payment channel information refers to the channel used by the user to make payments, such as online shopping malls, third-party platforms, etc.
[0124] Step S303, constructing a user feature vector according to the payment method information, the payment amount information, the payment time information, and the payment channel information;
[0125] In this embodiment, the step of constructing a user feature vector includes: determining the dimension of the user feature vector, for example, you can select features such as payment method (set as a discrete variable, represented by one-hot encoding or label encoding), payment amount (set as a continuous variable, standardized or normalized), payment time (set as a discrete variable, such as divided by hours or days) and payment channel (set as a discrete variable, represented by one-hot encoding or label encoding), and convert the extracted feature values into a format suitable for processing by a machine learning algorithm. For example, for discrete variables such as payment method, one-hot encoding (One-HotEncoding) or label encoding (Label Encoding) can be used for conversion; for continuous variables such as payment amount, standardization (such as z-score standardization) or normalization (such as min-max normalization) can be performed. The encoded feature values are combined into a user feature vector, and each user feature vector is a multidimensional array or matrix, which contains the values of the user in each feature dimension.
[0126] Step S304, performing cluster analysis on the user feature vectors according to a preset clustering algorithm to obtain user group labels;
[0127] In this embodiment, the preset clustering algorithm can adopt the K-means algorithm. The steps of clustering analysis of user feature vectors by the K-means algorithm include: determining the number of clusters K to be divided, randomly selecting K points from the user feature vectors as initial cluster centers; calculating the distance (commonly used Euclidean distance) from each user feature vector to the K cluster centers; according to the principle of the closest distance, assigning each user feature vector to the cluster represented by the nearest cluster center, and calculating the mean of all user feature vectors in each cluster as the new cluster center. After updating the cluster center, recalculate the distance from each user feature vector to the new cluster center, and redistribute the samples to the nearest cluster, repeat the above assignment and update steps until the cluster center no longer changes significantly or reaches the preset number of iterations, and complete the cluster analysis step to obtain the user group cluster cluster. After obtaining the user group cluster cluster, assign corresponding labels according to the characteristics of the cluster center of each user group cluster to obtain the user group label.
[0128] Step S305: construct the user payment profile according to the user group tag and the valid payment information.
[0129] In this embodiment, user group labels and valid payment information are associated and integrated to obtain comprehensive user payment information, and then the framework of the user payment portrait is designed, including the dimensions, indicators and display methods of the portrait. The content of the user payment portrait is filled in according to the integrated comprehensive user payment information and user feature vector, and the user's payment behavior and characteristics are displayed using charts, graphics, text descriptions, etc., thereby effectively constructing the user payment portrait.
[0130] This embodiment obtains valid payment information by performing data cleaning on the decrypted payment information; extracts payment method information, payment amount information, payment time information, and payment channel information from the valid payment information; constructs a user feature vector based on the payment method information, the payment amount information, the payment time information, and the payment channel information; performs cluster analysis on the user feature vector based on a preset clustering algorithm to obtain a user group label; and constructs the user payment portrait based on the user group label and the valid payment information. Thus, user payment portraits representing different user groups are effectively constructed to facilitate the subsequent generation of personalized payment contract codes.
[0131] Continue to refer Figure 6 In some optional implementations of this embodiment, step S40 includes the following steps:
[0132] Step S401, pre-processing the user payment portrait to obtain standard payment portrait information;
[0133] In this embodiment, preprocessing includes removing noise data and abnormal data, wherein noise data refers to unreasonable payment amounts, non-existent payment methods, abnormal timestamps, etc. contained in the user payment portrait, and abnormal data refers to extremely high payment amounts, frequent abnormal transaction patterns, etc. contained in the user payment portrait.
[0134] Step S402, extracting features from the standard payment portrait information based on a natural language processing algorithm to obtain a feature vector of the payment portrait;
[0135] In this embodiment, the natural language processing algorithm can adopt a bag-of-words model to perform text analysis on standard payment portrait information to extract payment portrait features including payment keywords, phrases or themes, and then map the payment portrait features into a feature vector space to obtain a payment portrait feature vector.
[0136] Step S403, clustering users according to the payment portrait feature vector to obtain user category groups;
[0137] In this embodiment, user clustering operations can be performed according to the K-means algorithm. The payment portrait feature vector is input into the K-means algorithm to perform a clustering analysis operation to obtain the corresponding user portrait feature clustering results, and then the corresponding user category groups are generated based on the user portrait feature clustering results.
[0138] Step S404, extracting a corresponding smart contract template from a preset smart contract template library according to the user category group;
[0139] In this embodiment, the user category group is used as a query condition to perform a traversal query in the smart contract template library to extract the corresponding smart contract template. The smart contract template library includes multiple smart contract templates, each of which is designed for a specific user category group to meet its specific payment needs or business scenarios.
[0140] Step S405, matching the key information in the payment portrait feature vector with the parameters of the smart contract template, and filling the key information into the corresponding position of the parameters according to the matching relationship to obtain a smart payment contract;
[0141] In this embodiment, key information related to user payment behavior and preferences is extracted from the payment portrait feature vector, including payment frequency, payment amount range, common payment methods, payment time preferences, etc. The parameters of the smart contract template include payment conditions, payment limits, payment time windows, payment fees, etc. By matching the key information with the parameters of the smart contract template, a matching relationship is effectively obtained, and then the key information is correspondingly filled into the smart contract template according to the matching relationship, thereby effectively generating a smart payment contract.
[0142] Step S406, obtaining personalized demand information, and performing code generation according to the personalized demand information and the smart payment contract to obtain the payment contract code.
[0143] In this embodiment, personalized demand information can be obtained through user surveys, demand analysis, etc. The personalized demand information may include specific payment processes, payment security requirements, payment notification methods, etc. The smart payment contract is further adjusted according to the personalized demand information so that the smart payment contract can be more refined to meet the personalized needs of users. When the adjustment is completed, the smart payment contract is converted into an executable payment contract code through a code generation tool.
[0144] This embodiment obtains standard payment portrait information by preprocessing the user payment portrait; extracts features of the standard payment portrait information based on a natural language processing algorithm to obtain the payment portrait feature vector; clusters users according to the payment portrait feature vector to obtain user category groups; extracts corresponding smart contract templates from a preset smart contract template library according to the user category groups; matches key information in the payment portrait feature vector with parameters of the smart contract template, and fills the key information into corresponding positions of the parameters according to the matching relationship to obtain a smart payment contract; obtains personalized demand information, generates code according to the personalized demand information and the smart payment contract, thereby effectively obtaining a personalized payment contract code configured according to the user payment portrait to facilitate subsequent payment contract execution processing.
[0145] Continue to refer Figure 7 In some optional implementations of this embodiment, step S60 includes the following steps:
[0146] Step S601, verifying the payment contract code according to the consensus mechanism and verification rules of the blockchain network;
[0147] In this embodiment, the payment contract code is verified through the network nodes of the blockchain network for consensus mechanism and verification rules, wherein the consensus mechanism preset by the blockchain network includes proof of work, proof of equity, etc., and the verification content corresponding to the verification rules includes the grammatical correctness, logical rationality, and security (such as preventing malicious code or vulnerabilities) of the code. In this embodiment, the payment contract code can also be functionally tested by building a test environment similar to the actual production environment, including a blockchain network, a smart contract deployment tool, a test account, etc., and then writing detailed test cases according to the functions and business logic of the payment contract, wherein the test cases should cover normal scenarios, abnormal scenarios, and boundary scenarios, etc., to ensure the comprehensiveness of the test. By verifying whether the functions of the payment contract are executed as expected under normal circumstances, for example, testing whether the user can successfully initiate payment, whether the payment amount is correctly deducted, and whether the payment status is updated. And simulating various abnormal situations to verify the fault tolerance and abnormal handling capabilities of the payment contract, for example, testing the behavior under abnormal circumstances such as the payment amount exceeding the limit, the payment password error, and the network interruption during the payment process. And verify whether the behavior of the payment contract under boundary value conditions is as expected, for example, testing the minimum value, maximum value, and specific decimal places of the payment amount. This enables effective functional testing of the payment contract code. When the payment contract code passes the above functional test, the payment contract code can be effectively deployed to the corresponding blockchain network.
[0148] Step S602, establishing an association between the verified payment contract code and the blockchain network;
[0149] In this embodiment, after the payment contract code is verified by the network nodes in the blockchain network, the payment contract code is associated with other smart contracts deployed in the blockchain network. The association can be achieved through the interactive logic, dependency or data sharing between the payment contract and the smart contract. After the association is established, the payment contract code will be recorded in a new block of the blockchain network for deployment and become part of the blockchain network. The deployed payment contract will have a unique contract address for identification and access on the blockchain network.
[0150] Step S603, obtaining the triggering conditions and execution logic predefined in the payment contract code;
[0151] In this embodiment, the trigger conditions may include time conditions, external events (such as the occurrence of a transaction), status changes of other smart contracts, etc. The execution logic is the automated behavior logic set corresponding to the trigger conditions. The execution logic may include functions such as transfer, data update, and triggering other smart contracts.
[0152] Step S604: monitor the trigger condition in real time, and when the trigger condition is met, automatically execute the contract function corresponding to the execution logic.
[0153] In this embodiment, when a trigger condition is met (such as reaching a specific time, a specific transaction occurring, etc.), the blockchain network will detect this change. Once the trigger condition is met, the blockchain network will automatically execute the execution logic corresponding to the condition to complete the implementation of the contract function, where the execution logic includes the above-mentioned transfer, data update, triggering other smart contracts and other functions.
[0154] This embodiment verifies the payment contract code according to the consensus mechanism and verification rules of the blockchain network; associates the verified payment contract code with the blockchain network; obtains the trigger conditions and execution logic predefined in the payment contract code; monitors the trigger conditions in real time, and automatically executes the contract function corresponding to the execution logic when the trigger conditions are met. This effectively implements the effective network deployment of the payment contract code to ensure the real-time availability of the payment function of the blockchain network.
[0155] Continue to refer Figure 8 In some optional implementations of this embodiment, step S70 includes the following steps:
[0156] Step S701, identifying potential vulnerabilities in the payment contract code;
[0157] In this embodiment, the payment contract code can be scanned by a static code analysis tool to discover potential coding errors, security vulnerabilities, performance issues, and other coding vulnerabilities.
[0158] Step S702, searching for a corresponding vulnerability repair solution in a preset repair solution list according to the potential vulnerability;
[0159] In this embodiment, the repair solution list is a pre-established list of common code vulnerabilities and their repair solutions, which can be updated according to the latest code security research and best practice results. Potential vulnerabilities are used as query conditions to perform query matching in the preset repair solution list to match the vulnerability repair solution that best matches the current vulnerability.
[0160] Step S703: Update the payment contract code according to the vulnerability repair solution to obtain the updated contract code.
[0161] In this embodiment, the payment contract code is modified accordingly according to the vulnerability repair solution found, which can be handled by rewriting the problematic code segment, adding additional security checks, adjusting the logic flow, etc. When the payment contract code is updated, the updated contract code can be fully tested, including unit testing, integration testing, and security testing to ensure that all modifications have not introduced new problems and that the original vulnerabilities have been fixed. The updated contract code is also subject to code review and security audit to ensure that all vulnerabilities have been properly handled to ensure the effectiveness of the updated contract code.
[0162] This embodiment identifies potential vulnerabilities in the payment contract code; searches for corresponding vulnerability repair solutions in a preset repair solution list based on the potential vulnerabilities; updates the payment contract code based on the vulnerability repair solutions, thereby effectively obtaining updated contract code that repairs the code vulnerabilities accordingly, so as to facilitate subsequent judgment on whether the updated contract code meets the preset security requirements.
[0163] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0164] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0165] Further references Fig. 9 , as a response to the above Figure 1 The present application provides an embodiment of a smart payment device. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0166] like Fig. 9 As shown, the smart payment device 800 described in this embodiment includes: an information acquisition module 801, an information analysis module 802, a portrait construction module 803, a contract generation module 804, a contract judgment module 805, a contract deployment module 806, and a contract adjustment module 807. Among them:
[0167] Information acquisition module 801, used to obtain encrypted payment information from the blockchain network;
[0168] The information analysis module 802 is used to perform cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information;
[0169] A portrait construction module 803, used to construct a user payment portrait according to the decrypted payment information;
[0170] The contract generation module 804 is used to extract key features of the user payment portrait and generate a payment contract code according to the extracted payment portrait feature vector;
[0171] The contract determination module 805 is used to determine whether the payment contract code meets the preset security requirements;
[0172] The contract deployment module 806 is used to deploy the payment contract code to the corresponding blockchain network for payment contract execution if the payment contract code meets the preset security requirements;
[0173] The contract adjustment module 807 is used to update the payment contract code if the payment contract code does not meet the preset security requirements, obtain an updated contract code, and re-judge whether the updated contract code meets the preset security requirements, and continuously cycle the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements.
[0174] By adopting the above-mentioned smart payment device, this embodiment can obtain encrypted payment information from the blockchain network; perform cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information; construct a user payment profile based on the decrypted payment information; extract key features of the user payment profile, and generate a payment contract code based on the extracted payment profile feature vector; determine whether the payment contract code meets the preset security requirements; if the payment contract code meets the preset security requirements, deploy the payment contract code to the corresponding blockchain network for payment contract execution; if the payment contract code does not meet the preset security requirements, update the payment contract code to obtain an updated contract code, and re-determine whether the updated contract code meets the preset security requirements, and continuously cycle the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements. This effectively realizes the setting of highly secure and personalized payment functions for users to improve payment efficiency.
[0175] To solve the above technical problems, the present application also provides a computer device. Fig.10 , Fig.10 This is a basic structural block diagram of the computer device in this embodiment.
[0176] The computer device 9 includes a memory 91, a processor 92, and a network interface 93 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 9 with components 91-93, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0177] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0178] The memory 91 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 91 can be an internal storage unit of the computer device 9, such as a hard disk or memory of the computer device 9. In other embodiments, the memory 91 can also be an external storage device of the computer device 9, such as a plug-in hard disk equipped on the computer device 9, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 91 can also include both the internal storage unit of the computer device 9 and its external storage device. In this embodiment, the memory 91 is generally used to store the operating system and various application software installed on the computer device 9, such as computer-readable instructions of the smart payment method, etc. In addition, the memory 91 can also be used to temporarily store various types of data that have been output or are to be output.
[0179] The processor 92 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 92 is generally used to control the overall operation of the computer device 9. In this embodiment, the processor 92 is used to run computer-readable instructions or process data stored in the memory 91, such as computer-readable instructions for running the smart payment method.
[0180] The network interface 93 may include a wireless network interface or a wired network interface. The network interface 93 is generally used to establish a communication connection between the computer device 9 and other electronic devices.
[0181] By adopting the above-mentioned computer device, this embodiment can obtain encrypted payment information from the blockchain network; perform cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information; construct a user payment profile based on the decrypted payment information; extract key features of the user payment profile, and generate a payment contract code based on the extracted payment profile feature vector; determine whether the payment contract code meets the preset security requirements; if the payment contract code meets the preset security requirements, deploy the payment contract code to the corresponding blockchain network for payment contract execution; if the payment contract code does not meet the preset security requirements, update the payment contract code to obtain an updated contract code, and re-determine whether the updated contract code meets the preset security requirements, and continuously cycle the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements. This effectively realizes the setting of highly secure and personalized payment functions for users to improve payment efficiency.
[0182] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the smart payment method as described above.
[0183] By adopting the above-mentioned computer-readable storage medium, this embodiment can obtain encrypted payment information from the blockchain network; perform cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information; construct a user payment profile based on the decrypted payment information; extract key features of the user payment profile, and generate a payment contract code based on the extracted payment profile feature vector; determine whether the payment contract code meets the preset security requirements; if the payment contract code meets the preset security requirements, deploy the payment contract code to the corresponding blockchain network for payment contract execution; if the payment contract code does not meet the preset security requirements, update the payment contract code to obtain an updated contract code, and re-determine whether the updated contract code meets the preset security requirements, and continuously cycle the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements. This effectively realizes the highly secure and personalized payment function settings for users to improve payment efficiency.
[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0185] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A smart payment method, characterized in that: The steps include: Obtain encrypted payment information from the blockchain network; Performing cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information; Constructing a user payment profile based on the decrypted payment information; Extract key features of the user payment profile, and generate a payment contract code based on the extracted payment profile feature vector; Determining whether the payment contract code meets preset security requirements; If the payment contract code meets the preset security requirements, the payment contract code is deployed to the corresponding blockchain network for payment contract execution; If the payment contract code does not meet the preset security requirements, the payment contract code is updated to obtain an updated contract code, and it is re-judged whether the updated contract code meets the preset security requirements, and the updating and security judgment of the updated contract code are continuously repeated until the updated contract code meets the preset security requirements.
2. The smart payment method according to claim 1, characterized in that: The step of obtaining encrypted payment information from the blockchain network specifically includes: Get the list of blockchain networks; Obtain transaction record information from the blockchain network corresponding to the blockchain network list; Identify the encrypted payment information in the transaction record information and extract the encrypted payment information.
3. The smart payment method according to claim 1, characterized in that: The step of performing cross-chain analysis and decryption processing on the encrypted payment information to obtain the decrypted payment information specifically includes: Extracting features of the encrypted payment information based on a federated learning algorithm to obtain a payment information feature vector; Perform cross-chain fusion on the payment information feature vector to construct a cross-chain payment information feature matrix; Performing dimensionality reduction processing on the cross-chain payment information feature matrix according to a matrix decomposition algorithm to obtain a low-dimensional payment information feature representation; Homomorphically encrypting the low-dimensional payment information feature representation to obtain an encrypted information feature representation; Transmitting the encrypted information feature representation across chains in the blockchain network, and homomorphically decrypting the encrypted information feature representation in the blockchain network to obtain a decrypted information feature representation; Payment matching is performed in the blockchain network according to the decrypted information feature representation to obtain the decrypted payment information.
4. The smart payment method according to claim 1, characterized in that: The step of constructing a user payment profile based on the decrypted payment information specifically includes: Performing data cleaning on the decrypted payment information to obtain valid payment information; Extract payment method information, payment amount information, payment time information, and payment channel information from the valid payment information; Constructing a user feature vector according to the payment method information, the payment amount information, the payment time information, and the payment channel information; Performing cluster analysis on the user feature vectors according to a preset clustering algorithm to obtain user group labels; The user payment profile is constructed according to the user group label and the valid payment information.
5. The smart payment method according to claim 1, characterized in that: The step of extracting key features from the user payment portrait and generating a payment contract code according to the extracted payment portrait feature vector specifically includes: Preprocessing the user payment profile to obtain standard payment profile information; Extracting features of the standard payment portrait information based on a natural language processing algorithm to obtain a feature vector of the payment portrait; Clustering users according to the payment portrait feature vector to obtain user category groups; Extracting a corresponding smart contract template from a preset smart contract template library according to the user category group; Matching the key information in the payment portrait feature vector with the parameters of the smart contract template, and filling the key information into the corresponding position of the parameters according to the matching relationship to obtain a smart payment contract; Personalized demand information is obtained, and code is generated according to the personalized demand information and the smart payment contract to obtain the payment contract code.
6. The smart payment method according to claim 1, characterized in that: The step of deploying the payment contract code to the corresponding blockchain network for payment contract execution specifically includes: Verifying the payment contract code according to the consensus mechanism and verification rules of the blockchain network; Associating the verified payment contract code with the blockchain network; Obtaining the trigger conditions and execution logic predefined in the payment contract code; The trigger condition is monitored in real time, and when the trigger condition is met, the contract function corresponding to the execution logic is automatically executed.
7. The smart payment method according to claim 1, characterized in that: The step of updating the payment contract code to obtain an updated contract code specifically includes: Identify potential vulnerabilities in payment contract code; Searching for a corresponding vulnerability repair solution in a preset repair solution list according to the potential vulnerability; The payment contract code is updated according to the vulnerability repair solution to obtain the updated contract code.
8. A smart payment device, characterized in that: include: Information acquisition module, used to obtain encrypted payment information from the blockchain network; An information analysis module, used to perform cross-chain analysis and decryption processing on the encrypted payment information to obtain decrypted payment information; A portrait building module, used to build a user payment portrait based on the decrypted payment information; A contract generation module, used to extract key features of the user payment profile and generate a payment contract code based on the extracted payment profile feature vector; A contract judgment module, used to judge whether the payment contract code meets the preset security requirements; A contract deployment module, configured to deploy the payment contract code to a corresponding blockchain network for payment contract execution if the payment contract code meets the preset security requirements; The contract adjustment module is used to update the payment contract code if the payment contract code does not meet the preset security requirements, obtain an updated contract code, and re-judge whether the updated contract code meets the preset security requirements, and continuously cycle the update and security judgment of the updated contract code until the updated contract code meets the preset security requirements.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the smart payment method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the smart payment method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
E-commerce transaction method and platform based on digital wallet with H5 technology
CN109325767A
Payment information security management method and system based on block chain
CN117592989A
Cited By
Payment order full-process intelligent processing method, device and equipment and storage medium
CN121010362A
A payment order whole-process intelligent processing method, device and equipment and storage medium
CN121010362B