CN113743933B - E-commerce platform transaction information encryption transmission method and system based on block chain - Google Patents

E-commerce platform transaction information encryption transmission method and system based on block chain Download PDF

Info

Publication number
CN113743933B
CN113743933B CN202110827646.7A CN202110827646A CN113743933B CN 113743933 B CN113743933 B CN 113743933B CN 202110827646 A CN202110827646 A CN 202110827646A CN 113743933 B CN113743933 B CN 113743933B
Authority
CN
China
Prior art keywords
transaction information
transaction
information
commerce platform
key pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110827646.7A
Other languages
Chinese (zh)
Other versions
CN113743933A (en
Inventor
蒋旺奇
刘奎阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kyushu Electronics Home Co ltd
Original Assignee
Shenzhen Kyushu Electronics Home Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kyushu Electronics Home Co ltd filed Critical Shenzhen Kyushu Electronics Home Co ltd
Priority to CN202110827646.7A priority Critical patent/CN113743933B/en
Publication of CN113743933A publication Critical patent/CN113743933A/en
Application granted granted Critical
Publication of CN113743933B publication Critical patent/CN113743933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention provides a block chain-based E-commerce platform transaction information encryption transmission method and system, which effectively compress the data volume of transaction information by acquiring the transaction information of an E-commerce platform and reserving the transaction information corresponding to effective transaction behaviors; the transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, so that the encrypted transaction information can be uniquely matched with the identities of the buyer and the seller, and the encrypted transaction information is stored by using a block chain network, so that the transaction information can be effectively prevented from being maliciously tampered or maliciously copied during the storage period, and the uniqueness and the invariability of the transaction data are ensured; and finally, the authority of the client for acquiring the transaction information is determined in a matching verification mode through a private key, so that the transaction information can only be transmitted to an authorized client, thereby avoiding other illegal clients from stealing the transaction information in an impersonation mode and greatly improving the data security of the transaction information.

Description

E-commerce platform transaction information encryption transmission method and system based on block chain
Technical Field
The invention relates to the technical field of e-commerce platform information management, in particular to a block chain-based e-commerce platform transaction information encryption transmission method and system.
Background
The e-commerce platform needs to record the transaction information of the buyer and the seller in the e-commerce platform in the operation process, so that the e-commerce platform can be used as the basis for the return of subsequent commodities. The transaction information generally includes sensitive privacy information such as identity information of both parties and sellers, transaction commodity type information, transaction amount flow information, transaction commodity logistics information and the like, so the transaction information needs to be stored and transmitted in a confidential mode. In the prior art, transaction information is directly stored in a server after being processed by a simple encryption algorithm, so that the transaction information is easily maliciously tampered and maliciously copied, the data security of the transaction information is greatly reduced, and the transaction security and the reliability of an e-commerce platform cannot be guaranteed.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a block chain-based E-commerce platform transaction information encryption transmission method and system, which effectively compress the data volume of transaction information by acquiring the transaction information of an E-commerce platform and reserving the transaction information corresponding to effective transaction behaviors; the transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, so that the encrypted transaction information can be uniquely matched with the identities of the buyer and the seller, and the encrypted transaction information is stored by using a block chain network, so that the transaction information can be effectively prevented from being maliciously tampered or copied during storage, and the uniqueness and the invariability of the transaction data are ensured; and finally, the authority of the client for acquiring the transaction information is determined in a matching verification mode through a private key, so that the transaction information can only be transmitted to an authorized client, thereby avoiding other illegal clients from stealing the transaction information in an impersonation mode and greatly improving the data security of the transaction information.
The invention provides a block chain-based E-commerce platform transaction information encryption transmission method, which is characterized by comprising the following steps of:
step S1, a trading information acquisition instruction is sent to the E-commerce platform server, so that trading information corresponding to the E-commerce platform is acquired; the transaction information comprises at least one of identity information of a buyer and a seller, transaction commodity type information, transaction amount flow information and transaction commodity logistics information; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors;
step S2, according to the identity information of the buyer and the seller in the transaction information, the reserved transaction information is encrypted, and a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior is generated; wherein the pair of asymmetric keys comprises a public key pair and a private key pair; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client;
step S3, judging whether the client sends information inquiry invitation to the E-commerce platform server; when the information inquiry invitation is determined to be successful, matching and verifying a private key pair corresponding to the client; determining whether to transmit the transaction information to the client according to the matching verification result;
further, in step S1, a transaction information obtaining instruction is sent to the e-commerce platform server, so as to obtain transaction information corresponding to the e-commerce platform; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only keeping the transaction information corresponding to the valid transaction behaviors specifically comprises the following steps:
step S101, a transaction information acquisition instruction is sent to an E-commerce platform server, and meanwhile, a first moment corresponding to the sending of the transaction information acquisition instruction is recorded; if the fed back transaction information of the e-commerce platform cannot be received after the preset time interval is exceeded from the first moment, sending a transaction information acquisition instruction to the e-commerce platform server again until the fed back transaction information of the e-commerce platform is received;
step S102, extracting real-name registration identity information of each buyer and seller on the E-commerce platform from the transaction information, and comparing the real-name registration identity information of the buyer and the real-name registration identity information of the seller with a preset E-commerce platform blacklist respectively, wherein the preset E-commerce platform blacklist comprises identity information of users prohibited to conduct transactions on the E-commerce platform; if the real-name registration identity information of the buyer or the real-name registration identity information of the seller is matched with a preset e-commerce platform blacklist, determining the transaction behavior corresponding to the transaction information as a suspicious transaction behavior; otherwise, determining the transaction behavior corresponding to the transaction information as an effective transaction behavior;
step S103, extracting the delivery time and the receipt time of the transaction commodity from the transaction information corresponding to the suspicious transaction behavior, and determining the time difference between the receipt time and the delivery time; comparing the time difference with a preset time difference threshold, and if the time difference exceeds the preset time difference threshold, determining the suspicious transaction behavior as an invalid transaction behavior; otherwise, determining the suspicious transaction information as an effective transaction behavior; then keeping the transaction information corresponding to all effective transaction behaviors;
further, in step S2, according to the identity information of the buyer and the seller in the transaction information, the reserved transaction information is encrypted, and a pair of asymmetric keys corresponding to the transaction information of each valid transaction behavior is generated; storing the public key pair and the encrypted transaction information in a block chain network of the e-commerce platform server, and sending the private key pair to the client specifically comprises:
step S201, acquiring identity codes corresponding to real-name registration identity information of a buyer and a seller on an E-commerce platform respectively in reserved transaction information, wherein the identity codes comprise platform registration account names, identity card numbers or telephone numbers used for real-name registration of the buyer and the seller; converting the identity code into an identity code in a binary form, and directly taking the identity code in the binary form as a decimal integer value;
step S202, using the following formulas (1) and (2), generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior,
(E,N)=(Gcd(1,Lcm(2*x-1,2*y-1)),x*y) (1)
Figure GDA0003563446390000031
in the above formulas (1) and (2), (E, N) represents a public key pair included in a pair of asymmetric keys, (D, N) represents a private key pair included in a pair of asymmetric keys, x and y respectively represent decimal integer values corresponding to the respective identity codes of the buyer and the seller in the transaction information after conversion, Gcd (1, b) represents finding the smallest value of E so that E and b are prime numbers when the parameter E to be solved is 1< E < b, Lcm (a, b) represents solving the smallest common multiple of a and b, and INT () represents an integer function;
step S203, after determining a public key pair (E, N) contained in a pair of asymmetric keys, performing P on the transaction information P E Carrying out encryption processing on// N so as to obtain a corresponding transaction information ciphertext, wherein// represents a remainder symbol; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and storing the private key pairSending the data to a client;
further, in step S3, it is determined whether the client sends an information query invitation to the e-commerce platform server; when the information inquiry invitation is determined to be successful, matching and verifying the private key pair corresponding to the client; then, according to the matching verification result, determining whether to transmit the transaction information to the client specifically comprises:
step S301, judging whether a response instruction containing an acknowledgement is fed back after a client sends a transaction information query request to an E-commerce platform server; if yes, the client sends information inquiry invitation to the E-commerce platform server successfully; if not, the client sends the information inquiry invitation to the E-commerce platform server unsuccessfully;
step S302, when the information inquiry invitation is determined to be successful, the private key pair corresponding to the client is matched and verified by using the following formula (3),
Figure GDA0003563446390000041
in the above equation (3), δ represents a result value of the matching verification, and when δ is 0, it represents that the matching verification is successful, and when δ is other non-zero value, it represents that the matching verification is failed, | (a, b) | represents a modulo function, that is, it represents that
Figure GDA0003563446390000043
Figure GDA0003563446390000042
Representing a bitwise XOR logical operation, the logical operation result being 0 if the corresponding position elements are the same, the logical operation result being 1 if the corresponding position elements are different, (D) i ,N i ) The method comprises the steps that (A) a private key pair input by a user for the ith time when matching verification is carried out on a client side is represented, and (D, N) the private key pair sent to the client side is represented;
step S303, when the matching verification is successful, extracting the public key pair (E, N) corresponding to the private key pair (D, N) and the encrypted transaction information P corresponding to the public key pair (E, N) from the blockchain network E // N; and to encrypted transaction messageInformation processing (P) E //N) D And after the decryption processing of the/N, transmitting the transaction information after the decryption processing to the client.
The invention also provides a block chain-based e-commerce platform transaction information encryption transmission system which is characterized by comprising a transaction information acquisition and screening module, a transaction information encryption module, an information inquiry and invitation module and a transaction information feedback transmission module; wherein the content of the first and second substances,
the transaction information acquisition and screening module is used for sending a transaction information acquisition instruction to the e-commerce platform server so as to acquire transaction information corresponding to the e-commerce platform; the transaction information comprises at least one of identity information of a buyer and a seller, transaction commodity type information, transaction amount flow information and transaction commodity logistics information; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors;
the transaction information encryption module is used for encrypting the reserved transaction information according to the identity information of the buyer and the seller in the transaction information and generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior; wherein the pair of asymmetric keys comprises a public key pair and a private key pair; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client;
the information inquiry invitation module is used for judging whether the client sends information inquiry invitation to the E-commerce platform server successfully;
the transaction information feedback transmission module is used for matching and verifying a private key pair corresponding to the client when the success of information inquiry invitation is determined; determining whether to transmit the transaction information to the client according to the matching verification result;
further, the transaction information acquisition and screening module is used for sending a transaction information acquisition instruction to the e-commerce platform server so as to acquire transaction information corresponding to the e-commerce platform; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only keeping the transaction information corresponding to the valid transaction behaviors specifically comprises the following steps:
sending a transaction information acquisition instruction to an e-commerce platform server, and simultaneously recording a first moment corresponding to the sending of the transaction information acquisition instruction; if the fed back transaction information of the e-commerce platform cannot be received after the preset time interval is exceeded from the first moment, sending a transaction information acquisition instruction to the e-commerce platform server again until the fed back transaction information of the e-commerce platform is received;
extracting real-name registration identity information of a buyer and a seller on an e-commerce platform respectively from the transaction information, and comparing the real-name registration identity information of the buyer and the real-name registration identity information of the seller with a preset e-commerce platform blacklist respectively, wherein the preset e-commerce platform blacklist comprises identity information of users prohibited to conduct transactions on the e-commerce platform; if the real-name registration identity information of the buyer or the real-name registration identity information of the seller is matched with a preset e-commerce platform blacklist, determining the transaction behavior corresponding to the transaction information as suspicious transaction behavior; otherwise, determining the transaction behavior corresponding to the transaction information as an effective transaction behavior;
extracting the delivery time and the sign-in time of the transaction commodity from the transaction information corresponding to the suspicious transaction behavior, and determining the time difference between the sign-in time and the delivery time; comparing the time difference with a preset time difference threshold, and if the time difference exceeds the preset time difference threshold, determining the suspicious transaction behavior as an invalid transaction behavior; otherwise, determining the suspicious transaction information as an effective transaction behavior; then keeping the transaction information corresponding to all effective transaction behaviors;
further, the transaction information encryption module is used for encrypting the reserved transaction information according to the identity information of the buyer and the seller in the transaction information and generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior; storing the public key pair and the encrypted transaction information in a block chain network of the e-commerce platform server, and sending the private key pair to the client specifically comprises:
acquiring identity codes corresponding to real-name registration identity information of a buyer and a seller on an e-commerce platform respectively in the reserved transaction information, wherein the identity codes comprise platform registration account names, identity card numbers or telephone numbers used for real-name registration of the buyer and the seller; converting the identity code into an identity code in a binary form, and directly taking the identity code in the binary form as a decimal integer value;
using the following formulas (1) and (2) to generate a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior,
(E,N)=(Gcd(1,Lcm(2*x-1,2*y-1)),x*y) (1)
Figure GDA0003563446390000061
in the above formulas (1) and (2), (E, N) represents a public key pair included in a pair of asymmetric keys, (D, N) represents a private key pair included in a pair of asymmetric keys, x and y respectively represent decimal integer values corresponding to the respective identity codes of the buyer and the seller in the transaction information after conversion, Gcd (1, b) represents finding the smallest value of E so that E and b are prime numbers when the parameter E to be solved is 1< E < b, Lcm (a, b) represents solving the smallest common multiple of a and b, and INT () represents an integer function;
after determining the public key pair (E, N) contained in a pair of asymmetric keys, performing P on the transaction information P E Carrying out encryption processing on// N so as to obtain a corresponding transaction information ciphertext, wherein// represents a remainder symbol; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client;
further, the information query invitation module is configured to determine whether the client sends the information query invitation to the e-commerce platform server successfully or not specifically includes:
judging whether a response instruction containing a positive response is fed back after a client sends a transaction information query request to an e-commerce platform server; if yes, the client sends information inquiry invitation to the E-commerce platform server successfully; if not, the client sends the information inquiry invitation to the E-commerce platform server unsuccessfully;
and (c) a second step of,
the transaction information feedback transmission module is used for matching and verifying a private key pair corresponding to the client when the success of information inquiry and invitation is determined; then, according to the matching verification result, determining whether to transmit the transaction information to the client specifically comprises:
when the information inquiry invitation is determined to be successful, matching and verifying the private key pair corresponding to the client by using the following formula (3),
Figure GDA0003563446390000071
in the above equation (3), δ represents a result value of the matching verification, and when δ is 0, it represents that the matching verification is successful, and when δ is other non-zero value, it represents that the matching verification is failed, | (a, b) | represents a modulo function, that is, it represents that
Figure GDA0003563446390000072
Figure GDA0003563446390000073
Indicating a bitwise XOR logical operation, the logical operation result being 0 if the corresponding position elements are the same, and the logical operation result being 1 if the corresponding position elements are different, (D) i ,N i ) The method comprises the steps that (A) a private key pair input by a user for the ith time when matching verification is carried out on a client side is represented, and (D, N) the private key pair sent to the client side is represented;
when the matching verification is successful, extracting a public key pair (E, N) corresponding to the private key pair (D, N) and the corresponding encrypted transaction information P from the blockchain network E // N; and proceeds to (P) the encrypted transaction information E //N) D And after the decryption processing of the/N, transmitting the transaction information after the decryption processing to the client.
Compared with the prior art, the encryption transmission method and system for the E-commerce platform transaction information based on the block chain effectively compress the data volume of the transaction information by acquiring the transaction information of the E-commerce platform and reserving the transaction information corresponding to the effective transaction behavior; the transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, so that the encrypted transaction information can be uniquely matched with the identities of the buyer and the seller, and the encrypted transaction information is stored by using a block chain network, so that the transaction information can be effectively prevented from being maliciously tampered or maliciously copied during the storage period, and the uniqueness and the invariability of the transaction data are ensured; and finally, the authority of the client for acquiring the transaction information is determined in a matching verification mode through a private key, so that the transaction information can only be transmitted to an authorized client, thereby avoiding other illegal clients from stealing the transaction information in an impersonation mode and greatly improving the data security of the transaction information.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a block chain-based e-commerce platform transaction information encryption transmission method provided by the invention.
Fig. 2 is a schematic structural diagram of an e-commerce platform transaction information encryption transmission system based on a block chain according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a block chain-based e-commerce platform transaction information encryption transmission method according to an embodiment of the present invention. The encryption transmission method for the e-commerce platform transaction information based on the block chain comprises the following steps:
step S1, a trading information acquisition instruction is sent to the E-commerce platform server, so that trading information corresponding to the E-commerce platform is acquired; the transaction information comprises at least one of identity information of the buyer and the seller, transaction commodity type information, transaction amount flow information and transaction commodity logistics information; analyzing the transaction information so as to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors;
step S2, according to the identity information of the buyer and the seller in the transaction information, the reserved transaction information is encrypted, and a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior is generated; wherein the pair of asymmetric keys comprises a public key pair and a private key pair; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client;
step S3, judging whether the client sends information inquiry invitation to the E-commerce platform server; when the information inquiry invitation is determined to be successful, matching and verifying a private key pair corresponding to the client; and determining whether to transmit the transaction information to the client according to the matching verification result.
The beneficial effects of the above technical scheme are: the encryption transmission method for the E-commerce platform transaction information based on the block chain effectively compresses the data volume of the transaction information by acquiring the transaction information of the E-commerce platform and reserving the transaction information corresponding to the effective transaction behavior; the transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, so that the encrypted transaction information can be uniquely matched with the identities of the buyer and the seller, and the encrypted transaction information is stored by using a block chain network, so that the transaction information can be effectively prevented from being maliciously tampered or maliciously copied during the storage period, and the uniqueness and the invariability of the transaction data are ensured; and finally, the authority of the client for acquiring the transaction information is determined in a matching verification mode through a private key, so that the transaction information can only be transmitted to an authorized client, thereby avoiding other illegal clients from stealing the transaction information in an impersonation mode and greatly improving the data security of the transaction information.
Preferably, in the step S1, a transaction information obtaining instruction is sent to the e-commerce platform server, so as to obtain transaction information corresponding to the e-commerce platform; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only keeping the transaction information corresponding to the valid transaction behaviors specifically comprises the following steps:
step S101, a transaction information acquisition instruction is sent to an E-commerce platform server, and a first moment corresponding to the sending of the transaction information acquisition instruction is recorded; if the fed back transaction information of the e-commerce platform cannot be received after the preset time interval is exceeded from the first moment, sending a transaction information acquisition instruction to the e-commerce platform server again until the fed back transaction information of the e-commerce platform is received;
step S102, extracting real-name registration identity information of each buyer and seller on the E-commerce platform from the transaction information, and comparing the real-name registration identity information of the buyer and the real-name registration identity information of the seller with a preset E-commerce platform blacklist respectively, wherein the preset E-commerce platform blacklist comprises identity information of users prohibited to conduct transactions on the E-commerce platform; if the real-name registration identity information of the buyer or the real-name registration identity information of the seller is matched with a preset e-commerce platform blacklist, determining the transaction behavior corresponding to the transaction information as a suspicious transaction behavior; otherwise, determining the transaction behavior corresponding to the transaction information as an effective transaction behavior;
step S103, extracting the delivery time and the receipt time of the transaction commodity from the transaction information corresponding to the suspicious transaction behavior, and determining the time difference between the receipt time and the delivery time; comparing the time difference with a preset time difference threshold, and if the time difference exceeds the preset time difference threshold, determining the suspicious transaction behavior as an invalid transaction behavior; otherwise, determining the suspicious transaction information as an effective transaction behavior; and then keeping the transaction information corresponding to all effective transaction behaviors.
The beneficial effects of the above technical scheme are: the e-commerce platform generates a large amount of transaction information corresponding to different transaction behaviors in the operation process, and each transaction information also comprises different types of sub-information such as identity information of buyers and sellers, transaction commodity type information, transaction amount flow information, transaction commodity logistics information, payment confirmation time information, payment mode information, commodity evaluation information and the like. By sending the transaction information acquisition instruction to the e-commerce platform server, information items matched with the transaction information acquisition instruction can be screened out from a large amount of transaction information, so that the transaction information of a required type can be extracted in a targeted manner, the transaction information can be rapidly acquired, other unnecessary redundant information items in the extracted transaction information can be avoided, and the workload of subsequent transaction information processing is effectively reduced.
In addition, the e-commerce platform may generate invalid transaction information during operation due to illegal transaction behaviors that a buyer or a seller swipes an order maliciously or the seller does not ship the illegal transaction information, and the invalid transaction information does not contribute to analyzing customer requirements and the like. And extracting real-name registration identity information of the buyer and the seller on the E-commerce platform respectively from the transaction information, and comparing the extracted real-name registration identity information with a preset E-commerce platform blacklist to determine whether the buyer and the seller corresponding to the transaction information belong to users who forbid transaction on the E-commerce platform, for example, the users can be but are not limited to users with a historical brush bank, so that the initial judgment on whether the transaction behavior is effective or not can be carried out. In addition, the delivery time and the receipt time of the transaction commodity are extracted from the transaction information corresponding to the suspicious transaction behavior, and the time difference between the receipt time and the delivery time is determined, so that whether the suspicious transaction behavior has a false delivery condition or not can be determined, and further secondary judgment is carried out on whether the suspicious transaction behavior is valid or not. Therefore, the condition that whether the transaction information is valid or not is judged by mistake can be prevented by the two judgments, so that the reserved transaction information is guaranteed to be reliable and effective to the maximum extent.
Preferably, in step S2, the reserved transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, and a pair of asymmetric keys corresponding to the transaction information of each valid transaction behavior is generated; storing the public key pair and the encrypted transaction information in a block chain network of the e-commerce platform server, and sending the private key pair to the client specifically comprises:
step S201, acquiring identity codes corresponding to real-name registration identity information of a buyer and a seller on an E-commerce platform respectively in reserved transaction information, wherein the identity codes comprise platform registration account names, identity card numbers or telephone numbers used for real-name registration of the buyer and the seller; converting the identity code into an identity code in a binary form, and directly taking the identity code in the binary form as a decimal integer value;
step S202, using the following formulas (1) and (2), generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior,
(E,N)=(Gcd(1,Lcm(2*x-1,2*y-1)),x*y) (1)
Figure GDA0003563446390000111
in the above formulas (1) and (2), (E, N) represents a public key pair included in a pair of asymmetric keys, (D, N) represents a private key pair included in a pair of asymmetric keys, x and y respectively represent decimal integer values corresponding to respective identity code conversion of buyers and sellers in transaction information, Gcd (1, b) represents that in the case that a parameter E to be solved is 1< E < b, the minimum value of E is found so that E and b are prime numbers, Lcm (a, b) represents the minimum common multiple of a and b is solved, and INT () represents an integer function; for the function Gcd (1, b), for example, when Gcd (1,5) is 2, and in the interval 1-5, 2, 3, 4 and 5 are prime numbers, and the minimum value of 2 is taken, then E is 2;
step S203, after determining a public key pair (E, N) contained in a pair of asymmetric keys, performing P on the transaction information P E Carrying out encryption processing on// N so as to obtain a corresponding transaction information ciphertext, wherein// represents a remainder symbol; and storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client.
The beneficial effects of the above technical scheme are: the identity information of the buyer and the seller registered with the real name on the e-commerce platform in the transaction information has uniqueness, so that the identity information is used as a generation basis of a key corresponding to the transaction information, and the generated public key pair and private key pair can be ensured to only correspond to the transaction information uniquely, so that the key is ensured not to be mistakenly matched with other transaction information, and meanwhile, the key can be effectively prevented from being maliciously tampered or maliciously copied, and the security and the uniqueness of the key are improved. In actual operation, because the identity code information is usually not pure digital symbol code, the identity code is converted into the binary identity code, and then the binary identity code is directly used as a decimal integer value, the identity code can be uniquely converted into the digital code, and thereby the messy code generated by the following asymmetric key is effectively prevented. For example, when the identity code is "abc", the identity code is first converted into the binary identity code "011000010110001001100011", and then the binary identity code is directly used as the decimal integer value "11000010110001001100011", that is, all "0" before the first "1" in the binary identity code are removed, so that the probability of the occurrence of the scrambled code after the identity code conversion can be effectively reduced.
In addition, the public key pair and the private key pair are respectively generated by using the formulas (1) and (2), so that the transaction information is encrypted by using the public key pair, and the encrypted transaction information and the public key pair are jointly stored in the block chain network of the e-commerce platform server, so that the encrypted transaction information and the public key pair can not be maliciously tampered and maliciously forged, and meanwhile, the encrypted transaction information can be decrypted only after the public key pair is obtained, and the data security of the transaction information is improved. The private key pair is sent to the client side such as the smart phone, so that the client side can use the private key pair as a certificate for verifying the authority of the user for checking the transaction information, and the corresponding checking authority can be obtained only by inputting the matched private key pair by the user. Therefore, a public key pair for encrypting the transaction information and a private key pair for verifying the user viewing authority are generated according to the real-name registration identity information of the buyer and the seller on the E-commerce platform in the transaction information, and the storage security and the viewing security of the transaction information can be improved.
Preferably, in the step S3, it is determined whether the client sends the information inquiry invitation to the e-commerce platform server successfully; when the information inquiry invitation is determined to be successful, matching and verifying a private key pair corresponding to the client; then, according to the matching verification result, determining whether to transmit the transaction information to the client specifically comprises:
step S301, judging whether a response instruction containing an acknowledgement is fed back after a client sends a transaction information query request to an E-commerce platform server; if yes, the client sends information inquiry invitation to the E-commerce platform server successfully; if not, the client sends the information inquiry invitation to the E-commerce platform server unsuccessfully;
step S302, when the information inquiry invitation is determined to be successful, the following formula (3) is used to perform matching verification on the private key pair corresponding to the client,
Figure GDA0003563446390000131
in the above equation (3), δ represents a result value of the match verification, and when δ is 0, it represents that the match verification is successful, and when δ is other non-zero value, it represents that the match verification is failed, | (a, b)I denotes a modulo function, i.e.
Figure GDA0003563446390000132
Figure GDA0003563446390000133
Representing a bitwise XOR logical operation, the logical operation result being 0 if the corresponding position elements are the same, the logical operation result being 1 if the corresponding position elements are different, (D) i ,N i ) The method comprises the steps that (A) a private key pair input by a user for the ith time when matching verification is carried out on a client side is represented, and (D, N) the private key pair sent to the client side is represented;
step S303, when the matching verification is successful, extracting the public key pair (E, N) corresponding to the private key pair (D, N) and the encrypted transaction information P corresponding to the public key pair (E, N) from the blockchain network E // N; and proceeds to (P) the encrypted transaction information E //N) D And after the decryption processing of the/N, transmitting the transaction information after the decryption processing to the client.
The beneficial effects of the above technical scheme are: the client sends a transaction information query request to the E-commerce platform server to realize the information query invitation relation between the client and the E-commerce platform server, so that the signal connection relation between the client and the E-commerce platform server is guaranteed to be established when information is required to be queried, and the situation that the client and the E-commerce platform server are always connected to occupy a communication channel is avoided. In addition, the formula (3) is utilized to verify the private key pair input by the user for the ith time, so that only the user with the corresponding authority can inquire the transaction information, the transaction information is prevented from being leaked, the data privacy of the transaction information is improved, and the data security in the operation process of the e-commerce platform is further ensured.
Fig. 2 is a schematic structural diagram of an e-commerce platform transaction information encryption transmission system based on a block chain according to an embodiment of the present invention. The e-commerce platform transaction information encryption transmission system based on the block chain comprises a transaction information acquisition and screening module, a transaction information encryption module, an information inquiry and invitation module and a transaction information feedback transmission module; wherein, the first and the second end of the pipe are connected with each other,
the transaction information acquisition and screening module is used for sending a transaction information acquisition instruction to the e-commerce platform server so as to acquire transaction information corresponding to the e-commerce platform; the transaction information comprises at least one of identity information of the buyer and the seller, transaction commodity type information, transaction amount flow information and transaction commodity logistics information; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors;
the transaction information encryption module is used for encrypting the reserved transaction information according to the identity information of the buyer and the seller in the transaction information and generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior; wherein the pair of asymmetric keys comprises a public key pair and a private key pair; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client;
the information inquiry invitation module is used for judging whether the client sends information inquiry invitation to the E-commerce platform server successfully;
the transaction information feedback transmission module is used for matching and verifying a private key pair corresponding to the client when the success of information inquiry and invitation is determined; and determining whether to transmit the transaction information to the client according to the matching verification result.
The beneficial effects of the above technical scheme are: the E-commerce platform transaction information encryption transmission system based on the block chain effectively compresses the data volume of transaction information by acquiring the transaction information of the E-commerce platform and reserving the transaction information corresponding to effective transaction behaviors; the transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, so that the encrypted transaction information can be uniquely matched with the identities of the buyer and the seller, and the encrypted transaction information is stored by using a block chain network, so that the transaction information can be effectively prevented from being maliciously tampered or maliciously copied during the storage period, and the uniqueness and the invariability of the transaction data are ensured; and finally, the authority of the client for acquiring the transaction information is determined in a matching verification mode through a private key, so that the transaction information can only be transmitted to an authorized client, thereby avoiding other illegal clients from stealing the transaction information in an impersonation mode and greatly improving the data security of the transaction information.
Preferably, the transaction information acquiring and screening module is used for sending a transaction information acquiring instruction to the e-commerce platform server so as to acquire transaction information corresponding to the e-commerce platform; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only keeping the transaction information corresponding to the valid transaction behaviors specifically comprises the following steps:
sending a transaction information acquisition instruction to an e-commerce platform server, and simultaneously recording a first moment corresponding to the sending of the transaction information acquisition instruction; if the fed back transaction information of the e-commerce platform cannot be received after the preset time interval is exceeded from the first moment, sending a transaction information acquisition instruction to the e-commerce platform server again until the fed back transaction information of the e-commerce platform is received;
extracting real-name registration identity information of a buyer and a seller on an e-commerce platform respectively from the transaction information, and comparing the real-name registration identity information of the buyer and the real-name registration identity information of the seller with a preset e-commerce platform blacklist respectively, wherein the preset e-commerce platform blacklist comprises identity information of users prohibited to conduct transactions on the e-commerce platform; if the real-name registration identity information of the buyer or the real-name registration identity information of the seller is matched with a preset e-commerce platform blacklist, determining the transaction behavior corresponding to the transaction information as suspicious transaction behavior; otherwise, determining the transaction behavior corresponding to the transaction information as an effective transaction behavior;
extracting the delivery time and the sign-in time of the transaction commodity from the transaction information corresponding to the suspicious transaction behavior, and determining the time difference between the sign-in time and the delivery time; comparing the time difference with a preset time difference threshold, and if the time difference exceeds the preset time difference threshold, determining the suspicious transaction behavior as an invalid transaction behavior; otherwise, determining the suspicious transaction information as an effective transaction behavior; and then keeping the transaction information corresponding to all effective transaction behaviors.
The beneficial effects of the above technical scheme are: the e-commerce platform generates a large amount of transaction information corresponding to different transaction behaviors in the operation process, and each transaction information also comprises different types of sub-information such as identity information of buyers and sellers, transaction commodity type information, transaction amount flow information, transaction commodity logistics information, payment confirmation time information, payment mode information, commodity evaluation information and the like. By sending the transaction information acquisition instruction to the e-commerce platform server, information items matched with the transaction information acquisition instruction can be screened out from a large amount of transaction information, so that the transaction information of a required type can be extracted in a targeted manner, the transaction information can be rapidly acquired, other unnecessary redundant information items in the extracted transaction information can be avoided, and the workload of subsequent transaction information processing is effectively reduced.
In addition, the e-commerce platform can generate some invalid transaction information during the operation process due to the fact that the buyer or the seller swipes maliciously or the seller does not ship the illegal transaction behaviors, and the invalid transaction information does not contribute to analyzing customer requirements and the like. And extracting real-name registration identity information of the buyer and the seller on the E-commerce platform respectively from the transaction information, and comparing the extracted real-name registration identity information with a preset E-commerce platform blacklist to determine whether the buyer and the seller corresponding to the transaction information belong to users who forbid transaction on the E-commerce platform, for example, the users can be but are not limited to users with a historical brush bank, so that the initial judgment on whether the transaction behavior is effective or not can be carried out. In addition, the delivery time and the receipt time of the transaction commodity are extracted from the transaction information corresponding to the suspicious transaction behavior, and the time difference between the receipt time and the delivery time is determined, so that whether the suspicious transaction behavior has a false delivery condition or not can be determined, and further secondary judgment is carried out on whether the suspicious transaction behavior is valid or not. Therefore, the condition that whether the transaction information is valid or not is judged by mistake can be prevented by the two judgments, so that the reserved transaction information is guaranteed to be reliable and effective to the maximum extent.
Preferably, the transaction information encryption module is configured to encrypt the reserved transaction information according to the identity information of the buyer and the seller in the transaction information, and generate a pair of asymmetric keys corresponding to the transaction information of each valid transaction behavior; storing the public key pair and the encrypted transaction information in a block chain network of the e-commerce platform server, and sending the private key pair to the client specifically comprises:
acquiring identity codes corresponding to real-name registration identity information of a buyer and a seller on an e-commerce platform respectively in the reserved transaction information, wherein the identity codes comprise platform registration account names, identity card numbers or telephone numbers used for real-name registration of the buyer and the seller; converting the identity code into an identity code in a binary form, and directly taking the identity code in the binary form as a decimal integer value;
using the following formulas (1) and (2) to generate a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior,
(E,N)=(Gcd(1,Lcm(2*x-1,2*y-1)),x*y) (1)
Figure GDA0003563446390000171
in the above formulas (1) and (2), (E, N) represents a public key pair included in a pair of asymmetric keys, (D, N) represents a private key pair included in a pair of asymmetric keys, x and y respectively represent decimal integer values corresponding to the respective identity codes of the buyer and the seller in the transaction information after conversion, Gcd (1, b) represents finding the smallest value of E so that E and b are prime numbers when the parameter E to be solved is 1< E < b, Lcm (a, b) represents solving the smallest common multiple of a and b, and INT () represents an integer function; for the function Gcd (1, b), for example, when Gcd (1,5) is 2, and in the interval 1-5, 2, 3, 4 and 5 are prime numbers, and the minimum value of 2 is taken, then E is 2;
after determining the public key pair (E, N) contained in a pair of asymmetric keys, performing P on the transaction information P E Carrying out encryption processing on// N so as to obtain a corresponding transaction information ciphertext, wherein// represents a remainder symbol; then storing the public key pair and the encrypted transaction information in the E-commerce platform suitThe server sends the private key pair to the client.
The beneficial effects of the above technical scheme are: the identity information of the real-name registration of the buyer and the seller on the E-commerce platform in the transaction information has uniqueness, so that the identity information is used as a generation basis of a key corresponding to the transaction information, and the generated public key pair and the generated private key pair only correspond to the transaction information uniquely, so that the key is prevented from being mistakenly matched with other transaction information, and meanwhile, the key can be effectively prevented from being maliciously tampered or copied, and the safety and the uniqueness of the key are improved. In actual operation, because the identity code information is usually not purely coded by digital symbols, the identity code is converted into a binary identity code, and then the binary identity code is directly used as a decimal integer value, the identity code can be uniquely converted into a digital code, and thus, messy codes generated by a subsequent asymmetric key are effectively prevented. For example, when the identity code is "abc", the identity code is first converted into the binary identity code "011000010110001001100011", and then the binary identity code is directly used as the decimal integer value "11000010110001001100011", that is, all "0" before the first "1" in the binary identity code are removed, so that the probability of the occurrence of the messy code after the identity code conversion can be effectively reduced.
In addition, a public key pair and a private key pair are respectively generated by using the formulas (1) and (2), so that the public key pair is used for encrypting the transaction information, and the encrypted transaction information and the public key pair are jointly stored in a block chain network of the e-commerce platform server, so that the encrypted transaction information and the public key pair can be ensured not to be maliciously tampered and maliciously forged, and meanwhile, the encrypted transaction information can be decrypted only after the public key pair is obtained, and the data security of the transaction information is improved. The private key pair is sent to the client side such as the smart phone, so that the client side can use the private key pair as a certificate for verifying the authority of the user for checking the transaction information, and the corresponding checking authority can be obtained only by inputting the matched private key pair by the user. Therefore, a public key pair for encrypting the transaction information and a private key pair for verifying the user viewing authority are generated according to the real-name registration identity information of the buyer and the seller on the E-commerce platform in the transaction information, and the storage security and the viewing security of the transaction information can be improved.
Preferably, the information query offer module is configured to determine whether the client sends the information query offer to the e-commerce platform server successfully includes:
judging whether a response instruction containing a positive response is fed back after a client sends a transaction information query request to an e-commerce platform server; if yes, the client sends information inquiry invitation to the E-commerce platform server successfully; if not, the client sends the information inquiry invitation to the E-commerce platform server unsuccessfully;
and (c) a second step of,
the transaction information feedback transmission module is used for matching and verifying a private key pair corresponding to the client when the success of information inquiry and invitation is determined; then, according to the matching verification result, determining whether to transmit the transaction information to the client specifically comprises:
when the information inquiry invitation is determined to be successful, matching and verifying the private key pair corresponding to the client by using the following formula (3),
Figure GDA0003563446390000181
in the above equation (3), δ represents a result value of the matching verification, and when δ is 0, it represents that the matching verification is successful, and when δ is other non-zero value, it represents that the matching verification is failed, | (a, b) | represents a modulo function, that is, it represents that
Figure GDA0003563446390000191
Figure GDA0003563446390000192
Representing a bitwise XOR logical operation, the logical operation result being 0 if the corresponding position elements are the same, the logical operation result being 1 if the corresponding position elements are different, (D) i ,N i ) Indicating that the client performs matching verificationThe private key pair input i times, (D, N) represents the private key pair sent to the client;
when the matching verification is successful, extracting a public key pair (E, N) corresponding to the private key pair (D, N) and the corresponding encrypted transaction information P from the blockchain network E // N; and proceeds to (P) the encrypted transaction information E //N) D And after the decryption processing of the/N, transmitting the transaction information after the decryption processing to the client.
The beneficial effects of the above technical scheme are: the client sends a transaction information query request to the E-commerce platform server to realize the information query invitation relation between the client and the E-commerce platform server, so that the signal connection relation between the client and the E-commerce platform server is guaranteed to be established when information is required to be queried, and the situation that the client and the E-commerce platform server are always connected to occupy a communication channel is avoided. In addition, by using the formula (3), the private key pair input by the user for the ith time is verified, so that only the user with the corresponding authority can inquire the transaction information, the transaction information is prevented from being leaked, the data privacy of the transaction information is improved, and the data security in the operation process of the e-commerce platform is further ensured.
As can be seen from the content of the above embodiment, the block chain-based e-commerce platform transaction information encryption transmission method and system effectively compress the data volume of the transaction information by obtaining the transaction information of the e-commerce platform and retaining the transaction information corresponding to the effective transaction behavior; the transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, so that the encrypted transaction information can be uniquely matched with the identities of the buyer and the seller, and the encrypted transaction information is stored by using a block chain network, so that the transaction information can be effectively prevented from being maliciously tampered or maliciously copied during the storage period, and the uniqueness and the invariability of the transaction data are ensured; and finally, the authority of the client for acquiring the transaction information is determined in a matching verification mode through a private key, so that the transaction information can only be transmitted to an authorized client, thereby avoiding other illegal clients from stealing the transaction information in an impersonation mode and greatly improving the data security of the transaction information.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (6)

1. The E-commerce platform transaction information encryption transmission method based on the block chain is characterized by comprising the following steps:
step S1, a trading information acquisition instruction is sent to the E-commerce platform server, so that trading information corresponding to the E-commerce platform is acquired; the transaction information comprises at least one of identity information of a buyer and a seller, transaction commodity type information, transaction amount flow information and transaction commodity logistics information; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors;
step S2, according to the identity information of the buyer and the seller in the transaction information, the reserved transaction information is encrypted, and a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior is generated; wherein the pair of asymmetric keys comprises a public key pair and a private key pair; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client;
step S3, judging whether the client sends information inquiry invitation to the E-commerce platform server; when the information inquiry invitation is determined to be successful, matching and verifying a private key pair corresponding to the client; determining whether to transmit the transaction information to the client according to the matching verification result;
in step S2, the reserved transaction information is encrypted according to the identity information of the buyer and the seller in the transaction information, and a pair of asymmetric keys corresponding to the transaction information of each valid transaction behavior is generated; storing the public key pair and the encrypted transaction information in a block chain network of the e-commerce platform server, and sending the private key pair to the client specifically comprises:
step S201, acquiring identity codes corresponding to real-name registration identity information of a buyer and a seller on an E-commerce platform respectively in reserved transaction information, wherein the identity codes comprise platform registration account names, identity card numbers or telephone numbers used for real-name registration of the buyer and the seller; converting the identity code into an identity code in a binary form, and directly taking the identity code in the binary form as a decimal integer value;
step S202, using the following formulas (1) and (2), generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior,
(E,N)=(Gcd(1,Lcm(2*x-1,2*y-1)),x*y) (1)
Figure FDA0003563446380000021
in the above formulas (1) and (2), (E, N) represents a public key pair included in a pair of asymmetric keys, (D, N) represents a private key pair included in a pair of asymmetric keys, x and y respectively represent decimal integer values corresponding to respective identity code conversion of buyers and sellers in transaction information, Gcd (1, b) represents that in the case that a parameter E to be solved is 1< E < b, the minimum value of E is found so that E and b are prime numbers, Lcm (a, b) represents the minimum common multiple of a and b is solved, and INT () represents an integer function;
step S203, after determining a public key pair (E, N) contained in a pair of asymmetric keys, performing P on the transaction information P E Carrying out encryption processing on// N so as to obtain a corresponding transaction information ciphertext, wherein// represents a remainder symbol; and storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client.
2. The block chain-based e-commerce platform transaction information encryption transmission method of claim 1, wherein:
in step S1, a transaction information obtaining instruction is sent to the e-commerce platform server, so as to obtain transaction information corresponding to the e-commerce platform; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors specifically comprises the following steps:
step S101, a transaction information acquisition instruction is sent to an E-commerce platform server, and meanwhile, a first moment corresponding to the sending of the transaction information acquisition instruction is recorded; if the fed back transaction information of the e-commerce platform cannot be received after the preset time interval is exceeded from the first moment, sending a transaction information acquisition instruction to the e-commerce platform server again until the fed back transaction information of the e-commerce platform is received;
step S102, extracting real-name registration identity information of each buyer and seller on the E-commerce platform from the transaction information, and comparing the real-name registration identity information of the buyer and the real-name registration identity information of the seller with a preset E-commerce platform blacklist respectively, wherein the preset E-commerce platform blacklist comprises identity information of users prohibited to conduct transactions on the E-commerce platform; if the real-name registration identity information of the buyer or the real-name registration identity information of the seller is matched with a preset e-commerce platform blacklist, determining the transaction behavior corresponding to the transaction information as suspicious transaction behavior; otherwise, determining the transaction behavior corresponding to the transaction information as an effective transaction behavior;
step S103, extracting the delivery time and the receipt time of the transaction commodity from the transaction information corresponding to the suspicious transaction behavior, and determining the time difference between the receipt time and the delivery time; comparing the time difference with a preset time difference threshold, and if the time difference exceeds the preset time difference threshold, determining the suspicious transaction behavior as an invalid transaction behavior; otherwise, determining the suspicious transaction information as an effective transaction behavior; and then keeping the transaction information corresponding to all effective transaction behaviors.
3. The block chain-based e-commerce platform transaction information encryption transmission method of claim 1, wherein:
in step S3, it is determined whether the client sends an information query invitation to the e-commerce platform server; when the information inquiry invitation is determined to be successful, matching and verifying a private key pair corresponding to the client; then, according to the matching verification result, determining whether to transmit the transaction information to the client specifically comprises:
step S301, judging whether a response instruction containing an acknowledgement is fed back after a client sends a transaction information query request to an E-commerce platform server; if yes, the client sends information inquiry invitation to the E-commerce platform server successfully; if not, the client sends the information inquiry invitation to the E-commerce platform server unsuccessfully;
step S302, when the information inquiry invitation is determined to be successful, the private key pair corresponding to the client is matched and verified by using the following formula (3),
Figure FDA0003563446380000031
in the above equation (3), δ represents a result value of the matching verification, and when δ is 0, it represents that the matching verification is successful, and when δ is other non-zero value, it represents that the matching verification is failed, | (a, b) | represents a modulo function, that is, it represents that
Figure FDA0003563446380000041
Figure FDA0003563446380000042
Indicating a bitwise XOR logical operation, the logical operation result being 0 if the corresponding position elements are the same, and the logical operation result being 1 if the corresponding position elements are different, (D) i ,N i ) The method comprises the steps that (A) a private key pair input by a user for the ith time when matching verification is carried out on a client side is represented, and (D, N) the private key pair sent to the client side is represented;
step S303, when the matching verification is successful, extracting the public key pair (E, N) corresponding to the private key pair (D, N) and the encrypted transaction information P corresponding to the public key pair (E, N) from the blockchain network E // N; and proceeds to (P) the encrypted transaction information E //N) D After decryption processing of// N, the transaction information after decryption processing is transmittedAnd (5) outputting to the client.
4. The E-commerce platform transaction information encryption transmission system based on the block chain is characterized by comprising a transaction information acquisition and screening module, a transaction information encryption module, an information inquiry and invitation module and a transaction information feedback transmission module; wherein the content of the first and second substances,
the transaction information acquisition and screening module is used for sending a transaction information acquisition instruction to the e-commerce platform server so as to acquire transaction information corresponding to the e-commerce platform; the transaction information comprises at least one of identity information of a buyer and a seller, transaction commodity type information, transaction amount flow information and transaction commodity logistics information; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors;
the transaction information encryption module is used for encrypting the reserved transaction information according to the identity information of the buyer and the seller in the transaction information and generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior; wherein the pair of asymmetric keys comprises a public key pair and a private key pair; storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client;
the information inquiry invitation module is used for judging whether the client sends information inquiry invitation to the E-commerce platform server successfully;
the transaction information feedback transmission module is used for matching and verifying a private key pair corresponding to the client when the success of information inquiry and invitation is determined; determining whether to transmit the transaction information to the client according to the matching verification result;
the transaction information encryption module is used for encrypting the reserved transaction information according to the identity information of the buyer and the seller in the transaction information and generating a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior; storing the public key pair and the encrypted transaction information in a block chain network of the e-commerce platform server, and sending the private key pair to the client specifically comprises: acquiring identity codes corresponding to real-name registration identity information of a buyer and a seller on an e-commerce platform respectively in the reserved transaction information, wherein the identity codes comprise platform registration account names, identity card numbers or telephone numbers used for real-name registration of the buyer and the seller; converting the identity code into an identity code in a binary form, and directly taking the identity code in the binary form as a decimal integer value;
using the following formulas (1) and (2) to generate a pair of asymmetric keys corresponding to the transaction information of each effective transaction behavior,
(E,N)=(Gcd(1,Lcm(2*x-1,2*y-1)),x*y) (1)
Figure FDA0003563446380000051
in the above formulas (1) and (2), (E, N) represents a public key pair included in a pair of asymmetric keys, (D, N) represents a private key pair included in a pair of asymmetric keys, x and y respectively represent decimal integer values corresponding to the respective identity codes of the buyer and the seller in the transaction information after conversion, Gcd (1, b) represents finding the smallest value of E so that E and b are prime numbers when the parameter E to be solved is 1< E < b, Lcm (a, b) represents solving the smallest common multiple of a and b, and INT () represents an integer function;
after determining the public key pair (E, N) contained in a pair of asymmetric keys, P is carried out on the transaction information P E Carrying out encryption processing on// N so as to obtain a corresponding transaction information ciphertext, wherein// represents a remainder symbol; and storing the public key pair and the encrypted transaction information in a block chain network of the E-commerce platform server, and sending the private key pair to the client.
5. The blockchain-based e-commerce platform transaction information encryption transmission system of claim 4, wherein:
the transaction information acquisition and screening module is used for sending a transaction information acquisition instruction to the e-commerce platform server so as to acquire transaction information corresponding to the e-commerce platform; analyzing the transaction information to judge whether all transaction behaviors corresponding to the acquired transaction information are valid or not, and only retaining the transaction information corresponding to the valid transaction behaviors specifically comprises the following steps:
sending a transaction information acquisition instruction to an e-commerce platform server, and simultaneously recording a first moment corresponding to the sending of the transaction information acquisition instruction; if the fed back transaction information of the e-commerce platform cannot be received after the preset time interval is exceeded from the first moment, sending a transaction information acquisition instruction to the e-commerce platform server again until the fed back transaction information of the e-commerce platform is received;
extracting real-name registration identity information of a buyer and a seller on an e-commerce platform respectively from the transaction information, and comparing the real-name registration identity information of the buyer and the real-name registration identity information of the seller with a preset e-commerce platform blacklist respectively, wherein the preset e-commerce platform blacklist comprises identity information of users prohibited to conduct transactions on the e-commerce platform; if the real-name registration identity information of the buyer or the real-name registration identity information of the seller is matched with a preset e-commerce platform blacklist, determining the transaction behavior corresponding to the transaction information as suspicious transaction behavior; otherwise, determining the transaction behavior corresponding to the transaction information as an effective transaction behavior;
extracting the delivery time and the sign-in time of the transaction commodity from the transaction information corresponding to the suspicious transaction behavior, and determining the time difference between the sign-in time and the delivery time; comparing the time difference with a preset time difference threshold, and if the time difference exceeds the preset time difference threshold, determining the suspicious transaction behavior as an invalid transaction behavior; otherwise, determining the suspicious transaction information as an effective transaction behavior; and then keeping the transaction information corresponding to all effective transaction behaviors.
6. The blockchain-based e-commerce platform transaction information encryption transmission system of claim 4, wherein:
the information inquiry invitation module is used for judging whether the client sends the information inquiry invitation to the e-commerce platform server successfully or not, and specifically comprises the following steps:
judging whether a response instruction containing a positive response is fed back after a client sends a transaction information query request to an e-commerce platform server; if yes, the client sends information inquiry invitation to the E-commerce platform server successfully; if not, the client sends the information inquiry invitation to the E-commerce platform server unsuccessfully;
and the number of the first and second groups,
the transaction information feedback transmission module is used for matching and verifying a private key pair corresponding to the client when the success of information inquiry and invitation is determined; then, according to the matching verification result, determining whether to transmit the transaction information to the client specifically comprises:
when the information inquiry invitation is determined to be successful, matching and verifying the private key pair corresponding to the client by using the following formula (3),
Figure FDA0003563446380000071
in the above equation (3), δ represents a result value of the matching verification, and when δ is 0, it represents that the matching verification is successful, and when δ is other non-zero value, it represents that the matching verification is failed, | (a, b) | represents a modulo function, that is, it represents that
Figure FDA0003563446380000072
Figure FDA0003563446380000073
Representing a bitwise XOR logical operation, the logical operation result being 0 if the corresponding position elements are the same, the logical operation result being 1 if the corresponding position elements are different, (D) i ,N i ) The method comprises the steps that (A) a private key pair input by a user for the ith time when matching verification is carried out on a client side is represented, and (D, N) the private key pair sent to the client side is represented;
when the matching verification is successful, extracting a public key pair (E, N) corresponding to the private key pair (D, N) and the corresponding encrypted transaction information P from the blockchain network E // N; and proceeds to (P) the encrypted transaction information E //N) D // N ofAnd after decryption processing, transmitting the transaction information after decryption processing to the client.
CN202110827646.7A 2021-07-21 2021-07-21 E-commerce platform transaction information encryption transmission method and system based on block chain Active CN113743933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110827646.7A CN113743933B (en) 2021-07-21 2021-07-21 E-commerce platform transaction information encryption transmission method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110827646.7A CN113743933B (en) 2021-07-21 2021-07-21 E-commerce platform transaction information encryption transmission method and system based on block chain

Publications (2)

Publication Number Publication Date
CN113743933A CN113743933A (en) 2021-12-03
CN113743933B true CN113743933B (en) 2022-09-16

Family

ID=78728883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110827646.7A Active CN113743933B (en) 2021-07-21 2021-07-21 E-commerce platform transaction information encryption transmission method and system based on block chain

Country Status (1)

Country Link
CN (1) CN113743933B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110633982A (en) * 2019-08-15 2019-12-31 中国平安财产保险股份有限公司 Transaction payment method and transaction payment device based on block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2569278A (en) * 2017-10-23 2019-06-19 Cygnetise Ltd Methods and apparatus for verifying a user transaction
CN109462588B (en) * 2018-11-13 2021-04-16 上海物融智能科技有限公司 Decentralized data transaction method and system based on block chain
CN112565412B (en) * 2020-12-03 2022-11-04 重庆新致金服信息技术有限公司 Data transaction method, system and equipment based on block chain
CN112561543A (en) * 2020-12-23 2021-03-26 谢雨函 E-commerce platform false transaction order monitoring method and system based on full-period logistics data analysis and cloud server

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110633982A (en) * 2019-08-15 2019-12-31 中国平安财产保险股份有限公司 Transaction payment method and transaction payment device based on block chain

Also Published As

Publication number Publication date
CN113743933A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
CN111079128B (en) Data processing method and device, electronic equipment and storage medium
US8898086B2 (en) Systems and methods for transmitting financial account information
CA2241052C (en) Application level security system and method
EP2220840B1 (en) Method of authentication of users in data processing systems
EP1175749B1 (en) High security biometric authentication using a public key/private key encryption pairs
US6119227A (en) Methods and apparatus for authenticating an originator of a message
CN109766979B (en) Two-dimensional code generation method, verification method and device
US20060195402A1 (en) Secure data transmission using undiscoverable or black data
EP3280089B1 (en) Key-generation method and access-control method
CN103679436A (en) Electronic contract security system and method based on biological information identification
US20030070074A1 (en) Method and system for authentication
CN109978533B (en) Offline secure payment system and method for resisting two-dimension code theft
WO2002037748A2 (en) Distributing public keys
US20140258718A1 (en) Method and system for secure transmission of biometric data
JP2009272671A (en) Secret authentication system
CN115001775B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN110634072B (en) Block chain transaction system based on multi-signature and hardware encryption
CN114205084B (en) Quantum key-based electronic mail multi-operation encryption method and device
CN113344561A (en) Digital currency vehicle wallet payment secure encryption communication method and system
CN113743933B (en) E-commerce platform transaction information encryption transmission method and system based on block chain
US20020184501A1 (en) Method and system for establishing secure data transmission in a data communications network notably using an optical media key encrypted environment (omkee)
CN112491840B (en) Information modification method, device, computer equipment and storage medium
King et al. A user-friendly approach to human authentication of messages
CN117454437B (en) Transaction processing method, storage medium and electronic device
CN112737790B (en) Data transmission method and device, server and client terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220823

Address after: Room 601, Block B, Jiuzhou Electric Building, No. 007, Keji South 12th Road, Gaoxin District, Yuehai Street, Nanshan District, Shenzhen, Guangdong, 518000

Applicant after: Shenzhen Kyushu Electronics Home Co.,Ltd.

Address before: 102400 No. 1, zone 1, Guba Road, Chengguan Street, Fangshan District, Beijing - s679

Applicant before: Deming Shangpin Technology Group Co.,Ltd.

GR01 Patent grant
GR01 Patent grant