Block chain enabling consumption trajectory traceability prediction method
By collecting and standardizing consumer data through multiple channels, and constructing a blockchain network for secure storage and supervision, the problem of incomplete consumer data has been solved. This enables precise tracing and accurate prediction of consumer behavior, improves data credibility and the accuracy of prediction models, and meets the needs of both merchants and consumers.
Patent Information
- Application Number
- CN202511295190.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-11-14
AI Technical Summary
Incomplete consumer data collection, improper processing, insecure storage, difficulties in tracing, and inaccurate predictions result in poor consumer behavior prediction performance, failing to meet the needs of merchants for marketing and consumers for personalized services.
By collecting consumer data through multiple channels, standardizing the data, and constructing a blockchain network that includes merchants, consumers, and regulatory nodes, the data is cleaned and denoised. The immutability of the blockchain and the regulatory nodes ensure secure storage. Based on the high-quality data, a consumer behavior prediction model is trained to achieve accurate traceability and prediction of consumer behavior.
It enables comprehensive collection, secure storage, and precise traceability of consumer data, improving data credibility and the accuracy of predictive models, providing valuable marketing advice and personalized services, and protecting consumer privacy.
Smart Images

Figure CN120956404A_ABST
Abstract
Description
Technical Field
[0001] This invention application relates to the field of consumer forecasting technology, and specifically discloses a blockchain-enabled method for predicting consumer trajectory. Background Technology
[0002] In today's digital age, the consumer market is exhibiting a diversified and complex development trend, with consumer behavior data scattered across various transaction stages and platforms. Currently, there are many shortcomings in the management of consumer data: on the one hand, data collection channels are singular, making it difficult to comprehensively reflect the full picture of consumer spending, and the collected data lacks unified standardized processing, resulting in chaotic data formats and inefficient utilization; on the other hand, data storage largely relies on centralized platforms, posing risks of data tampering and leakage, while severe data barriers between different platforms hinder the accurate tracing of consumption patterns. In terms of consumer behavior prediction, issues such as incomplete and inaccurate basic data, as well as insecure storage, result in poor training performance of predictive models. The predicted results deviate significantly from reality, failing to meet the needs of businesses in developing marketing strategies and consumers in obtaining personalized services. Furthermore, the lack of an effective regulatory mechanism hinders the standardized management of consumer data throughout its entire lifecycle, further impacting its reliability and application value. Blockchain technology, with its decentralized, immutable, and traceable characteristics, offers a new approach to solving the aforementioned problems. Therefore, it is necessary to propose a blockchain-based method for tracing and predicting consumption patterns. This method, through multi-channel data collection, standardized processing, secure storage, and effective supervision, can achieve precise tracing of consumption patterns and accurate prediction of consumer behavior. Summary of the Invention
[0003] The purpose of this invention is to overcome the problems of incomplete consumer data collection, non-standard processing, insecure storage, difficulty in tracing, and inaccurate prediction in the existing technology, and to provide a blockchain-enabled consumer trajectory tracing and prediction method.
[0004] To achieve the above objectives, the basic solution of this invention provides a blockchain-enabled consumption trajectory tracing and prediction method, comprising the following steps: S001: Data collection and preprocessing: Collect consumer consumption data from multiple channels and standardize the collected data. S002: Data Storage and Blockchain Network Construction: Construct a blockchain network consisting of merchant nodes, consumer nodes, and regulatory nodes. The blockchain network contains consumer information blocks, which include user identifier, consumption time, product information, transaction amount, transaction location, merchant identifier, hash value, and timestamp. After the blockchain network is constructed, data cleaning and noise reduction preprocessing operations are performed. The preprocessed consumer information is encrypted and uploaded to the blockchain network for storage, and the stored management data can be accessed and manipulated. S003: Consumption Trajectory Tracing: Based on consumption data, the tracing requester is traced through consumer nodes and the blockchain network. The blockchain network extracts all consumption information blocks corresponding to the user identifier in the request. By verifying the hash value and timestamp of each consumption information block, the integrity and authenticity of the consumption trajectory are determined, forming a complete consumption trajectory tracing result. S004: Consumer Behavior Prediction: Extract historical consumption information blocks of target consumers from the blockchain, preprocess them to obtain a training dataset; input the training dataset into a preset consumer behavior prediction model for training to obtain an optimized consumer behavior prediction model; input the latest consumption information of target consumers into the optimized consumer behavior prediction model to obtain the consumer behavior prediction result, and store the consumer behavior prediction result in the blockchain network.
[0005] Furthermore, the data cleaning and denoising includes removing duplicate data, correcting erroneous data, filling in missing values, and data smoothing.
[0006] Furthermore, the consumption data includes transaction records from online e-commerce platforms, consumption data from offline physical stores, payment information from payment platforms, and related discussions by consumers on social media.
[0007] Furthermore, the consumer node is used to initiate consumption behavior, authorize traceability requests, and view its own consumption trajectory and prediction results; the merchant node is used to collect and generate consumption information blocks and participate in blockchain consensus verification; the third-party service node is used to provide data analysis services, consumption behavior prediction model training services, and conduct consumption trajectory traceability after obtaining authorization.
[0008] Furthermore, the product information includes product name, product code, product category, and product specifications; the hash value includes the hash value of the current consumption information block and the hash value of the previous consumption information block.
[0009] Furthermore, the specific process for verifying the hash value and timestamp of each consumption information block is as follows: calculate the hash value of the current consumption information block and compare it with the hash value stored in the block. If they match, the block has not been tampered with. At the same time, verify whether the time sequence of each consumption information block is continuous based on the timestamp. If they are continuous, the consumption trajectory is determined to be complete.
[0010] Furthermore, the consumer behavior prediction results are stored in the blockchain network to form prediction result blocks, which include user identifiers, prediction time, prediction content, prediction models, and hash values.
[0011] The principle and effect of this basic scheme are as follows: 1. This invention collects consumer data through multiple channels, enabling comprehensive acquisition of consumer information. After standardization, the data format is unified, laying a solid data foundation for subsequent traceability and prediction work. 2. Constructing a blockchain network that includes regulatory nodes not only leverages the characteristics of blockchain to ensure data security and immutability, but also enables effective supervision of the entire data lifecycle through regulatory nodes, thereby improving data credibility. 3. Before data storage, cleaning and noise reduction processes are performed to remove invalid and erroneous data, thereby improving data quality and making the consumption trajectory tracing results based on this data more accurate and reliable. 4. The consumer behavior prediction model is trained based on high-quality, securely stored historical consumption data, which effectively improves the prediction accuracy of the model, provides merchants with more valuable marketing suggestions, and enables consumers to obtain services that are more tailored to their needs. 5. By employing encryption technology to protect consumer information and combining it with the characteristics of blockchain, consumer privacy and security are maximized, and consumer trust in the use of data is enhanced. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 The diagram illustrates the overall steps of a blockchain-enabled consumption trajectory tracing and prediction method proposed in this application. Detailed Implementation
[0014] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0015] A blockchain-enabled method for tracing and predicting consumer behavior, Example 1 Figure 1 As shown: Includes the following steps: S001: Data Acquisition and Preprocessing Obtain consumer transaction records from online e-commerce platforms (such as Taobao and JD.com), including product names, transaction times, and amounts; collect consumer data from offline physical stores (such as supermarkets and clothing stores) through their POS systems; obtain payment information from payment platforms (such as Alipay and WeChat Pay); and crawl consumer discussion information about products from social media (such as Weibo and Xiaohongshu). The collected data is standardized, for example, the transaction time is uniformly converted into the format of "year-month-day hour:minute:second", the transaction amount is uniformly converted into a value in "yuan", and the product name is standardized. S002: Data Storage and Blockchain Network Construction Construct a blockchain network consisting of merchant nodes (such as servers of major supermarkets and e-commerce platforms), consumer nodes (consumers' mobile apps), and regulatory nodes (servers of market regulatory departments).
[0016] The consumption information block includes the user identifier (obtained by SHA-256 hashing the user's ID number), the consumption time "2024-05-10 14:30:25", the product information (name "XX Sports Shoes", code "SP005", category "Clothing", size "42"), the transaction amount "699 yuan", the transaction location "5th floor of XX Shopping Mall", the merchant identifier "SJ008", the hash value (the hash value of the current block and the hash value of the previous block are both calculated using the SHA-256 algorithm) and the timestamp. After the blockchain network is built, the data is cleaned and denoised: duplicate transaction records are removed, errors in product codes are corrected (such as changing "SP05" to "SP005"), missing transaction location information is filled in by associating payment locations, and the moving average method is used to smooth transaction amount data with large fluctuations. The pre-processed consumption information is encrypted using the RSA asymmetric encryption algorithm and then uploaded to the blockchain network for storage. Merchant nodes, consumer nodes, and regulatory nodes can access and manipulate the stored data according to their respective permissions. For example, consumer nodes can view their own consumption information, and regulatory nodes can supervise the flow of all data. S003: Tracing Consumption Patterns When a merchant acts as the traceability requester and obtains authorization from the consumer, it initiates a traceability request to the blockchain network through the consumer node. The request includes the identifier of the target user. Based on the user's identifier, the blockchain network extracts all corresponding consumption information blocks from the network. It verifies the hash value of each block, calculating that the hash value of the current block matches the stored hash value; it also checks the timestamps, noting that the consumption times are sequentially "2024-05-10 14:30:25" and "2024-05-15 10:15:30," etc., indicating a coherent timeline and confirming the completeness and authenticity of the consumption trajectory. This traceability result is then fed back to the merchant.
[0017] S004: Consumer Behavior Prediction Extract historical consumption information blocks of the target consumer from the past two years from the blockchain, preprocess them, including removing outliers and standardizing, to obtain a training dataset. The training dataset is input into a pre-defined decision tree prediction model for training. By adjusting the model parameters, an optimized model is obtained. The consumer's latest consumption information (purchase of "XX sports T-shirt" on June 1, 2024) is input into the optimized model to predict that the consumer may purchase "XX sports shorts" in the next month. The prediction result is used to generate a prediction result block, which includes the user identifier, prediction time "2024-06-02 09:10:00", prediction content "may purchase XX sports shorts in the next month", prediction model (decision tree model V2.0) and hash value, and is then encrypted and uploaded to the blockchain network for storage.
[0018] Regulatory nodes oversee the entire process to ensure that data collection is legal, storage is secure, traceability is standardized, and the prediction process is compliant. The method described in this embodiment enables comprehensive collection, secure storage, precise traceability, and accurate prediction of consumer data, providing strong support for the healthy development of the consumer market.
[0019] Example 2 This example uses a consumer who frequently purchases maternity and baby products to illustrate in detail the application process of blockchain-enabled consumption trajectory tracing and prediction method: S001: Data Acquisition and Preprocessing The system collects the consumer's transaction records from online maternal and infant e-commerce platforms (such as Tmall Baby and JD Baby), including the brand of formula milk powder purchased, the model of diapers, the purchase time and amount, etc.; it also collects the consumer's consumption data from the POS system of offline maternal and infant physical stores (such as XX Maternal and Infant Chain Store), covering information on products such as baby food and toys; it obtains relevant payment records from payment platforms (such as UnionPay), including payment time and payment method; and it collects the consumer's discussions about maternal and infant products from social media (such as Mama Help and parenting forums), such as reviews of a certain brand of formula milk powder and needs for baby food. The collected data is standardized, with all time formats standardized to "year-month-day hour:minute:second", transaction amounts standardized to "yuan", and product names standardized according to industry standards, such as standardizing "XX brand diapers" to "XX brand paper diapers". S002: Data Storage and Blockchain Network Construction A blockchain network was constructed, consisting of the e-commerce platform server, offline chain stores server (merchant nodes), consumers' mobile APP (consumer nodes), and the local market supervision bureau server (regulatory nodes). The consumption information block includes the user identifier (obtained by SHA-256 hashing the consumer's mobile phone number), the consumption time "2024-07-01 09:20:30", the product information (name "XX brand stage 3 milk powder", code "MY012", category "dairy products", specification "900g"), the transaction amount "298 yuan", the transaction location "XX City XX District XX Road XX Maternal and Infant Store", the merchant identifier "MY003", the hash value (the hash value of the current block and the hash value of the previous block calculated using the SHA-256 algorithm) and the timestamp. After constructing the blockchain network, data cleaning and noise reduction are performed: duplicate purchase records caused by system failures are deleted; the miswritten "MY12" in the product code is corrected to "MY012"; for an online purchase record that is missing a transaction location, the delivery address is filled in as "XX City XX District XX Community" by associating with the logistics delivery address; the exponential smoothing method is used to smooth the amount of milk powder purchased by the consumer to eliminate the impact of short-term fluctuations. The pre-processed consumption information is encrypted using the ECC asymmetric encryption algorithm and then uploaded to the blockchain network for storage. Consumers can view their consumption records via a mobile app, merchants can query their own transaction information, and regulatory nodes monitor the uploading and access of data in real time. S003: Tracing Consumption Patterns A manufacturer of maternal and infant products applied for traceability authorization from a consumer for product quality traceability. After obtaining authorization, the manufacturer initiated a traceability request to the blockchain network through a merchant node. The request included the consumer's user identifier. The blockchain network extracts all corresponding consumption information blocks based on the user's identifier, verifies the hash value of each block, and confirms that the calculated result matches the stored hash value. It also checks the timestamps; the consumption times are sequentially displayed as "2024-05-15 16:40:15," "2024-06-02 11:10:30," and "2024-07-01 09:20:30," confirming the completeness and authenticity of the consumption trajectory. The traceability results show that the consumer purchased XX brand diapers, XX brand baby rice cereal, and XX brand stage 3 formula milk powder within the past two months, forming a complete consumption trajectory that is fed back to the manufacturer. S004: Consumer Behavior Prediction Extract the consumer's historical consumption information blocks from the blockchain over the past year. During preprocessing, remove one obviously abnormal high-value consumption record (which was verified to be a mistake). Then, standardize the data to obtain the training dataset. The training dataset is input into a pre-defined neural network prediction model. By adjusting parameters such as the number of neurons in the hidden layer and the learning rate, the model is trained to obtain an optimized model. The consumer's latest consumption information (purchase of "XX brand baby walker" on July 10, 2024) is input into the optimized model to predict that the consumer may purchase "XX brand baby high chair" in the next two months. Generate a prediction result block containing the user identifier, prediction time "2024-07-11 14:25:00", prediction content "may purchase XX brand baby high chair in the next two months", prediction model (neural network model V3.0) and hash value, and upload it to the blockchain network for storage after encryption. Regulatory oversight throughout the process ensures that data collection complies with the Personal Information Protection Law, that storage is secure and reliable, and that traceability and forecasting operations are conducted in a legal and compliant manner.
[0020] The advantages of this invention are as follows: Trustworthy traceability: Block hash chain association + timestamp verification ensures data accuracy (actual test data); Accurate prediction: Training with multi-source data improves prediction accuracy (compared to traditional methods). Privacy protection: Consumer nodes authorize data access independently; Dynamic updates: Prediction results are uploaded to the blockchain in real time to form a closed-loop feedback.
[0021] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A blockchain-enabled method for tracing and predicting consumer behavior, characterized in that, Includes the following steps: S001: Data collection and preprocessing: Collect consumer consumption data from multiple channels and standardize the collected data. S002: Data Storage and Blockchain Network Construction: Construct a blockchain network consisting of merchant nodes, consumer nodes, and regulatory nodes. The blockchain network contains consumer information blocks, which include user identifier, consumption time, product information, transaction amount, transaction location, merchant identifier, hash value, and timestamp. After constructing the blockchain network, perform data cleaning and noise reduction preprocessing operations. The preprocessed consumer information is encrypted and uploaded to the blockchain network for storage, and the stored management data can be accessed and manipulated. S003: Consumption Trajectory Tracing: Based on consumption data, the tracing requester is traced through consumer nodes and the blockchain network. The blockchain network extracts all consumption information blocks corresponding to the user identifier in the request. By verifying the hash value and timestamp of each consumption information block, the integrity and authenticity of the consumption trajectory are determined, forming a complete consumption trajectory tracing result. S004: Consumer Behavior Prediction: Extract historical consumption information blocks of target consumers from the blockchain, preprocess them to obtain a training dataset; input the training dataset into a preset consumer behavior prediction model for training to obtain an optimized consumer behavior prediction model; input the latest consumption information of target consumers into the optimized consumer behavior prediction model to obtain the consumer behavior prediction result, and store the consumer behavior prediction result in the blockchain network.
2. The blockchain-enabled consumption trajectory tracing and prediction method according to claim 1, wherein the data cleaning and denoising includes removing duplicate data, correcting erroneous data, filling in missing values, and data smoothing.
3. The blockchain-enabled consumption trajectory tracing and prediction method according to claim 1, wherein the consumption data includes transaction records from online e-commerce platforms, consumption data from offline physical stores, payment information from payment platforms, and related discussions by consumers on social media.
4. The blockchain-enabled consumption trajectory tracing and prediction method according to claim 1, its features are as follows: The features are as follows: the consumer node is used to initiate consumption behavior, authorize traceability requests, and view its own consumption trajectory and prediction results; the merchant node is used to collect and generate consumption information blocks and participate in blockchain consensus verification; and the third-party service node is used to provide data analysis services, consumption behavior prediction model training services, and conduct consumption trajectory traceability after obtaining authorization.
5. The blockchain-enabled consumption trajectory tracing and prediction method according to claim 1, characterized in that, The product information includes the product name, product code, product category, and product specifications; the hash value includes the hash value of the current consumption information block and the hash value of the previous consumption information block.
6. The blockchain-enabled consumption trajectory tracing and prediction method according to claim 1, characterized in that, The specific process for verifying the hash value and timestamp of each consumption information block is as follows: calculate the hash value of the current consumption information block and compare it with the hash value stored in the block. If they match, the block has not been tampered with. At the same time, verify whether the time sequence of each consumption information block is continuous based on the timestamp. If they are continuous, the consumption trajectory is determined to be complete.
7. The blockchain-enabled consumption trajectory tracing and prediction method according to claim 1, characterized in that the consumption behavior prediction results are stored in the blockchain network to form a prediction result block, and the prediction result block includes user identifier, prediction time, prediction content, prediction model and hash value.