A blockchain-based second-hand device transaction method, device and medium
Patent Information
- Application Number
- CN202310092644.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-03
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-02-03
AI Technical Summary
[0004]现有技术中,在对二手设备的交易过程时,通常难以对二手设备的来源以及去向进行精准记录,同时也难以对二手设备的设备状况进行准确评估,以致二手设备的交易过程存在较大风险
[0018]本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:本申请实施例通过对设备信息进行加密,并获取二手设备对应的设备残值检测结果,能够在对设备信息进行保密的同时,确定出当前二手设备的剩余价值,从而对当前二手设备的价值进行精准评估。其次,本申请实施例基于设备信息编码与设备残值编码,构建二手设备的标识码,并基于每个二手设备的标识码以及每个标识码的流通过程,形成二手设备溯源树。从而能够对二手设备多次交易过程进行记录,进而能够对该二手设备的交易过程进行溯源,确定二手设备交易的安全性。
Smart Images

Figure CN116128532B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a blockchain-based method, device, and medium for trading second-hand equipment. Background Technology
[0002] At present, the second-hand industrial equipment market is huge, but it faces problems such as chaotic rules, a single business model, outdated management mechanisms of second-hand operating companies, gray transactions becoming the mainstream of the market, a shortage of professional and technical personnel resulting in a lack of technical support for enterprise transformation and upgrading, and insufficient awareness.
[0003] In the used equipment industry, the lack of trust in the quality and processing effect of used chemical equipment has made the development of this industry difficult. Coupled with vicious competition in some industries and lax market supervision, the development of the used equipment industry is even more difficult.
[0004] In the existing technology, it is usually difficult to accurately record the source and destination of used equipment during the transaction process, and it is also difficult to accurately assess the condition of used equipment, which leads to significant risks in the transaction process. Summary of the Invention
[0005] This application provides a blockchain-based method, equipment, and medium for trading second-hand equipment, which addresses the following technical problem: the trading process for second-hand equipment in the prior art carries significant risks.
[0006] The embodiments of this application adopt the following technical solutions:
[0007] This application provides a blockchain-based method for trading used equipment. The method includes: acquiring equipment information of the used equipment; generating a first hash value corresponding to the used equipment based on the equipment information; generating an equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value; encrypting the equipment information using a symmetric encryption algorithm and the public key of an authorized equipment residual value detection platform to obtain encrypted data, and storing the encrypted data on the blockchain; determining the equipment residual value detection result corresponding to the used equipment based on the equipment residual value detection platform and the encrypted data; generating a second hash value based on the equipment residual value detection result and the equipment information code; generating an equipment residual value code corresponding to the used equipment based on the equipment residual value detection result and the second hash value; registering the used equipment's identification code with a secondary node based on the equipment information code and the equipment residual value code; and forming a used equipment traceability tree based on each used equipment's identification code and the circulation process of each identification code, so as to store the used equipment transaction process through the used equipment traceability tree.
[0008] This application embodiment encrypts equipment information and obtains the residual value test results corresponding to the used equipment. This allows for the determination of the remaining value of the used equipment while maintaining the confidentiality of the equipment information, thus enabling accurate valuation. Secondly, this application embodiment constructs an identification code for the used equipment based on the equipment information code and the equipment residual value code. Based on each used equipment identification code and its circulation process, a used equipment traceability tree is formed. This allows for the recording of multiple transactions of the used equipment, enabling traceability of the transaction process and ensuring the security of used equipment transactions.
[0009] In one implementation of this application, the method of generating a first hash value corresponding to the used equipment based on equipment information, and generating an equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value, specifically includes: converting the equipment information into a corresponding letter string based on a preset encoding template, and performing hash calculation on the letter string to obtain a first hash value; wherein, the equipment information includes at least one of the following: equipment name, equipment place of origin, equipment production date, and equipment serial number; converting the first hash value corresponding to the used equipment into a corresponding numeric string based on the preset encoding template; and combining the letter string, the numeric string, and the time when the equipment information was received to obtain the equipment information code corresponding to the used equipment.
[0010] In one implementation of this application, device information is encrypted using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data. Specifically, this includes: obtaining a generated random number; encrypting the device information based on the random number to obtain first encrypted data corresponding to the device information; obtaining public keys of multiple device residual value detection platforms; performing asymmetric encryption on the random number using the multiple public keys to obtain second encrypted data corresponding to each of the multiple public keys; and sorting the multiple second encrypted data according to a preset information combination rule to obtain encrypted data.
[0011] In one implementation of this application, determining the residual value of a used device based on an equipment residual value testing platform and encrypted data specifically includes: obtaining first encrypted data and second encrypted data from the blockchain through the equipment residual value testing platform; decrypting the second encrypted data using the private key corresponding to the equipment residual value testing platform to obtain a random number; decrypting the first encrypted data based on the random number through the equipment residual value testing platform to obtain device information; analyzing the device information through the equipment residual value testing platform to obtain a reference equipment residual value testing result corresponding to the device information; obtaining reference equipment residual value testing results sent by multiple equipment residual value testing platforms respectively, and averaging the multiple reference equipment residual value testing results to obtain the equipment residual value testing result corresponding to the used device.
[0012] In one implementation of this application, a second hash value is generated based on the equipment residual value detection result and the equipment information code, and an equipment residual value code corresponding to the used equipment is generated based on the equipment residual value detection result and the second hash value. Specifically, this includes: converting the reference equipment residual value detection results sent by multiple equipment residual value detection platforms and the equipment residual value detection result corresponding to the used equipment into corresponding numeric strings based on a preset encoding template; combining the numeric strings with the equipment information code, performing hash calculation on the combined strings to obtain the second hash value; and combining the numeric string corresponding to the equipment residual value detection result, the second hash value, and the time string of obtaining the equipment residual value detection result to obtain the equipment residual value code corresponding to the used equipment.
[0013] In one implementation of this application, registering a used equipment identification code with a secondary node based on the equipment information code and the equipment residual value code specifically includes: assigning a prefix and a suffix to the equipment information code using a first preset unique assignment rule and the secondary node; wherein the first preset unique assignment rule is at least related to the user information of the user currently owning the used equipment; and assigning a prefix and a suffix to the equipment residual value code using a second preset unique assignment rule and the secondary node; wherein the second preset unique assignment rule is related to the time of obtaining the equipment residual value code and the platform information of the equipment residual value detection platform corresponding to the equipment residual value code; combining the assigned equipment information code and the assigned equipment residual value code to obtain combined code information; uploading the combined code information to the primary node through the secondary node for review by the primary node; and registering the combined code information as an identification code after receiving the review approval information at the secondary node.
[0014] In one implementation of this application, after registering the identification code of the used equipment with the secondary node based on the equipment information code and the equipment residual value code, the method further includes: after determining the buyer user of the used equipment, constructing the current transaction identification code corresponding to the used equipment based on the buyer user's user information, transaction time, and the identification code of the used equipment; and storing the current transaction identification code, the corresponding equipment information, equipment information code, equipment residual value code, and buyer user information to the blockchain.
[0015] In one implementation of this application, a used equipment traceability tree is formed based on the identification code of each used equipment and the circulation process of each identification code, so as to store the used equipment transaction process through the used equipment traceability tree. Specifically, it includes: determining the stored transaction information corresponding to the used equipment in the blockchain based on the equipment information of the used equipment; determining the previous transaction identification code corresponding to the current transaction based on the time sequence of the stored transaction information; mapping the current transaction identification code corresponding to the used equipment to the previous transaction identification code to obtain the traceability tree, so as to store the used equipment transaction process through the used equipment traceability tree.
[0016] This application provides a blockchain-based used equipment trading device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: acquire equipment information of the used equipment; generate a first hash value corresponding to the used equipment based on the equipment information; and generate an equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value; encrypt the equipment information using a symmetric encryption algorithm and the public key of an authorized equipment residual value detection platform to obtain encrypted data, and store the encrypted data in the blockchain; determine the equipment residual value detection result corresponding to the used equipment based on the equipment residual value detection platform and the encrypted data; generate a second hash value based on the equipment residual value detection result and the equipment information code, and generate an equipment residual value code corresponding to the used equipment based on the equipment residual value detection result and the second hash value; register the identification code of the used equipment with a secondary node based on the equipment information code and the equipment residual value code; and form a used equipment traceability tree based on the identification code of each used equipment and the circulation process of each identification code, so as to store the used equipment trading process through the used equipment traceability tree.
[0017] This application provides a non-volatile computer storage medium storing computer-executable instructions. These instructions are configured to: acquire device information of a used device; generate a first hash value corresponding to the used device based on the device information; generate a device information code corresponding to the current transaction stage based on the device information and the first hash value; encrypt the device information using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data, and store the encrypted data in a blockchain; determine the device residual value detection result corresponding to the used device based on the device residual value detection platform and the encrypted data; generate a second hash value based on the device residual value detection result and the device information code; generate a device residual value code corresponding to the used device based on the device residual value detection result and the second hash value; register the used device's identification code with a secondary node based on the device information code and the device residual value code; and form a used device traceability tree based on each used device's identification code and the circulation process of each identification code, so as to store the used device transaction process through the used device traceability tree.
[0018] The above-mentioned at least one technical solution adopted in this application embodiment can achieve the following beneficial effects: By encrypting the equipment information and obtaining the equipment residual value detection results corresponding to the used equipment, this application embodiment can determine the remaining value of the current used equipment while keeping the equipment information confidential, thereby accurately assessing the value of the current used equipment. Secondly, this application embodiment constructs an identification code for the used equipment based on the equipment information code and the equipment residual value code, and forms a used equipment traceability tree based on each used equipment identification code and the circulation process of each identification code. This allows for the recording of multiple transactions of the used equipment, enabling traceability of the transaction process and ensuring the security of the used equipment transactions. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0020] Figure 1 A flowchart illustrating a blockchain-based method for trading secondhand equipment is provided for embodiments of this application.
[0021] Figure 2 This is a schematic diagram of the structure of a blockchain-based second-hand equipment trading device provided in an embodiment of this application. Detailed Implementation
[0022] This application provides a blockchain-based method, device, and medium for trading second-hand equipment.
[0023] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0024] At present, the second-hand industrial equipment market is huge, but it faces problems such as chaotic rules, a single business model, outdated management mechanisms of second-hand operating companies, gray transactions becoming the mainstream of the market, a shortage of professional and technical personnel resulting in a lack of technical support for enterprise transformation and upgrading, and insufficient awareness.
[0025] In the used equipment industry, the lack of trust in the quality and processing effect of used chemical equipment has made the development of this industry difficult. Coupled with vicious competition in some industries and lax market supervision, the development of the used equipment industry is even more difficult.
[0026] In the current technology, it is usually difficult to accurately record the source and destination of used equipment during the transaction process, and it is also difficult to accurately assess the condition of used equipment, which leads to significant risks in the transaction process.
[0027] To address the aforementioned issues, this application provides a blockchain-based method, device, and medium for trading secondhand equipment. By encrypting equipment information and obtaining the residual value detection results corresponding to the secondhand equipment, the remaining value of the secondhand equipment can be determined while maintaining the confidentiality of the equipment information, thereby enabling accurate valuation of the current value of the secondhand equipment. Secondly, this application constructs an identification code for the secondhand equipment based on the equipment information code and the equipment residual value code, and forms a traceability tree for each secondhand equipment based on the identification code and the circulation process of each identification code. This allows for the recording of multiple transactions of the secondhand equipment, enabling traceability of the transaction process and ensuring the security of the secondhand equipment transactions.
[0028] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0029] Figure 1 This document provides a flowchart of a blockchain-based method for trading secondhand equipment, as illustrated in an embodiment of this application. Figure 1 As shown, the blockchain-based method for trading second-hand equipment includes the following steps:
[0030] S101. Obtain the equipment information of the used equipment, generate the first hash value corresponding to the used equipment based on the equipment information, and generate the equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value.
[0031] In one embodiment of this application, based on a preset encoding template, device information is converted into a corresponding alphanumeric string, and the alphanumeric string is hashed to obtain a first hash value; wherein, the device information includes at least one of the following: device name, device origin, device production date, and device serial number. Based on the preset encoding template, the first hash value corresponding to the used device is converted into a corresponding numeric string. The alphanumeric string, the numeric string, and the time when the device information was received are combined to obtain the device information code corresponding to the used device.
[0032] Specifically, the preset encoding template in this application includes multiple device names, device origins, dates, and serial numbers, as well as the corresponding letter strings. By comparing the current device information with the preset encoding template, the corresponding letter strings can be obtained. Next, based on the character string corresponding to the current device information, a hash calculation is performed to obtain the first hash value corresponding to the device information.
[0033] Furthermore, based on a preset encoding template, the first hash value is converted into a corresponding numeric string. The resulting numeric string, alphanumeric string, and the time when the device information was received are then combined. For example, the device information is combined according to the time the device information was received, the numeric string, and the alphanumeric string in that order to obtain the device information code corresponding to the used device's information.
[0034] S102. The device information is encrypted using a symmetric encryption algorithm and the public key of the authorized device residual value detection platform to obtain encrypted data, and the encrypted data is stored in the blockchain.
[0035] In one embodiment of this application, a generated random number is obtained. Device information is encrypted based on the random number to obtain first encrypted data corresponding to the device information. Public keys of multiple device residual value detection platforms are obtained. The random number is asymmetrically encrypted using the multiple public keys to obtain second encrypted data corresponding to each public key. The multiple second encrypted data are sorted according to a preset information combination rule to obtain encrypted data.
[0036] Specifically, upon receiving information requesting encryption of the current device information, a random number is generated as a key. This random number is then used to encrypt the current device information to obtain the first encrypted data. In this embodiment, multiple device residual value assessment platforms are pre-selected for evaluating the value of used equipment. Each of the selected platforms has a corresponding public key. The first encrypted data is then encrypted using the public key of each platform to obtain the second encrypted data.
[0037] Further, the first encrypted data is encrypted using the public key corresponding to the first device residual value detection platform to obtain the first second encrypted data. The first encrypted data is then encrypted using the public key corresponding to the second device residual value detection platform to obtain the second second encrypted data. The first encrypted data is then encrypted using the public key corresponding to the third device residual value detection platform to obtain the third second encrypted data. This process continues until all device residual value detection platforms have encrypted the first encrypted data, resulting in multiple second encrypted data sets. These multiple second encrypted data sets are then sorted and linked with the names of the multiple device residual value detection platforms according to a preset order.
[0038] S103. Based on the equipment residual value detection platform and encrypted data, determine the equipment residual value detection result corresponding to the used equipment.
[0039] In one embodiment of this application, a first encrypted data and a second encrypted data are obtained from the blockchain through an equipment residual value detection platform. The second encrypted data is decrypted using the private key corresponding to the equipment residual value detection platform to obtain a random number. The first encrypted data is then decrypted using the random number by the equipment residual value detection platform to obtain equipment information. The equipment information is analyzed by the equipment residual value detection platform to obtain a reference equipment residual value detection result corresponding to the equipment information. Reference equipment residual value detection results sent by multiple equipment residual value detection platforms are obtained, and the average of the multiple reference equipment residual value detection results is taken to obtain the equipment residual value detection result corresponding to the used equipment.
[0040] Specifically, upon receiving a request to assess the value of a used device, each equipment residual value assessment platform retrieves first and second encrypted data from the blockchain. Each platform then decrypts the second encrypted data using its private key to obtain a random number key. Next, each platform decrypts the first encrypted data using the obtained random number key to obtain the corresponding equipment information. After obtaining this equipment information, each platform performs its own value assessment and uploads the results.
[0041] Furthermore, after obtaining the assessment results uploaded by multiple equipment residual value testing platforms, the average of the multiple value assessment results is calculated to obtain the equipment residual value test result corresponding to the second-hand equipment.
[0042] By averaging the multiple assessment results, the accuracy of the value assessment results can be improved, thus preventing cheating in the equipment residual value detection platform.
[0043] S104. Based on the equipment residual value detection result and the equipment information code, generate a second hash value, and based on the equipment residual value detection result and the second hash value, generate the equipment residual value code corresponding to the used equipment.
[0044] In one embodiment of this application, based on a preset encoding template, the reference equipment residual value detection results sent by multiple equipment residual value detection platforms, as well as the equipment residual value detection results corresponding to the used equipment, are converted into corresponding numeric strings. The numeric strings are combined with the equipment information encoding, and the combined string is hashed to obtain a second hash value. The numeric string corresponding to the equipment residual value detection result, the second hash value, and the time string from which the equipment residual value detection result was obtained are combined to obtain the equipment residual value code corresponding to the used equipment.
[0045] Specifically, after obtaining the equipment residual value detection results, based on the preset encoding results, the reference equipment residual value detection results sent by multiple equipment residual value detection platforms are converted into corresponding numeric strings, and the equipment residual value obtained after averaging is also converted into a numeric string.
[0046] Furthermore, the acquired multiple numeric strings and device information codes are sorted according to a preset order. For example, the multiple numeric strings can be sorted according to the order of the numeric string corresponding to the reference device residual value detection result, the string corresponding to the device residual value detection result, and the device information code. A second hash value can be obtained by performing a hash calculation on the sorted strings.
[0047] Furthermore, by combining the numeric string corresponding to the residual value result of the equipment, the second hash value, and the time when the residual value detection result of the equipment was obtained, the residual value code corresponding to the current second-hand equipment can be obtained.
[0048] S105. Based on the equipment information code and the equipment residual value code, register the identification code of the used equipment with the secondary node.
[0049] In one embodiment of this application, a prefix and suffix are assigned to the device information code using a first preset unique assignment rule and a secondary node; wherein the first preset unique assignment rule is at least related to the user information of the current user to whom the used equipment belongs. A prefix and suffix are assigned to the device residual value code using a second preset unique assignment rule and a secondary node; wherein the second preset unique assignment rule is related to the time the device residual value code was obtained and the platform information of the device residual value detection platform corresponding to the device residual value code. The assigned device information code and the assigned device residual value code are combined to obtain combined code information. The combined code information is uploaded to the primary node through the secondary node for review by the primary node. After receiving the review approval information, the secondary node registers the combined code information as an identifier.
[0050] Specifically, the user information corresponding to the used equipment is obtained, and based on a preset encoding template and the user information, the user information is converted into a corresponding string. For example, the user's name is obtained and converted into a first string, and the user's ID card information is obtained and converted into a second string. The device information code is prefixed using the first string and suffixed using the second string to obtain the assigned device information code.
[0051] Furthermore, the system obtains platform information for each of the multiple equipment residual value testing platforms that perform residual value testing on the current used equipment. For example, it can obtain the platform name, convert it into a third string based on a preset encoding template, obtain the platform number, and convert it into a fourth string. Using this third string, the system prefixes the equipment residual value code, and uses the fourth string to suffix the equipment residual value code, thus obtaining the assigned equipment residual value code.
[0052] Furthermore, based on a preset order, for example, combining the assigned device information code first and the assigned device residual value code later, the combined encoded information is obtained.
[0053] Furthermore, the combined encoded information is uploaded to the primary node for review. If the review is successful, the primary node sends a review approval notification to the current secondary node. After the review is approved, the secondary node registers the combined encoded information as an identifier.
[0054] S106. Based on the identification code of each used equipment and the circulation process of each identification code, a used equipment traceability tree is formed to store the used equipment transaction process through the used equipment traceability tree.
[0055] In one embodiment of this application, after identifying the buyer of the used equipment, a current transaction identifier code corresponding to the used equipment is constructed based on the buyer's user information, transaction time, and the used equipment's identifier code. The current transaction identifier code, along with the corresponding equipment information, equipment information code, equipment residual value code, and buyer's user information, are stored in the blockchain.
[0056] Specifically, when trading used equipment, after identifying the buyer, the buyer's information is converted into a corresponding buyer information string based on a preset template. The transaction time is also converted into a corresponding time string. The device's identifier is obtained, and its equipment information is retrieved based on this identifier. A transaction identifier corresponding to the current transaction is constructed based on the device information, the buyer's information string, and the time string. This information is then stored on the blockchain to document the transaction process.
[0057] In one embodiment of this application, based on the device information of the used equipment, the stored transaction information corresponding to the used equipment is determined in the blockchain. Based on the time sequence of the stored transaction information, the previous transaction identifier corresponding to the current transaction is determined. The current transaction identifier corresponding to the used equipment is mapped with the previous transaction identifier to obtain a traceability tree, so as to store the used equipment transaction process through the used equipment traceability tree.
[0058] Specifically, each piece of used equipment may be resold multiple times; therefore, the same equipment may have undergone multiple transactions. In order to trace the transaction process of the same used equipment, this application embodiment uploads each transaction process to the blockchain for storage.
[0059] Furthermore, after the current transaction is completed, the stored transaction process corresponding to the current used device is retrieved from the blockchain, and the previous transaction process closest to the current transaction time is retrieved and stored. The current transaction identifier corresponding to the current transaction process is mapped with the previous transaction identifier to obtain the transaction traceability tree corresponding to the used device, so as to store the used device transaction process through the used device traceability tree.
[0060] This application embodiment, based on the identifier resolution secondary node, assigns a unique identity to each used equipment, constructs a full lifecycle traceability management system for used equipment, and realizes comprehensive, multi-dimensional, and in-depth quality visualization and transparency of used equipment manufacturers, production dates, circulation, historical operation, and scrapping, helping buyers of used equipment to better identify high-quality equipment.
[0061] Figure 2This is a schematic diagram of the structure of a blockchain-based second-hand equipment trading device provided as an embodiment of this application. Figure 2 As shown, the blockchain-based second-hand equipment trading platform includes:
[0062] At least one processor; and,
[0063] A memory communicatively connected to the at least one processor; wherein,
[0064] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0065] Obtain the equipment information of the used equipment, generate a first hash value corresponding to the used equipment based on the equipment information, and generate the equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value;
[0066] The device information is encrypted using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data, which is then stored in the blockchain.
[0067] Based on the equipment residual value detection platform and the encrypted data, the equipment residual value detection result corresponding to the second-hand equipment is determined;
[0068] Based on the equipment residual value detection result and the equipment information code, a second hash value is generated, and based on the equipment residual value detection result and the second hash value, the equipment residual value code corresponding to the second-hand equipment is generated;
[0069] Based on the equipment information code and the equipment residual value code, register the identification code of the used equipment with the secondary node;
[0070] A traceability tree for used equipment is formed based on the identification code of each used equipment and the circulation process of each identification code, so as to store the transaction process of the used equipment through the traceability tree.
[0071] This application embodiment also provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0072] Obtain the equipment information of the used equipment, generate a first hash value corresponding to the used equipment based on the equipment information, and generate the equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value;
[0073] The device information is encrypted using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data, which is then stored in the blockchain.
[0074] Based on the equipment residual value detection platform and the encrypted data, the equipment residual value detection result corresponding to the second-hand equipment is determined;
[0075] Based on the equipment residual value detection result and the equipment information code, a second hash value is generated, and based on the equipment residual value detection result and the second hash value, the equipment residual value code corresponding to the second-hand equipment is generated;
[0076] Based on the equipment information code and the equipment residual value code, register the identification code of the used equipment with the secondary node;
[0077] A traceability tree for used equipment is formed based on the identification code of each used equipment and the circulation process of each identification code, so as to store the transaction process of the used equipment through the traceability tree.
[0078] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0079] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0080] The above description is merely an embodiment of this application and is not intended to limit this application. For those skilled in the art, various modifications and variations can be made to the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of this application should be included within the scope of the claims of this application.
Claims
1. A blockchain-based method for trading secondhand equipment, characterized in that, The method includes: The process involves obtaining equipment information for a used device, generating a first hash value corresponding to the used device based on the equipment information, and generating an equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value. Specifically, this includes: converting the equipment information into a corresponding letter string based on a preset encoding template, and performing a hash calculation on the letter string to obtain the first hash value; wherein the equipment information includes at least one of the following: equipment name, equipment origin, equipment production date, and equipment serial number; converting the first hash value corresponding to the used device into a corresponding numeric string based on the preset encoding template; and combining the letter string, the numeric string, and the time the equipment information was received to obtain the equipment information code corresponding to the used device. The device information is encrypted using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data, which is then stored in the blockchain. Based on the equipment residual value detection platform and the encrypted data, the equipment residual value detection result corresponding to the second-hand equipment is determined; Based on the equipment residual value detection result and the equipment information code, a second hash value is generated, and based on the equipment residual value detection result and the second hash value, the equipment residual value code corresponding to the second-hand equipment is generated; Based on the equipment information code and the equipment residual value code, register the identification code of the used equipment with the secondary node; Based on the identification code of each used device and the circulation process of each identification code, a used device traceability tree is formed to store the used device transaction process through the used device traceability tree; The process of encrypting the device information using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data specifically includes: Get the generated random number; The device information is encrypted based on the random number to obtain the first encrypted data corresponding to the device information; Obtain the public keys of multiple device residual value detection platforms; The random number is asymmetrically encrypted using multiple public keys to obtain second encrypted data corresponding to each of the multiple public keys; Based on preset information combination rules, the plurality of second encrypted data are sorted to obtain the encrypted data; The determination of the residual value detection result corresponding to the used equipment based on the equipment residual value detection platform and the encrypted data specifically includes: The first encrypted data and the second encrypted data are obtained from the blockchain through the equipment residual value detection platform. The second encrypted data is decrypted using the private key corresponding to the equipment residual value detection platform to obtain the random number; The equipment residual value detection platform decrypts the first encrypted data based on the random number to obtain the equipment information; The equipment residual value detection platform is used to analyze the equipment information to obtain the reference equipment residual value detection result corresponding to the equipment information. Obtain reference equipment residual value detection results sent by multiple equipment residual value detection platforms respectively, and average the multiple reference equipment residual value detection results to obtain the equipment residual value detection result corresponding to the second-hand equipment; The process of generating a second hash value based on the equipment residual value detection result and the equipment information code, and generating an equipment residual value code corresponding to the used equipment based on the equipment residual value detection result and the second hash value, specifically includes: Based on a preset encoding template, the reference equipment residual value detection results sent by the multiple equipment residual value detection platforms, as well as the equipment residual value detection results corresponding to the second-hand equipment, are converted into corresponding numeric strings. The numeric string is combined with the device information encoding, and the combined string is hashed to obtain the second hash value. The numeric string corresponding to the equipment residual value detection result, the second hash value, and the time string of obtaining the equipment residual value detection result are combined to obtain the equipment residual value code corresponding to the second-hand equipment. Before registering the identification code of the used equipment to the secondary node based on the equipment information code and the equipment residual value code, the method further includes: The device information code is prefixed and suffixed using a first preset unique assignment rule and the second-level node; wherein the first preset unique assignment rule is at least related to the user information of the user currently owning the second-hand device; and The device residual value code is prefixed and suffixed using the second preset unique assignment rule and the second-level node; wherein, the second preset unique assignment rule is related to the time of obtaining the device residual value code and the platform information of the device residual value detection platform corresponding to the device residual value code; After registering the identification code of the used equipment with the secondary node based on the equipment information code and the equipment residual value code, the method further includes: After identifying the buyer of the used equipment, a current transaction identifier code corresponding to the used equipment is constructed based on the buyer's user information, transaction time, and the identifier code of the used equipment.
2. The method for trading second-hand equipment based on blockchain according to claim 1, characterized in that, The step of registering the identification code of the used equipment with the secondary node based on the equipment information code and the equipment residual value code specifically includes: The assigned device information code is combined with the assigned device residual value code to obtain the combined code information; The combined encoded information is uploaded to the first-level node through the second-level node, so that the first-level node can review the combined encoded information. After receiving the approval information, the secondary node registers the combined encoding information as an identifier.
3. The method for trading second-hand equipment based on blockchain according to claim 1, characterized in that, After constructing the current transaction identifier code corresponding to the second-hand equipment, the method further includes: The current transaction identifier, along with the corresponding device information, device information code, device residual value code, and buyer user information, are stored in the blockchain.
4. The method for trading second-hand equipment based on blockchain according to claim 3, characterized in that, The process of forming a used equipment traceability tree based on the identification code of each used equipment and the circulation process of each identification code, in order to store the used equipment transaction process through the used equipment traceability tree, specifically includes: Based on the equipment information of the used equipment, the stored transaction information corresponding to the used equipment is determined in the blockchain; Based on the time sequence of the stored transaction information, the previous transaction identifier code corresponding to the current transaction is determined; The current transaction identifier code corresponding to the used equipment is mapped to the previous transaction identifier code to obtain the traceability tree, so as to store the transaction process of the used equipment through the used equipment traceability tree.
5. A blockchain-based second-hand equipment trading device, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: The process involves obtaining equipment information for a used device, generating a first hash value corresponding to the used device based on the equipment information, and generating an equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value. Specifically, this includes: converting the equipment information into a corresponding letter string based on a preset encoding template, and performing a hash calculation on the letter string to obtain the first hash value; wherein the equipment information includes at least one of the following: equipment name, equipment origin, equipment production date, and equipment serial number; converting the first hash value corresponding to the used device into a corresponding numeric string based on the preset encoding template; and combining the letter string, the numeric string, and the time the equipment information was received to obtain the equipment information code corresponding to the used device. The device information is encrypted using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data, which is then stored in the blockchain. Based on the equipment residual value detection platform and the encrypted data, the equipment residual value detection result corresponding to the second-hand equipment is determined; Based on the equipment residual value detection result and the equipment information code, a second hash value is generated, and based on the equipment residual value detection result and the second hash value, the equipment residual value code corresponding to the second-hand equipment is generated; Based on the equipment information code and the equipment residual value code, register the identification code of the used equipment with the secondary node; A traceability tree for used equipment is formed based on the identification code of each used equipment and the circulation process of each identification code, so as to store the transaction process of the used equipment through the traceability tree; The process of encrypting the device information using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data specifically includes: Get the generated random number; The device information is encrypted based on the random number to obtain the first encrypted data corresponding to the device information; Obtain the public keys of multiple device residual value detection platforms; The random number is asymmetrically encrypted using multiple public keys to obtain second encrypted data corresponding to each of the multiple public keys; Based on preset information combination rules, the plurality of second encrypted data are sorted to obtain the encrypted data; The determination of the residual value detection result corresponding to the used equipment based on the equipment residual value detection platform and the encrypted data specifically includes: The first encrypted data and the second encrypted data are obtained from the blockchain through the equipment residual value detection platform. The second encrypted data is decrypted using the private key corresponding to the equipment residual value detection platform to obtain the random number; The equipment residual value detection platform decrypts the first encrypted data based on the random number to obtain the equipment information; The equipment residual value detection platform is used to analyze the equipment information to obtain the reference equipment residual value detection result corresponding to the equipment information. Obtain reference equipment residual value detection results sent by multiple equipment residual value detection platforms respectively, and average the multiple reference equipment residual value detection results to obtain the equipment residual value detection result corresponding to the second-hand equipment; The process of generating a second hash value based on the equipment residual value detection result and the equipment information code, and generating an equipment residual value code corresponding to the used equipment based on the equipment residual value detection result and the second hash value, specifically includes: Based on a preset encoding template, the reference equipment residual value detection results sent by the multiple equipment residual value detection platforms, as well as the equipment residual value detection results corresponding to the second-hand equipment, are converted into corresponding numeric strings. The numeric string is combined with the device information encoding, and the combined string is hashed to obtain the second hash value. The numeric string corresponding to the equipment residual value detection result, the second hash value, and the time string of obtaining the equipment residual value detection result are combined to obtain the equipment residual value code corresponding to the second-hand equipment. Before registering the identification code of the used equipment with the secondary node based on the equipment information code and the equipment residual value code, the process also includes: The device information code is prefixed and suffixed using a first preset unique assignment rule and the second-level node; wherein the first preset unique assignment rule is at least related to the user information of the user currently owning the second-hand device; and The device residual value code is prefixed and suffixed using the second preset unique assignment rule and the second-level node; wherein, the second preset unique assignment rule is related to the time of obtaining the device residual value code and the platform information of the device residual value detection platform corresponding to the device residual value code; After registering the identification code of the used equipment with the secondary node based on the equipment information code and the equipment residual value code, the process further includes: After identifying the buyer of the used equipment, a current transaction identifier code corresponding to the used equipment is constructed based on the buyer's user information, transaction time, and the identifier code of the used equipment.
6. A non-volatile computer storage medium storing computer-executable instructions, wherein the computer... Executable instructions are set as follows: The process involves obtaining equipment information for used equipment, generating a first hash value corresponding to the used equipment based on the equipment information, and generating an equipment information code corresponding to the current transaction stage based on the equipment information and the first hash value. Specifically, this includes converting the equipment information into a corresponding letter string based on a preset encoding template, and performing a hash calculation on the letter string to obtain the first hash value. The equipment information includes at least one of the following: equipment name, equipment origin, equipment production date, and equipment serial number; Based on a preset encoding template, the first hash value corresponding to the second-hand device is converted into a corresponding numeric string; the letter string, the numeric string, and the time when the device information was received are combined to obtain the device information code corresponding to the second-hand device. The device information is encrypted using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data, which is then stored in the blockchain. Based on the equipment residual value detection platform and the encrypted data, the equipment residual value detection result corresponding to the second-hand equipment is determined; Based on the equipment residual value detection result and the equipment information code, a second hash value is generated, and based on the equipment residual value detection result and the second hash value, the equipment residual value code corresponding to the second-hand equipment is generated; Based on the equipment information code and the equipment residual value code, register the identification code of the used equipment with the secondary node; A traceability tree for used equipment is formed based on the identification code of each used equipment and the circulation process of each identification code, so as to store the transaction process of the used equipment through the traceability tree; The process of encrypting the device information using a symmetric encryption algorithm and the public key of an authorized device residual value detection platform to obtain encrypted data specifically includes: Get the generated random number; The device information is encrypted based on the random number to obtain the first encrypted data corresponding to the device information; Obtain the public keys of multiple device residual value detection platforms; The random number is asymmetrically encrypted using multiple public keys to obtain second encrypted data corresponding to each of the multiple public keys; Based on preset information combination rules, the plurality of second encrypted data are sorted to obtain the encrypted data; The determination of the residual value detection result corresponding to the used equipment based on the equipment residual value detection platform and the encrypted data specifically includes: The first encrypted data and the second encrypted data are obtained from the blockchain through the equipment residual value detection platform. The second encrypted data is decrypted using the private key corresponding to the equipment residual value detection platform to obtain the random number; The equipment residual value detection platform decrypts the first encrypted data based on the random number to obtain the equipment information; The equipment residual value detection platform is used to analyze the equipment information to obtain the reference equipment residual value detection result corresponding to the equipment information. Obtain reference equipment residual value detection results sent by multiple equipment residual value detection platforms respectively, and average the multiple reference equipment residual value detection results to obtain the equipment residual value detection result corresponding to the second-hand equipment; The process of generating a second hash value based on the equipment residual value detection result and the equipment information code, and generating an equipment residual value code corresponding to the used equipment based on the equipment residual value detection result and the second hash value, specifically includes: Based on a preset encoding template, the reference equipment residual value detection results sent by the multiple equipment residual value detection platforms, as well as the equipment residual value detection results corresponding to the second-hand equipment, are converted into corresponding numeric strings. The numeric string is combined with the device information encoding, and the combined string is hashed to obtain the second hash value. The numeric string corresponding to the equipment residual value detection result, the second hash value, and the time string of obtaining the equipment residual value detection result are combined to obtain the equipment residual value code corresponding to the second-hand equipment. Before registering the identification code of the used equipment with the secondary node based on the equipment information code and the equipment residual value code, the process also includes: The device information code is prefixed and suffixed using a first preset unique assignment rule and the second-level node; wherein the first preset unique assignment rule is at least related to the user information of the user currently owning the second-hand device; and The device residual value code is prefixed and suffixed using the second preset unique assignment rule and the second-level node; wherein, the second preset unique assignment rule is related to the time of obtaining the device residual value code and the platform information of the device residual value detection platform corresponding to the device residual value code; After registering the identification code of the used equipment with the secondary node based on the equipment information code and the equipment residual value code, the process further includes: After identifying the buyer of the used equipment, a current transaction identifier code corresponding to the used equipment is constructed based on the buyer's user information, transaction time, and the identifier code of the used equipment.
Citation Information
Patent Citations
Method, apparatus and system for commodity traceability
CN109003093A
An article exchange method and device based on a block chain
CN109583956A