A transaction data processing method and system of a virtual commodity transaction platform
By encrypting transaction data on a virtual goods trading platform using fully homomorphic encryption and asymmetric public-key encryption technologies, the security issues caused by plaintext processing of transaction data are resolved, thereby improving data security and processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-03-24
AI Technical Summary
The transaction data of existing virtual goods trading platforms is decrypted into plaintext on the server side, which poses a risk of internal data leakage and user privacy leakage. Furthermore, when the server is attacked from the outside, the plaintext data is completely exposed, resulting in low security.
The system employs a fully homomorphic encryption algorithm to generate the first public and private keys, and an asymmetric public-key encryption algorithm to generate the second public and private keys. Sensitive transaction parameter data is encrypted, the server performs ciphertext operations and business verification, and the client decrypts the data to obtain the transaction result. The transaction parameter calculation strategy is divided into high-frequency and low-frequency strategies to optimize the allocation of computing resources.
It improves data security during virtual goods transactions, prevents user privacy leaks, and enhances transaction data processing efficiency while ensuring security, thus avoiding memory waste.
Smart Images

Figure CN121077664B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a transaction data processing method and system of virtual commodity transaction platform. BACKGROUND
[0002] At present, the virtual commodity transaction platform generally adopts the method of "encrypted transmission + plaintext processing", and the specific steps are as follows: the client uses HTTPS protocol and transmits transaction data to the server based on TLS / SSL encryption, the server decrypts the data after receiving to process the transaction in plaintext form, including price calculation, transaction matching, risk assessment and other business logic operations, and finally returns the processing result to the client after encryption. Since the transaction data of the existing technology must be decrypted to plaintext on the server side for processing, platform personnel, database administrators and other internal staff can directly access the complete transaction data of the user, which has the risk of internal data leakage. At the same time, once the server is attacked externally, all plaintext data will be completely exposed, resulting in user privacy leakage and property loss, and there is a problem of low security. SUMMARY
[0003] The main purpose of the embodiment of the present application is to provide a transaction data processing method and system of virtual commodity transaction platform, which aims to improve the data security in the virtual commodity transaction process and prevent user privacy leakage.
[0004] To achieve the above purpose, one aspect of the embodiment of the present application provides a transaction data processing method of virtual commodity transaction platform, which comprises:
[0005] The service end constructs a homomorphic operation strategy table according to the historical transaction parameter calculation strategy of each client;
[0006] The client generates a first public key and a first private key based on a fully homomorphic encryption algorithm, and generates a second public key and a second private key based on an asymmetric public key encryption algorithm;
[0007] The client extracts commodity transaction information; wherein the commodity transaction information includes transaction parameter data, transaction record data and transaction parameter calculation strategy;
[0008] The client encrypts the transaction parameter data using the first public key to generate transaction parameter ciphertext, and encrypts the transaction record data using the second public key to generate transaction record ciphertext;
[0009] The server extracts a homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table, performs operation on the transaction parameter ciphertext according to the homomorphic operation method, and obtains operation result ciphertext; performs business verification on the transaction record ciphertext, and encrypts the verification result by using the second public key to obtain verification result ciphertext;
[0010] The client obtains the operation result ciphertext and the verification result ciphertext, decrypts the operation result ciphertext by using the first private key to obtain operation result plaintext, decrypts the verification result ciphertext by using the second private key to obtain verification result plaintext, and integrates the operation result plaintext and the verification result plaintext to obtain a transaction result.
[0011] In some embodiments, the server constructs a homomorphic operation strategy table according to the historical transaction parameter calculation strategies of the clients, including the following steps:
[0012] Obtain and count the historical transaction parameter calculation strategies of the clients and the use frequency of the transaction parameter calculation strategies;
[0013] Convert the transaction parameter calculation strategies into corresponding homomorphic operation formulas;
[0014] According to the use frequency, the transaction parameter calculation strategies are divided into high-frequency strategies and low-frequency strategies;
[0015] The homomorphic operation formulas of the high-frequency strategies are stored in the memory database of the server;
[0016] The homomorphic operation formulas of the low-frequency strategies are stored in the disk database of the server;
[0017] An identifier of the transaction parameter calculation strategy and a storage location index of the homomorphic operation formula are corresponded to form a homomorphic operation strategy table.
[0018] In some embodiments, the step of generating the first public key and the first private key includes:
[0019] A secret polynomial including a plurality of coefficients is created by a random number generator;
[0020] The secret polynomial is used as the first private key;
[0021] A first polynomial and a first error polynomial are randomly generated;
[0022] The first public key is calculated according to the secret polynomial, the first polynomial and the first error polynomial.
[0023] In some embodiments, the step of generating the second public key and the second private key includes:
[0024] Determine the parameters of the elliptic curve; wherein, the elliptic curve parameters include a first coefficient, a second coefficient, and a base point;
[0025] Generate random integers using a random number generator;
[0026] The random integer is determined as the second private key;
[0027] The second public key is calculated using the second private key and the base point through the dot product of elliptic curves.
[0028] In some embodiments, the transaction parameter data is encrypted using the first public key to generate ciphertext transaction parameters, including the following steps:
[0029] Choose a randomized polynomial, a second-error polynomial, and a third-error polynomial;
[0030] The transaction parameter data is calculated based on the first public key, the random polynomial, and the second error polynomial to obtain the first ciphertext;
[0031] The transaction parameter data is calculated based on the first public key, the random polynomial, and the third error polynomial to obtain the second ciphertext;
[0032] The first ciphertext and the second ciphertext are combined to form the transaction parameter ciphertext.
[0033] In some embodiments, the client extracts product transaction information, including the following steps:
[0034] The client extracts the unit price of goods from the commodity transaction information based on regular expressions for currency symbols and numerical formats.
[0035] Based on the sequence labeling model, the transaction timestamp, user identity identifier, trademark identifier, and product quantity are extracted from the product transaction information;
[0036] Based on keyword dictionary matching algorithm and support vector machine classification algorithm, the rules for calculating cumulative amount, handling fee and member discount are identified from the commodity transaction information.
[0037] In some embodiments, the steps of the server extracting the homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table, performing operations on the ciphertext of the transaction parameters according to the homomorphic operation method to obtain the ciphertext of the operation result; performing business verification on the ciphertext of the transaction record, and encrypting the verification result using the second public key to obtain the ciphertext of the verification result, include:
[0038] The server receives the encrypted transaction parameters, the encrypted transaction record, and the transaction parameter calculation strategy.
[0039] Based on the transaction parameters, the strategy identifier corresponding to the strategy is calculated, and the corresponding homomorphic operation method is looked up in the homomorphic operation table.
[0040] According to the homomorphic operation method, arithmetic operations are performed in the ciphertext field of homomorphic encryption to obtain the ciphertext of the operation result;
[0041] The server extracts elliptic curve points and encrypted data from the ciphertext of the transaction record;
[0042] The shared key is calculated using the second private key;
[0043] The original transaction record data is restored using a symmetric decryption algorithm; wherein, the original transaction record data includes user identity identifier, product identifier, and transaction timestamp;
[0044] Perform a business compliance check on the original transaction record data to obtain the verification results;
[0045] The verification result is encrypted using the second public key to obtain the ciphertext of the verification result.
[0046] In some embodiments, the method further includes the following steps:
[0047] The client encapsulates the encrypted transaction parameters, the encrypted transaction record, and the transaction parameter calculation strategy to generate a transaction data packet, and calculates the hash digest value of the transaction data packet.
[0048] The server obtains the transaction data packet, performs integrity verification on the transaction data packet based on the hash digest value, and after successful verification, disassembles the transaction data packet to obtain the ciphertext of the transaction parameters, the ciphertext of the transaction record, and the transaction parameter calculation strategy.
[0049] In some embodiments, the method further includes the following steps:
[0050] The client uses a threshold-shared secret algorithm to split the first private key into multiple private key fragments;
[0051] The private key is fragmented and sent to multiple trusted nodes for storage;
[0052] After receiving the ciphertext of the computation result, the client sends a decryption request for the ciphertext of the computation result to the trusted node to obtain a sub-decryption result;
[0053] The sub-decryption results fed back by each trusted node are reconstructed to obtain the complete decryption result.
[0054] To achieve the above objectives, another aspect of this application proposes a transaction data processing system for a virtual goods trading platform, the system comprising:
[0055] The server is used to construct a homomorphic operation strategy table based on the historical transaction parameters of each client; extract the homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table; perform operation on the ciphertext of the transaction parameters according to the homomorphic operation method to obtain the ciphertext of the operation result; perform business verification on the ciphertext of the transaction record, and encrypt the verification result using the second public key to obtain the ciphertext of the verification result.
[0056] The client is used to generate a first public key and a first private key based on a fully homomorphic encryption algorithm, and a second public key and a second private key based on an asymmetric public-key encryption algorithm; extract commodity transaction information, wherein the commodity transaction information includes transaction parameter data, transaction record data, and transaction parameter calculation strategy; encrypt the transaction parameter data using the first public key to generate ciphertext of transaction parameters; encrypt the transaction record data using the second public key to generate ciphertext of transaction records; obtain the ciphertext of the calculation result and the ciphertext of the verification result; decrypt the ciphertext of the calculation result using the first private key to obtain the plaintext of the calculation result; decrypt the ciphertext of the verification result using the second private key to obtain the plaintext of the verification result; and integrate the plaintext of the calculation result and the plaintext of the verification result to obtain the transaction result.
[0057] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.
[0058] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0059] The embodiments of this application include at least the following beneficial effects: This application provides a transaction data processing method and system for a virtual goods trading platform. This scheme constructs a homomorphic operation strategy table on the server side, generates a first public key and a first private key on the client side based on a fully homomorphic encryption algorithm, and generates a second public key and a second private key based on an asymmetric public key encryption algorithm. The more sensitive transaction parameter data is encrypted using the first public key, while the less sensitive transaction data is encrypted using the second public key. The ciphertext of the transaction parameters, the ciphertext of the transaction record, and the transaction parameter calculation strategy are encapsulated to generate a transaction data packet, and the hash digest value of the transaction data packet is calculated. Based on the fully homomorphic operation strategy table, ciphertext operations and business verification are performed on the server side, and then the results are sent back to the client for decryption to obtain the plaintext of the transaction result. This can improve data security during virtual goods transactions and prevent user privacy leaks. Using two sets of keys also ensures transaction data processing efficiency while improving data security. Furthermore, dividing the transaction parameter calculation strategy into high-frequency and low-frequency strategies is beneficial for improving the allocation of computing resources, avoiding memory waste, and further improving the processing efficiency of transaction data. Attached Figure Description
[0060] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0061] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application;
[0062] Figure 2 This is a flowchart illustrating a transaction data processing method for a virtual goods trading platform provided in an embodiment of this application;
[0063] Figure 3 This is a schematic diagram of the transaction data processing flow provided in the embodiments of this application;
[0064] Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0066] Although functional modules are divided in the system diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100," "second / S200," etc., in the specification, claims, and the aforementioned figures are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0067] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0068] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0069] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0071] It is understood that the transaction data processing method for a virtual goods trading platform provided in this embodiment of the invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.
[0072] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the present invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.
[0073] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0074] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0075] Terminal 102 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.
[0076] This application can be used in a variety of general-purpose or special-purpose computer system environments or configurations. It can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside on local and remote computer storage media, including storage devices.
[0077] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0078] In related technologies, virtual goods trading platforms commonly employ an "encrypted transmission + plaintext processing" method. The specific steps are as follows: the client uses the HTTPS protocol and TLS / SSL encryption to transmit transaction data to the server. Upon receiving the data, the server decrypts it and processes it in plaintext, including business logic operations such as price calculation, transaction matching, and risk assessment. Finally, the processed results are encrypted and returned to the client. Because the transaction data in this existing technology must be decrypted into plaintext on the server side for processing, internal staff such as platform technicians and database administrators can directly access users' complete transaction data, posing a risk of internal data leakage. Furthermore, if the server suffers an external attack, all plaintext data will be completely exposed, leading to user privacy breaches and financial losses, indicating a low level of security.
[0079] In view of this, this application provides a method and system for processing transaction data on a virtual goods trading platform. This scheme employs two key pairs. For highly sensitive transaction parameter data, homomorphic encryption technology is used to enable direct computation of the encrypted data on the server side, avoiding the exposure of sensitive data and reducing the risk of data leakage in the trading system. For less sensitive transaction record data, asymmetric public-key encryption technology is used, enabling fast encryption. Through these two key pairs, the overall transaction data processing efficiency of the virtual goods trading platform can be improved while ensuring the protection of core data privacy. Furthermore, dividing the transaction parameter calculation strategy into high-frequency and low-frequency strategies helps improve the allocation of computing resources, avoids memory waste, and further improves the processing efficiency of transaction data.
[0080] Figure 2This is an optional flowchart of a transaction data processing method for a virtual goods trading platform provided in an embodiment of this application. Figure 2 The method may include, but is not limited to, steps S100 to S600.
[0081] In step S100, the server calculates the strategy based on the historical transaction parameters of each client and constructs a homomorphic operation strategy table.
[0082] Specifically, transaction parameter calculation strategies include identifiers used to calculate transaction parameters, such as rules for cumulative amount calculation, transaction fee calculation, or membership discount calculation. These identifiers guide the server in performing homomorphic operations. The homomorphic operation strategy table stores various transaction parameter calculation strategies and their corresponding homomorphic operation methods in the form of a hash table. The server can look up the corresponding operation instruction sequence in the homomorphic operation table based on the strategy identifier. For example, when encountering a "transaction fee calculation rule," it will instruct the server to first perform a multiplication operation to calculate the transaction fee amount, and then perform an addition operation to add the transaction fee amount to the original amount. When encountering a "membership discount calculation rule," it will instruct the server to perform only one multiplication operation to apply the discount ratio.
[0083] The server obtains and counts the historical transaction parameter calculation strategies and usage frequency of each client, converts the transaction parameter calculation strategies into corresponding homomorphic operation formulas, and divides the transaction parameter calculation strategies into high-frequency strategies and low-frequency strategies according to usage frequency. The homomorphic operation formulas of high-frequency strategies are stored in the server's memory database, and the homomorphic operation formulas of low-frequency strategies are stored in the server's disk database. A correspondence is established between the identifier of the transaction parameter calculation strategy and the storage location index of the homomorphic operation formula, forming a homomorphic operation strategy table.
[0084] By stratifying transaction parameter calculation strategies based on usage frequency, high-frequency strategies can benefit from memory and access speed, while low-frequency strategies can avoid memory waste through disk storage. This improves overall system performance and optimizes resource allocation, ensuring that the system can still quickly locate and execute corresponding calculations under large-scale concurrent requests, thereby improving the efficiency of transaction data processing.
[0085] In step S200, the client generates a first public key and a first private key based on a fully homomorphic encryption algorithm, and generates a second public key and a second private key based on an asymmetric public key encryption algorithm.
[0086] Fully homomorphic encryption algorithms can be BGV (Brakerski-Gentry-Vaikuntanathan), BFV (Brakerski / Fan-Vercauteren), or CKKS (Cheon-Kim-Kim-Song), while asymmetric encryption algorithms can be SM2 elliptic curve public-key cryptography, RSA (Rivest–Shamir–Adleman), etc.
[0087] The client generates two key pairs locally, referred to as the first public key and the first private key, and the second public key and the second private key, respectively.
[0088] The main steps for generating the first public key and the first private key are as follows: create a secret polynomial with several coefficients using a random number generator, and use this secret polynomial as the first private key; randomly generate the first polynomial and the first error polynomial, and calculate the first public key based on the secret polynomial, the first polynomial, and the first error polynomial.
[0089] The main steps for generating the second public key and the second private key are as follows: First, determine the elliptic curve parameters, which include the first coefficient, the second coefficient, and the base point. Then, generate a random integer using a random number generator. Use the generated random integer as the second private key. Finally, calculate the second public key using the dot multiplication method of the elliptic curve based on the second private key and the base point.
[0090] Step S300: The client extracts the commodity transaction information; wherein, the commodity transaction information includes transaction parameter data, transaction record data, and transaction parameter calculation strategy.
[0091] Transaction parameter data includes product unit price, transaction quantity, etc.; transaction record data includes timestamp, user identity identifier, product identifier, etc.; transaction parameter calculation strategy is a strategy identifier that guides the server-side homomorphic operation, including identifiers for cumulative amount calculation rules, handling fee calculation rules, or member discount calculation rules.
[0092] The client can extract the unit price of goods from commodity transaction information based on currency symbol regular expressions and numerical format regular expressions; extract transaction timestamps, user identification, trademarks and commodity quantities from commodity transaction information based on sequence labeling models; and identify the cumulative amount calculation rules, handling fee calculation rules and member discount calculation rules from commodity transaction information based on keyword dictionary matching algorithms and support vector machine classification algorithms.
[0093] In step S400, the client uses the first public key to encrypt the transaction parameter data and generate ciphertext for the transaction parameters; it then uses the second public key to encrypt the transaction record data and generate ciphertext for the transaction record.
[0094] Further, a random polynomial, a second faulty polynomial, and a third faulty polynomial are selected; the transaction parameter data is calculated based on the first public key, the random polynomial, and the second faulty polynomial to obtain the first ciphertext; the transaction parameter data is calculated based on the first public key, the random polynomial, and the third faulty polynomial to obtain the second ciphertext; the first ciphertext and the second ciphertext are combined to form the transaction parameter ciphertext.
[0095] In step S500, the server extracts the homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table, performs the operation on the ciphertext of the transaction parameters according to the homomorphic operation method, and obtains the ciphertext of the operation result; performs business verification on the ciphertext of the transaction record, and encrypts the verification result using the second public key to obtain the ciphertext of the verification result.
[0096] Specifically, the server receives encrypted transaction parameters, encrypted transaction records, and transaction parameter calculation strategies from the client; it then searches for the corresponding homomorphic operation method in the homomorphic operation table based on the strategy identifier corresponding to the transaction parameter calculation strategy; according to the homomorphic operation method, it performs arithmetic operations in the homomorphically encrypted ciphertext field to obtain the ciphertext of the operation result; the server extracts elliptic curve points and encrypted data from the encrypted transaction record; it calculates the shared key using the second private key; and it restores the original transaction record data using a symmetric decryption algorithm; the original transaction record data includes user identity identifier, product identifier, and transaction timestamp; it performs business compliance verification on the original transaction record data to obtain the verification result; and it encrypts the verification result using the second public key to obtain the ciphertext of the verification result.
[0097] In step S600, the client obtains the ciphertext of the operation result and the ciphertext of the verification result, decrypts the ciphertext of the operation result using the first private key to obtain the plaintext of the operation result, decrypts the ciphertext of the verification result using the second private key to obtain the plaintext of the verification result, and integrates the plaintext of the operation result and the plaintext of the verification result to obtain the transaction result.
[0098] In some embodiments, the method further includes the following steps:
[0099] The client encapsulates the encrypted transaction parameters, encrypted transaction records, and transaction parameter calculation strategy to generate a transaction data packet and calculates the hash digest value of the transaction data packet. The server obtains the transaction data packet, verifies its integrity based on the hash digest value, and after successful verification, disassembles the transaction data packet to obtain the encrypted transaction parameters, encrypted transaction records, and transaction parameter calculation strategy.
[0100] In some embodiments, the method further includes the following steps:
[0101] The client uses a threshold-shared secret algorithm to split the first private key into multiple private key fragments; the private key fragments are sent to multiple trusted nodes for storage; after receiving the ciphertext of the computation result, the client sends a decryption request for the ciphertext of the computation result to the trusted nodes to obtain the sub-decryption result; the sub-decryption results fed back by each trusted node are reconstructed to obtain the complete decryption result.
[0102] By following the steps outlined above, the security of transaction data can be further improved.
[0103] Based on this, the transaction processing method for a virtual goods trading platform proposed in this application can be used to process transaction data of the virtual goods trading platform in a secure manner, preventing the leakage of sensitive data, and improving data security while ensuring the processing efficiency of transaction data. Furthermore, dividing the transaction parameter calculation strategy into high-frequency and low-frequency strategies is beneficial for improving the allocation of computing resources, avoiding memory waste, and further improving the processing efficiency of transaction data.
[0104] Below, in conjunction with Figure 3 The data processing flow and specific application examples of virtual commodity trading platform transaction scenarios are described in detail and explained in the embodiments of this application.
[0105] For example, the server collects eight different transaction parameter calculation strategies from three clients, covering various calculation scenarios such as transaction fees, discounts, points, and insurance premiums. These eight strategies are then converted into operational formulas based on the Paillier homomorphic encryption algorithm, allowing for corresponding multiplication operations even under encryption. Paillier encryption is a probabilistic public-key encryption system based on a complex residues problem, with core features including homomorphic addition and scalar multiplication capabilities. By statistically analyzing the usage frequency of each strategy over 30 days, the server categorizes strategies into high-frequency and low-frequency categories using a threshold of 1,000 uses. The homomorphic formulas for the four high-frequency strategies are stored in a Redis in-memory database for millisecond-level access, while the homomorphic formulas for the four low-frequency strategies are stored in a PostgreSQL disk database to save memory resources. PostgreSQL is an object-relational database management system. Finally, a complete strategy index table, namely the homomorphic operation strategy table, is established, realizing a one-to-one correspondence between transaction parameter calculation strategy identifiers, homomorphic formula numbers, and storage locations. When a client requests transaction calculation, the system can quickly locate and retrieve the corresponding homomorphic formula through the homomorphic operation strategy table, perform encrypted calculations, and return the result.
[0106] When User A logs into the virtual goods trading platform B for the first time, the client used by User A generates a first public key PK1 and a first private key SK1 based on the BFV fully homomorphic encryption algorithm, and generates a second public key PK2 and a second private key SK2 based on the SM2 elliptic curve public-key cryptography algorithm. The specific process is as follows: First, system parameters are set, including security parameter λ=128, polynomial degree n=8192, and noise parameter σ=3.2. The client operates on a polynomial ring, where q is a large prime number. When generating the first private key SK1, the client creates a secret polynomial s(x) using a random number generator. This secret polynomial contains n coefficients, each randomly selected from the set {-1,0,1}. The generated secret polynomial s(x) is the first private key SK1. When generating the first public key, a first polynomial a(x) is first randomly generated, with coefficients randomly selected from {0,1,...,q-1}. A first erroneous polynomial e(x) is then generated, with coefficients randomly selected according to a Gaussian distribution. Next, calculate b(x) = -a(x)·s(x) + e(x), where s(x) is the first private key. The final first public key PK1 consists of two polynomials: PK1 = (a(x), b(x)).
[0107] When generating the second private key SK2, the elliptic curve parameters are first determined, including parameters a1 and b1 in the curve equation y²=x1³+a1x+b1, and the base point G of the elliptic curve. A random integer d is selected from the interval [1, n-1] using a random number generator; this random integer d is the second private key SK2. When generating the second public key PK2, based on the generated second private key SK2, the client calculates the point P on the elliptic curve as P=d·G, where d is the second private key and G is the base point of the elliptic curve. The operation uses point multiplication on the elliptic curve, and the calculated point P is the second public key PK2.
[0108] When user A selects to purchase a specific virtual product on platform B, the client will receive product transaction information. This information includes transaction parameter data, transaction record data, and a transaction parameter calculation strategy. Transaction parameter data includes the product unit price and quantity. Transaction record data includes the transaction timestamp, user identification, and product identifier. The transaction parameter calculation strategy is a strategy identifier that guides homomorphic operations on the server side, including identifiers for rules for cumulative amount calculation, transaction fee calculation, or membership discount calculation.
[0109] The client can extract the required content from the commodity transaction information. Specifically, the client extracts the unit price of the commodity from the commodity transaction information based on the currency symbol regular expression and the numerical format regular expression; the client extracts the transaction timestamp, user identity identifier, commodity identifier, and commodity quantity from the commodity transaction information based on the BiLSTM-CRF sequence labeling model; and the client identifies the cumulative amount calculation rules, handling fee calculation rules, and member discount calculation rules from the commodity transaction information based on the keyword dictionary matching algorithm and the support vector machine classification algorithm.
[0110] For example, the original transaction information of the virtual goods trading platform is: "User ID_12345 purchased 2 smartphones with product number PHONE_001 on December 15, 2024 at 14:30, at a unit price of ¥3,299.99. Members enjoy a 10% discount and need to pay a 3% handling fee."
[0111] The client first uses a currency symbol regular expression to identify the RMB symbol "¥", and then uses a numerical format regular expression to identify a price format like "3,299.99" that includes a thousands separator and a decimal point. Therefore, it accurately locates and extracts the unit price "¥3,299.99" from the original commodity transaction information.
[0112] The product transaction information is input into the BiLSTM-CRF sequence labeling model. This deep learning model is trained on a large amount of transaction data, captures contextual semantic features through a bidirectional long short-term memory network, and then combines conditional random fields for sequence labeling optimization, giving it powerful sequence understanding and entity recognition capabilities. In this process, the model can identify and label the transaction timestamp "December 15, 2024, 14:30", the user identity identifier "12345", the product identifier "PHONE_001", and the product quantity "2 units".
[0113] Next, a keyword dictionary matching algorithm was used for preliminary rule localization. This algorithm pre-constructed a comprehensive business rule keyword library, covering core words such as "cumulative," "total," "handling fee," "commission," "member," "discount," and "offer," as well as their synonym variations. The keyword dictionary matching algorithm successfully identified key business rule expressions such as "members enjoy a 10% discount" and "a 3% handling fee is required." Subsequently, the matched keyword fragments and their contextual information were converted into numerical feature vectors. A support vector machine classification algorithm received these feature vectors as input and, through a trained classification model, accurately determined the business type, ultimately classifying the identified rules into three categories: cumulative amount calculation rules, handling fee calculation rules, and member discount calculation rules.
[0114] For the encryption of transaction parameter data M, a random polynomial u(x) is selected. The coefficients of u(x) are uniformly sampled from the ternary distribution {-1,0,1} to generate two independent error polynomials e1(x) and e2(x), which are called the second error polynomial and the third error polynomial. The coefficients of e1(x) and e2(x) are sampled from a discrete Gaussian distribution with parameter σ. The first part of the ciphertext c1=PK1[0]·u(x)+e1(x) mod q is calculated, and the second part of the ciphertext c2=PK1[1]·u(x)+e2(x)+⌊q / 2⌋·m(x)mod q is calculated. Finally, the transaction parameter ciphertext C_M=(c1,c2) is generated. Here, mod is the modulo operator, which means taking the remainder operation. mod q means taking the remainder after dividing the result by q.
[0115] For encrypting transaction record data R, firstly, a temporary private key k∈[1,n-1] is selected using a random number generator, and a temporary public key point C3=k·G is calculated based on this temporary private key k. Next, the shared key point (x2,y2)=k·PK2 is calculated using the temporary private key k and the second public key PK2, and the binary representation of the x2 coordinates is extracted from this shared key point. Using the extracted x2 coordinates as input, a 256-bit symmetric encryption key is generated through 10,000 iterations using the PBKDF2 key derivation function and the SHA-256 hash algorithm. Further, the transaction record data R is encrypted using the AES-256-GCM algorithm using this symmetric encryption key, resulting in ciphertext data and a 16-byte authentication tag. Finally, the temporary public key point C3 is combined with the encrypted ciphertext data to form the complete ciphertext transaction record C_R.
[0116] The client encapsulates the encrypted transaction parameters, encrypted transaction records, and transaction parameter calculation strategy to generate a transaction data packet and calculates the hash value of the transaction data packet. The server uses the hash value to perform integrity verification on the transaction data packet. After successful verification, the server deconstructs the transaction data packet to obtain the encrypted transaction parameters, encrypted transaction records, and transaction parameter calculation strategy.
[0117] The ciphertext of transaction parameters C_M, the ciphertext of transaction record C_R, and the transaction parameter calculation strategy S are encapsulated in TLV format to generate a structured transaction data packet containing a protocol version number (16 bits), a message type identifier (16 bits), timestamp information (64 bits), a data length field (32 bits), and payload data. The SHA-256 hash algorithm is used to perform continuous hash operations in a fixed order of transaction data packet header information, ciphertext of transaction parameters, ciphertext of transaction record, and transaction parameter calculation strategy. After the operation is completed, a 256-bit hash digest value H is generated, which serves as a digital fingerprint for the integrity of the transaction data packet.
[0118] After the server disassembles the transaction data packet, it looks up the corresponding sequence of operation instructions in the homomorphic operation table based on the policy identifier. For example, when encountering a "commission calculation rule," it instructs the server to first perform multiplication to calculate the commission amount, and then perform addition to add the commission amount to the original amount. When encountering a "member discount calculation rule," it instructs the server to perform only one multiplication operation to apply the discount ratio. In practical applications, when the server receives the ciphertext transaction parameter C_M and the transaction parameter calculation policy, it looks up the corresponding sequence of operation instructions in the homomorphic operation table based on the policy identifier corresponding to the transaction parameter calculation policy, and directly performs arithmetic operations in the BGV homomorphically encrypted ciphertext field. Through this step, the transaction parameter data remains encrypted throughout the entire transaction amount calculation process, and the server cannot know the specific amount value, thus achieving privacy protection in the calculation process.
[0119] The server first extracts elliptic curve points and encrypted data from the ciphertext C_R of the transaction record. It then calculates the shared key using the second private key SK2 and finally reconstructs the original transaction record data R using a symmetric decryption algorithm. The decrypted transaction record data R contains key business information such as user identity, product identifier, and transaction timestamp. Business compliance verification is then performed on the decrypted transaction record data R. For example, for the user identity, user authentication can be performed, querying the user's account status, permission level, and credit history to confirm the user's legal eligibility to execute the transaction. For the product identifier, the inventory status, sales restrictions, and price validity of virtual goods can be checked to ensure the availability of the purchased virtual goods. For the transaction timestamp, transaction verification can be performed, analyzing the reasonableness of the transaction time, whether the transaction frequency is normal, and whether the payment method is valid, identifying potential abnormal transaction behaviors. The verification result is then encrypted using SM2 with the second public key PK2 to generate the ciphertext C_V of the verification result.
[0120] The server sends the encrypted results of the above operations and the encrypted verification results to the client. The client uses the first private key SK1 to perform BFV homomorphic decryption on the encrypted results. The specific process is as follows: First, calculate the intermediate result t(x) = c2 - c1 · s(x) mod q, where c1 and c2 are the two components of the encrypted results, and s(x) is the secret polynomial corresponding to the first private key SK1. Round t(x) and calculate m'(x) = (2·t(x) / q) mod 2 to obtain the decrypted transaction amount. The client uses the second private key SK2 to perform SM2 decryption on the encrypted verification result C_V. First, extract the elliptic curve point C3 and encrypted data from the encrypted verification result C_V, and use the second private key SK2 to calculate the shared key point (x2, y2) = SK2 · C3. Extract the x2 coordinates from the shared key point and use PBKDF2-SHA256 for 10,000 iterations to generate a 256-bit symmetric key. Finally, the symmetric key is used to decrypt the original verification result data using the AES-256-GCM algorithm. As an example, the transaction result displays the following information: Virtual item name "Legendary Sword", original price 100 gold coins, VIP discount 20%, discounted price 80 gold coins, platform fee 1.6 gold coins, final payment amount 81.6 gold coins. The security verification status is also displayed: User identity verified, inventory sufficient, transaction permissions valid, risk assessment level: low risk.
[0121] To further enhance the security of transaction data processing, the client can also employ a threshold-shared secret algorithm to split the first private key into multiple private key fragments, which are then distributed to multiple nodes for storage. During decryption, after receiving the ciphertext of the computation result, the client sends a decryption request to the aforementioned trusted nodes and reconstructs the complete decryption result based on the sub-decryption results returned by the trusted nodes. The client uses a (t,N) threshold scheme, preferably where N=5 represents a total of 5 key fragments generated, and t=3 represents at least 3 key fragments required to reconstruct the complete private key. This configuration provides sufficient fault tolerance while ensuring security.
[0122] Specifically, the receiving module takes the first private key SK1 as input and constructs a quadratic random polynomial f(x) = SK1 + a3·x + a4·x² over the finite field GF(p); SK1 is the first private key; a3 and a4 are polynomial coefficients, where p is the smallest prime number greater than the value of SK1, and the coefficients a3 and a4 are selected using a cryptographically secure random number generator. The module calculates the function values at five evaluation points to generate key fragments Share_i = f(i) mod p (i = 1, 2, 3, 4, 5), and each fragment is appended with a SHA-256 integrity checksum, a timestamp, and a sequence number. The generated five private key fragments are then sent as output to five pre-verified nodes for distributed storage via independent secure communication channels.
[0123] When the ciphertext C_Result of the operation needs to be decrypted, the client receives the decryption request as input, generates an authentication request containing a timestamp, a random nonce, and a digital signature, and sends a private key reconstruction request to 5 nodes. After each node verifies the legality of the request, it returns the stored key fragment Share_i to the client. After the client collects at least 3 valid fragments, it uses the Lagrange interpolation algorithm to calculate L(x), and obtains the complete first private key SK1 through L(0). The reconstructed SK1 is used to perform BGV homomorphic decryption on the ciphertext C_Result to obtain the plaintext result. After the decryption is completed, the complete first private key information in memory is cleared immediately, and the final decryption result is output.
[0124] In summary, the embodiments of this application have at least the following beneficial effects.
[0125] ① Two key pairs are used: fully homomorphic encryption is used for highly sensitive transaction parameter data, and asymmetric public key encryption is used for less sensitive transaction record data.
[0126] ② The transaction parameter calculation strategies are stratified based on usage frequency, so that high-frequency strategies enjoy memory and access speed, while low-frequency strategies avoid memory waste through disk storage. This improves the overall system performance and optimizes resource allocation, ensuring that the system can still quickly locate and execute the corresponding calculations under large-scale concurrent requests, thereby improving the processing efficiency of transaction data.
[0127] ③ The first private key after full homomorphic encryption is decomposed into multiple fragments and distributed to different trusted nodes for storage. This ensures that decryption can only be completed when multiple fragments are collected, further preventing private key leakage and thus avoiding the exposure of sensitive data and reducing the risk of data leakage on the trading platform.
[0128] This application embodiment also provides a transaction data processing system for a virtual goods trading platform, which can implement the above-mentioned transaction data processing method for a virtual goods trading platform. The system includes:
[0129] Server 101 is used to construct a homomorphic operation strategy table based on the historical transaction parameter calculation strategies of each client; extract the homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table; perform operation on the ciphertext of the transaction parameters according to the homomorphic operation method to obtain the ciphertext of the operation result; perform business verification on the ciphertext of the transaction record, and encrypt the verification result using the second public key to obtain the ciphertext of the verification result.
[0130] Client 102 is used to generate a first public key and a first private key based on a fully homomorphic encryption algorithm, and to generate a second public key and a second private key based on an asymmetric public key encryption algorithm; extract commodity transaction information; wherein, the commodity transaction information includes transaction parameter data, transaction record data, and transaction parameter calculation strategy; encrypt the transaction parameter data using the first public key to generate transaction parameter ciphertext; encrypt the transaction record data using the second public key to generate transaction record ciphertext; obtain the ciphertext of the calculation result and the ciphertext of the verification result; decrypt the ciphertext of the calculation result using the first private key to obtain the calculation result plaintext; decrypt the ciphertext of the verification result using the second private key to obtain the verification result plaintext; and integrate the plaintext of the calculation result and the plaintext of the verification result to obtain the transaction result.
[0131] Please see Figure 4 , Figure 4 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0132] The processor 301 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0133] The memory 302 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 302 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 302 and is called and executed by the processor 301.
[0134] Input / output interface 303 is used to implement information input and output;
[0135] The communication interface 304 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0136] Bus 305 transmits information between various components of the device (e.g., processor 301, memory 302, input / output interface 303, and communication interface 304);
[0137] The processor 301, memory 302, input / output interface 303, and communication interface 304 are connected to each other within the device via bus 305.
[0138] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0139] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0140] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the module claims listing several systems, several of these systems may be specifically embodied by the same hardware item. The use of the terms first, second, and third, etc., does not indicate any order and can be interpreted as names.
[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal user device (which may be a mobile phone, computer, server, air conditioner, or network user device, etc.) to execute the methods described in the various embodiments of the present invention.
[0142] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for processing transaction data on a virtual goods trading platform, characterized in that, Includes the following steps: The server calculates and constructs a homomorphic operation strategy table based on the historical transaction parameters of each client; The client generates a first public key and a first private key based on a fully homomorphic encryption algorithm, and generates a second public key and a second private key based on an asymmetric public key encryption algorithm. The client extracts product transaction information; wherein, the product transaction information includes transaction parameter data, transaction record data, and transaction parameter calculation strategy; The client uses the first public key to encrypt the transaction parameter data, generating ciphertext for the transaction parameters; and uses the second public key to encrypt the transaction record data, generating ciphertext for the transaction record. The server extracts the homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table, performs the operation on the ciphertext of the transaction parameters according to the homomorphic operation method, and obtains the operation result ciphertext; performs business verification on the ciphertext of the transaction record, and encrypts the verification result using the second public key to obtain the verification result ciphertext; The client obtains the ciphertext of the operation result and the ciphertext of the verification result, decrypts the ciphertext of the operation result using the first private key to obtain the plaintext of the operation result, decrypts the ciphertext of the verification result using the second private key to obtain the plaintext of the verification result, and integrates the plaintext of the operation result and the plaintext of the verification result to obtain the transaction result.
2. The method according to claim 1, characterized in that, The server constructs a homomorphic operation strategy table based on the client's historical transaction parameters, including the following steps: Obtain and statistically analyze the historical transaction parameter calculation strategies and the frequency of use of the transaction parameter calculation strategies for each client. The transaction parameter calculation strategy is converted into a corresponding homomorphic operation formula; Based on the frequency of use, the transaction parameter calculation strategy is divided into a high-frequency strategy and a low-frequency strategy; The homomorphic operation formula of the high-frequency strategy is stored in the server's memory database; The homomorphic operation formula of the low-frequency strategy is stored in the server's disk database; Establish a correspondence between the identifier of the transaction parameter calculation strategy and the storage location index of the homomorphic operation formula to form a homomorphic operation strategy table.
3. The method according to claim 1, characterized in that, The steps to generate the first public key and the first private key include: Create a secret polynomial with several coefficients using a random number generator; Use the secret polynomial as the first private key; Randomly generate the first polynomial and the first incorrect polynomial; The first public key is calculated based on the secret polynomial, the first polynomial, and the first error polynomial.
4. The method according to claim 1, characterized in that, The steps to generate the second public key and the second private key include: Determine the parameters of the elliptic curve; wherein, the elliptic curve parameters include a first coefficient, a second coefficient, and a base point; Generate random integers using a random number generator; The random integer is determined as the second private key; The second public key is calculated using the second private key and the base point through the dot product of elliptic curves.
5. The method according to claim 1, characterized in that, The transaction parameter data is encrypted using the first public key to generate ciphertext transaction parameters, including the following steps: Choose a randomized polynomial, a second-error polynomial, and a third-error polynomial; The transaction parameter data is calculated based on the first public key, the random polynomial, and the second error polynomial to obtain the first ciphertext; The transaction parameter data is calculated based on the first public key, the random polynomial, and the third error polynomial to obtain the second ciphertext; The first ciphertext and the second ciphertext are combined to form the transaction parameter ciphertext.
6. The method according to claim 1, characterized in that, The client extracts product transaction information, including the following steps: The client extracts the unit price of goods from the commodity transaction information based on regular expressions for currency symbols and numerical formats. Based on the sequence labeling model, the transaction timestamp, user identity identifier, trademark identifier, and product quantity are extracted from the product transaction information; Based on keyword dictionary matching algorithm and support vector machine classification algorithm, the rules for calculating cumulative amount, handling fee and member discount are identified from the commodity transaction information.
7. The method according to claim 1, characterized in that, The server extracts the homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table, and performs operations on the ciphertext of the transaction parameters according to the homomorphic operation method to obtain the ciphertext of the operation result. The steps of performing business verification on the encrypted transaction record and encrypting the verification result using the second public key to obtain the encrypted verification result include: The server receives the encrypted transaction parameters, the encrypted transaction record, and the transaction parameter calculation strategy. Based on the transaction parameters, the strategy identifier corresponding to the strategy is calculated, and the corresponding homomorphic operation method is searched in the homomorphic operation strategy table. According to the homomorphic operation method, arithmetic operations are performed in the ciphertext field of homomorphic encryption to obtain the ciphertext of the operation result; The server extracts elliptic curve points and encrypted data from the ciphertext of the transaction record; The shared key is calculated using the second private key; The original transaction record data is restored using a symmetric decryption algorithm; wherein, the original transaction record data includes user identity identifier, product identifier, and transaction timestamp; Perform a business compliance check on the original transaction record data to obtain the verification results; The verification result is encrypted using the second public key to obtain the ciphertext of the verification result.
8. The method according to any one of claims 1-7, characterized in that, The method further includes the following steps: The client encapsulates the encrypted transaction parameters, the encrypted transaction record, and the transaction parameter calculation strategy to generate a transaction data packet, and calculates the hash digest value of the transaction data packet. The server obtains the transaction data packet, performs integrity verification on the transaction data packet based on the hash digest value, and after successful verification, disassembles the transaction data packet to obtain the ciphertext of the transaction parameters, the ciphertext of the transaction record, and the transaction parameter calculation strategy.
9. The method according to any one of claims 1-7, characterized in that, The method further includes the following steps: The client uses a threshold-shared secret algorithm to split the first private key into multiple private key fragments; The private key is fragmented and sent to multiple trusted nodes for storage; After receiving the ciphertext of the computation result, the client sends a decryption request for the ciphertext of the computation result to the trusted node to obtain a sub-decryption result; The sub-decryption results fed back by each trusted node are reconstructed to obtain the complete decryption result.
10. A transaction data processing system for a virtual goods trading platform, characterized in that, include: On the server side, it is used to calculate strategies and construct homomorphic operation strategy tables based on the historical transaction parameters of each client; Extract the homomorphic operation method corresponding to the transaction parameter calculation strategy from the homomorphic operation strategy table, and perform operation on the ciphertext of the transaction parameter according to the homomorphic operation method to obtain the ciphertext of the operation result; The transaction record ciphertext is verified by business logic, and the verification result is encrypted using a second public key to obtain the verification result ciphertext. The client is used to generate a first public key and a first private key based on a fully homomorphic encryption algorithm, and a second public key and a second private key based on an asymmetric public-key encryption algorithm; extract commodity transaction information, wherein the commodity transaction information includes transaction parameter data, transaction record data, and transaction parameter calculation strategy; encrypt the transaction parameter data using the first public key to generate ciphertext of transaction parameters; encrypt the transaction record data using the second public key to generate ciphertext of transaction records; obtain the ciphertext of the calculation result and the ciphertext of the verification result; decrypt the ciphertext of the calculation result using the first private key to obtain the plaintext of the calculation result; decrypt the ciphertext of the verification result using the second private key to obtain the plaintext of the verification result; and integrate the plaintext of the calculation result and the plaintext of the verification result to obtain the transaction result.
Citation Information
Patent Citations
Authentication method, readable medium and electronic equipment
CN115700562A
User transaction processing method and device based on block chain
CN118840201A