A transaction data processing method based on cloud storage and NFC
By adopting transaction data processing methods based on cloud storage and NFC in the financial transaction system, the problem of low data security is solved, real-time collection, encryption, decryption, cleaning and visualization of transaction data is realized, ensuring data security and usability, supporting merchant decision-making.
Patent Information
- Application Number
- CN202310980452.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-06
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2043-08-06
Smart Images

Figure CN116976884B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transaction data processing, and in particular to a transaction data processing method based on cloud storage and NFC. Background Art
[0002] In the current digital age, electronic payments and transactions have become part of people's lives. With the rise of mobile payments and the popularity of smart devices, people are increasingly relying on electronic payments and expect faster and safer payment experiences. At the same time, a large amount of transaction data needs to be effectively processed and managed. The promotion and popularization of NFC (near field communication) technology has provided a new means for financial transactions. At the same time, cloud storage technology also provides a convenient way to manage and store transaction data. However, the existing financial transaction system still has the problem of low data security in data processing. Summary of the invention
[0003] Based on this, it is necessary for the present invention to provide a transaction data processing method based on cloud storage and NFC to solve at least one of the above technical problems.
[0004] To achieve the above purpose, a transaction data processing method based on cloud storage and NFC includes the following steps:
[0005] Step S1: Collect transaction data of smart devices in real time through NFC technology to obtain original commodity transaction data;
[0006] Step S2: Encrypt the commodity transaction original data using a transaction data encryption algorithm to obtain commodity transaction ciphertext data; package the commodity transaction ciphertext data to obtain a commodity transaction data packet;
[0007] Step S3: uploading the commodity transaction data packet to a preset cloud server to obtain commodity transaction cloud storage; decompressing the commodity transaction data packet to obtain commodity transaction data to be decrypted;
[0008] Step S4: decrypt the commodity transaction data using a transaction data decryption algorithm, and perform data preprocessing to obtain commodity transaction data;
[0009] Step S5: Back up the commodity transaction data regularly in the cloud storage, and perform data analysis to obtain the commodity transaction data analysis results; display the commodity transaction data analysis results in charts through visualization technology to assist merchants in making decisions.
[0010] The present invention enables merchants to quickly obtain transaction data and timely understand commodity sales through real-time collection; obtaining commodity transaction raw data provides a basis for subsequent data encryption and analysis. Data encryption protects the privacy and security of transaction data and prevents unauthorized data access; data packaging helps to organize and manage data, which is convenient for transmission and storage. Data encryption protects the privacy and security of transaction data and prevents unauthorized data access; data packaging helps to organize and manage data, which is convenient for transmission and storage. The decryption process allows merchants to restore encrypted data for analysis and processing; data preprocessing includes data cleaning, denoising and conversion, etc., making the data more readable and usable. Regular backup ensures the integrity and recoverability of data, and data can be restored when it is lost. Data analysis provides in-depth insights into commodity transaction data through methods such as statistics, trend analysis and pattern recognition; visual display enables complex data to be intuitively displayed in the form of charts, helping merchants understand data and make effective decisions. The beneficial effects of the above steps include instant acquisition of transaction data, data privacy and security protection, data organization and management, reliable cloud storage, data visualization and decision assistance. These effects help merchants better understand and utilize commodity transaction data, and provide support for business growth and decision-making.
[0011] Preferably, step S1 comprises the following steps:
[0012] Step S11: using NFC technology to establish a near field communication connection between the user's smart device and the merchant's transaction device when the two are close to each other;
[0013] Step S12: The merchant's transaction device reads transaction information from the user's smart device through a near field communication connection to obtain the commodity transaction data to be processed;
[0014] Step S13: Use data cleaning technology to clean the commodity transaction data to be processed to obtain original commodity transaction data.
[0015] The present invention provides a simple, fast, wireless short-range communication method using NFC technology; establishing a near-field communication connection enables the user's smart device and the merchant's transaction device to directly exchange information without other complex connection steps; the establishment of a near-field communication connection provides a basis for transaction data transmission and lays a foundation for subsequent data reading. Through the near-field communication connection, the merchant can easily obtain the transaction information in the user's smart device and realize the rapid transmission of data; reading the transaction information provides the merchant's transaction device with raw data, which provides materials for subsequent data cleaning and processing. Data cleaning technology can automatically or semi-automatically identify and repair problems such as abnormal values, missing values, duplicate values, and inconsistent values in the data; data cleaning can improve the quality and accuracy of the data and reduce errors and deviations in the subsequent data processing and analysis process; the cleaned commodity transaction data is called commodity transaction raw data, which provides a high-quality data basis for subsequent data encryption, analysis and visualization. The above includes simplifying the interaction process, fast data transmission, obtaining raw data, and improving data quality and accuracy. These effects help merchants to obtain transaction information in real time, accurately analyze and understand commodity transaction conditions, provide decision support, and enhance user experience.
[0016] Preferably, step S2 comprises the following steps:
[0017] Step S21: Encrypt the commodity transaction original data using a transaction data encryption algorithm to obtain commodity transaction ciphertext data;
[0018] Step S22: segmenting the commodity transaction ciphertext data to obtain commodity transaction data blocks;
[0019] Step S23: Serialize the commodity transaction data block using data serialization technology, and encapsulate the serialized data block to obtain a commodity transaction data packet.
[0020] The data encryption of the present invention protects the privacy and security of transaction data and prevents unauthorized data access; the generation of commodity transaction ciphertext data makes sensitive information unreadable during transmission and storage, thereby improving the confidentiality of data. Data segmentation divides commodity transaction ciphertext data into small blocks to facilitate subsequent processing and transmission; data segmentation can improve the efficiency of data processing and reduce resource usage. Data serialization converts commodity transaction data from objects in memory into byte streams that can be transmitted and stored; encapsulating serialized data blocks into data packets helps to organize and manage data, facilitating transmission and storage; data encapsulation can also add metadata and verification information to provide data integrity and reliability guarantees. The above includes data privacy and security protection, improved data processing efficiency, convenience of data transmission and storage, and guarantees of data integrity and reliability. These effects help to ensure the security and availability of commodity transaction data and provide a reliable data foundation for subsequent data upload, decryption and analysis.
[0021] Preferably, step S21 includes the following steps:
[0022] Step S211: Representing the commodity transaction original data as a matrix to obtain a commodity transaction matrix;
[0023] Step S212: Encrypt the commodity transaction matrix using a transaction data encryption algorithm to obtain a commodity transaction ciphertext matrix;
[0024] The function formula of the transaction data encryption algorithm is as follows:
[0025] EncryptedData=f(M)=sin(K*x 2 +3x)+log 10 (2x+1), x∈M;
[0026] In the formula, EncryptedData is the commodity transaction ciphertext matrix, f is the transaction data encryption algorithm function, M is the commodity transaction matrix, x is the element in the commodity transaction matrix, and K is the symmetric key of the transaction data encryption algorithm;
[0027] The present invention encrypts the commodity transaction matrix by constructing a functional formula of a transaction data encryption algorithm to obtain a commodity transaction ciphertext matrix; the formula fully considers the transaction data encryption algorithm function f, which acts on each element x in the commodity transaction matrix M, encrypts and converts each transaction data, and generates corresponding ciphertext; commodity transaction matrix M, element x in the commodity transaction matrix, symmetric key K of the transaction data encryption algorithm. Wherein, sin(K*x 2+3x) The sine function in this expression can perform nonlinear mapping on the original data, increasing the complexity and concealment of the data. The purpose of the design of the transaction data encryption algorithm function is to transform each element in the original commodity transaction matrix through a series of complex nonlinear transformations, including square, multiplication, sine function and logarithmic function, so as to generate an encrypted ciphertext matrix. This design aims to increase the complexity and concealment of the ciphertext, improve the security of the data, and make it difficult for unauthorized users to restore and parse the original transaction data.
[0028] Step S213: performing an inverse operation on the commodity transaction ciphertext matrix to obtain commodity transaction ciphertext data.
[0029] The present invention selects a suitable symmetric key K, which is a key parameter in an encryption algorithm, and can provide strong encryption protection to ensure that only authorized users can decrypt and obtain data; selecting a secure and sufficiently complex symmetric key K can increase the resistance of the encryption algorithm and reduce the risk of being maliciously cracked or attacked. Representing the original commodity transaction data in a matrix form can facilitate matrix operations and encryption operations, and enhance the processing and analysis capabilities of data; the matrix representation can make the data structure clearer, and provide better operability in the subsequent encryption and decryption process. The transaction data encryption algorithm encrypts the commodity transaction matrix to protect the privacy and confidentiality of the data and prevent unauthorized access and leakage; the elements in the commodity transaction ciphertext matrix are encrypted data, and the ciphertext matrix is unreadable for people without the key, which enhances the security and confidentiality of the data. The commodity transaction ciphertext matrix can be converted back to the original commodity transaction data by inverting the operation; the inversion operation provides the data restoration capability, so that the encrypted data can be decrypted and used when needed; the legal decryption operation ensures that only authorized users can restore and obtain the original transaction data, which increases the availability and controllability of the data. The above includes data encryption protection, enhanced data processing and analysis capabilities, data privacy and security protection, data restoration and improved availability. These effects enable commodity transaction data to be securely transmitted, stored and analyzed under the premise of protecting privacy, while ensuring that legitimate users can decrypt and operate data.
[0030] Preferably, step S3 comprises the following steps:
[0031] Step S31: Select Amazon Web Services as the cloud server, register an account, and obtain a commodity transaction cloud server;
[0032] Step S32: creating a storage space on the commodity transaction cloud server, and uploading the commodity transaction data packet to the commodity transaction cloud server using network transmission technology to obtain commodity transaction cloud storage;
[0033] Step S33: decompressing the commodity transaction data packet through the commodity transaction cloud storage to obtain the commodity transaction data to be decrypted.
[0034] The present invention selects AWS as a cloud server to obtain reliable infrastructure and rich cloud services. Amazon Web Services (AWS) is a leading cloud service provider. AWS can provide high-availability, elastic and scalable computing resources to meet the needs of the commodity trading system. After registering an account, the cloud server can be easily managed and operated, including configuration, monitoring, deployment and other operations. Creating storage space on the cloud server provides a reliable data storage and management system to ensure that commodity trading data is safely stored on the cloud; using network transmission technology to upload data packets to the cloud server, reliable and efficient data transmission is achieved, avoiding the limitations and delays of physical transmission methods; commodity trading cloud storage provides data backup, fault tolerance and high availability, ensuring data persistence and reliability. Using commodity trading cloud storage to decompress data packets can restore the original data form, facilitating subsequent data processing and decryption operations; the decompressed commodity trading data to be decrypted can be effectively extracted and read for further analysis, processing and business operations; with the help of the high-speed reading and access capabilities of cloud storage, large-scale commodity trading data can be quickly acquired and processed, improving data processing efficiency and system response performance. The above includes obtaining reliable cloud service infrastructure, reliable data storage and management, efficient data transmission, data security and reliability guarantee, data restoration and readability improvement, high-speed reading and access capabilities, etc. These effects enable commodity transaction data to be stored, transmitted and processed safely, reliably and efficiently in the cloud environment, improving the availability, scalability and performance of the system.
[0035] Preferably, step S4 comprises the following steps:
[0036] Step S41: Decrypt the commodity transaction data to be decrypted using a transaction data decryption algorithm to obtain commodity transaction plaintext data;
[0037] Step S42: performing abnormal data processing on the commodity transaction plaintext data through an abnormal data processing algorithm to obtain clean commodity transaction data;
[0038] Step S43 uses data formatting technology to normalize the clean data of commodity transactions to obtain commodity transaction data to be denoised;
[0039] Step S44: using data denoising technology to perform denoising processing on the commodity transaction data to be denoised, to obtain commodity transaction data.
[0040] The present invention restores the encrypted commodity transaction data to plain text data through a decryption algorithm, making the data readable and understandable; the decrypted data can be further analyzed, counted and mined to provide accurate data support for business decisions and business processes. The abnormal data processing algorithm can identify and process abnormal values, abnormal patterns or abnormal behaviors in commodity transaction data; the processed clean data can improve data quality and reduce interference with subsequent data analysis and modeling processes; the cleaned and pre-processed data helps to ensure the accuracy and reliability of the data and improve the accuracy of analysis and decision-making. The data formatting technology organizes and adjusts the commodity transaction data in a specific format to make it conform to specifications and standards; the normalized data is easy to understand and process, which is convenient for subsequent data analysis, mining and visualization; the unified data format helps to improve data consistency and reduce errors and confusion in the data processing process. Data denoising technology can detect and remove noise, abnormal values or invalid data in commodity transaction data; the denoised data has higher quality and credibility, and can provide more accurate data analysis results and business decision-making basis; denoising processing helps to improve data consistency, reliability and availability, thereby improving the performance and effect of the system. The above includes improving the readability and comprehensibility of data, improving data quality, handling outliers, reducing errors and confusion, improving data consistency and credibility, providing accurate analysis results and decision-making basis, etc. These effects help to achieve data cleaning, data standardization, data accuracy and data reliability in the process of commodity trading data processing, thereby providing a better foundation and support for subsequent analysis, modeling and decision-making.
[0041] Preferably, step S41 includes the following steps:
[0042] Step S411: performing an inverse operation on the commodity transaction data to be decrypted to obtain a commodity transaction matrix to be decrypted;
[0043] Step S412: Decrypt the commodity transaction matrix to be decrypted using a transaction data decryption algorithm to obtain a commodity transaction plaintext matrix;
[0044] The function formula of the transaction data decryption algorithm is as follows:
[0045]
[0046] Where DecryptedData is the commodity transaction plaintext matrix, g is the inverse function of the transaction data encryption algorithm function, y is the element in the commodity transaction to-be-decrypted matrix, K is the symmetric key of the transaction data encryption algorithm, and C is the commodity transaction to-be-decrypted matrix.
[0047] The present invention decrypts the commodity transaction matrix to be decrypted by constructing a function formula of a transaction data decryption algorithm to obtain a commodity transaction plaintext matrix; the function formula fully considers the inverse function g of the transaction data encryption algorithm function, which is the function of the transaction data decryption algorithm, and acts on each element y in the commodity transaction matrix to be decrypted C. The function g decrypts and converts each transaction data to be decrypted to generate the corresponding plaintext; the element y in the commodity transaction matrix to be decrypted, the symmetric key K of the transaction data encryption algorithm, and the commodity transaction matrix to be decrypted C. Among them, sqrt(sin (-1) The square root operation and inverse trigonometric function operation in the expression (y)-log2(y)) can help restore the data before encryption. In general, the design purpose of the transaction data decryption algorithm function is to generate a decrypted plaintext matrix by subjecting each element in the ciphertext matrix to a series of inverse operations, including inverse trigonometric functions, logarithmic functions, and multiplication. This design is intended to reverse the conversion process of the encryption algorithm so that the ciphertext can be restored to the original transaction data. The inverse function g in the decryption algorithm can achieve data decryption by performing reverse mathematical calculations on the ciphertext.
[0048] Step S413: Convert the commodity transaction plaintext matrix into data form to obtain commodity transaction plaintext data.
[0049] The present invention converts the data to be decrypted into a matrix form through an inversion operation; through the inversion operation, the ciphertext data can be restored, providing necessary conversion and preparation for subsequent decryption. The transaction data decryption algorithm uses an appropriate key and decryption algorithm to restore the matrix data to be decrypted into a plaintext matrix; the decrypted plaintext matrix contains the plaintext form of the original transaction data, making it readable and understandable; the decrypted matrix data can be further analyzed, processed and applied to provide accurate data support for subsequent data processing and decision-making. Converting the plaintext matrix into a data form is the process of parsing the matrix data into specific commodity transaction information; by converting the plaintext matrix into a data form, the commodity transaction data can be restored to a readable transaction record and related attributes; the conversion of plaintext data makes commodity transactions more operable and convenient for analysis, providing greater flexibility for subsequent data processing, report generation and decision-making. The above includes: data restoration and decryption, data readability and comprehensibility improvement, data analysis and processing capability enhancement, accurate data support for subsequent data processing and decision-making, commodity transaction information recovery and convenience, report generation and decision-making flexibility improvement, etc. These effects help improve the availability, accuracy, and reliability of commodity trading data, providing a better basis for business decision-making and analysis.
[0050] Preferably, the function formula of the abnormal data processing algorithm in step S43 is as follows:
[0051]
[0052] Where M clean is the clean data of commodity transaction, M(i,j) is the element in the i-th row and j-th column of the commodity transaction plaintext matrix, μ is the mean of the commodity transaction plaintext data, θ is the threshold parameter in the abnormal data processing algorithm, σ is the standard deviation of the commodity transaction plaintext data, and z is the integral variable.
[0053] The present invention normalizes the clean data of commodity transactions by constructing a function formula of an abnormal data processing algorithm to obtain the commodity transaction data to be denoised; the function formula fully takes into account the clean data M of commodity transactions. clean , represents the clean data of commodity transactions, that is, the result after being processed by the abnormal data processing algorithm, which corresponds to the element in the i-th row and j-th column of the commodity transaction plaintext matrix; M(i,j) is the element in the i-th row and j-th column of the commodity transaction plaintext matrix, μ is the mean of the commodity transaction plaintext data, θ is the threshold parameter in the abnormal data processing algorithm, σ is the standard deviation of the commodity transaction plaintext data, and z is the integral variable. Among them, if M(i,j)>μ+θ*σ is the first part of the abnormal data processing algorithm. This part of the processing is executed when the element M(i,j) in the i-th row and j-th column of the commodity transaction plaintext matrix is greater than μ+θ*σ. This part of the processing uses the probability density function (PDF) calculation to integrate the integral variable z in front of M(i,j) from negative infinity to M(i,j). The specific calculation uses the probability density function of the normal distribution, where μ is the mean of the plaintext data and σ is the standard deviation of the plaintext data. The purpose of this part of the processing is to eliminate abnormal data above the threshold range.
[0054] and If M(i,j)<μ-θ*σ is the second part of the abnormal data processing algorithm. When the element M(i,j) in the i-th row and j-th column of the commodity transaction plaintext matrix is less than μ-θ*σ, this part of the processing is executed. This part of the processing is also calculated using the probability density function (PDF). The integral variable z after M(i,j) is integrated from M(i,j) to positive infinity. The probability density function of the normal distribution is still used, where μ is the mean of the plaintext data and σ is the standard deviation of the plaintext data. The purpose of this part of the processing is to eliminate abnormal data below the threshold range. In summary, the function formula of the abnormal data processing algorithm describes how to process abnormal data in the commodity transaction plaintext matrix. By calculating the probability density function and performing the integration operation according to the threshold parameter and the statistical characteristics of the plaintext data, the data above or below the threshold range can be eliminated, thereby obtaining clean commodity transaction data. The main idea of this algorithm is based on the normal distribution assumption, and the data exceeding the threshold range is regarded as abnormal data and excluded from the overall data.
[0055] Preferably, step S5 comprises the following steps:
[0056] Step S51: backing up commodity transaction data according to a preset time point and frequency to obtain commodity transaction backup data;
[0057] Step S52: using a preset commodity transaction data analysis model to perform data analysis on the commodity transaction backup data to obtain commodity transaction data analysis results;
[0058] Step S53: Use visualization technology to display the analysis results of commodity transaction data in charts to support merchants in making decisions.
[0059] The present invention can prevent data loss or damage by regularly backing up commodity transaction data, and ensure the integrity and recoverability of merchant transaction records. Data backup is an important data management and risk management strategy to ensure the security and reliability of data. Commodity transaction backup data provides a data source for backtracking so that data can be restored and analyzed when needed. Commodity transaction data analysis can reveal potential patterns, trends and correlations in data to gain insights and understanding of relevant transaction activities; by applying a preset commodity transaction data analysis model, backup data can be deeply analyzed to discover information about sales, customer behavior, commodity trends, etc.; commodity transaction data analysis results can be used to support business activities such as decision making, market positioning, inventory management, and optimization of transaction processes. Visualization technology can present data analysis results in the form of charts, graphs, and images, making complex data easy to understand and interpret; chart presentation can help merchants visually grasp the trends, correlations, and anomalies of commodity transaction data, and provide intuitive data expression; through visual presentation, merchants can better understand and analyze the results of commodity transaction data analysis, so as to make data-based decisions, such as adjusting product pricing strategies, optimizing marketing plans, and improving supply chain management. Including data security, acquisition of data insights, provision of decision support, etc. These effects help merchants better understand and manage commodity transaction data, thereby optimizing business processes and making strategic decisions.
[0060] Preferably, step S52 includes the following steps:
[0061] Step S521: Divide the commodity transaction backup data into a training data set, a verification data set, and a test data set;
[0062] Step S522: constructing a commodity transaction data analysis model based on a deep learning neural network;
[0063] Step S523: input the training data set into the commodity transaction data analysis model based on the deep learning neural network for model training to obtain a verification model; and input the verification data set into the verification model for parameter tuning through the data analysis loss function to generate a test model;
[0064] Among them, the formula of the data analysis loss function is as follows:
[0065]
[0066] Where L(β) is the data analysis loss function, Ω is the domain of the loss function, N is the number of validation data sets, and w n is the weight of the nth data in the validation data set, β is the parameter of the validation model, and v n is the data point of the nth validation data set in the domain, v is the integral variable on the domain Ω, f(v n , β) is the output result of the verification model, g(v n ) is the true value of the target in the definition domain, λ1 and λ2 are the weight parameters of the regularization term, is the parameter gradient of the validation model, and β0 is the reference parameter of the validation model;
[0067] The present invention constructs a formula for a data analysis loss function to input the validation data set into the validation model for parameter tuning to generate a test model; the formula fully takes into account the data analysis loss function L(β), the domain of the loss function Ω, the number of validation data sets N, and the weight w of the nth data in the validation data set. n , the parameter β of the validation model, the data point v of the nth validation dataset in the definition domain n , verify the output of the model f(v n , β), defines the true value of the target in the domain g(v n ), the weight parameters λ1 and λ2 of the regularization term, and the parameter gradient of the validation model The reference parameter β0 of the verification model; where, is the data prediction error term, which is used to measure the difference between the output of the validation model and the true value. It is the integral of the square of the difference between the predicted value and the true value of all data points on the domain Ω. Specifically, for each data point v in the validation data set, n ,f(v n , β) is the prediction result of the validation model based on the parameter β for this data point, g(v n ) is the true value of the data point, and the weight w is used for weighted summation. n The prediction errors for each data point are synthesized; is a parameter smoothing term or regularization term, which is used to control the smoothness of the validation model parameter β. is the gradient of β, which represents the rate of change of parameter β over the domain Ω, The modulus of the gradient of β, that is, the magnitude of the change of parameter β in the domain Ω; λ2∫ Ω |β-β0| 2 dv is a parameter penalty or regularization term, which is used to make the parameter β of the validation model close to the reference parameter β0. β0 is a reference parameter, which can be a set of predefined parameter values or a parameter value obtained based on prior knowledge. |β-β0| represents the absolute value of the difference between the parameter β and the reference parameter β0. This term penalizes the deviation of the parameter β from the reference parameter β0 by integrating the square of the difference between the parameter β and the reference parameter β0. λ2 is the weight parameter of the regularization term, which is used to control the importance of the parameter penalty term in the entire loss function. This term penalizes the parameter β when it changes too much or is not smooth by integrating the square of the gradient norm of the parameter β. λ1 is the weight parameter of the regularization term, which is used to adjust the importance of the smoothing term in the entire loss function. In summary, the formula of the data analysis loss function comprehensively considers the prediction error term, the parameter smoothing term, and the parameter penalty term. It is used to comprehensively evaluate the difference between the prediction result of the validation model and the true value, and control the smoothness of the model parameters and the degree of closeness to the reference parameter. The weight parameters λ1 and λ2 can be adjusted according to the specific problem and requirements to balance the importance of different terms in the entire loss function. Minimizing the loss function can help optimize the validation model to achieve better performance on the given data.
[0068] Step S524: input the test data set into the test model after parameter optimization for model testing to obtain an optimized commodity transaction data analysis model; re-input the commodity transaction backup data into the optimized commodity transaction data analysis model for data analysis to obtain the commodity transaction data analysis results.
[0069] The present invention divides the data set into common steps for machine learning and deep learning tasks to evaluate the performance and generalization ability of the model. By dividing the data set, the model can be trained using the training data set, the model can be parameterized by the verification data set, and the performance of the model can be evaluated using the test data set. Dividing the data set helps to avoid problems such as overfitting (the model overfits the training data) and underfitting (the model cannot capture the pattern in the data), and improves the accuracy and reliability of the model. The deep learning neural network has a strong expressive ability and can analyze commodity transaction data by learning nonlinear patterns and feature relationships in the data. Constructing a commodity transaction data analysis model can help merchants to mine hidden information in the data, extract useful features and patterns, and use them to predict sales trends, identify abnormal transactions, and other tasks. The model can optimize the parameters of the model through the process of training, verification, and testing, and improve its predictive and generalization capabilities. The model training process uses the training data set to learn the representation of patterns and features, thereby establishing the weights and biases of the model. By optimizing the loss function, the model can adjust the parameters to reduce the error between the predicted results and the actual results, and improve the model's ability to fit the data. By tuning the parameters of the model through the verification data set, overfitting can be avoided and the best model parameter configuration can be selected. By evaluating the optimized model using a test data set, the performance and accuracy of the model can be objectively measured; the optimized commodity transaction data analysis model can more accurately predict and analyze commodity transaction behavior, helping merchants make more informed decisions; re-entering the commodity transaction backup data into the optimized model for data analysis can obtain useful insights into sales trends, market demand, and customer behavior, providing merchants with data-based business decision support. In summary, the beneficial effects of the above steps include accuracy evaluation of data set partitioning, effective use of deep learning neural network models, and improved prediction accuracy through parameter tuning and model optimization. Through these steps, merchants can build and apply optimized commodity transaction data analysis models to improve their understanding and decision-making capabilities of commodity transaction data, thereby optimizing business operations and market competitiveness. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings:
[0071] Figure 1 The present invention is a flowchart of the steps of the transaction data processing method based on cloud storage and NFC;
[0072] Figure 2 for Figure 1 Detailed step flow diagram of step S1;
[0073] Figure 3 for Figure 1Detailed step flow diagram of step S2;
[0074] Figure 4 for Figure 3 Detailed step flow diagram of step S3;
[0075] Figure 5 for Figure 1 Detailed step flow chart of step S5 in FIG. DETAILED DESCRIPTION
[0076] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0077] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0078] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0079] To achieve this, please refer to Figures 1 to 5 The present invention provides a transaction data processing method based on cloud storage and NFC, the method comprising the following steps:
[0080] Step S1: Collect transaction data of smart devices in real time through NFC technology to obtain original commodity transaction data;
[0081] Step S2: Encrypt the commodity transaction original data using a transaction data encryption algorithm to obtain commodity transaction ciphertext data; package the commodity transaction ciphertext data to obtain a commodity transaction data packet;
[0082] Step S3: uploading the commodity transaction data packet to a preset cloud server to obtain commodity transaction cloud storage; decompressing the commodity transaction data packet to obtain commodity transaction data to be decrypted;
[0083] Step S4: decrypt the commodity transaction data using a transaction data decryption algorithm, and perform data preprocessing to obtain commodity transaction data;
[0084] Step S5: Back up the commodity transaction data regularly in the cloud storage, and perform data analysis to obtain the commodity transaction data analysis results; display the commodity transaction data analysis results in charts through visualization technology to assist merchants in making decisions.
[0085] In the embodiment of the present invention, please refer to Figure 1 FIG. 1 is a flow chart of the steps of the transaction data processing method based on cloud storage and NFC of the present invention. In this example, the steps of the transaction data processing method based on cloud storage and NFC include:
[0086] Step S1: Collect transaction data of smart devices in real time through NFC technology to obtain original commodity transaction data;
[0087] The smart device described in the embodiment of the present invention may refer to a mobile device that supports NFC technology (such as a smart phone, a tablet computer, etc.), or a specific NFC reading and writing device. Through NFC technology, wireless communication between the device and a commodity or other device with an NFC chip can be achieved. When the smart device interacts with the commodity, the NFC chip can read the identification information and other related data of the commodity, and collect these data as the original data of the commodity transaction.
[0088] Step S2: Encrypt the commodity transaction original data using a transaction data encryption algorithm to obtain commodity transaction ciphertext data; package the commodity transaction ciphertext data to obtain a commodity transaction data packet;
[0089] The encryption algorithm used in the embodiment of the present invention can be selected according to specific needs, such as a commonly used symmetric encryption algorithm (such as AES) or an asymmetric encryption algorithm (such as RSA). The encryption algorithm is used to encrypt the original commodity transaction data to ensure the security of the data during transmission and storage. The encrypted commodity transaction data can be packaged into a data packet for subsequent transmission and processing.
[0090] Step S3: uploading the commodity transaction data packet to a preset cloud server to obtain commodity transaction cloud storage; decompressing the commodity transaction data packet to obtain commodity transaction data to be decrypted;
[0091] In the embodiment of the present invention, the commodity transaction data packet is uploaded to a preset cloud server; different data transmission protocols and technologies can be used to achieve data upload, such as HTTP, HTTPS, FTP, etc. The cloud server can provide reliable storage and access services. After uploading, the commodity transaction data packet needs to be decompressed to obtain the commodity transaction data to be decrypted.
[0092] Step S4: decrypt the commodity transaction data using a transaction data decryption algorithm, and perform data preprocessing to obtain commodity transaction data;
[0093] The embodiment of the present invention uses a corresponding decryption algorithm to perform a decryption operation on the commodity transaction data to be decrypted to restore it to the original transaction data. The decrypted data may also need to go through some data preprocessing steps, such as noise removal, data cleaning, data format conversion, etc., for subsequent data analysis and processing.
[0094] Step S5: Back up the commodity transaction data regularly in the cloud storage, and perform data analysis to obtain the commodity transaction data analysis results; display the commodity transaction data analysis results in charts through visualization technology to assist merchants in making decisions.
[0095] The commodity transaction data of the embodiment of the present invention can be backed up to the cloud storage regularly to ensure the security and recoverability of the data. At the same time, various analysis operations can be performed on the commodity transaction data, such as statistical analysis, trend analysis, correlation analysis, and predictive analysis, to obtain insights and information about commodity transactions. The analysis results can be displayed through visualization technology (such as charts, reports, dashboards, etc.) to help merchants better understand the data and make decisions.
[0096] The present invention enables merchants to quickly obtain transaction data and timely understand commodity sales through real-time collection; obtaining commodity transaction raw data provides a basis for subsequent data encryption and analysis. Data encryption protects the privacy and security of transaction data and prevents unauthorized data access; data packaging helps to organize and manage data, which is convenient for transmission and storage. Data encryption protects the privacy and security of transaction data and prevents unauthorized data access; data packaging helps to organize and manage data, which is convenient for transmission and storage. The decryption process allows merchants to restore encrypted data for analysis and processing; data preprocessing includes data cleaning, denoising and conversion, etc., making the data more readable and usable. Regular backup ensures the integrity and recoverability of data, and data can be restored when it is lost. Data analysis provides in-depth insights into commodity transaction data through methods such as statistics, trend analysis and pattern recognition; visual display enables complex data to be intuitively displayed in the form of charts, helping merchants understand data and make effective decisions. The beneficial effects of the above steps include instant acquisition of transaction data, data privacy and security protection, data organization and management, reliable cloud storage, data visualization and decision assistance. These effects help merchants better understand and utilize commodity transaction data, and provide support for business growth and decision-making.
[0097] Preferably, step S1 comprises the following steps:
[0098] Step S11: using NFC technology to establish a near field communication connection between the user's smart device and the merchant's transaction device when the two are close to each other;
[0099] Step S12: The merchant's transaction device reads transaction information from the user's smart device through a near field communication connection to obtain the commodity transaction data to be processed;
[0100] Step S13: Use data cleaning technology to clean the commodity transaction data to be processed to obtain original commodity transaction data.
[0101] As an embodiment of the present invention, refer to Figure 2 As shown, Figure 1 Detailed step flow diagram of step S1 in FIG. 1 , in this embodiment, step S1 includes the following steps:
[0102] Step S11: using NFC technology to establish a near field communication connection between the user's smart device and the merchant's transaction device when the two are close to each other;
[0103] In the embodiment of the present invention, both the user's smart device and the merchant's transaction device must support NFC technology. When the user's smart device and the merchant's transaction device are close to each other and at a suitable distance, a near-field communication connection can be established between them through the NFC chip. Through the NFC communication protocol, data can be securely transmitted between devices.
[0104] Step S12: The merchant's transaction device reads transaction information from the user's smart device through a near field communication connection to obtain the commodity transaction data to be processed;
[0105] In the embodiment of the present invention, the merchant transaction device exchanges data with the user smart device through a near field communication connection. The merchant transaction device can use an NFC reader or a built-in NFC chip to read transaction information in the user smart device. By reading specific data in an NFC tag or application, the merchant transaction device can obtain information related to the commodity transaction, such as commodity identification, price, quantity, etc.
[0106] Step S13: Use data cleaning technology to clean the commodity transaction data to be processed to obtain original commodity transaction data.
[0107] The commodity transaction data to be processed in the embodiment of the present invention needs to go through a data cleaning process. Data cleaning refers to the process of verifying, correcting and standardizing data to ensure data quality and consistency. The commodity transaction data to be processed can be obtained from the user's smart device, and the original data of the commodity transaction can be obtained through the data cleaning operation, providing an accurate and reliable data basis for subsequent steps such as data encryption, cloud storage and data analysis.
[0108] The present invention provides a simple, fast, wireless short-range communication method using NFC technology; establishing a near-field communication connection enables the user's smart device and the merchant's transaction device to directly exchange information without other complex connection steps; the establishment of a near-field communication connection provides a basis for transaction data transmission and lays a foundation for subsequent data reading. Through the near-field communication connection, the merchant can easily obtain the transaction information in the user's smart device and realize the rapid transmission of data; reading the transaction information provides the merchant's transaction device with raw data, which provides materials for subsequent data cleaning and processing. Data cleaning technology can automatically or semi-automatically identify and repair problems such as abnormal values, missing values, duplicate values, and inconsistent values in the data; data cleaning can improve the quality and accuracy of the data and reduce errors and deviations in the subsequent data processing and analysis process; the cleaned commodity transaction data is called commodity transaction raw data, which provides a high-quality data basis for subsequent data encryption, analysis and visualization. The above includes simplifying the interaction process, fast data transmission, obtaining raw data, and improving data quality and accuracy. These effects help merchants to obtain transaction information in real time, accurately analyze and understand commodity transaction conditions, provide decision support, and enhance user experience.
[0109] Preferably, step S2 comprises the following steps:
[0110] Step S21: Encrypt the commodity transaction original data using a transaction data encryption algorithm to obtain commodity transaction ciphertext data;
[0111] Step S22: segmenting the commodity transaction ciphertext data to obtain commodity transaction data blocks;
[0112] Step S23: Serialize the commodity transaction data block using data serialization technology, and encapsulate the serialized data block to obtain a commodity transaction data packet.
[0113] As an embodiment of the present invention, refer to Figure 3 As shown, Figure 1 Detailed step flow diagram of step S2 in FIG. 1 , in this embodiment, step S2 includes the following steps:
[0114] Step S21: Encrypt the commodity transaction original data using a transaction data encryption algorithm to obtain commodity transaction ciphertext data;
[0115] In the embodiment of the present invention, a specific transaction data encryption algorithm is used to encrypt the original data of commodity transactions. A suitable symmetric encryption algorithm (such as AES) or an asymmetric encryption algorithm (such as RSA) can be selected. The encryption algorithm uses an encryption key to convert the data to ensure the confidentiality and security of the data. The encrypted data becomes an unreadable ciphertext form.
[0116] Step S22: segmenting the commodity transaction ciphertext data to obtain commodity transaction data blocks;
[0117] In the embodiment of the present invention, the commodity transaction ciphertext data can be segmented as needed, and the large block of data can be divided into smaller data blocks. The purpose of data segmentation is to facilitate processing and transmission, reduce the size of the data packet, and improve data processing efficiency. Usually, the commodity transaction ciphertext data can be divided according to fixed-size blocks or other segmentation rules.
[0118] Step S23: Serialize the commodity transaction data block using data serialization technology, and encapsulate the serialized data block to obtain a commodity transaction data packet.
[0119] In the embodiment of the present invention, the data block needs to be serialized and converted into a specific serialization format, such as JSON, XML or Protocol Buffers. Serialization technology can convert the data structure into a linear byte stream for easy transmission and storage. The serialized data block can be encapsulated, and necessary header information, checksum, etc. can be added to form a complete commodity transaction data packet. The encapsulation of the data packet can be defined by a custom protocol or a standard protocol (such as HTTP).
[0120] The data encryption of the present invention protects the privacy and security of transaction data and prevents unauthorized data access; the generation of commodity transaction ciphertext data makes sensitive information unreadable during transmission and storage, thereby improving the confidentiality of data. Data segmentation divides commodity transaction ciphertext data into small blocks to facilitate subsequent processing and transmission; data segmentation can improve the efficiency of data processing and reduce resource usage. Data serialization converts commodity transaction data from objects in memory into byte streams that can be transmitted and stored; encapsulating serialized data blocks into data packets helps to organize and manage data, facilitating transmission and storage; data encapsulation can also add metadata and verification information to provide data integrity and reliability guarantees. The above includes data privacy and security protection, improved data processing efficiency, convenience of data transmission and storage, and guarantees of data integrity and reliability. These effects help to ensure the security and availability of commodity transaction data and provide a reliable data foundation for subsequent data upload, decryption and analysis.
[0121] Preferably, step S21 includes the following steps:
[0122] Step S211: Representing the commodity transaction original data as a matrix to obtain a commodity transaction matrix;
[0123] In the embodiment of the present invention, the commodity transaction raw data needs to be represented in the form of a matrix. A matrix is a two-dimensional data structure consisting of rows and columns. The commodity transaction raw data can be converted into a matrix according to certain rules based on specific data attributes and requirements. For example, transaction data can be divided according to attributes such as time, commodity category, transaction amount, etc., and each row or column represents a specific attribute. In this way, the raw data is represented as a matrix, which provides a basis for subsequent matrix operations and encryption.
[0124] Step S212: Encrypt the commodity transaction matrix using a transaction data encryption algorithm to obtain a commodity transaction ciphertext matrix;
[0125] In the embodiment of the present invention, the commodity transaction matrix is encrypted using the selected symmetric key K and the transaction data encryption algorithm. A common symmetric encryption algorithm can be selected, such as AES (Advanced Encryption Standard). The encryption algorithm uses the symmetric key K as a parameter to encrypt each element of the commodity transaction matrix. The encrypted result forms a commodity transaction ciphertext matrix, in which the elements are encrypted data. The ciphertext matrix can provide confidentiality and security for the original commodity transaction data.
[0126] The function formula of the transaction data encryption algorithm is as follows:
[0127] EncryptedData=f(M)=sin(K*x 2 +3x)+log10 (2x+1), x∈M;
[0128] In the formula, EncryptedData is the commodity transaction ciphertext matrix, f is the transaction data encryption algorithm function, M is the commodity transaction matrix, x is the element in the commodity transaction matrix, and K is the symmetric key of the transaction data encryption algorithm;
[0129] The present invention encrypts the commodity transaction matrix by constructing a functional formula of a transaction data encryption algorithm to obtain a commodity transaction ciphertext matrix; the formula fully considers the transaction data encryption algorithm function f, which acts on each element x in the commodity transaction matrix M, encrypts and converts each transaction data, and generates corresponding ciphertext; commodity transaction matrix M, element x in the commodity transaction matrix, symmetric key K of the transaction data encryption algorithm. Wherein, sin(K*x 2 +3x) The sine function in this expression can perform nonlinear mapping on the original data, increasing the complexity and concealment of the data. The purpose of the design of the transaction data encryption algorithm function is to transform each element in the original commodity transaction matrix through a series of complex nonlinear transformations, including square, multiplication, sine function and logarithmic function, so as to generate an encrypted ciphertext matrix. This design aims to increase the complexity and concealment of the ciphertext, improve the security of the data, and make it difficult for unauthorized users to restore and parse the original transaction data.
[0130] Step S213: performing an inverse operation on the commodity transaction ciphertext matrix to obtain commodity transaction ciphertext data.
[0131] In the embodiment of the present invention, according to the selected encryption algorithm, an inversion operation is applied to the commodity transaction ciphertext matrix. The inversion operation is a mathematical operation that can be implemented by using related techniques of linear algebra or other numerical calculation methods. The inverse of the matrix is unique, which can ensure the security of the encryption algorithm.
[0132] The present invention selects a suitable symmetric key K, which is a key parameter in an encryption algorithm, and can provide strong encryption protection to ensure that only authorized users can decrypt and obtain data; selecting a secure and sufficiently complex symmetric key K can increase the resistance of the encryption algorithm and reduce the risk of being maliciously cracked or attacked. Representing the original commodity transaction data in a matrix form can facilitate matrix operations and encryption operations, and enhance the processing and analysis capabilities of data; the matrix representation can make the data structure clearer, and provide better operability in the subsequent encryption and decryption process. The transaction data encryption algorithm encrypts the commodity transaction matrix to protect the privacy and confidentiality of the data and prevent unauthorized access and leakage; the elements in the commodity transaction ciphertext matrix are encrypted data, and the ciphertext matrix is unreadable for people without the key, which enhances the security and confidentiality of the data. The commodity transaction ciphertext matrix can be converted back to the original commodity transaction data by inverting the operation; the inversion operation provides the data restoration capability, so that the encrypted data can be decrypted and used when needed; the legal decryption operation ensures that only authorized users can restore and obtain the original transaction data, which increases the availability and controllability of the data. The above includes data encryption protection, enhanced data processing and analysis capabilities, data privacy and security protection, data restoration and improved availability. These effects enable commodity transaction data to be securely transmitted, stored and analyzed under the premise of protecting privacy, while ensuring that legitimate users can decrypt and operate data.
[0133] Preferably, step S3 comprises the following steps:
[0134] Step S31: Select Amazon Web Services as the cloud server, register an account, and obtain a commodity transaction cloud server;
[0135] Step S32: creating a storage space on the commodity transaction cloud server, and uploading the commodity transaction data packet to the commodity transaction cloud server using network transmission technology to obtain commodity transaction cloud storage;
[0136] Step S33: decompressing the commodity transaction data packet through the commodity transaction cloud storage to obtain the commodity transaction data to be decrypted.
[0137] As an embodiment of the present invention, refer to Figure 4 As shown, Figure 1 Detailed step flow diagram of step S3 in the embodiment, step S3 includes the following steps:
[0138] Step S31: Select Amazon Web Services as the cloud server, register an account, and obtain a commodity transaction cloud server;
[0139] In the embodiment of the present invention, visit the AWS official website and register an account, provide the required personal or organizational information for registration, select the appropriate AWS service region, which will determine the location and availability of the cloud server, browse various services on the AWS management console to understand their functions and advantages, select the appropriate cloud computing instance (i.e., EC2 instance) according to the needs, configure the necessary computing resources and operating system, start and configure the selected EC2 instance, and ensure network connectivity and necessary security settings.
[0140] Step S32: creating a storage space on the commodity transaction cloud server, and uploading the commodity transaction data packet to the commodity transaction cloud server using network transmission technology to obtain commodity transaction cloud storage;
[0141] In the embodiment of the present invention, in the AWS management console, navigate to the Amazon S3 service, create a new S3 bucket to store the commodity transaction data package, select the appropriate region and naming scheme, configure the permission settings of the bucket as needed, ensure that only authorized users have access to the data, and use appropriate network transmission technology (such as AWS CLI command line tool, AWS SDK or AWS console) to upload the commodity transaction data package to the S3 bucket. The entire data package can be uploaded at once or in blocks, depending on the size of the data package and network conditions. Ensure that the integrity and accuracy of the data is maintained during the upload process. After confirming that the data package is uploaded, verify the data file and folder structure in the bucket.
[0142] Step S33: decompressing the commodity transaction data packet through the commodity transaction cloud storage to obtain the commodity transaction data to be decrypted.
[0143] Before performing the decompression operation on the cloud server in the embodiment of the present invention, please ensure that the corresponding decompression tool has been installed. Common decompression tools include gzip, tar, and zip. To connect to the cloud server, you can use an SSH client to remotely connect or access it through the web terminal provided by the AWS management console, navigate to the directory where the data packet is stored, and use the appropriate decompression command to perform the decompression operation. For example, a command combining gzip and tar can be used to decompress a data packet in .tar.gz or .tgz format. After waiting for the decompression operation to complete, check the decompressed files and directories to ensure that the data packet is successfully decompressed and the file content is complete.
[0144] The present invention selects AWS as a cloud server to obtain reliable infrastructure and rich cloud services. Amazon Web Services (AWS) is a leading cloud service provider. AWS can provide high-availability, elastic and scalable computing resources to meet the needs of the commodity trading system. After registering an account, the cloud server can be easily managed and operated, including configuration, monitoring, deployment and other operations. Creating storage space on the cloud server provides a reliable data storage and management system to ensure that commodity trading data is safely stored on the cloud; using network transmission technology to upload data packets to the cloud server, reliable and efficient data transmission is achieved, avoiding the limitations and delays of physical transmission methods; commodity trading cloud storage provides data backup, fault tolerance and high availability, ensuring data persistence and reliability. Using commodity trading cloud storage to decompress data packets can restore the original data form, facilitating subsequent data processing and decryption operations; the decompressed commodity trading data to be decrypted can be effectively extracted and read for further analysis, processing and business operations; with the help of the high-speed reading and access capabilities of cloud storage, large-scale commodity trading data can be quickly acquired and processed, improving data processing efficiency and system response performance. The above includes obtaining reliable cloud service infrastructure, reliable data storage and management, efficient data transmission, data security and reliability guarantee, data restoration and readability improvement, high-speed reading and access capabilities, etc. These effects enable commodity transaction data to be stored, transmitted and processed safely, reliably and efficiently in the cloud environment, improving the availability, scalability and performance of the system.
[0145] Preferably, step S4 comprises the following steps:
[0146] Step S41: Decrypt the commodity transaction data to be decrypted using a transaction data decryption algorithm to obtain commodity transaction plaintext data;
[0147] In the embodiment of the present invention, the encryption algorithm and key to be used must be determined first, and the corresponding decryption algorithm is used to decrypt the commodity transaction data to be decrypted according to the encryption algorithm and key. This usually involves the step of using the key to decrypt to restore the original plaintext data, ensuring the security of the key during the decryption process, and ensuring that only legitimate users can obtain the decrypted plaintext data.
[0148] Step S42: performing abnormal data processing on the commodity transaction plaintext data through an abnormal data processing algorithm to obtain clean commodity transaction data;
[0149] The selection of abnormal data processing algorithms in the embodiments of the present invention depends on specific needs and data characteristics. Statistical analysis, machine learning, pattern recognition and other methods can be used to detect and process abnormal data, and the selected algorithm is used to perform abnormal detection on commodity transaction plaintext data to identify and mark abnormal data points or data sets. Different processing methods can be selected according to the type and importance of abnormal data, such as removing abnormal data, repairing abnormal data or replacing abnormal data with reasonable estimated values, and performing corresponding abnormal data processing operations to ensure that clean commodity transaction data is obtained and reduce the impact of abnormalities on subsequent analysis or processing.
[0150] Step S43 uses data formatting technology to normalize the clean data of commodity transactions to obtain commodity transaction data to be denoised;
[0151] In the embodiment of the present invention, a data formatting technology suitable for commodity transaction data is determined. For example, structured query language (SQL) can be used for data table design and standardized management, or other data standardization tools and technologies can be used to convert, clean and organize commodity transaction clean data according to data formatting specifications to achieve consistent data representation and structure, and perform data formatting operations, including naming of data fields, definition of data types, data conversion and data cleaning, etc., to ensure data consistency, completeness and accuracy.
[0152] Step S44: using data denoising technology to perform denoising processing on the commodity transaction data to be denoised, to obtain commodity transaction data.
[0153] In the embodiment of the present invention, a data denoising technology suitable for commodity transaction data is selected. Commonly used technologies include filters, outlier detection, smoothing technology, etc. The data denoising technology is applied to process the commodity transaction data to be denoised to filter out noise or abnormal data, improve data quality and accuracy, select a suitable denoising algorithm and parameter settings according to specific needs and data characteristics, run the data denoising algorithm, perform denoising on the commodity transaction data to be denoised, and obtain cleaned and optimized commodity transaction data.
[0154] The present invention restores the encrypted commodity transaction data to plain text data through a decryption algorithm, making the data readable and understandable; the decrypted data can be further analyzed, counted and mined to provide accurate data support for business decisions and business processes. The abnormal data processing algorithm can identify and process abnormal values, abnormal patterns or abnormal behaviors in commodity transaction data; the processed clean data can improve data quality and reduce interference with subsequent data analysis and modeling processes; the cleaned and pre-processed data helps to ensure the accuracy and reliability of the data and improve the accuracy of analysis and decision-making. The data formatting technology organizes and adjusts the commodity transaction data in a specific format to make it conform to specifications and standards; the normalized data is easy to understand and process, which is convenient for subsequent data analysis, mining and visualization; the unified data format helps to improve data consistency and reduce errors and confusion in the data processing process. Data denoising technology can detect and remove noise, abnormal values or invalid data in commodity transaction data; the denoised data has higher quality and credibility, and can provide more accurate data analysis results and business decision-making basis; denoising processing helps to improve data consistency, reliability and availability, thereby improving the performance and effect of the system. The above includes improving the readability and comprehensibility of data, improving data quality, handling outliers, reducing errors and confusion, improving data consistency and credibility, providing accurate analysis results and decision-making basis, etc. These effects help to achieve data cleaning, data standardization, data accuracy and data reliability in the process of commodity trading data processing, thereby providing a better foundation and support for subsequent analysis, modeling and decision-making.
[0155] Preferably, step S41 includes the following steps:
[0156] Step S411: performing an inverse operation on the commodity transaction data to be decrypted to obtain a commodity transaction matrix to be decrypted;
[0157] In the embodiment of the present invention, it is first necessary to clarify the structure and representation of the commodity transaction data to be decrypted, assuming that the data to be decrypted is a data set in the form of a matrix. For the matrix to be decrypted, the inverse operation usually refers to the inverse matrix operation on the matrix. The existence of the inverse matrix is related to the property that the reversible matrix has full rank. Use a suitable mathematical library or software to implement the matrix inversion algorithm in the computer. Common numerical methods include Gaussian elimination, LU decomposition, SVD decomposition, etc. Apply the inversion algorithm to the matrix to be decrypted to obtain the commodity transaction matrix to be decrypted.
[0158] Step S412: Decrypt the commodity transaction matrix to be decrypted using a transaction data decryption algorithm to obtain a commodity transaction plaintext matrix;
[0159] The transaction data decryption algorithm used in the embodiment of the present invention is determined. The specific algorithm selection may depend on the algorithm and key type used when encrypting the data. To implement the selected decryption algorithm, ensure that the decryption key and the commodity transaction matrix to be decrypted are correctly used as inputs, use the decryption algorithm to perform a decryption operation on the commodity transaction matrix to be decrypted to restore the plaintext matrix data, and ensure the security of the decryption operation, including the protection of the key and the restriction of access rights, so as to prevent unauthorized users from obtaining the decrypted plaintext matrix.
[0160] The function formula of the transaction data decryption algorithm is as follows:
[0161]
[0162] Where DecryptedData is the commodity transaction plaintext matrix, g is the inverse function of the transaction data encryption algorithm function, y is the element in the commodity transaction to-be-decrypted matrix, K is the symmetric key of the transaction data encryption algorithm, and C is the commodity transaction to-be-decrypted matrix.
[0163] The present invention decrypts the commodity transaction matrix to be decrypted by constructing a function formula of a transaction data decryption algorithm to obtain a commodity transaction plaintext matrix; the function formula fully considers the inverse function g of the transaction data encryption algorithm function, which is the function of the transaction data decryption algorithm, and acts on each element y in the commodity transaction matrix to be decrypted C. The function g decrypts and converts each transaction data to be decrypted to generate the corresponding plaintext; the element y in the commodity transaction matrix to be decrypted, the symmetric key K of the transaction data encryption algorithm, and the commodity transaction matrix to be decrypted C. Among them, sqrt(sin (-1) The square root operation and inverse trigonometric function operation in the expression (y)-log2(y)) can help restore the data before encryption. In general, the design purpose of the transaction data decryption algorithm function is to generate a decrypted plaintext matrix by subjecting each element in the ciphertext matrix to a series of inverse operations, including inverse trigonometric functions, logarithmic functions, and multiplication. This design is intended to reverse the conversion process of the encryption algorithm so that the ciphertext can be restored to the original transaction data. The inverse function g in the decryption algorithm can achieve data decryption by performing reverse mathematical calculations on the ciphertext.
[0164] Step S413: Convert the commodity transaction plaintext matrix into data form to obtain commodity transaction plaintext data.
[0165] In the embodiment of the present invention, the structure and representation of the commodity transaction plaintext matrix are determined, such as the columns of the matrix corresponding to different data fields, and the rows corresponding to different transaction records. According to the structure of the plaintext matrix, it is converted into a suitable data form, such as tabular data, CSV files or database records, etc. During the data conversion process, the consistency, completeness and accuracy of the data are ensured, including the correct definition of data types, the processing of missing values and the normalization of data formats, etc. The converted data is verified to ensure the correctness and availability of the data.
[0166] The present invention converts the data to be decrypted into a matrix form through an inversion operation; through the inversion operation, the ciphertext data can be restored, providing necessary conversion and preparation for subsequent decryption. The transaction data decryption algorithm uses an appropriate key and decryption algorithm to restore the matrix data to be decrypted into a plaintext matrix; the decrypted plaintext matrix contains the plaintext form of the original transaction data, making it readable and understandable; the decrypted matrix data can be further analyzed, processed and applied to provide accurate data support for subsequent data processing and decision-making. Converting the plaintext matrix into a data form is the process of parsing the matrix data into specific commodity transaction information; by converting the plaintext matrix into a data form, the commodity transaction data can be restored to a readable transaction record and related attributes; the conversion of plaintext data makes commodity transactions more operable and convenient for analysis, providing greater flexibility for subsequent data processing, report generation and decision-making. The above includes: data restoration and decryption, data readability and comprehensibility improvement, data analysis and processing capability enhancement, accurate data support for subsequent data processing and decision-making, commodity transaction information recovery and convenience, report generation and decision-making flexibility improvement, etc. These effects help improve the availability, accuracy, and reliability of commodity trading data, providing a better basis for business decision-making and analysis.
[0167] Preferably, the function formula of the abnormal data processing algorithm in step S43 is as follows:
[0168]
[0169] Where M ciean is the clean data of commodity transaction, M(i, j) is the element in the i-th row and j-th column of the commodity transaction plaintext matrix, μ is the mean of the commodity transaction plaintext data, θ is the threshold parameter in the abnormal data processing algorithm, σ is the standard deviation of the commodity transaction plaintext data, and z is the integral variable.
[0170] The present invention normalizes the clean data of commodity transactions by constructing a function formula of an abnormal data processing algorithm to obtain the commodity transaction data to be denoised; the function formula fully takes into account the clean data M of commodity transactions. ciean, represents the clean data of commodity transactions, that is, the result after being processed by the abnormal data processing algorithm, which corresponds to the element in the i-th row and j-th column of the commodity transaction plaintext matrix; M(i, j) is the element in the i-th row and j-th column of the commodity transaction plaintext matrix, μ is the mean of the commodity transaction plaintext data, θ is the threshold parameter in the abnormal data processing algorithm, σ is the standard deviation of the commodity transaction plaintext data, and z is the integral variable. Among them, ifM(i, j)>μ+θ*σ is the first part of the abnormal data processing algorithm. This part of the processing is executed when the element M(i, j) in the i-th row and j-th column of the commodity transaction plaintext matrix is greater than μ+θ*σ. This part of the processing uses the probability density function (PDF) calculation to integrate the integral variable z in front of M(i, j) from negative infinity to M(i, j). The specific calculation uses the probability density function of the normal distribution, where μ is the mean of the plaintext data and σ is the standard deviation of the plaintext data. The purpose of this part of the processing is to eliminate abnormal data above the threshold range.
[0171] and ifM(i, j)<μ-θ*σ is the second part of the abnormal data processing algorithm. When the element M(i, j) in the i-th row and j-th column of the commodity transaction plaintext matrix is less than μ-θ*σ, this part of the processing is executed. This part of the processing is also calculated using the probability density function (PDF). The integral variable z after M(i, j) is integrated from M(i, j) to positive infinity. The probability density function of the normal distribution is still used, where μ is the mean of the plaintext data and σ is the standard deviation of the plaintext data. The purpose of this part of the processing is to eliminate abnormal data below the threshold range. In summary, the function formula of the abnormal data processing algorithm describes how to process abnormal data in the commodity transaction plaintext matrix. By calculating the probability density function and performing the integration operation according to the threshold parameter and the statistical characteristics of the plaintext data, the data above or below the threshold range can be eliminated, thereby obtaining clean commodity transaction data. The main idea of this algorithm is based on the normal distribution assumption, and the data exceeding the threshold range is regarded as abnormal data and excluded from the overall data.
[0172] Preferably, step S5 comprises the following steps:
[0173] Step S51: backing up commodity transaction data according to a preset time point and frequency to obtain commodity transaction backup data;
[0174] Step S52: using a preset commodity transaction data analysis model to perform data analysis on the commodity transaction backup data to obtain commodity transaction data analysis results;
[0175] Step S53: Use visualization technology to display the analysis results of commodity transaction data in charts to support merchants in making decisions.
[0176] As an embodiment of the present invention, refer to Figure 5 As shown, Figure 1 FIG. 5 is a schematic diagram of a detailed step flow chart of step S5 in FIG. 5 . In this embodiment, step S5 includes the following steps:
[0177] Step S51: backing up commodity transaction data according to a preset time point and frequency to obtain commodity transaction backup data;
[0178] In the embodiment of the present invention, the source and storage method of the commodity transaction data, such as database, log file, etc., are first determined, and a reasonable backup strategy is designed, including the time point and frequency of the backup. The time point can be daily, weekly or monthly, etc., and the frequency can be one or more backups. According to the backup strategy, write an automated script or use related backup tools to trigger the backup operation at a preset time point. During the backup process, ensure the integrity and consistency of the data. Compression and encryption and other technologies can be used to optimize the backup process and data security. Perform the backup operation at the preset time point and frequency, and copy the commodity transaction data to the backup storage location. The backup storage can be a local disk, network storage or cloud storage, etc.
[0179] Step S52: using a preset commodity transaction data analysis model to perform data analysis on the commodity transaction backup data to obtain commodity transaction data analysis results;
[0180] In the embodiment of the present invention, the commodity transaction data analysis model and algorithm to be used are determined. These models can be statistical models, machine learning models, time series analysis models, etc., and appropriate models are selected according to the needs to prepare commodity transaction backup data to ensure the integrity and accuracy of the data. According to the requirements of the analysis model, data cleaning, preprocessing and feature engineering steps are performed, the selected commodity transaction data analysis model is implemented, and the backup data is trained or predicted using the corresponding algorithm. According to the objectives of the analysis model, the commodity transaction data analysis results are obtained. This may be to predict sales trends, discover abnormal transactions, identify key performance indicators, etc., and the analysis results are verified and evaluated to ensure the accuracy and interpretability of the results.
[0181] Step S53: Use visualization technology to display the analysis results of commodity transaction data in charts to support merchants in making decisions.
[0182] In the embodiment of the present invention, a suitable visualization tool or library is selected, such as Tableau, Power BI, matplotlib, etc., according to the merchant needs and the characteristics of the data analysis results, according to the analysis objectives and results, the key indicators, variables and trends that need to be displayed are determined, and the selected visualization tool is used to convert the commodity transaction data analysis results into charts, graphs or dashboards, etc., and the layout, color, label and interaction method of the chart are defined so that the merchant can clearly understand and interpret the analysis results, ensure the readability and operability of the visualization results, and provide interactive functions such as filtering, zooming in and out, dynamic display, etc., so that the merchant can explore the data in depth and make decisions.
[0183] The present invention can prevent data loss or damage by regularly backing up commodity transaction data, and ensure the integrity and recoverability of merchant transaction records. Data backup is an important data management and risk management strategy to ensure the security and reliability of data. Commodity transaction backup data provides a data source for backtracking so that data can be restored and analyzed when needed. Commodity transaction data analysis can reveal potential patterns, trends and correlations in data to gain insights and understanding of relevant transaction activities; by applying a preset commodity transaction data analysis model, backup data can be deeply analyzed to discover information about sales, customer behavior, commodity trends, etc.; commodity transaction data analysis results can be used to support business activities such as decision making, market positioning, inventory management, and optimization of transaction processes. Visualization technology can present data analysis results in the form of charts, graphs, and images, making complex data easy to understand and interpret; chart display can help merchants visually grasp the trends, correlations, and anomalies of commodity transaction data, and provide intuitive data expression methods; through visual presentation, merchants can better understand and analyze commodity transaction data analysis results, so as to make data-based decisions, such as adjusting product pricing strategies, optimizing marketing plans, and improving supply chain management. These effects include ensuring data security, obtaining data insights, and providing decision support. These effects help merchants better understand and manage commodity transaction data, thereby optimizing business processes and making strategic decisions.
[0184] Preferably, step S52 includes the following steps:
[0185] Step S521: Divide the commodity transaction backup data into a training data set, a verification data set, and a test data set;
[0186] In the embodiment of the present invention, first, according to the ratio of the data set to be divided, for example, training set: validation set: test set = 70%: 15%: 15%, data of corresponding ratio is randomly selected from the commodity transaction backup data to ensure that the division of the data set is random and can represent the distribution and characteristics of the overall data to avoid deviation or overfitting problems. The division of the data set should take time factors into consideration to ensure that the training set contains early transaction data, the validation set contains mid-term data, and the test set contains recent transaction data.
[0187] Step S522: constructing a commodity transaction data analysis model based on a deep learning neural network;
[0188] In the embodiment of the present invention, an appropriate deep learning neural network architecture is selected, such as a convolutional neural network (CNN), a recurrent neural network (RNN) or a Transformer, etc., to process the characteristics and patterns of commodity transaction data, and define the input and output of the model. The input can be a feature vector of commodity transactions, and the output can be sales forecasts, anomaly detection, etc. The training data set is used to train the neural network model. The parameters of the model are adjusted by the back propagation algorithm and the optimizer to reduce the gap between the predicted output and the true value. The performance and generalization ability of the model are evaluated using the validation data set. The validity of the model is verified by calculating evaluation indicators (such as accuracy, mean square error, etc.), and necessary adjustments and improvements are made. The adjusted and improved model is tested, and the performance of the model is evaluated using the test data set. Compare the predicted results of the model with the actual results, and analyze the accuracy, recall rate, precision and other indicators of the model.
[0189] Step S523: input the training data set into the commodity transaction data analysis model based on the deep learning neural network for model training to obtain a verification model; and input the verification data set into the verification model for parameter tuning through the data analysis loss function to generate a test model;
[0190] In the embodiment of the present invention, the divided training data set is input into the deep learning neural network for model training. The data can be processed in batches to improve the training efficiency. During the training process, the difference between the predicted result and the actual result is evaluated by calculating the loss function (such as the mean square error). The weights and biases of the model are updated using the back propagation algorithm and the optimizer to minimize the loss function. During the training process, the performance of the model is evaluated using the validation data set. By calculating the loss value and evaluation index on the validation set, the hyperparameters and architecture of the model are adjusted to improve the generalization ability of the model. Through the iterative process of repeated training and verification, a model that performs well on the validation data set is obtained, that is, the validation model.
[0191] Among them, the formula of the data analysis loss function is as follows:
[0192]
[0193] Where L(β) is the data analysis loss function, Ω is the domain of the loss function, N is the number of validation data sets, and w n is the weight of the nth data in the validation data set, β is the parameter of the validation model, and v n is the data point of the nth validation data set in the domain, v is the integral variable on the domain Ω, f(v n , β) is the output result of the verification model, g(v n ) is the true value of the target in the definition domain, λ1 and λ2 are the weight parameters of the regularization term, is the parameter gradient of the validation model, and β0 is the reference parameter of the validation model;
[0194] The present invention constructs a formula for a data analysis loss function to input the validation data set into the validation model for parameter tuning to generate a test model; the formula fully takes into account the data analysis loss function L(β), the domain of the loss function Ω, the number of validation data sets N, and the weight w of the nth data in the validation data set. n , the parameter β of the validation model, the data point v of the nth validation dataset in the definition domain n , verify the output of the model f(v n , β), defines the true value of the target in the domain g(v n ), the weight parameters λ1 and λ2 of the regularization term, and the parameter gradient of the validation model The reference parameter β0 of the verification model; where, is the data prediction error term, which is used to measure the difference between the output of the validation model and the true value. It is the integral of the square of the difference between the predicted value and the true value of all data points on the domain Ω. Specifically, for each data point v in the validation data set, n ,f(v n , β) is the prediction result of the validation model based on the parameter β for this data point, g(v n ) is the true value of the data point, and the weight w is used for weighted summation. n The prediction errors for each data point are synthesized; is a parameter smoothing term or regularization term, which is used to control the smoothness of the validation model parameter β. is the gradient of β, which represents the rate of change of parameter β over the domain Ω, The modulus of the gradient of β, that is, the magnitude of the change of parameter β in the domain Ω; λ2∫ Ω |β-β0| 2dv is a parameter penalty or regularization term, which is used to make the parameter β of the validation model close to the reference parameter β0. β0 is a reference parameter, which can be a set of predefined parameter values or a parameter value obtained based on prior knowledge. |β-β0| represents the absolute value of the difference between the parameter β and the reference parameter β0. This term penalizes the deviation of the parameter β from the reference parameter β0 by integrating the square of the difference between the parameter β and the reference parameter β0. λ2 is the weight parameter of the regularization term, which is used to control the importance of the parameter penalty term in the entire loss function. This term penalizes the parameter β when it changes too much or is not smooth by integrating the square of the gradient norm of the parameter β. λ1 is the weight parameter of the regularization term, which is used to adjust the importance of the smoothing term in the entire loss function. In summary, the formula of the data analysis loss function comprehensively considers the prediction error term, the parameter smoothing term, and the parameter penalty term. It is used to comprehensively evaluate the difference between the prediction result of the validation model and the true value, and control the smoothness of the model parameters and the degree of closeness to the reference parameter. The weight parameters λ1 and λ2 can be adjusted according to the specific problem and requirements to balance the importance of different terms in the entire loss function. Minimizing the loss function can help optimize the validation model to achieve better performance on the given data.
[0195] Step S524: input the test data set into the test model after parameter optimization for model testing to obtain an optimized commodity transaction data analysis model; re-input the commodity transaction backup data into the optimized commodity transaction data analysis model for data analysis to obtain the commodity transaction data analysis results.
[0196] In the embodiment of the present invention, the divided test data set is input into the parameter-optimized model for model testing. The trained model is used to predict or classify the test data set. By predicting and classifying the test data set, the performance evaluation indicators of the model on the new data, such as accuracy, recall, etc., are obtained. If the performance of the model still meets the requirements, the commodity transaction backup data is input into the optimized model for data analysis to obtain various analysis results of the commodity transaction data. The analysis results can be sales trend prediction, abnormal transaction detection, key performance indicator calculation, etc., which can be customized according to the needs and goals of the merchant.
[0197] The present invention divides the data set into common steps for machine learning and deep learning tasks to evaluate the performance and generalization ability of the model. By dividing the data set, the model can be trained using the training data set, the model can be parameterized by the verification data set, and the performance of the model can be evaluated using the test data set. Dividing the data set helps to avoid problems such as overfitting (the model overfits the training data) and underfitting (the model cannot capture the pattern in the data), and improves the accuracy and reliability of the model. The deep learning neural network has a strong expressive ability and can analyze commodity transaction data by learning nonlinear patterns and feature relationships in the data. Constructing a commodity transaction data analysis model can help merchants to mine hidden information in the data, extract useful features and patterns, and use them to predict sales trends, identify abnormal transactions, and other tasks. The model can optimize the parameters of the model through the process of training, verification, and testing, and improve its predictive and generalization capabilities. The model training process uses the training data set to learn the representation of patterns and features, thereby establishing the weights and biases of the model. By optimizing the loss function, the model can adjust the parameters to reduce the error between the predicted results and the actual results, and improve the model's ability to fit the data. By tuning the parameters of the model through the verification data set, overfitting can be avoided and the best model parameter configuration can be selected. By evaluating the optimized model using a test data set, the performance and accuracy of the model can be objectively measured; the optimized commodity transaction data analysis model can more accurately predict and analyze commodity transaction behavior, helping merchants make more informed decisions; re-entering the commodity transaction backup data into the optimized model for data analysis can obtain useful insights into sales trends, market demand, and customer behavior, providing merchants with data-based business decision support. In summary, the beneficial effects of the above steps include accuracy evaluation of data set partitioning, effective use of deep learning neural network models, and improved prediction accuracy through parameter tuning and model optimization. Through these steps, merchants can build and apply optimized commodity transaction data analysis models to improve their understanding and decision-making capabilities of commodity transaction data, thereby optimizing business operations and market competitiveness.
[0198] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0199] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A transaction data processing method based on cloud storage and NFC, characterized in that: The following steps are involved: Step S1: collect transaction data of smart devices in real time through NFC technology to obtain original commodity transaction data; Step S1 includes the following steps: Step S11: using NFC technology to establish a near field communication connection between the user's smart device and the merchant's transaction device when the two are close to each other; Step S12: The merchant's transaction device reads transaction information from the user's smart device through a near field communication connection to obtain the commodity transaction data to be processed; Step S13: using data cleaning technology to clean the commodity transaction data to be processed, and obtaining the original commodity transaction data; Step S2: Encrypt the commodity transaction original data using the transaction data encryption algorithm to obtain commodity transaction ciphertext data; package the commodity transaction ciphertext data to obtain a commodity transaction data packet; wherein step S2 includes the following steps: Step S21: Encrypt the commodity transaction original data using a transaction data encryption algorithm to obtain commodity transaction ciphertext data; wherein step S21 includes the following steps: Step S211: Representing the commodity transaction original data as a matrix to obtain a commodity transaction matrix; Step S212: Encrypt the commodity transaction matrix using a transaction data encryption algorithm to obtain a commodity transaction ciphertext matrix; wherein the function formula of the transaction data encryption algorithm is as follows: EncryptedData=f(M)=sin(K*x 2 +3x)+log 10 (2x+1),x∈M; In the formula, EncryptedData is the commodity transaction ciphertext matrix, f is the transaction data encryption algorithm function, M is the commodity transaction matrix, x is the element in the commodity transaction matrix, and K is the symmetric key of the transaction data encryption algorithm; Step S213: performing an inverse operation on the commodity transaction ciphertext matrix to obtain commodity transaction ciphertext data; Step S22: segmenting the commodity transaction ciphertext data to obtain commodity transaction data blocks; Step S23: serializing the commodity transaction data block using data serialization technology, and encapsulating the serialized data block to obtain a commodity transaction data packet; Step S3: Upload the commodity transaction data packet to a preset cloud server to obtain commodity transaction cloud storage; decompress the commodity transaction data packet to obtain commodity transaction data to be decrypted; Step S3 includes the following steps: Step S31: Select Amazon Web Services as the cloud server, register an account, and obtain a commodity transaction cloud server; Step S32: creating a storage space on the commodity transaction cloud server, and uploading the commodity transaction data packet to the commodity transaction cloud server using network transmission technology to obtain commodity transaction cloud storage; Step S33: decompressing the commodity transaction data packet through the commodity transaction cloud storage to obtain the commodity transaction data to be decrypted; Step S4: decrypt the commodity transaction data to be decrypted using a transaction data decryption algorithm, and perform data preprocessing to obtain commodity transaction data; wherein step S4 includes the following steps: Step S41: Decrypt the commodity transaction data to be decrypted using a transaction data decryption algorithm to obtain commodity transaction plaintext data; wherein step S41 includes the following steps: Step S411: performing an inverse operation on the commodity transaction data to be decrypted to obtain a commodity transaction matrix to be decrypted; Step S412: Decrypt the commodity transaction matrix to be decrypted using a transaction data decryption algorithm to obtain a commodity transaction plaintext matrix; The function formula of the transaction data decryption algorithm is as follows: In the formula, DecryptedData is the commodity transaction plaintext matrix, g is the inverse function of the transaction data encryption algorithm function, y is the element in the commodity transaction to be decrypted matrix, K is the symmetric key of the transaction data encryption algorithm, and C is the commodity transaction to be decrypted matrix; Step S413: converting the commodity transaction plaintext matrix into data form to obtain commodity transaction plaintext data; Step S42: Perform abnormal data processing on the commodity transaction plaintext data through an abnormal data processing algorithm to obtain clean commodity transaction data; wherein the function formula of the abnormal data processing algorithm is as follows: Where M clean is the clean data of commodity transaction, M(i,j) is the element of the i-th row and j-th column of the commodity transaction plaintext matrix, μ is the mean of the commodity transaction plaintext data, θ is the threshold parameter in the abnormal data processing algorithm, σ is the standard deviation of the commodity transaction plaintext data, and z is the integral variable; Step S43 uses data formatting technology to normalize the clean data of commodity transactions to obtain commodity transaction data to be denoised; Step S44: using data noise reduction technology to perform noise reduction processing on the commodity transaction data to be noise reduced, and obtain commodity transaction data; Step S5: regularly backing up the commodity transaction data in cloud storage, and performing data analysis to obtain commodity transaction data analysis results; using visualization technology to display the commodity transaction data analysis results in charts to assist merchants in making decisions; Step S5 includes the following steps: Step S51: backing up commodity transaction data according to a preset time point and frequency to obtain commodity transaction backup data; Step S52: using a preset commodity transaction data analysis model to perform data analysis on the commodity transaction backup data to obtain commodity transaction data analysis results; Step S52 includes the following steps: Step S521: Divide the commodity transaction backup data into a training data set, a verification data set, and a test data set; Step S522: constructing a commodity transaction data analysis model based on a deep learning neural network; Step S523: input the training data set into the commodity transaction data analysis model based on the deep learning neural network for model training to obtain a verification model; and input the verification data set into the verification model for parameter tuning through the data analysis loss function to generate a test model; wherein the formula of the data analysis loss function is as follows: Where L(β) is the data analysis loss function, Ω is the domain of the loss function, N is the number of validation data sets, and w n is the weight of the nth data in the validation data set, β is the parameter of the validation model, and v n is the data point of the nth validation data set in the domain, v is the integral variable on the domain Ω, f(v n ,β) is the output result of the verification model, g(v n ) is the true value of the target in the definition domain, λ1 and λ2 are the weight parameters of the regularization term, is the parameter gradient of the validation model, and β0 is the reference parameter of the validation model; Step S524: input the test data set into the test model after parameter optimization to perform model testing, and obtain an optimized commodity transaction data analysis model; re-input the commodity transaction backup data into the optimized commodity transaction data analysis model to perform data analysis, and obtain commodity transaction data analysis results; Step S53: Use visualization technology to display the analysis results of commodity transaction data in charts to support merchants in making decisions.
