E-commerce transaction security system based on blockchain
Through the blockchain-based e-commerce transaction guarantee system, the accuracy and security issues of geographical location data in e-commerce transactions are solved, real-time anomaly detection and rapid response are achieved, ensuring the smooth progress of transactions and the improvement of user trust.
Patent Information
- Application Number
- CN202410904200.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-08
AI Technical Summary
There are problems with the accuracy and consistency of geographical location data in e-commerce transactions. Data may be tampered with or forged during transmission and storage, and there is a lack of real-time anomaly detection and response capabilities, which affects the security and smooth progress of transactions.
Adopt a blockchain-based e-commerce transaction guarantee system, including user identity authentication module, transaction record module, smart contract module, geographical location verification module, location data sharing module, location anomaly detection module and location data privacy protection module, through encryption technology and machine learning algorithms ensure accuracy, security and real-time monitoring of geolocation data, automatically triggering alerts and dispute resolution.
It improves the accuracy and consistency of geographical location data, prevents tampering and forgery, enables real-time anomaly detection and rapid response, and enhances transaction security and user trust.
Smart Images

Figure CN118446695B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transaction management, and in particular to an e-commerce transaction guarantee system based on blockchain. Background Art
[0002] With the rapid development of e-commerce, the volume of online transactions has increased dramatically, and the security of transactions has become one of the key factors restricting the further development of e-commerce. At present, there are problems such as information leakage, transaction fraud, and credit risk in the process of e-commerce transactions, which seriously affect the trust of users and the credibility of the platform. The traditional e-commerce transaction security system mainly relies on centralized trust institutions for management, which is not only costly but also has the risk of single point failure. Blockchain technology, as a decentralized distributed ledger technology, has the characteristics of transparency, immutability and traceability, and provides new ideas and solutions for solving security problems in e-commerce transactions.
[0003] Although a variety of e-commerce transaction assurance systems have been launched, there are still some unpopular and critical issues in geolocation service assurance that have not been effectively resolved:
[0004] Accuracy and consistency of location data: The location data captured at a single time may be affected by signal interference, equipment failure or other environmental factors, resulting in inaccurate data. This requires the aggregation and analysis of multiple location data to improve data accuracy.
[0005] Security and tamper-proofing of location data: Geographic location information may be tampered with or forged during transmission and storage, resulting in the failure of location-related services during transactions. The use of encryption technology and blockchain technology can effectively prevent data tampering and forgery.
[0006] Real-time anomaly detection and response capabilities: In geo-location-related services, timely detection and handling of anomalies such as location deviation, stagnation, and location forgery are crucial to ensure the smooth progress of transactions. This requires real-time monitoring and analysis through advanced machine learning algorithms to trigger alarms in a timely manner and notify relevant parties for processing.
[0007] In order to solve the above problems, the present invention proposes an e-commerce transaction security system based on blockchain. Summary of the invention
[0008] Based on the above objectives, the present invention provides an e-commerce transaction security system based on blockchain.
[0009] The blockchain-based e-commerce transaction security system includes:
[0010] User identity authentication module, which is used to authenticate users when registering and logging in, generate a unique user identity, and encrypt and store user information on the blockchain;
[0011] The transaction record module is used to record the detailed information of e-commerce transactions, including the identities of both parties to the transaction, transaction time, transaction amount and transaction status, and store the detailed information in the form of blockchain transactions;
[0012] Smart contract module, which is used to create and execute transaction contracts on the blockchain, including commodity purchase contracts, payment contracts and service contracts, to ensure that both parties to the transaction operate in accordance with the contract agreement;
[0013] The geographic location verification module is used to verify the user's geographic location during the transaction process, including location capture, encryption and storage, and uses a location aggregation algorithm to verify multiple location data;
[0014] Location data sharing module, which is used to securely share verified location information with relevant service providers, including logistics companies, delivery personnel and customers, to ensure accurate delivery of information;
[0015] The location anomaly detection module is used to monitor and analyze geographic location information in real time, using machine learning algorithms to detect location anomalies, including location deviation, stagnation, and location falsification, automatically triggering alarms and notifying relevant parties;
[0016] The location dispute resolution module is used to provide location information based on blockchain records when disputes related to geographic location occur, and adopt smart contracts to automate and transparently resolve disputes;
[0017] The location data privacy protection module is used to encrypt the user's geographic location information to ensure the privacy protection of data during transmission and storage, and adopts homomorphic encryption algorithm to allow users to authorize the access and use of their location data.
[0018] Furthermore, the user identity authentication module specifically includes:
[0019] The multi-factor authentication submodule is used to authenticate users during registration and login, using a combination of multiple authentication methods, including password authentication, SMS verification code, email verification, and biometrics (such as fingerprint recognition, facial recognition, and voiceprint recognition) to improve the security and accuracy of identity authentication;
[0020] The identity generation submodule is used to generate a unique user identity (UID) after the user successfully passes the identity authentication. The identity is generated based on the user's multiple identity information through a hash algorithm to ensure uniqueness and security;
[0021] The information encryption storage submodule is used to encrypt the user's identity information and unique user identity. The encryption algorithm adopts an advanced asymmetric encryption algorithm (such as RSA or ECC), and then stores the encrypted user information and identity on the blockchain to ensure the security and non-tamperability of data during transmission and storage.
[0022] Furthermore, the transaction record module specifically includes:
[0023] The transaction data collection submodule is used to collect detailed transaction information in real time during each transaction, including the identities of both parties to the transaction, transaction time, transaction amount and transaction status;
[0024] The data verification submodule is used to verify the accuracy and completeness of the collected transaction data by matching and verifying the identity provided by the user identity authentication module to ensure the authenticity of the identities of both parties to the transaction;
[0025] The transaction data encryption submodule is used to encrypt the verified transaction data and use a symmetric encryption algorithm (such as AES) to encrypt the data to ensure the security of the transaction data during storage and transmission;
[0026] The blockchain storage submodule is used to store encrypted transaction data in the form of blockchain transactions, and ensure the immutability and traceability of transaction data through the distributed ledger technology of blockchain.
[0027] Furthermore, the smart contract module specifically includes:
[0028] The contract creation submodule creates various types of transaction contracts on the blockchain, including commodity purchase contracts, payment contracts, and service contracts. When creating a contract, the user defines the terms and conditions of the contract through a graphical interface or programming language (such as Solidity);
[0029] The contract deployment submodule deploys the created smart contract to the blockchain to ensure the immutability and transparency of the contract terms. During the deployment process, the identities of the contract creator and executor are verified through the user identity authentication module;
[0030] The contract execution submodule is used to automatically execute the contract terms when the contract trigger conditions are met. During the contract execution process, the contract execution submodule will monitor the operations of both parties in real time and perform corresponding processing according to the preset contract terms, including payment of funds, confirmation of product delivery or provision of services;
[0031] The contract verification submodule is used to verify during the contract execution process to ensure that both parties to the transaction operate in accordance with the contract agreement. It verifies the identities of both parties to the transaction and the authenticity of the transaction data by interacting with the transaction record module and the user identity authentication module;
[0032] The contract recording submodule is used to record the detailed information of contract creation, deployment and execution on the blockchain, including contract terms, execution status and results, to ensure the transparency and traceability of the contract execution process.
[0033] Furthermore, the geographic location verification module specifically includes:
[0034] The location capture submodule is used to capture the user's geographic location information in real time during the transaction process, and obtain accurate location data through GPS network positioning technology. The location information is expressed in the form of longitude and latitude;
[0035] The location encryption submodule is used to encrypt the captured geographic location information to ensure the security of the location information during transmission and storage;
[0036] The location storage submodule is used to store the encrypted geographic location information on the blockchain, using the distributed ledger technology of the blockchain to ensure the immutability and traceability of the location information;
[0037] The location aggregation algorithm submodule is used to aggregate and verify the location data captured multiple times, and analyze the consistency and accuracy of multiple location data through the K-means clustering algorithm;
[0038] The location verification submodule verifies the aggregated location information during the transaction process and ensures the authenticity and legitimacy of the user's geographic location information through data interaction with the user identity authentication module and the transaction record module.
[0039] Furthermore, the K-means algorithm is specifically as follows:
[0040] Initialize K cluster centers ;
[0041] Each location data point Assign to the nearest cluster center:
[0042] ,in, Indicates A collection of clusters, Represents a location data point With cluster center The Euclidean distance between Represents a location data point With other cluster centers The Euclidean distance between are the indices of all cluster centers, ranging from: ,and ≠ ;
[0043] Recompute the center of each cluster: ;
[0044] Repeat the assignment and calculation of cluster centers until the cluster centers no longer change significantly;
[0045] Aggregate multiple captured geolocation data into K Clusters are formed, each cluster represents the average value of a location, and abnormal location information is identified and filtered out to improve the accuracy and consistency of location data.
[0046] Furthermore, the location verification submodule specifically includes:
[0047] Get the unique user identity in the user authentication module;
[0048] Obtain transaction information corresponding to a unique user identity in a transaction record module, including multiple location data;
[0049] Use K-means clustering algorithm to aggregate multiple location data to obtain location cluster centers;
[0050] The location data of the cluster center is verified to ensure the consistency and accuracy of the location data.
[0051] Furthermore, the location data sharing module specifically includes:
[0052] Location data request: The relevant service provider sends a location information request to the location data sharing module, and the request includes the identity of the service provider and the required location information scope;
[0053] Identity and authority verification: The location data request submodule verifies the identity and authority of the requester to ensure that only legitimate service providers can access location information;
[0054] After verification, the location data sharing module forwards the request to the location data encryption submodule.
[0055] Data encryption: The location data encryption submodule performs secondary encryption processing on the location information verified by the location verification module, and uses an asymmetric encryption algorithm (such as RSA) to encrypt the data. The encryption formula is as follows: encrypted location data = RSA public key (verified location data);
[0056] Data transmission: The encrypted geolocation information is transmitted to the verified service provider via the HTTPS communication channel;
[0057] Data decryption: The recipient (such as logistics companies, delivery personnel, and customers) uses the private key to decrypt the received geolocation information.
[0058] Furthermore, the location anomaly detection module receives the real-time geographic location information of the location capture submodule, specifically including:
[0059] The location data preprocessing submodule preprocesses the received location information data, including data cleaning, denoising and standardization to ensure data quality;
[0060] The anomaly detection algorithm submodule uses a time series-based LSTM (Long Short-Term Memory) network to analyze and detect preprocessed location data, identify location anomalies, including location deviation, stagnation, and location forgery, and input historical location data (such as longitude and latitude data over a period of time) into the LSTM network, which outputs the predicted current location: ,in, Indicates time The location coordinates of Represents the position coordinates of the next moment predicted by LSTM;
[0061] The alarm trigger submodule automatically triggers an alarm when an abnormal position is detected and generates an abnormality report;
[0062] The notification submodule notifies relevant parties, including logistics companies, delivery personnel, and customers, of abnormal reports and alarm information in real time through the HTTPS communication channel.
[0063] Furthermore, the position deviation detection is achieved by comparing the position predicted by LSTM with the actual position, and calculating the position deviation:
[0064] Deviation ;
[0065] in, 实际 , 实际 Indicates the actual position coordinates. When the deviation exceeds the set threshold, it is judged as position deviation;
[0066] The stagnation detection is performed by analyzing the position change over a period of time. If the position change is less than a set threshold, it is judged as stagnation:
[0067] Location
[0068] in, 上次 , 上次 Indicates the last recorded location coordinates. If If the position is less than the set threshold, the user's position is considered stagnant;
[0069] The location forgery detection: the forged location information features are identified by training the classification model, and the SVM classification algorithm is used for detection. The feature vector is set as , model output :
[0070] ,in, Indicates the classification result, 0 is normal and 1 is fake.
[0071] Beneficial effects of the present invention:
[0072] The present invention obtains the user's geographic location information in real time through the location capture submodule, uses positioning technology to ensure the accuracy of location data, and the location aggregation algorithm submodule adopts the K-means clustering algorithm to aggregate and analyze the geographic location data captured multiple times, identifies and filters out abnormal data points, effectively improves the accuracy and consistency of location data, and prevents erroneous judgments caused by single data deviations.
[0073] In the present invention, the anomaly detection algorithm submodule analyzes and detects the preprocessed location data through the LSTM algorithm based on the time series, and identifies location anomalies (such as location deviation, stagnation and location forgery). Location forgery detection identifies the characteristics of forged geographic location information through the SVM classification model to ensure the accuracy and reliability of detection. When a location anomaly is detected, the alarm triggering submodule automatically generates an abnormal report and triggers an alarm, and the notification submodule notifies the relevant parties (including logistics companies, delivery personnel and customers) in real time through a secure communication channel to achieve rapid response and processing. Through these measures, the system can promptly detect and handle geographic location anomalies to ensure the smooth progress of e-commerce transactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0075] Figure 1 A schematic diagram of system function modules according to an embodiment of the present invention;
[0076] Figure 2 Schematic diagram of a position anomaly detection module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0077] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0078] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0079] like Figure 1-Figure 2 As shown, the blockchain-based e-commerce transaction security system includes:
[0080] User identity authentication module, which is used to authenticate users when registering and logging in, generate a unique user identity, and encrypt and store user information on the blockchain;
[0081] The transaction record module is used to record the detailed information of e-commerce transactions, including the identities of both parties to the transaction, transaction time, transaction amount and transaction status, and store the detailed information in the form of blockchain transactions;
[0082] Smart contract module, which is used to create and execute transaction contracts on the blockchain, including commodity purchase contracts, payment contracts and service contracts, to ensure that both parties to the transaction operate in accordance with the contract agreement;
[0083] The location verification module is used to verify the user's location during the transaction process, including location capture, encryption and storage. It uses a location aggregation algorithm to verify multiple location data to improve the accuracy of location data. Single location data may be affected by signal interference, equipment failure or other environmental factors, resulting in inaccurate location data. Through the aggregation and analysis of multiple location data, abnormal data points can be filtered out to improve the accuracy of location data.
[0084] Location data sharing module, which is used to securely share verified location information with relevant service providers, including logistics companies, delivery personnel and customers, to ensure accurate delivery of information;
[0085] The location anomaly detection module is used to monitor and analyze geographic location information in real time, using machine learning algorithms to detect location anomalies, including location deviation, stagnation, and location falsification, automatically triggering alarms and notifying relevant parties;
[0086] The location dispute resolution module is used to provide location information based on blockchain records when disputes related to geographic location occur, and adopt smart contracts to automate and transparently resolve disputes;
[0087] The location data privacy protection module is used to encrypt the user's geographic location information to ensure the privacy protection of data during transmission and storage, and adopts homomorphic encryption algorithm to allow users to authorize the access and use of their location data.
[0088] The user identity authentication module specifically includes:
[0089] The multi-factor authentication submodule is used to authenticate users during registration and login, using a combination of multiple authentication methods, including password authentication, SMS verification code, email verification, and biometrics (such as fingerprint recognition, facial recognition, and voiceprint recognition) to improve the security and accuracy of identity authentication;
[0090] The identity generation submodule is used to generate a unique user identity (UID) after the user successfully passes the identity authentication. The identity is generated based on the user's multiple identity information through a hash algorithm to ensure uniqueness and security;
[0091] The information encryption storage submodule is used to encrypt the user's identity information and unique user identity. The encryption algorithm adopts an advanced asymmetric encryption algorithm (such as RSA or ECC), and then stores the encrypted user information and identity on the blockchain to ensure the security and non-tamperability of data during transmission and storage.
[0092] The transaction record module specifically includes:
[0093] The transaction data collection submodule is used to collect detailed transaction information in real time during each transaction, including the identities of both parties to the transaction, transaction time, transaction amount and transaction status;
[0094] The data verification submodule is used to verify the accuracy and completeness of the collected transaction data by matching and verifying the identity provided by the user identity authentication module to ensure the authenticity of the identities of both parties to the transaction;
[0095] The transaction data encryption submodule is used to encrypt the verified transaction data and use a symmetric encryption algorithm (such as AES) to encrypt the data to ensure the security of the transaction data during storage and transmission;
[0096] The blockchain storage submodule is used to store encrypted transaction data in the form of blockchain transactions, and ensure the immutability and traceability of transaction data through the distributed ledger technology of blockchain.
[0097] The smart contract module specifically includes:
[0098] The contract creation submodule creates various types of transaction contracts on the blockchain, including commodity purchase contracts, payment contracts, and service contracts. When creating a contract, the user defines the terms and conditions of the contract through a graphical interface or programming language (such as Solidity);
[0099] The contract deployment submodule deploys the created smart contract to the blockchain to ensure the immutability and transparency of the contract terms. During the deployment process, the identities of the contract creator and executor are verified through the user identity authentication module;
[0100] The contract execution submodule is used to automatically execute the contract terms when the contract trigger conditions are met. During the contract execution process, the contract execution submodule will monitor the operations of both parties in real time and perform corresponding processing according to the preset contract terms, including payment of funds, confirmation of product delivery or provision of services;
[0101] The contract verification submodule is used to verify during the contract execution process to ensure that both parties to the transaction operate in accordance with the contract agreement. It verifies the identities of both parties to the transaction and the authenticity of the transaction data by interacting with the transaction record module and the user identity authentication module;
[0102] The contract recording submodule is used to record the detailed information of contract creation, deployment and execution on the blockchain, including contract terms, execution status and results, to ensure the transparency and traceability of the contract execution process.
[0103] The geographic location verification module specifically includes:
[0104] The location capture submodule is used to capture the user's geographic location information in real time during the transaction process, and obtain accurate location data through GPS network positioning technology. The location information is expressed in the form of longitude and latitude, for example:
[0105] LocationData = (latitude, longitude);
[0106] The location encryption submodule is used to encrypt the captured location information to ensure the security of the location information during transmission and storage. The encryption formula is as follows: encrypted location data = AESkey (location data) where AESkey means using the key key for AES encryption;
[0107] The location storage submodule is used to store the encrypted geographic location information on the blockchain, using the distributed ledger technology of the blockchain to ensure the immutability and traceability of the location information;
[0108] The location aggregation algorithm submodule is used to aggregate and verify the location data captured multiple times, and analyze the consistency and accuracy of multiple location data through the K-means clustering algorithm;
[0109] The location verification submodule verifies the aggregated location information during the transaction process and ensures the authenticity and legitimacy of the user's geographic location information through data interaction with the user identity authentication module and the transaction record module.
[0110] The details of the K-means algorithm are as follows:
[0111] Initialize K cluster centers ;
[0112] Each location data point Assign to the nearest cluster center:
[0113] ,in, Indicates A collection of clusters, Represents a location data point With cluster center The Euclidean distance between Represents a location data point With other cluster centers The Euclidean distance between are the indices of all cluster centers, ranging from: ,and ≠ ;
[0114] Recompute the center of each cluster: ;
[0115] Repeat the assignment and calculation of cluster centers until the cluster centers no longer change significantly;
[0116] Aggregate multiple captured geolocation data into KClusters are formed, each cluster represents the average value of a location, and abnormal location information is identified and filtered out to improve the accuracy and consistency of location data.
[0117] During the transaction process, the location verification submodule verifies the authenticity and legitimacy of the aggregated geographic location information through data interaction with the user identity authentication module and the transaction record module, including:
[0118] Get the unique user identity in the user authentication module;
[0119] Obtain transaction information corresponding to a unique user identity in a transaction record module, including multiple location data;
[0120] Use K-means clustering algorithm to aggregate multiple location data to obtain location cluster centers;
[0121] The location data of the cluster center is verified to ensure the consistency and accuracy of the location data.
[0122] Through the above calculation and verification process, the system can effectively improve the accuracy and reliability of location data, prevent location-related fraud, and ensure the smooth progress of e-commerce transactions.
[0123] Through multiple submodules of the geographic location verification module, comprehensive verification of the user's geographic location is achieved during the transaction process. The location capture submodule ensures the accuracy of location data through a variety of positioning technologies, the location encryption submodule ensures the security of location information through encryption algorithms, the location storage submodule ensures the immutability and traceability of data through blockchain technology, the location aggregation algorithm submodule aggregates and analyzes multiple location data through the K-means clustering algorithm, identifies and filters out abnormal data, and improves the verification accuracy of location data. The location verification submodule verifies the authenticity and legitimacy of geographic location information through data interaction, effectively improving the reliability of geographic location services and user trust.
[0124] The location data sharing module specifically includes:
[0125] Location data request: The relevant service provider sends a location information request to the location data sharing module, and the request includes the identity of the service provider and the required location information scope;
[0126] Identity and authority verification: The location data request submodule verifies the identity and authority of the requester to ensure that only legitimate service providers can access location information;
[0127] After verification, the location data sharing module forwards the request to the location data encryption submodule.
[0128] Data encryption: The location data encryption submodule performs secondary encryption processing on the location information verified by the location verification module, and uses an asymmetric encryption algorithm (such as RSA) to encrypt the data. The encryption formula is as follows: encrypted location data = RSA public key (verified location data);
[0129] Data transmission: The encrypted geolocation information is transmitted to the verified service provider via the HTTPS communication channel;
[0130] Data decryption: The recipient (such as logistics companies, delivery personnel, and customers) uses the private key to decrypt the received geographic location information. The decryption formula is as follows: decrypted location data = RSAprivate key (encrypted location data), ensuring the integrity and readability of the data.
[0131] The location anomaly detection module receives the real-time geographic location information from the location capture submodule, including:
[0132] The location data preprocessing submodule preprocesses the received location information data, including data cleaning, denoising and standardization to ensure data quality;
[0133] The anomaly detection algorithm submodule uses a time series-based LSTM (Long Short-Term Memory) network to analyze and detect preprocessed location data, identify location anomalies, including location deviation, stagnation, and location forgery, and input historical location data (such as longitude and latitude data over a period of time) into the LSTM network, which outputs the predicted current location: ,in, Indicates time The location coordinates of Represents the position coordinates of the next moment predicted by LSTM;
[0134] The alarm trigger submodule automatically triggers an alarm when an abnormal position is detected and generates an abnormality report;
[0135] The notification submodule notifies relevant parties, including logistics companies, delivery personnel, and customers, of abnormal reports and alarm information in real time through the HTTPS communication channel.
[0136] LSTM is a special RNN (recurrent neural network) that can capture long-term dependencies. The details are as follows:
[0137] Input Gate: ;
[0138] Forget Gate: ;
[0139] Output Gate: ;
[0140] Candidate memory cells: ;
[0141] Memory unit update: ;
[0142] Hide status updates: ;
[0143] in, is the Sigmoid function, * represents element-by-element multiplication, and are parameters that need to be trained.
[0144] Position deviation detection is achieved by comparing the position predicted by LSTM with the actual position and calculating the position deviation:
[0145] Deviation ;
[0146] in, 实际 , 实际 Indicates the actual position coordinates. When the deviation exceeds the set threshold, it is judged as position deviation;
[0147] Stagnation detection analyzes the position change over a period of time. If the position change is less than the set threshold, it is considered stagnant:
[0148] Location
[0149] in, 上次 , 上次 Indicates the last recorded location coordinates. If If the position is less than the set threshold, the user's position is considered stagnant;
[0150] Location forgery detection: We train a classification model to identify forged location information features and use the SVM classification algorithm for detection. Let the feature vector be , model output :
[0151] ,in, Indicates the classification result, 0 is normal and 1 is fake.
[0152] The SVM classification model is trained and applied as follows: In order to use the SVM (Support Vector Machine) classification model to identify forged geolocation information features, the following steps are required:
[0153] Data preparation: Collect and annotate geographic location data, including normal location data and fake location data.
[0154] Feature extraction: Extract features from geolocation data.
[0155] Model training: Use the SVM algorithm to train the classification model.
[0156] Model application: The extracted features are input into the trained SVM model for classification.
[0157] The specific plan is as follows:
[0158] Collect normal location data and fake location data, and mark the category of each data (normal or fake). The dataset is represented as: ;in, Indicates The feature vector of the position data, represents the class label (0 for normal, 1 for fake).
[0159] Extract meaningful features from geographic location data, including: location change rate, location offset, statistical characteristics of historical location data (such as mean, variance, etc.), and location change patterns within a time interval, for example, feature vector It can be expressed as:
[0160] rate, offset, mean, variance, ..
[0161] Model training: Use the extracted feature vectors and corresponding labels to train the SVM classification model. The goal of SVM is to find a hyperplane to separate the feature spaces of different categories. The model training is as follows:
[0162] ,in, is the weight vector, is the bias term, is the regularization parameter, is the hinge loss function, is a regularization term. By minimizing this regularization term, the classification model will tend to choose a smaller weight vector, thereby reducing the risk of overfitting.
[0163] Model application: The trained SVM model is used to classify new location data. For a given new location data feature vector , the output of the SVM model is:
[0164] ,in, is the classification result, 0 means normal and 1 means forged.
[0165] Therefore: In the above example, Model represents the trained SVM model. is the feature vector extracted from the geographic location data, It is the classification result, which is predicted by the SVM model.
[0166] The specific contents of the location dispute resolution module are as follows:
[0167] The dispute triggering submodule is used to receive dispute applications and automatically trigger the dispute resolution process when a geographical location-related dispute occurs;
[0168] The blockchain data retrieval submodule is used to retrieve relevant geographic location information records from the blockchain;
[0169] The smart contract execution submodule is used to automatically execute dispute resolution steps during the dispute resolution process using preset smart contracts, including data verification, evidence provision, and adjudication steps;
[0170] The transparent recording submodule records every step and final result of dispute resolution on the blockchain to ensure the transparency and fairness of the entire process.
[0171] The content of the location data privacy protection module includes:
[0172] The location data encryption submodule is used to encrypt the user's location information, using the AES symmetric encryption algorithm to ensure the security of data during transmission and storage, and generate the initial ciphertext;
[0173] Homomorphic encryption submodule: The initial ciphertext is encrypted again using a homomorphic encryption algorithm to generate homomorphically encrypted ciphertext. The service provider can perform calculation operations on the encrypted geographic location information without decrypting the homomorphically encrypted ciphertext.
[0174] The access control submodule manages the user's access rights to their location data. Users can set access rights through the authorization management interface, including authorizing which service providers can access their encrypted geographic location information. Only service providers authorized by the user can obtain encrypted data and perform homomorphic computing.
[0175] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present invention is limited to these examples. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity.
[0176] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. The blockchain-based e-commerce transaction security system is characterized by: include: User identity authentication module, which is used to authenticate users when registering and logging in, generate a unique user identity, and encrypt and store user information on the blockchain; The transaction record module is used to record the detailed information of e-commerce transactions, including the identities of both parties to the transaction, transaction time, transaction amount and transaction status, and store the detailed information in the form of blockchain transactions; Smart contract module, which is used to create and execute transaction contracts on the blockchain, including commodity purchase contracts, payment contracts and service contracts, to ensure that both parties to the transaction operate in accordance with the contract agreement; The geographic location verification module is used to verify the user's geographic location during the transaction process, including location capture, encryption and storage, and uses a location aggregation algorithm to verify multiple location data. The geographic location verification module specifically includes: The location capture submodule is used to capture the user's geographic location information in real time during the transaction process and obtain accurate location data through GPS network positioning technology; The location encryption submodule is used to encrypt the captured geographic location information to ensure the security of the location information during transmission and storage; The location storage submodule is used to store the encrypted geographic location information on the blockchain, using the distributed ledger technology of the blockchain to ensure the immutability and traceability of the location information; The location aggregation algorithm submodule is used to aggregate and verify the location data captured multiple times, and analyze the consistency and accuracy of multiple location data through the K-means clustering algorithm; The location verification submodule verifies the aggregated location information during the transaction process and ensures the authenticity and legitimacy of the user's location information through data interaction with the user identity authentication module and the transaction record module; The details of the K-means clustering algorithm are as follows: Initialize K cluster centers ; Each location data point Assign to the nearest cluster center: ,in, Indicates A collection of clusters, Represents a location data point With cluster center The Euclidean distance between Represents a location data point With other cluster centers The Euclidean distance between are the indices of all cluster centers, ranging from: ,and ≠ ; Recompute the center of each cluster: ; Repeat the assignment and calculation of cluster centers until the cluster centers no longer change significantly; Aggregate multiple captured geolocation data into K Clusters, each cluster represents the average value of a location, identify and filter out abnormal location information, and improve the accuracy and consistency of location data; A location data sharing module, which is used to securely share verified location information with relevant service providers, including logistics companies, delivery personnel, and customers; The location anomaly detection module is used to monitor and analyze geographic location information in real time, and uses machine learning algorithms to detect location anomalies, including location deviation detection, stagnation detection, and location forgery detection, automatically triggering alarms and notifying relevant parties. The location anomaly detection module receives real-time geographic location information from the location capture submodule, specifically including: The location data preprocessing submodule preprocesses the received location information data, including data cleaning, denoising and standardization to ensure data quality; The anomaly detection algorithm submodule uses a time series-based LSTM network to analyze and detect preprocessed location data and identify location anomalies, including location deviation detection, stagnation detection, and location forgery detection. The historical location data is input into the LSTM network, and the LSTM network outputs the predicted current location: ,in, Indicates time The location coordinates of Represents the position coordinates of the next moment predicted by LSTM; The alarm trigger submodule automatically triggers an alarm when an abnormal position is detected and generates an abnormality report; The notification submodule notifies relevant parties, including logistics companies, delivery personnel, and customers, of abnormal reports and alarm information in real time through the HTTPS communication channel; The position deviation detection is achieved by comparing the position predicted by LSTM with the actual position and calculating the position deviation: Deviation ; in, 实际 , 实际 Indicates the actual position coordinates. When the deviation exceeds the set threshold, it is judged as position deviation; The stagnation detection is performed by analyzing the position change over a period of time. If the position change is less than a set threshold, it is judged as stagnation: Location in, 上次 , 上次 Indicates the last recorded location coordinates. If If the position is less than the set threshold, the user's position is considered stagnant; The location forgery detection: the forged location information features are identified by training the classification model, and the SVM classification algorithm is used for detection. The feature vector is set as , model output : ,in, Indicates the classification result, 0 is normal and 1 is forged; The location dispute resolution module is used to provide location information based on blockchain records when disputes related to geographic location occur, and adopt smart contracts to automate and transparently resolve disputes; The location data privacy protection module is used to encrypt the user's geographic location information to ensure the privacy protection of data during transmission and storage, and adopts a homomorphic encryption algorithm to allow users to authorize the access and use of their location data.
2. The blockchain-based e-commerce transaction security system according to claim 1 is characterized in that: The user identity authentication module specifically includes: The multi-factor authentication submodule is used to authenticate users during registration and login, using a combination of multiple authentication methods, including password authentication, SMS verification code, email verification, and biometrics, to improve the security and accuracy of identity authentication; The identity generation submodule is used to generate a unique user identity after the user successfully passes the identity authentication. The identity is generated based on the user's multiple identity information through a hash algorithm to ensure uniqueness and security; The information encryption storage submodule is used to encrypt the user's identity information and unique user identity, and then store the encrypted user information and identity on the blockchain to ensure the security and non-tamperability of data during transmission and storage.
3. The blockchain-based e-commerce transaction security system according to claim 1 is characterized in that: The transaction record module specifically includes: The transaction data collection submodule is used to collect detailed transaction information in real time during each transaction, including the identities of both parties to the transaction, transaction time, transaction amount and transaction status; The data verification submodule is used to verify the accuracy and completeness of the collected transaction data by matching and verifying the identity provided by the user identity authentication module to ensure the authenticity of the identities of both parties to the transaction; The transaction data encryption submodule is used to encrypt the verified transaction data and use a symmetric encryption algorithm to encrypt the data to ensure the security of the transaction data during storage and transmission; The blockchain storage submodule is used to store encrypted transaction data in the form of blockchain transactions, and ensure the immutability and traceability of transaction data through the distributed ledger technology of blockchain.
4. The blockchain-based e-commerce transaction security system according to claim 1, characterized in that: The smart contract module specifically includes: The contract creation submodule creates various types of transaction contracts on the blockchain, including commodity purchase contracts, payment contracts, and service contracts. When creating a contract, the user defines the terms and conditions of the contract through a graphical interface; The contract deployment submodule deploys the created smart contract to the blockchain to ensure the immutability and transparency of the contract terms. During the deployment process, the identities of the contract creator and executor are verified through the user identity authentication module; The contract execution submodule is used to automatically execute the contract terms when the contract trigger conditions are met. During the contract execution process, the contract execution submodule will monitor the operations of both parties in real time and perform corresponding processing according to the preset contract terms, including payment of funds, confirmation of product delivery or provision of services; The contract verification submodule is used to verify the contract during execution to ensure that both parties to the transaction operate in accordance with the contract. It verifies the identities of both parties to the transaction and the authenticity of the transaction data by interacting with the transaction record module and the user identity authentication module. The contract recording submodule is used to record the detailed information of contract creation, deployment and execution on the blockchain, including contract terms, execution status and results, to ensure the transparency and traceability of the contract execution process.
5. The blockchain-based e-commerce transaction security system according to claim 1, characterized in that: The location verification submodule specifically includes: Get the unique user identity in the user authentication module; Obtain transaction information corresponding to a unique user identity in a transaction record module, including multiple location data; Use K-means clustering algorithm to aggregate multiple location data to obtain location cluster centers; The location data of the cluster center is verified to ensure the consistency and accuracy of the location data.
6. The blockchain-based e-commerce transaction security system according to claim 1, characterized in that: The location data sharing module specifically includes: Location data request: The relevant service provider sends a location information request to the location data sharing module, and the request includes the identity of the service provider and the required location information scope; Identity and authority verification: The location data request submodule verifies the identity and authority of the requester to ensure that only legitimate service providers can access location information; After verification, the location data sharing module forwards the request to the location data encryption submodule; Data encryption: The location data encryption submodule performs secondary encryption processing on the location information verified by the location verification module; Data transmission: The encrypted geolocation information is transmitted to the verified service provider via the HTTPS communication channel; Data decryption: The recipient uses the private key to decrypt the received geolocation information.
