Blockchain-based e-commerce information change method and system

By classifying and hashing the e-commerce information on the blockchain, efficient changes in e-commerce information are achieved, solving the problems of complex and high cost of information changes in the existing technology, improving the change efficiency and reducing the cost.

CN113515535BActive Publication Date: 2025-01-03BEIJING MERISINO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110597718.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-31
Publication Date
2025-01-03
Estimated Expiration
2041-05-31

AI Technical Summary

Technical Problem

The existing e-commerce information change method is based on the information stored in the backend server for verification, resulting in complex and inefficient information change, especially when the amount of change is large, increasing the amount of data and on-chain costs in the blockchain.

Method used

Through the blockchain method, e-commerce information is classified and identified, and hash values ​​of immutable information and variable information are calculated separately, and information matching the hash value is queried on the blockchain to realize the individuality of variable information Changes to avoid repeated changes in immutable information.

Benefits of technology

The information change process is simplified, the efficiency of information change is improved, the cost of information change is reduced, and the increase in the amount of data in the blockchain is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113515535B_ABST
    Figure CN113515535B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for changing e-commerce information in a blockchain, the method comprising: an electronic device obtains information to be changed in e-commerce, classifies and identifies the information to be changed to determine the immutable information and the variable information in the information to be changed; the electronic device performs calculations on the immutable information and the variable information to obtain a first hash value and a second hash value. The technical solution provided by the present application has the advantage of low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a method and system for changing e-commerce information on a blockchain. Background Art

[0002] E-commerce, or e-commerce for short, refers to the electronic trading of transactions and related service activities on the Internet, Intranet and Value Added Network (VAN), making all aspects of traditional business activities electronic and networked. Blockchain is a term in the field of information technology. In essence, it is a shared database, and the data or information stored in it has the characteristics of "unforgeable", "full traceability", "traceability", "openness and transparency", and "collective maintenance".

[0003] The existing e-commerce information changes are verified based on the information stored in the backend server. This kind of information change will change the entire information, and the amount of information changed is large and the change is complicated. Summary of the invention

[0004] The embodiments of the present application provide a blockchain-based e-commerce information change method and related products, which can verify e-commerce information based on blockchain and improve the efficiency of information change.

[0005] In the first aspect, the present application embodiment provides a method for changing e-commerce information of a blockchain

[0006] The electronic device obtains the information to be changed of the e-commerce, classifies and identifies the information to be changed to determine the immutable information and the variable information in the information to be changed;

[0007] The electronic device performs calculations on the immutable information and the variable information to obtain a first hash value and a second hash value respectively;

[0008] The electronic device sends the first hash value and the second hash value to other devices in the blockchain. When the other devices query the third hash value that is the same as the first hash value and do not query the fourth hash value that is the same as the second hash value, the other devices use the variable information corresponding to the second hash value to replace the variable information mapped by the third hash value. The other devices replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce.

[0009] In a second aspect, a blockchain e-commerce information change system is provided, the system comprising: an electronic device and other devices; wherein:

[0010] An electronic device, used for obtaining information to be changed in e-commerce, classifying and identifying the information to be changed to determine the immutable information and the variable information in the information to be changed;

[0011] An electronic device, configured to calculate the immutable information and the mutable information to obtain a first hash value and a second hash value respectively;

[0012] An electronic device, configured to send the first hash value and the second hash value to other devices in the blockchain;

[0013] Other devices are used to query a third hash value that is the same as the first hash value and do not query a fourth hash value that is the same as the second hash value, use the variable information corresponding to the second hash value to replace the variable information mapped by the third hash value, and replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce.

[0014] According to a third aspect, a computer-readable storage medium is provided, which stores a program for electronic data exchange, wherein the program enables a terminal to execute the method provided in the first aspect.

[0015] In a fourth aspect, a terminal is provided, wherein the terminal is used to execute the method steps provided in the first aspect.

[0016] Implementing the embodiments of the present application has the following beneficial effects:

[0017] It can be seen that the technical solution provided by the present application is that the electronic device obtains the information to be changed of the e-commerce, classifies and identifies the information to be changed to determine the immutable information and the variable information in the information to be changed; the electronic device respectively calculates the immutable information and the variable information to obtain the first hash value (corresponding to the immutable information) and the second hash value (corresponding to the variable information); the electronic device sends the first hash value and the second hash value to other devices of the blockchain, and when other devices query the third hash value that is the same as the first hash value and do not query the fourth hash value that is the same as the second hash value, the other devices use the variable information corresponding to the second hash value to replace the variable information mapped by the third hash value, and replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce. The present application uses the hash value of the immutable information to point to whether the variable information has changed, thereby simplifying the process of information update, so that the variable information in the information to be changed can be changed separately through the blockchain, avoiding repeated changes of the immutable information, realizing the change of part of the information in the blockchain, improving the efficiency of information change, and reducing the cost of information change. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A schematic diagram of the structure of an electronic device provided in this application.

[0020] Figure 2 A flowchart of a method for changing e-commerce information on a blockchain provided in this application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] See also Figure 1 , Figure 1 An electronic device is provided, which may include: a processor, a memory, a camera, and a display screen. The above components may be connected via a bus or in other ways, and the present application does not limit the specific way of the above connection. In practical applications, the above computer device may be a smart phone, a personal computer, a server, a tablet computer, a smart TV, etc.

[0025] Information changes in e-commerce are very common verification information. Some of this information will not change, but some will change. For example, the ID number, date of birth, gender, ethnicity and other information in identity verification are all immutable information, but the name and address on the ID card are all variable information. How to deal with this kind of information changes has become a problem that needs to be solved in e-commerce.

[0026] See also Figure 2 , Figure 2 A method for changing e-commerce information on a blockchain is provided, which can be used in Figure 1 The method is performed in the electronic device shown. Figure 2 As shown, the following steps are included:

[0027] Step S200: The electronic device obtains the information to be changed of the e-commerce, and classifies and identifies the information to be changed to determine the immutable information and the variable information in the information to be changed;

[0028] The above classification and identification can be implemented by a classifier, such as a support vector machine, a neural network model, or other device to determine the variable information and the immutable information in the information to be changed.

[0029] Taking identity information as an example, immutable information may include: ID number, date of birth, gender, ethnicity, etc., and variable information may specifically include: name, address, issuing authority, etc.

[0030] Of course, the above information to be changed may also be other information, such as business license, work permit and the like.

[0031] Step S201: The electronic device calculates the immutable information and the variable information to obtain a first hash value (corresponding to the immutable information) and a second hash value (corresponding to the variable information);

[0032] The above calculation method can be hash calculation. The specific implementation method can refer to the calculation method of hash value, which will not be repeated here.

[0033] Step S202: The electronic device sends the first hash value and the second hash value to other devices of the blockchain. When the other devices query the third hash value that is the same as the first hash value and do not query the fourth hash value that is the same as the second hash value, the other devices use the variable information corresponding to the second hash value to replace the variable information mapped by the third hash value. The other devices replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce.

[0034] The above-mentioned other devices may be trusted devices in the blockchain, and the other devices may be other electronic devices, such as computers, servers, etc.

[0035] The technical solution provided by the present application is that the electronic device obtains the information to be changed of the e-commerce, classifies and identifies the information to be changed to determine the immutable information and the variable information in the information to be changed; the electronic device respectively performs calculations on the immutable information and the variable information to obtain the first hash value (corresponding to the immutable information) and the second hash value (corresponding to the variable information); the electronic device sends the first hash value and the second hash value to other devices of the blockchain, and when other devices query the third hash value that is the same as the first hash value and do not query the fourth hash value that is the same as the second hash value, the other devices use the variable information corresponding to the second hash value to replace the variable information mapped by the third hash value, and replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce. The present application uses the hash value of the immutable information to point to whether the variable information has changed, thereby simplifying the process of information and updating, so that the variable information in the information to be changed can be changed separately through the blockchain, avoiding repeated changes of the immutable information, realizing the change of part of the information in the blockchain, improving the efficiency of information change, and reducing the cost of information change.

[0036] Regarding information changes, existing changes are overall changes. For example, after an identity card is reissued, the identity card will be replaced. This type of change will result in a lot of changed data in the blockchain, because most of the information to be changed in e-commerce is immutable information. The overall change will increase the amount of data in the blockchain and increase the cost of on-chain (the blockchain's on-chain data is charged based on the amount of data). Therefore, this application processes the immutable information and variable information in the information to be changed separately, and establishes a mapping between the hash value of the immutable information and the variable information. In this way, the corresponding variable information can be queried through the immutable hash value, and then the hash value comparison is used to determine whether the variable information has changed. When a change occurs, the variable information is replaced to complete the information change. This not only reduces the amount of data in the changed information, but also facilitates the change of information, improves the efficiency of information change, and reduces costs.

[0037] For example, the above method may further include, before step S200:

[0038] The electronic device verifies the target object. If the verification is successful, step S200 and subsequent steps are executed. The verification of the target object can be performed by biometric verification methods, such as face, fingerprint, voiceprint, etc. This application does not limit the specific method of the above verification.

[0039] Verifying the target object can improve the reliability of the information to be changed, thereby improving the security of information changes and preventing malicious changes by unrelated personnel.

[0040] For example, the electronic device verifying the target object may specifically include:

[0041] The electronic device collects a facial image of the target object, extracts features from the facial image to obtain input data, performs n-layer convolution operations on the input data to obtain an operation result, performs a subtraction operation based on the operation result and the template operation result to obtain a difference. If the difference is greater than a verification threshold, it is determined that the verification has failed; if the difference is less than the verification threshold, it is determined that the verification has passed.

[0042] For example, if the input data is an input matrix, performing n layers of convolution operations on the input data to obtain the operation result may specifically include:

[0043] Performing a first-layer convolution operation on the input matrix to obtain a first-layer convolution result, and using the first-layer convolution result as the input matrix of the next layer to perform a next-layer convolution operation to obtain a next-layer convolution result until n layers of convolution operations are completed to obtain an operation result; wherein, performing a first-layer convolution operation on the input matrix to obtain a first-layer convolution result may specifically include:

[0044] Get the convolution kernel size [y][y] of the first layer of convolution operation, cut the input matrix with [y][y] as the sliding window size to obtain α cutting matrices, the size of which is [y][y], compare the α cutting matrices to determine the number of cutting matrices with exactly the same element values, and obtain the maximum value β among the number of exactly the same cutting matrices. If β> the first threshold, construct a bitmap of the β cutting matrices relative to the α cutting matrices; traverse each cutting matrix in the α cutting matrices, if the cutting matrix belongs to the β cutting matrices, the corresponding value of the bitmap is 1, if the cutting matrix does not belong to the β cutting matrices, the corresponding value of the bitmap is 0; perform a convolution operation on a cutting matrix in the β cutting matrices with the convolution kernel to obtain the calculation result β When performing convolution operation on α cutting matrices and convolution kernels, extract the value of the i-th cutting matrix in the bitmap. If the value is equal to 1, directly output the calculation result. β , if the value is equal to 0, the i-th cutting matrix is ​​convolved with the convolution kernel to obtain the calculation result i , traverse α cutting matrices to perform convolution operations to obtain the first layer of convolution results. The convolution operations of other layers (subsequent layers) can also refer to the above method, which will not be repeated here.

[0045] The following is an actual example to illustrate the bitmap method, which may include: if the number of α cutting matrices is 1000, then the corresponding bit position of the bitmap is also 1000 bits, if β=100 and the β cutting matrices are located in the first 100 of the 1000 cutting matrices, then the first 100 bits of the bitmap are 1, and the last 900 are 0. It should be noted that the positions corresponding to the above β cutting matrices are only examples, and may be different in actual applications.

[0046] The cutting matrices with completely identical element values ​​may specifically include: values ​​at each corresponding position of the two cutting matrices are identical.

[0047] The first threshold value is generally relatively large, such as 50, 100, 200, etc.

[0048] The principle of the above scheme specifically includes: for the same cutting matrix and convolution kernel (the value of the convolution kernel is the same), the convolution operation has the same result, but the existing convolution operation does not distinguish and directly performs the calculation, and for face images, the input matrix can be the RGB value of the pixel. For face images, the RGB value of most pixels is the RGB value of the skin, so the probability that their element values ​​are the same will be higher. In this way, the number of convolution operations can be reduced, because for β cutting matrices, only one convolution operation is performed, and the other calculation results are directly called. β , so it can reduce the amount of calculation and improve the calculation efficiency. The above calculation results β And the calculation results i The subscripts in the numbers are only used to distinguish the numbers of the calculation results.

[0049] The present application also provides a blockchain e-commerce information change system, the system comprising: an electronic device and other devices; wherein,

[0050] An electronic device, used for obtaining information to be changed in e-commerce, classifying and identifying the information to be changed to determine the immutable information and the mutable information in the information to be changed;

[0051] An electronic device, configured to calculate the immutable information and the mutable information to obtain a first hash value and a second hash value respectively;

[0052] An electronic device, configured to send the first hash value and the second hash value to other devices in the blockchain;

[0053] Other devices are used to query a third hash value that is the same as the first hash value and do not query a fourth hash value that is the same as the second hash value, use the variable information corresponding to the second hash value to replace the variable information mapped by the third hash value, and replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce.

[0054] For example,

[0055] The electronic device is also used to verify the target object, and if the verification is successful, obtain the pending change information of the e-commerce.

[0056] For example,

[0057] The electronic device is specifically used to input the information to be changed into a classifier to obtain immutable information and variable information.

[0058] For example,

[0059] The electronic device is specifically used to collect the biological information of the target object, identify and verify the biological information to realize the verification of the target object.

[0060] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods recorded in the above method embodiments.

[0061] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the methods recorded in the above method embodiments.

[0062] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0063] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0064] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for changing e-commerce information on a blockchain, characterized in that: The method comprises the following steps: The electronic device verifies the target object. If the verification is successful, the electronic device obtains the information to be changed of the e-commerce, and classifies and identifies the information to be changed to determine the immutable information and the variable information in the information to be changed; The electronic device performs calculations on the immutable information and the variable information to obtain a first hash value and a second hash value respectively; The electronic device sends the first hash value and the second hash value to other devices in the blockchain. When the other devices query the third hash value that is the same as the first hash value and fail to query the fourth hash value that is the same as the second hash value, the other devices use the variable information corresponding to the second hash value to replace the variable information mapped by the third hash value. The other devices replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce. The electronic device verifies the target object by: The electronic device collects a face image of the target object, extracts features from the face image to obtain input data, performs n-layer convolution operations on the input data to obtain an operation result, performs a subtraction operation on the operation result and the template operation result to obtain a difference, and if the difference is greater than a verification threshold, determines that the verification fails; if the difference is less than the verification threshold, determines that the verification passes; If the input data is an input matrix, the input data is subjected to n layers of convolution operations to obtain the operation results, which specifically include: Performing a first-layer convolution operation on the input matrix to obtain a first-layer convolution result, and using the first-layer convolution result as the input matrix of the next layer to perform a next-layer convolution operation to obtain a next-layer convolution result until n layers of convolution operations are performed to obtain an operation result; wherein, performing a first-layer convolution operation on the input matrix to obtain a first-layer convolution result specifically includes: Get the convolution kernel size y*y of the first layer of convolution operation, cut the input matrix with y*y as the sliding window size to obtain α cutting matrices, the size of the cutting matrix is ​​y*y, compare the α cutting matrices to determine the number of cutting matrices with exactly the same element values, and obtain the maximum value β among the number of exactly the same cutting matrices. If β>the first threshold, construct a bitmap of the β cutting matrices relative to the α cutting matrices; traverse each cutting matrix in the α cutting matrices, if the cutting matrix belongs to the β cutting matrices, the value corresponding to the bitmap is 1, if the cutting matrix does not belong to the β cutting matrices, the value corresponding to the bitmap is 0; perform a convolution operation on a cutting matrix in the β cutting matrices and the convolution kernel to obtain the calculation result β When performing convolution operation on α cutting matrices and convolution kernels, extract the value of the i-th cutting matrix in the bitmap. If the value is equal to 1, directly output the calculation result. β , if the value is equal to 0, the i-th cutting matrix is ​​convolved with the convolution kernel to obtain the calculation result i , traverse α cutting matrices to perform convolution operations to obtain the first layer of convolution results.

2. The method according to claim 1, characterized in that: The classifying and identifying the information to be changed to determine the immutable information and the mutable information in the information to be changed specifically includes: The electronic device inputs the information to be changed into a classifier to obtain immutable information and variable information.

3. A blockchain e-commerce information change system, characterized in that: The system includes: electronic equipment and other equipment; wherein, An electronic device, used for obtaining information to be changed in e-commerce, classifying and identifying the information to be changed to determine the immutable information and the mutable information in the information to be changed; An electronic device, configured to calculate the immutable information and the mutable information to obtain a first hash value and a second hash value respectively; An electronic device, configured to send the first hash value and the second hash value to other devices in the blockchain; The other device is used to replace the variable information mapped by the third hash value with the variable information corresponding to the second hash value when querying the third hash value that is the same as the first hash value and not querying the fourth hash value that is the same as the second hash value, and replace the fourth hash value paired with the third hash value with the second hash value to complete the information change of the e-commerce; The electronic device is also used to verify the target object and, if the verification is successful, obtain the pending change information of the e-commerce; The electronic device verifies the target object by: The electronic device collects a face image of the target object, extracts features from the face image to obtain input data, performs n-layer convolution operations on the input data to obtain an operation result, performs a subtraction operation on the operation result and the template operation result to obtain a difference, and if the difference is greater than a verification threshold, determines that the verification fails; if the difference is less than the verification threshold, determines that the verification passes; If the input data is an input matrix, the input data is subjected to n layers of convolution operations to obtain the operation results, which specifically include: Performing a first-layer convolution operation on the input matrix to obtain a first-layer convolution result, and using the first-layer convolution result as the input matrix of the next layer to perform a next-layer convolution operation to obtain a next-layer convolution result until n layers of convolution operations are performed to obtain an operation result; wherein, performing a first-layer convolution operation on the input matrix to obtain a first-layer convolution result specifically includes: Get the convolution kernel size y*y of the first layer of convolution operation, cut the input matrix with y*y as the sliding window size to obtain α cutting matrices, the size of the cutting matrix is ​​y*y, compare the α cutting matrices to determine the number of cutting matrices with exactly the same element values, and obtain the maximum value β among the number of exactly the same cutting matrices. If β>the first threshold, construct a bitmap of the β cutting matrices relative to the α cutting matrices; traverse each cutting matrix in the α cutting matrices, if the cutting matrix belongs to the β cutting matrices, the value corresponding to the bitmap is 1, if the cutting matrix does not belong to the β cutting matrices, the value corresponding to the bitmap is 0; perform a convolution operation on a cutting matrix in the β cutting matrices and the convolution kernel to obtain the calculation result β When performing convolution operation on α cutting matrices and convolution kernels, extract the value of the i-th cutting matrix in the bitmap. If the value is equal to 1, directly output the calculation result. β , if the value is equal to 0, the i-th cutting matrix is ​​convolved with the convolution kernel to obtain the calculation result i , traverse α cutting matrices to perform convolution operations to obtain the first layer of convolution results.

4. A computer-readable storage medium storing a program for electronic data exchange, wherein: The program enables the terminal to execute the method provided in any one of claims 1-2.