CN111125749B - Block chain-based clothes sharing method, terminal device and storage medium - Google Patents

Block chain-based clothes sharing method, terminal device and storage medium Download PDF

Info

Publication number
CN111125749B
CN111125749B CN201911152644.1A CN201911152644A CN111125749B CN 111125749 B CN111125749 B CN 111125749B CN 201911152644 A CN201911152644 A CN 201911152644A CN 111125749 B CN111125749 B CN 111125749B
Authority
CN
China
Prior art keywords
clothes
information
wardrobe
block chain
sharing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911152644.1A
Other languages
Chinese (zh)
Other versions
CN111125749A (en
Inventor
苟喜霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN201911152644.1A priority Critical patent/CN111125749B/en
Publication of CN111125749A publication Critical patent/CN111125749A/en
Application granted granted Critical
Publication of CN111125749B publication Critical patent/CN111125749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The application provides a block chain-based clothes sharing method, terminal equipment and a storage medium, wherein the method comprises the following steps: scanning information on a wardrobe to obtain first clothes information of clothes; uploading the first clothes information to a block chain, so that consistency analysis is performed on the first clothes information by other terminal equipment in the block chain to obtain a consistency result; when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password; and generating clothes sharing information after the wardrobe is determined to be opened according to the wardrobe password, and uploading the clothes sharing information to the block chain. The clothes sharing treatment based on the block chain is completed, so that the waste of clothes and the pollution to the environment are avoided; any terminal equipment in the block chain can acquire the clothes information, and a user of any terminal equipment acquires the clothes without the participation of a third-party platform, so that the platform is not limited, and the clothes sharing range is expanded.

Description

Block chain-based clothes sharing method, terminal device and storage medium
Technical Field
The application relates to the technical field of logistics, in particular to a block chain-based clothes sharing method, terminal equipment and storage medium.
Background
Along with the development and progress of living standard, people have more and more requirements on dressing. For the user, the user may choose to purchase the clothing offline, or on the network. Thus, many people accumulate a lot of clothes.
Now, with the emphasis on environment and the diversification of clothes selection, it is a problem how to treat accumulated clothes.
However, in the prior art, a way for users to share the clothes is not provided yet, and then many people choose to discard the clothes, which causes waste of the clothes and environmental pollution.
Disclosure of Invention
The application provides a clothes sharing method based on a block chain, terminal equipment and a storage medium, which are used for solving the problem of providing a clothes sharing mode and further avoiding clothes waste and environmental pollution.
In a first aspect, the present application provides a method for sharing clothes based on a block chain, where the method is applied to a terminal device in the block chain, and the method includes:
scanning information on a wardrobe to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password;
uploading the first clothes information to a block chain, so that consistency analysis is performed on the first clothes information by other terminal equipment in the block chain according to intelligent contract to obtain a consistency result;
when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password;
after the wardrobe is determined to be opened according to the wardrobe password, generating clothes sharing information, and uploading the clothes sharing information to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information.
Further, before scanning the scanning information on the wardrobe to obtain the first clothes information of the clothes, the method further comprises the following steps:
acquiring second clothes information of the clothes, wherein the second clothes information is the clothes information stored by the current terminal equipment, and the second clothes information comprises a clothes sharing state;
when the clothes sharing state in the second clothes information is determined to be characterized as a sharable state, the second clothes information is checked with prestored third clothes information, wherein the third clothes information is uploaded to each terminal device in the block chain by a terminal device which actively shares the clothes;
executing the step of scanning information on the wardrobe upon determining correspondence between the second laundry information and the third laundry information.
Further, before acquiring the second laundry information of the laundry, the method further includes:
receiving a viewing instruction, wherein the viewing instruction is used for indicating that the clothes are displayed to a user;
and displaying second clothes information of the clothes according to the viewing instruction.
Further, the method further comprises:
after the wardrobe is determined not to be opened according to the wardrobe password, generating clothes unshared information, uploading the clothes unshared information to the block chain, so that after the wardrobe password is updated by terminal equipment actively sharing the clothes in the block chain, the updated wardrobe password is uploaded to the block chain.
Further, after uploading the clothes sharing information to the block chain, the method further includes:
and when the clothes are detected to be returned to the wardrobe, uploading clothes sharing end information to the block chain, so that after the terminal equipment actively sharing the clothes in the block chain updates the wardrobe password and the sharing times according to the clothes sharing end information, the updated wardrobe password and the updated sharing times are uploaded to the block chain.
Further, the method further comprises:
acquiring shared information sent by a user, wherein the shared information comprises basic clothes information, and generating a wardrobe password according to the shared information;
generating a clothes key value according to the clothes basic information and a preset unique identifier;
generating fourth clothes information according to the clothes key value, the generated wardrobe password and a preset wardrobe identification;
and uploading the fourth clothes information to the block chain.
Further, after uploading the fourth clothing information to the block chain, the method further includes:
updating the generated wardrobe password when the access authority of the generated wardrobe password is determined to be acquired and the wardrobe corresponding to the wardrobe identification is not opened;
updating the fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification;
and uploading the updated fourth clothes information to the block chain.
Further, the fourth laundry information includes sharing times; after uploading the fourth laundry information to the blockchain, further comprising:
when detecting that the clothes corresponding to the basic information of the clothes are returned to the wardrobe corresponding to the wardrobe identification, updating the generated wardrobe password and the sharing times;
updating the fourth clothes information according to the clothes key value, the updated wardrobe password, the wardrobe identification and the updated sharing times;
and uploading the updated fourth clothes information to the block chain.
Further, the fourth laundry information includes a sharing number; after uploading the fourth laundry information to the blockchain, further comprising:
when detecting that the clothes corresponding to the basic information of the clothes are returned to the wardrobe corresponding to the wardrobe identification, obtaining clothes sharing ending information, wherein the clothes sharing information comprises a unique identification;
and when the unique identifier in the clothes sharing information is determined to be consistent with the preset unique identifier, determining that the current sharing process is ended.
Further, the method further comprises:
acquiring first clothes state information sent by a user, and acquiring identity information of terminal equipment for enjoying clothes, which corresponds to the first clothes state information;
when the first clothes state information is determined to represent that clothes can be used, second clothes state information uploaded by other terminal equipment is obtained;
when the second clothes state information represents that clothes are not available, configuring a preset weight value for the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information, and adding the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information into a blacklist when the preset weight value is larger than the preset value.
Further, the method further comprises:
when the first clothes state information represents that clothes are not available, configuring a preset weight for the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information, and adding the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information into a blacklist when the preset weight is larger than a preset value;
when the usable information of the clothes sent by the user is acquired, the generated wardrobe password is updated;
updating the fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification;
and uploading the updated fourth clothes information to the block chain.
Further, the method further comprises:
sending verification information to an identity information system, wherein the verification information comprises identity information, so that the identity information system returns a verification result after verifying the identity information;
after the received verification result is determined to represent that the verification is passed, generating a hash value according to the identity information;
randomly generating an encryption key, and encrypting the hash value according to the encryption key to obtain encrypted identity information;
and uploading the hash value and the encrypted identity information to the block chain.
In a second aspect, the present application provides a terminal device, where the terminal device is a terminal device in a blockchain, and the terminal device includes:
the scanning module is used for scanning information on a wardrobe to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password;
the first uploading module is used for uploading the first clothes information to a block chain so that other terminal equipment in the block chain can carry out consistency analysis on the first clothes information according to an intelligent contract to obtain a consistency result;
the first obtaining module is used for obtaining the access authority of the wardrobe password when the number of other terminal devices with consistent clothes is larger than the preset number according to the consistency result;
the first generation module is used for generating clothes sharing information after the wardrobe is determined to be opened according to the wardrobe password;
the second uploading module is used for uploading the clothes sharing information to the block chain so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information.
Further, the terminal device further includes:
the second acquisition module is used for acquiring second clothes information of clothes before the scanning module scans scanning information on a wardrobe to obtain first clothes information of the clothes, wherein the second clothes information is the clothes information stored by current terminal equipment, and the second clothes information comprises a clothes sharing state;
the checking module is used for checking the second clothes information with prestored third clothes information when the clothes sharing state in the second clothes information is determined to be a sharable state, wherein the third clothes information is uploaded to each terminal device in the block chain by a terminal device which actively shares the clothes;
an execution module for executing the scanning module when it is determined that the second laundry information is consistent with the third laundry information.
Further, the terminal device further includes:
a receiving module, configured to receive a viewing instruction before the second obtaining module obtains the second piece of clothing information of the piece of clothing, where the viewing instruction is used to instruct a user to display the piece of clothing;
and the display module is used for displaying second clothes information of the clothes according to the viewing instruction.
Further, the terminal device further includes:
and the second generation module is used for generating clothes unshared information after the wardrobe is determined not to be opened according to the wardrobe password, and uploading the clothes unshared information to the block chain, so that after the wardrobe password is updated by the terminal equipment which actively shares the clothes in the block chain, the updated wardrobe password is uploaded to the block chain.
Further, the terminal device further includes:
a third uploading module, configured to upload clothing sharing end information to the block chain when it is detected that the clothing is returned to the wardrobe after the clothing sharing information is uploaded to the block chain by the second uploading module, so that after the wardrobe password and the number of sharing times are updated according to the clothing sharing end information by a terminal device that actively shares the clothing in the block chain, the updated wardrobe password and the updated number of sharing times are uploaded to the block chain.
Further, the terminal device further includes:
the third acquisition module is used for acquiring shared information sent by a user, wherein the shared information comprises basic clothes information, and a wardrobe password is generated according to the shared information;
the third generation module is used for generating a clothes key value according to the clothes basic information and a preset unique identifier;
the fourth generating module is used for generating fourth clothes information according to the clothes key value, the generated wardrobe password and a preset wardrobe identification;
and the fourth uploading module is used for uploading the fourth clothes information to the block chain.
Further, the terminal device further includes:
the first updating module is used for updating the generated wardrobe password after the fourth clothes information is uploaded to the block chain by the fourth uploading module and when the access authority of the generated wardrobe password is determined to be acquired and the wardrobe corresponding to the wardrobe identification is not opened;
the second updating module is used for updating the fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification;
and the fifth uploading module is used for uploading the updated fourth clothes information to the block chain.
Further, the fourth laundry information includes sharing times; the terminal device further includes:
a third updating module, configured to update the generated wardrobe password and the number of sharing times when it is detected that the clothing corresponding to the clothing basic information is returned to the wardrobe corresponding to the wardrobe identification after the fourth information of the clothing is uploaded to the block chain by the fourth uploading module;
the fourth updating module is used for updating the fourth clothes information according to the clothes key value, the updated wardrobe password, the wardrobe identification and the updated sharing times;
and the sixth uploading module is used for uploading the updated fourth clothes information to the block chain.
Further, the fourth laundry information includes sharing times; the terminal device further includes:
a fourth obtaining module, configured to obtain clothing sharing end information when it is detected that the clothing corresponding to the clothing basic information is returned to the wardrobe corresponding to the wardrobe identification after the fourth uploading module uploads the fourth clothing information to the block chain, where the clothing sharing information includes a unique identification;
and the determining module is used for determining that the current sharing process is ended when the unique identifier in the clothes sharing information is determined to be consistent with the preset unique identifier.
Further, the terminal device further includes:
the fifth acquisition module is used for acquiring first clothes state information sent by a user and acquiring identity information of terminal equipment for enjoying clothes, which corresponds to the first clothes state information;
the sixth acquisition module is used for acquiring second clothes state information uploaded by other terminal equipment when the first clothes state information represents that clothes can be used;
the first configuration module is used for configuring a preset weight value for the identity information of the terminal equipment for enjoying the clothes corresponding to the first clothes state information when the second clothes state information represents that the clothes are not available, so that the identity information of the terminal equipment for enjoying the clothes corresponding to the first clothes state information is added into a blacklist when the preset weight value is larger than a preset value.
Further, the terminal device further includes:
the second configuration module is used for configuring a preset weight value for the identity information of the terminal equipment for enjoying the clothes, which corresponds to the first clothes state information, when the first clothes state information indicates that the clothes are not available, so that the identity information of the terminal equipment for enjoying the clothes, which corresponds to the first clothes state information, is added into a blacklist when the preset weight value is greater than a preset value;
the fifth updating module is used for updating the generated wardrobe password when the clothes available information sent by the user is acquired;
a sixth updating module, configured to update the fourth clothing information according to the clothing key value, the updated wardrobe password, and the wardrobe identifier;
and the seventh uploading module is used for uploading the updated fourth clothes information to the block chain.
Further, the terminal device further includes:
the system comprises a sending module and a verification module, wherein the sending module is used for sending verification information to an identity information system, and the verification information comprises identity information so that the identity information system returns a verification result after verifying the identity information;
the fifth generation module is used for generating a hash value according to the identity information after the received verification result is determined to represent that the verification passes;
a sixth generating module, configured to randomly generate an encryption key, and encrypt the hash value according to the encryption key to obtain encrypted identity information;
an eighth upload module, configured to upload the hash value and the encrypted identity information to the block chain.
In a third aspect, the present application provides a terminal device comprising means or means (means) for performing the steps of any of the methods of the first aspect above.
In a fourth aspect, the present application provides a terminal device comprising a processor, a memory and a computer program, wherein the computer program is stored in the memory and configured to be executed by the processor to implement any of the methods of the first aspect.
In a fifth aspect, the present application provides a terminal device comprising at least one processing element or chip for performing any of the methods of the first aspect above.
In a sixth aspect, the present application provides a computer program for performing any of the methods of the first aspect above when executed by a processor.
In a seventh aspect, the present application provides a computer readable storage medium having the computer program of the sixth aspect stored thereon.
According to the clothes sharing method based on the block chain, the terminal devices and the storage medium, the block chain is formed by the terminal devices, any terminal device in the block chain can upload first clothes information to the block chain by acquiring the first clothes information, so that other terminal devices in the block chain can perform consensus processing on the first clothes information, and then after the consensus passes, any current terminal device acquires access authority of a wardrobe password, and then a wardrobe is opened, so that a user acquires clothes, and further the clothes are shared; and any current terminal device uploads the clothes sharing information of the current clothes to the block chain, and then each terminal device in the block chain can update the clothes sharing state of the clothes. Therefore, the clothes sharing treatment based on the block chain is completed, and the waste of clothes and the pollution of the environment are avoided; any terminal device in the block chain can acquire the clothes information, and a user of any terminal device acquires the clothes without the participation of a third-party platform, so that the platform is not limited, and the clothes sharing range is expanded; and based on the mode of the block chain and the intelligent contract, the information of the clothes is stored and transmitted in the block chain, but the information of the clothes cannot be modified, so that the reliability of the information of the clothes is ensured, the user can acquire the real information of the clothes, and the user can use the clothes meeting the requirements of the user.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for sharing clothes based on a block chain according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another method for sharing clothes based on a block chain according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another method for sharing clothes based on a block chain according to an embodiment of the present application;
fig. 5 is a signaling diagram of an uplink process of clothing information according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another clothing sharing method based on a block chain according to an embodiment of the present application;
fig. 7 is a schematic flowchart of another method for sharing clothes based on a block chain according to an embodiment of the present application;
fig. 8 is a signaling diagram of a block chain joining by a terminal device of an individual user according to an embodiment of the present application;
fig. 9 is a signaling diagram of a block chain joining by a terminal device of an enterprise user according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of another terminal device provided in an embodiment of the present application;
fig. 12 is a schematic structural diagram of another terminal device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by referencing a particular embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The embodiment of the application can be applied to the technical field of logistics, and the application of the embodiment of the application is realized by adopting terminal equipment.
In the following, terms related to the embodiments of the present application will be explained.
1) Block chain: the blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm.
2) And a wardrobe: it can be a wardrobe, an intelligent wardrobe, a storage facility, etc. arranged in public places.
It should be noted that the terms or terms referred to in the embodiments of the present application may be mutually referred and are not described in detail.
The specific application scenarios of the application are as follows: along with the development and the progress of living standard, people have more and more requirements on dressing. For the user, the user may choose to purchase the clothing offline, or on the network. Thus, many people accumulate a lot of clothes.
Now, with the emphasis on environment and the diversification of clothes selection, it is a problem how to treat accumulated clothes. However, in the prior art, a way for users to share the clothes is not provided yet, and then many people choose to discard the clothes, which causes waste of the clothes and environmental pollution.
In order to avoid waste of clothes and pollution to the environment, clothes-based e-commerce platforms are slowly started to appear, and users can exchange and use the clothes based on the e-commerce platforms; however, in the existing exchange platform, a user cannot know the source of clothes and the number of people passing through the clothes. And for these exchange platforms, the exchange platform needs to complete the logistics treatment and the washing of the laundry, for example, the exchange platform bears the logistics cost of the laundry and the washing process of the laundry, but the logistics treatment and the washing of the laundry are costly. The exchange platforms actively provide clothes, so that users can use the clothes; however, the clothes between different exchange platforms cannot be shared, and the idle clothes in some individual users are more, and the clothes cannot be provided on the exchange platforms.
The application provides a block chain-based clothes sharing method, terminal equipment and storage medium, and aims to solve the above technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application, and as shown in fig. 1, a block chain may be constructed for each terminal device to obtain a block chain network; each terminal device can be used as a device for actively sharing clothes and can also be used as a device for enjoying the clothes.
Fig. 2 is a schematic flowchart of a clothing sharing method based on a block chain according to an embodiment of the present application. As shown in fig. 2, the method includes:
101. scanning information on the wardrobe is scanned to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password.
In this embodiment, the execution subject of this embodiment may be a terminal device, or a device or apparatus for sharing clothes based on a block chain, or other devices or apparatuses that can execute the method of this embodiment. In this embodiment, an execution subject is described as a terminal device.
Different terminal devices form a block chain, and then a block chain network is formed; these terminal devices may be terminal devices of individual users or terminal devices of enterprise users.
A wardrobe is provided at a preset place, and clothes to be shared can be placed in the wardrobe. The terminal equipment needing to actively share the clothes can upload the clothes information of the clothes to the block chain, and then each terminal equipment in the block chain can upload the clothes information to the terminal equipment actively sharing the clothes; the block chain can also form two-dimensional codes or bar codes for the clothes information uploaded by the terminal equipment actively sharing the clothes; and then, the block chain sends the two-dimensional code or the bar code to the wardrobe, and the wardrobe displays the two-dimensional code or the bar code.
Therefore, in order to facilitate the user to use the wardrobe, the two-dimensional code or the bar code may be displayed on the wardrobe, and the two-dimensional code or the bar code may be referred to as scanned information of the clothes. The two-dimensional code or the barcode stores the laundry information of the laundry, and in order to distinguish the laundry information from other laundry information, the laundry information stored in the two-dimensional code or the barcode is referred to as first laundry information.
When the user needs to enjoy clothes, the user can operate the terminal device, and then the terminal device scans the two-dimensional code or the bar code on the wardrobe, and then the terminal device scans the scanning information on the wardrobe. The code scanning information is stored with the clothes information uploaded by the terminal equipment which actively shares the clothes, so that the current terminal equipment can acquire the first clothes information of the clothes. Wherein the first laundry information includes, but is not limited to, the following information: clothing category, clothing brand, time of purchase, price of purchase, place of purchase, number of shares, time of share, wardrobe password, clothing sharing status, clothing picture, clothing location. The wardrobe password is used for opening a wardrobe for storing clothes. The laundry sharing state represents that laundry may be shared, or laundry may not be shared, or laundry has been enjoyed.
102. The first clothes information is uploaded to the block chain, so that consistency analysis is carried out on the first clothes information by other terminal equipment in the block chain according to an intelligent contract, and then a consistency result is obtained.
In this embodiment, the current terminal device uploads the scanned first clothing information to the block chain, and then other nodes in the block chain perform consensus processing on the first clothing information.
In the step, the current terminal device uploads the scanned first clothes information to the block chain, so that other terminal devices in the block chain respectively acquire the first clothes information; the terminal equipment actively sharing the clothes uploads the clothes information, so that other terminal equipment respectively acquires the cochain clothes information; each other terminal device analyzes the first clothes information and the cochain clothes information by using an intelligent contract to perform common identification processing so as to determine whether the first clothes information and the cochain clothes information are consistent, for example, the other terminal devices call the intelligent contract to perform image identification on a picture in the first clothes information and a picture in the cochain clothes information; and when determining that the terminal devices are consistent, uploading the consistency result of each other terminal device to the block chain, namely, uploading the consensus result of each other terminal device to the block chain.
103. And when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password.
In the embodiment, since each other terminal device performs consensus processing on the first clothes information, and uploads the consensus result to the block chain; thus, the current terminal device needing to enjoy the clothes can receive the consensus result uploaded by each other terminal device, namely, the consistency result.
The current terminal equipment counts the number of other terminal equipment with consistent clothes according to the consistency result, and when the number of the current terminal equipment is determined to be larger than the preset number, the first clothes information is determined to pass the consensus. Then, since the wardrobe password is stored in the first clothes information, only the current terminal device cannot acquire the access right, after the first clothes information is determined to pass the consensus, the current terminal device can acquire the access right of the wardrobe password by using the intelligent contract.
104. After the wardrobe is determined to be opened according to the wardrobe password, clothes sharing information is generated and uploaded to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information.
In this embodiment, after the current terminal device obtains the access right of the wardrobe password, the current terminal device may interact with the wardrobe by using the wardrobe password, for example, the current terminal device sends the wardrobe, and then the wardrobe is opened. Or after the current terminal equipment acquires the access authority of the wardrobe password, displaying the wardrobe password; the user then opens the wardrobe using the wardrobe password.
After the wardrobe is opened, the wardrobe sends a feedback message to the current terminal equipment through the block chain network, wherein the feedback message represents that the wardrobe is opened; and, after the wardrobe is opened, the user may take out the laundry in the wardrobe.
Then, the current terminal device may generate wardrobe sharing information, which indicates that the clothes in the wardrobe are shared. The wardrobe sharing information includes, but is not limited to, the following information: wardrobe identification, clothes identification, wardrobe opening time and identification of current terminal equipment. Then, the current terminal device uploads the wardrobe sharing information to the block chain, and then, each other terminal device in the block chain can receive the wardrobe sharing information.
Then, the clothes information of the upper chain is stored in each other terminal device in the block chain, the clothes information of the upper chain has a clothes sharing state, and the clothes sharing state represents that the clothes can be shared; and updating the stored clothes sharing state by each other terminal device in the block chain according to the received wardrobe sharing information, and further enabling the updated clothes sharing state to be that the clothes are enjoyed. And the current terminal device is used as a node in the block chain, and the current terminal device can also update the clothes sharing state of the clothes, so that the clothes sharing state after updating is that the clothes are already enjoyed.
In this embodiment, first clothes information of clothes is obtained by scanning information on a wardrobe, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information includes a clothes sharing state and a wardrobe password; uploading the first clothes information to a block chain, so that consistency analysis is performed on the first clothes information by other terminal equipment in the block chain according to an intelligent contract, and then a consistency result is obtained; when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password; after the wardrobe is determined to be opened according to the wardrobe password, clothes sharing information is generated and uploaded to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information. The method comprises the steps that a block chain is formed through each terminal device, any terminal device in the block chain can upload first clothes information to the block chain by acquiring the first clothes information, so that other terminal devices in the block chain can perform consensus processing on the first clothes information, and then after the consensus processing is passed, any current terminal device acquires access permission of a wardrobe password, and then a wardrobe is opened, so that a user acquires clothes, and clothes are shared; in addition, any current terminal device uploads the clothes sharing information of the current clothes to the block chain, and then each terminal device in the block chain can update the clothes sharing state of the clothes. Therefore, the clothes sharing treatment based on the block chain is completed, and the waste of clothes and the pollution to the environment are avoided; any terminal device in the block chain can acquire the clothes information, and a user of any terminal device acquires the clothes without the participation of a third-party platform, so that the platform is not limited, and the clothes sharing range is expanded; and based on the mode of the block chain and the intelligent contract, the information of the clothes is stored and transmitted in the block chain, but the information of the clothes cannot be modified, so that the reliability of the information of the clothes is ensured, the user can acquire the real information of the clothes, and the user can use the clothes meeting the requirements of the user.
Fig. 3 is a schematic flowchart of another clothing sharing method based on a block chain according to an embodiment of the present application. As shown in fig. 3, the method includes:
201. receiving a viewing instruction, wherein the viewing instruction is used for indicating that the clothes are displayed to a user; and displaying second clothes information of the clothes according to the viewing instruction.
In this embodiment, the execution subject of this embodiment may be a terminal device, or a device or apparatus for sharing clothes based on a block chain, or other devices or apparatuses that can execute the method of this embodiment. In this embodiment, an execution subject is described as a terminal device.
Different terminal devices form a block chain, and a block chain network is formed; these terminal devices may be terminal devices of individual users or terminal devices of enterprise users.
The wardrobe is arranged at a preset place, and clothes to be shared can be placed in the wardrobe. The terminal equipment needing to actively share the clothes can upload the clothes information of the clothes to the block chain, and then each terminal equipment in the block chain can upload the clothes information to the terminal equipment actively sharing the clothes. Further, the laundry is shared onto the block chain, i.e., the laundry is chain-linked.
Any terminal device in the blockchain can then produce a look at the clothing shared to the blockchain. A user can send a viewing instruction to the terminal device, for example, the viewing instruction is sent by sending out voice, touching the terminal device and the like; the viewing instruction indicates clothes which the user needs to view; then, since a plurality of clothes are shared in the blockchain, the terminal device can call the clothes indicated by the viewing instruction according to the viewing instruction, and then the terminal device displays second clothes information of the clothes. Wherein the first laundry information includes, but is not limited to, the following information: clothing category, clothing brand, time of purchase, price of purchase, place of purchase, number of shares, time of share, wardrobe password, clothing sharing status. The wardrobe password is used for opening a wardrobe for storing clothes. The laundry sharing state characterizes whether the laundry may be shared, or the laundry may not be shared, or the laundry has been enjoyed. However, at this time, the terminal device does not acquire the access right of the wardrobe password, so that the terminal device does not display the wardrobe password in the second clothes information when the second clothes information is displayed.
For example, the user may send a viewing instruction to the terminal device, where the viewing instruction indicates information such as a preset geographical range and a type of clothes, and the terminal device retrieves the clothes corresponding to the viewing instruction from the block chain, where the information of the clothes is stored in the block chain; then, the terminal device displays the clothes information of the clothes corresponding to the viewing instruction. Furthermore, any terminal device in the blockchain can check clothes within a certain range from the terminal device, and the user can know information such as the brand, the purchase time, the purchase price, the purchase place, the sharing times, the sharing time, the position of the clothes and the like of the clothes.
202. And acquiring second clothes information of the clothes, wherein the second clothes information is the clothes information stored by the current terminal equipment, and the second clothes information comprises a clothes sharing state.
In this embodiment, after step 201, the current terminal device displays second clothes information of the clothes to the user, so that the user can select clothes of the heart instrument according to the second clothes information, and further find clothes meeting the intention of the user. Then, the current terminal device needs to check the laundry information.
At this time, after step 201, the user selects one piece of clothes; the terminal device actively sharing the clothes uploads the clothes information of the clothes to the block chain, so that the current terminal device serving as a node in the block chain stores the clothes information of the clothes, and the clothes information stored by the current terminal device is called as second clothes information. The second laundry information includes, but is not limited to, the following information: clothing category, clothing brand, time of purchase, price of purchase, place of purchase, number of shares, time of share, wardrobe password, clothing sharing status. The wardrobe password is used for opening a wardrobe for storing clothes. The laundry sharing state represents that laundry may be shared, or laundry may not be shared, or laundry has been enjoyed.
The current terminal device calls the stored second clothing information by using the intelligent contract.
203. And when the clothes sharing state in the second clothes information is determined to be characterized as a sharable state, checking the second clothes information with prestored third clothes information, wherein the third clothes information is uploaded to each terminal device in the block chain by the terminal device actively sharing clothes.
In this embodiment, the current terminal device first needs to detect the clothes sharing state of the clothes selected by the user; the current terminal device acquires the clothes sharing state in the second clothes information, and judges whether the clothes sharing state is a shareable state or an unshared state, namely, whether the clothes are in a rented state or not; when the current terminal device determines that the clothes sharing state in the second clothes information is characterized as the sharable state, the current terminal device determines that the clothes can be shared by the current user.
Then, the current terminal device needs to check the clothes information to ensure the correctness of the clothes. At this time, the current terminal device stores second clothes information, wherein the second clothes information is the clothes information in the currently acquired block chain; however, at the initial time, the terminal device actively sharing the laundry broadcasts the laundry information in the block chain, and the laundry information at this time is called as third laundry information. The current terminal equipment needs to utilize an intelligent contract to check the clothes information in the currently acquired block chain and the clothes information broadcasted by the terminal equipment actively sharing the clothes in the block chain; that is, the current terminal device checks the second clothes information with the third clothes information, and then detects whether the linked data is consistent, wherein the linked data refers to the clothes information.
204. Upon determining correspondence between the second laundry information and the third laundry information, step 205 is performed.
In this embodiment, when the current terminal device determines that the second clothes information is consistent with the third clothes information, the current terminal device determines that the linked data is consistent, and then the current terminal device determines that the current clothes can be shared. Step 205 is then performed.
205. Scanning information on the wardrobe is scanned to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password.
In this embodiment, this step may refer to step 101 in fig. 2, and is not described again.
206. The first clothes information is uploaded to the block chain, so that consistency analysis is carried out on the first clothes information by other terminal equipment in the block chain according to an intelligent contract, and then a consistency result is obtained.
In this embodiment, this step may refer to step 102 in fig. 2, and is not described again.
207. And when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password.
In this embodiment, this step may refer to step 103 in fig. 2, and is not described again.
208. After the wardrobe is determined to be opened according to the wardrobe password, clothes sharing information is generated and uploaded to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information.
In this embodiment, this step can be referred to as step 104 of fig. 2. After the wardrobe is determined to be opened, the current terminal equipment can determine the quota value corresponding to the clothing identifier according to a preset quota information rule, wherein the quota information rule comprises the corresponding relation between the clothing identifier and the quota value; and deducting the credit value corresponding to the clothing identification from the credit account of the current terminal equipment.
For example, after the current terminal device determines that a wardrobe is opened, the current terminal device calls a preset payment interface, and deducts and freezes a value corresponding to the clothing identifier from an account corresponding to the current terminal device.
209. And when the clothes are detected to be returned to the wardrobe, the clothes sharing end information is uploaded to the block chain, so that the terminal equipment actively sharing the clothes in the block chain updates the wardrobe password and the sharing times according to the clothes sharing end information, and then the updated wardrobe password and the updated sharing times are uploaded to the block chain.
In the present embodiment, after the user shares the laundry after step 208, the user needs to return the laundry after using the laundry; the user places clothes into the wardrobe, then the user inputs first returning information into the terminal device, the wardrobe sends second returning information to the terminal device through the block chain, and then the terminal device confirms that the wardrobe is returned into the wardrobe.
Then, the terminal device uploads the laundry sharing end information to the block chain. The laundry sharing end information includes, but is not limited to, the following information: clothing category, clothing brand, time of purchase, price of purchase, place of purchase, number of shares, time of share, identification of the terminal device. Thus, the terminal equipment actively sharing the clothes receives the clothes sharing end information; then, the terminal equipment actively sharing the clothes needs to update the wardrobe password so as to obtain an updated wardrobe password, and the terminal equipment actively sharing the clothes accumulates the sharing times of the clothes for 1 time so as to obtain the updated sharing times; then, the terminal device actively sharing the clothes uploads the updated wardrobe password and the updated sharing times to the block chain, and then each terminal device in the block chain receives the updated wardrobe password and the updated sharing times, but each terminal device in the block chain does not obtain the access right of the updated wardrobe password temporarily.
And, at this moment, the terminal equipment actively sharing the clothes can be confirmed, and the process of sharing the clothes is finished currently; the terminal equipment actively sharing the clothes verifies the identity information of the terminal equipment by using an intelligent contract, namely, the terminal equipment actively sharing the clothes obtains a Hash value (Hash) of the terminal equipment through personal plaintext information, and obtains an identifier of the terminal equipment sharing the clothes in the clothes sharing finishing information, and compares the identifier with the identifier of the terminal equipment sharing the clothes; after the consistency is confirmed, the terminal device actively sharing the clothes calls a preset payment interface, deducts the credit value frozen in the step 208, namely, the credit value frozen in the step 208 is counted into an account of the terminal device actively sharing the clothes, so as to obtain deduction information of the credit value, and then the terminal device actively sharing the clothes uploads the deduction information of the credit value to a block chain. Deduction information of the credit value, including but not limited to the following information: clothes identification, time sharing, identification of terminal equipment actively sharing clothes, identification of terminal equipment enjoying clothes and a limit value.
210. After the wardrobe is determined not to be opened according to the wardrobe password, clothes unshared information is generated and uploaded to the block chain, so that after the wardrobe password is updated by the terminal device in the block chain, which actively shares clothes, the updated wardrobe password is uploaded to the block chain.
In this embodiment, after step 207, after the current terminal device acquires the access right of the wardrobe password, the current terminal device may interact with the wardrobe by using the wardrobe password, for example, the current terminal device sends the wardrobe to the wardrobe, and then determines whether the wardrobe is opened. Or after the current terminal equipment acquires the access authority of the wardrobe password, displaying the wardrobe password; the user then uses the wardrobe password to determine whether to open the wardrobe.
After the preset time, if the wardrobe is not opened, the wardrobe can send a feedback message to the current terminal device through the block chain network, and the feedback message represents that the wardrobe is not opened.
Then, the current terminal device may generate wardrobe-unshared information, which indicates that the clothes in the wardrobe are unshared. Wardrobe unshared information includes, but is not limited to, the following information: wardrobe identification, clothes identification, wardrobe unopened time, and identification of current terminal equipment. Then, the current terminal device uploads the wardrobe unshared information to the blockchain, and then, each other terminal device in the blockchain can receive the wardrobe unshared information.
Then, storing the clothes information of the upper chain in each other terminal device in the block chain, wherein the clothes information of the upper chain has a clothes sharing state which represents that clothes can be shared; and each other terminal device in the block chain updates the stored clothes sharing state according to the received wardrobe unshared information, and the updated clothes sharing state is that the clothes information is acquired but the clothes are unshared. And the current terminal device is used as a node in the block chain, the current terminal device can also update the clothes sharing state of the clothes, and the updated clothes sharing state is that the clothes information is acquired but the clothes are not shared.
At this time, the terminal device actively sharing the clothes in the block chain also receives the wardrobe unshared information, and the terminal device actively sharing the clothes can determine the access authority of the wardrobe password of the clothes, and the access authority is acquired by other terminal devices, but the clothes are not shared. Then, the terminal device actively sharing the clothes can update the wardrobe password of the clothes, and then the terminal device actively sharing the clothes uploads the updated wardrobe password to the block chain.
In this embodiment, on the basis of the above embodiment, before the user takes out the clothes, the terminal device may also verify the clothes information, thereby ensuring the correctness of the clothes information; when the wardrobe is not opened, the clothes unshared information can be uploaded, so that the terminal equipment actively sharing the clothes in the block chain can update the password of the wardrobe, and the safety of the clothes is ensured; based on the mode of the block chain and the intelligent contract, the information of the clothes is stored and transmitted in the block chain, but the information of the clothes cannot be modified, so that the reliability of the information of the clothes is ensured, the user acquires the real information of the clothes, and the user can use the clothes meeting the requirements of the user.
Fig. 4 is a schematic flowchart of another clothing sharing method based on a block chain according to an embodiment of the present application. As shown in fig. 4, the method includes:
301. acquiring shared information sent by a user, wherein the shared information comprises basic clothes information, and generating a wardrobe password according to the shared information.
In this embodiment, the execution subject of this embodiment may be a terminal device, or a device or apparatus for sharing clothes based on a block chain, or other devices or apparatuses that can execute the method of this embodiment. In this embodiment, an execution subject is described as a terminal device.
Different terminal devices form a block chain, and a block chain network is formed; these terminal devices may be terminal devices of individual users or terminal devices of enterprise users.
The terminal equipment in the block chain can be used as the terminal equipment for enjoying clothes, and can also be used as the terminal equipment for actively enjoying clothes. When the terminal device is used as a terminal device for actively sharing clothes, the terminal device needs to upload clothes information to the block chain.
First, a user inputs basic information of clothes into a terminal device. The basic information of the clothes includes, but is not limited to, the following information: color of clothes, material of clothes, brand of clothes, initial purchase date of clothes, purchase price of clothes, and the like, purchase place of clothes, at least one picture of clothes, geographical position information of clothes, whether clothes can be purchased, and time when clothes can be shared. For example, the purchase location of the clothing is a specific location, or an e-commerce platform link.
Therefore, the terminal equipment determines that the user needs to actively share the clothes, and further obtains sharing information according to the basic information of the clothes.
Then, the terminal device generates an initial wardrobe password, which is applied to locking and unlocking of the wardrobe.
302. And generating a clothes key value according to the clothes basic information and the preset unique identification.
In this embodiment, a preset unique identifier is pre-configured in the terminal device, and the preset unique identifier may be a hardware identifier of the terminal device or an identity of a user. The terminal equipment generates a key value (key) according to the basic information of the clothes and the preset unique identification, and the key value is called as a clothes key value.
303. And generating fourth clothes information according to the clothes key value, the generated wardrobe password and the preset wardrobe identification.
In this embodiment, the terminal device has already acquired the wardrobe identification of the wardrobe; the terminal device generates clothes data according to the clothes key value, the wardrobe password and the wardrobe identification, namely, the terminal device generates the clothes data according to the clothes basic information, the preset unique identification, the wardrobe password and the wardrobe identification, and then fourth clothes information is obtained.
304. And uploading the fourth clothes information to the block chain.
In this embodiment, the terminal device uplinks the generated fourth laundry information and the laundry key value, that is, uploads the generated fourth laundry information and the laundry key value to the block chain; other terminal devices in the block chain acquire the clothes information and the clothes key value, but the other terminal devices in the block chain do not acquire the access right of the wardrobe password temporarily.
Fig. 5 is a signaling diagram of an uplink procedure of clothing information according to an embodiment of the present application, as shown in fig. 5, including the following steps: step 11, the terminal equipment acquires shared information sent by a user, wherein the shared information comprises basic clothing information, and generates a wardrobe password according to the shared information; and step 12, the terminal equipment generates a clothes key value according to the clothes basic information and the preset unique identification. And step 13, the terminal equipment generates fourth clothes information according to the clothes key value, the generated wardrobe password and a preset wardrobe identification. And step 14, the terminal equipment uploads the clothes key value and the fourth clothes information to the block chain network.
305. Scanning information on the wardrobe is scanned to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password.
In this embodiment, this step may refer to step 101 shown in fig. 2, and is not described again.
306. The first clothes information is uploaded to the block chain, so that consistency analysis is carried out on the first clothes information by other terminal equipment in the block chain according to an intelligent contract, and then a consistency result is obtained.
In this embodiment, this step may refer to step 102 shown in fig. 2, and is not described again.
307. And when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password.
In this embodiment, this step may refer to step 103 shown in fig. 2, and is not described again.
308. After the wardrobe is determined to be opened according to the wardrobe password, clothes sharing information is generated and uploaded to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information.
In this embodiment, this step may refer to step 104 shown in fig. 2, and is not described again.
309. Updating the generated wardrobe password when the access authority of the generated wardrobe password is acquired and the wardrobe corresponding to the wardrobe identification is not opened; updating fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification; and uploading the updated fourth clothes information to the block chain.
In this embodiment, when the terminal device is used as a terminal device for actively sharing clothes, other terminal devices in the current block chain acquire the access right of the wardrobe password, but when the wardrobe is not opened, other terminal devices upload clothes unshared information to the block chain, the clothes unshared information indicates that the access right of the wardrobe password is acquired and the wardrobe corresponding to the wardrobe identifier is not opened, and then the terminal device for actively sharing clothes needs to update the wardrobe password.
Then, the terminal equipment actively sharing the clothes needs to re-chain the clothes data, and at this time, the terminal equipment actively sharing the clothes generates a clothes key value which is not changed; and the terminal equipment actively sharing the clothes updates the fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification; and then, the terminal equipment actively sharing the clothes updates the fourth clothes information and uploads the fourth clothes information to the block chain network.
310. The fourth laundry information includes sharing times; when the fact that the clothes corresponding to the basic information of the clothes are returned to the wardrobe corresponding to the wardrobe identification is detected, the generated wardrobe password and the sharing times are updated; updating fourth clothes information according to the clothes key value, the updated wardrobe password, the wardrobe identification and the updated sharing times; and uploading the updated fourth clothes information to the block chain.
In this embodiment, when the terminal device is used as a terminal device for actively sharing clothes, when other terminal devices in the block chain enjoy the clothes and return the clothes to the wardrobe, the other terminal devices may determine that the wardrobe is returned to the wardrobe; then, the other terminal devices upload the clothing sharing end information to the block chain. At this time, the terminal device which is actively sharing the clothes determines that the clothes are returned to the wardrobe corresponding to the wardrobe identification, so that the terminal device which is actively sharing the clothes needs to update the wardrobe password, and also needs to update the sharing times in the clothes information because the clothes are shared.
At this time, the terminal device actively sharing the clothes generates a clothes key value which is not changed; the terminal equipment actively sharing the clothes updates the fourth clothes information according to the clothes key value, the updated wardrobe password, the wardrobe identification and the updated sharing times; and then, the terminal equipment actively sharing the clothes updates the fourth clothes information and uploads the fourth clothes information to the block chain network.
311. When detecting that the clothes corresponding to the basic information of the clothes are returned to the wardrobe corresponding to the wardrobe identification, acquiring clothes sharing finishing information, wherein the clothes sharing information comprises the unique identification; and when the unique identifier in the clothes sharing information is determined to be consistent with the preset unique identifier, determining that the current sharing process is ended.
In this embodiment, on the basis of the above embodiment, when the terminal device is used as a terminal device that actively shares the clothes, the terminal device needs to upload the clothes information to the block chain, and then, other terminal devices in the block chain can acquire and view the clothes information, and then the user can select a proper clothes; when the terminal device is used as a terminal device for actively sharing clothes, the access right of the generated wardrobe password is determined to be acquired, or the wardrobe password can be updated when the clothes are returned, so that the safety of the clothes is ensured; and when the returned clothes are determined, the sharing times of the clothes can be updated, so that each user can check the using times of the clothes, and the traceability of the clothes is ensured.
Fig. 6 is a schematic flowchart of another clothing sharing method based on a block chain according to an embodiment of the present application. As shown in fig. 6, the method includes:
401. scanning information on a wardrobe to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password.
In this embodiment, the execution subject of this embodiment may be a terminal device, or a device or apparatus for sharing clothes based on a block chain, or other devices or apparatuses that can execute the method of this embodiment. In this embodiment, an execution subject is described as a terminal device.
Different terminal devices form a block chain, and a block chain network is formed; these terminal devices may be terminal devices of individual users or terminal devices of enterprise users.
This step can be referred to as step 101 shown in fig. 2, and is not described again.
402. The first clothes information is uploaded to the block chain, so that consistency analysis is carried out on the first clothes information by other terminal equipment in the block chain according to an intelligent contract, and then a consistency result is obtained.
In this embodiment, this step may refer to step 102 shown in fig. 2, and is not described again.
403. And when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password.
In this embodiment, this step may refer to step 103 shown in fig. 2, and is not described again.
404. After the wardrobe is determined to be opened according to the wardrobe password, clothes sharing information is generated and uploaded to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information.
In this embodiment, this step may refer to step 104 shown in fig. 2, and is not described again.
405. The method comprises the steps of obtaining first clothes state information sent by a user, and obtaining identity information of a terminal device which enjoys clothes and corresponds to the first clothes state information.
In this embodiment, when the terminal device is used as a terminal device for actively sharing clothes, after step 404, the terminal device for actively sharing clothes may detect that the clothes is returned to the wardrobe, and the terminal device for enjoying clothes may upload clothes sharing end information to the blockchain, where the clothes sharing end information includes, but is not limited to, the following information: clothing category, clothing brand, purchase time, purchase price, purchase place, sharing times, sharing time, identification of the terminal device, identity information of the terminal device.
The terminal device actively sharing the laundry may compare the received sharing end information with the stored laundry information. And the user can check whether the laundry is washed, and then determine that the laundry can be continuously used; if the clothes are washed, the clothes can be used, and if the clothes are not washed, the clothes cannot be used; then, the user inputs laundry state information of the laundry to the terminal device, and the laundry state information at this time is referred to as first laundry state information. The first laundry state information represents whether the laundry can be used.
And the terminal device actively sharing the clothes already acquires the clothes sharing end information, the clothes sharing end information comprises the identity information of the terminal device sharing the clothes, and the terminal device actively sharing the clothes can also acquire the identity information of the terminal device sharing the clothes.
406. And when the first clothes state information is determined to represent that the clothes are available, acquiring second clothes state information uploaded by other terminal equipment.
In this embodiment, after step 405, the terminal device actively sharing the laundry waits for the next terminal device to use the laundry when determining that the first laundry state information represents that the laundry is usable. Therefore, when the next terminal device uses the clothes, after the next terminal device opens the wardrobe by using the method of the embodiment, the user of the next terminal device can detect the state of the clothes, and further determine whether the clothes are clear, namely whether the clothes can be used; the user of the next terminal device inputs second laundry state information into the next terminal device, the second laundry state information representing whether the laundry can be used. And the next terminal equipment uploads the second clothes state information to the block chain.
407. When the second clothes state information represents that the clothes are not available, configuring a preset weight value for the identity information of the terminal equipment for enjoying the clothes corresponding to the first clothes state information, and adding the identity information of the terminal equipment for enjoying the clothes corresponding to the first clothes state information into the blacklist when the preset weight value is larger than the preset value.
In this embodiment, after step 406, the next terminal device uploads the second laundry state information to the block chain, so that the terminal device actively sharing the laundry may acquire the second laundry state information.
When the terminal equipment actively sharing the clothes determines that the second clothes state information represents that the clothes are not available, the clothes are determined not to be cleaned by the user of the previous terminal equipment, and the identity information of the terminal equipment enjoying the clothes, which is acquired in the step 405, is accumulated by a preset weight; the terminal equipment actively sharing the clothes determines whether the configured weight value of the terminal equipment for enjoying the clothes is greater than a preset value; if the number of the terminal devices is larger than the preset number, the terminal devices actively sharing the clothes are added into the blacklist, namely the identity information of the last terminal device sharing the clothes is added into the blacklist. Then, the terminal equipment actively sharing the clothes uploads the blacklist to the block chain, and then each terminal equipment in the block chain can acquire and check the blacklist; the blockchain does not allow the terminal devices in the black list to share the clothing again.
408. When the first clothes state information represents that the clothes are not available, configuring a preset weight value for the identity information of the terminal equipment which is corresponding to the first clothes state information and is used for enjoying the clothes, and adding the identity information of the terminal equipment which is corresponding to the first clothes state information and is used for enjoying the clothes into a blacklist when the preset weight value is larger than the preset value.
In this embodiment, after step 405, when the terminal device actively sharing the laundry determines that the first laundry state information represents that the laundry is not available, it determines that the laundry is not washed by the user of the last terminal device enjoying the laundry; the terminal equipment actively sharing the clothes accumulates the identity information of the terminal equipment enjoying the clothes, which is acquired in the step 405, with a preset weight value; the terminal equipment actively sharing the clothes determines whether the configured weight of the terminal equipment sharing the clothes is greater than a preset value or not; if the number of the terminal devices is larger than the preset threshold, the terminal devices actively sharing the clothes are added into the blacklist, namely the identity information of the last terminal device sharing the clothes is added into the blacklist. Then, the terminal equipment actively sharing the clothes uploads the blacklist to the block chain, and then each terminal equipment in the block chain can acquire and check the blacklist; the block chain does not allow the terminal devices in the blacklist to share the clothing again.
409. When the usable information of the clothes sent by the user is acquired, the generated wardrobe password is updated; updating fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification; and uploading the updated fourth clothes information to the block chain.
In the present embodiment, after step 408, if the terminal device actively sharing the laundry determines that the laundry is not washed by the user of the last terminal device sharing the laundry, the user of the terminal device actively sharing the laundry washes the laundry; after the user washes the laundry, the user inputs laundry availability information into the terminal device, and the laundry availability information indicates that the laundry is available for use.
At this time, the terminal device actively sharing the clothes needs to update the wardrobe password.
Then, the terminal equipment actively sharing the clothes needs to re-chain the clothes data, and at this time, the terminal equipment actively sharing the clothes generates a clothes key value which is not changed; the terminal equipment actively sharing the clothes updates the fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification; and then, the terminal equipment actively sharing the clothes updates the fourth clothes information and uploads the fourth clothes information to the block chain network.
In this embodiment, on the basis of the above embodiment, after the terminal device actively sharing the clothes detects that the clothes are returned to the wardrobe, it can also detect whether the clothes are clear or not and whether the clothes can be continuously used or not; thereby determining whether the laundry can be continuously shared; and when the terminal equipment actively sharing the clothes determines that the clothes can be continuously used, the next terminal equipment can verify the state of the clothes, so that the correctness of information is ensured, and the follow-up user can share the clothes.
Fig. 7 is a schematic flowchart of another clothing sharing method based on a block chain according to an embodiment of the present application. As shown in fig. 7, the method includes:
501. and sending verification information to the identity information system, wherein the verification information comprises the identity information, so that the identity information system returns a verification result after verifying the identity information.
In this embodiment, the execution subject of this embodiment may be a terminal device, or a device or apparatus for sharing clothes based on a block chain, or other devices or apparatuses that can execute the method of this embodiment. In this embodiment, an execution subject is described as a terminal device.
Different terminal devices form a block chain, and a block chain network is formed; these terminal devices may be terminal devices of individual users or terminal devices of enterprise users.
Before the terminal device shares and enjoys the clothing, the terminal device needs to join the blockchain network.
Firstly, the terminal equipment sends verification information to an identity information system, wherein the verification information comprises identity information, and the verification information is used for indicating that the identity of the terminal equipment needs to be verified. Then, the identity information system verifies the received identity information according to the pre-stored standard identity information to obtain a verification result; and the identity information system sends the verification result to the terminal equipment, and the verification result represents whether the verification is passed or not.
The terminal equipment can be the terminal equipment of an individual user, and the identity information system can be a resident identity information system; the terminal device may be a terminal device of an enterprise user and the identity information system may be an enterprise credit information publicity system.
502. And after the received verification result is determined to represent that the verification is passed, generating a hash value according to the identity information.
In this embodiment, after the terminal device determines that the authentication result represents that the identity of the terminal device passes the authentication, the terminal device may generate a hash value according to the identity information.
For example, the terminal device may be a terminal device of an individual user, and the identity information includes, but is not limited to, the following information: name, gender, identification number, phone, account, timestamp. And the terminal equipment calculates the information to generate a hash value to obtain a key value of the terminal equipment.
For example, the terminal device may be a terminal device of an enterprise user, and the identity information includes, but is not limited to, the following information: enterprise name, business license expiration date, corporate representative, contact phone, account, timestamp. And the terminal equipment calculates the information to generate a hash value to obtain a key value of the terminal equipment.
503. And randomly generating an encryption key, and encrypting the hash value according to the encryption key to obtain the encrypted identity information.
In this embodiment, the terminal device randomly generates a pair of encryption keys; then, the terminal device encrypts the hash value obtained in step 502 by using the encryption key to obtain the encrypted identity information.
504. And uploading the hash value and the encrypted identity information to a block chain.
In this embodiment, the terminal device uplinks the generated key value and the encrypted identity information, that is, uploads the hash value and the encrypted identity information to the block chain. Thus, the terminal device joins the blockchain network.
Fig. 8 is a signaling diagram of a block chain joining by a terminal device of an individual user according to an embodiment of the present application, and as shown in fig. 8, the method includes:
and step 21, the terminal equipment sends verification information to the resident identity information system, wherein the verification information comprises identity information. Identity information includes, but is not limited to, the following: name, gender, identification number, phone, account, timestamp.
And step 22, the resident identity information system verifies the identity information to obtain a verification result.
And step 23, the resident identity information system sends the verification result to the terminal equipment.
And step 24, the terminal equipment sends the identity information and the card number to the bank card system.
And step 25, the bank card system binds the identity information and the card number to obtain a binding result.
And step 26, the bank card system sends the binding result to the terminal equipment.
And 27, the terminal equipment performs hash calculation on the identity information to obtain a hash value. And the hash value is used as a key value of the terminal equipment. And the terminal equipment stores the hash value and the encrypted identity information.
And step 28, the terminal equipment randomly generates a pair of encryption keys, and encrypts the hash value according to the encryption keys to obtain the encrypted identity information.
And step 29, the terminal equipment uploads the hash value and the encrypted identity information to the block chain.
Fig. 9 is a signaling diagram of an enterprise user terminal joining a block chain according to an embodiment of the present application, and as shown in fig. 9, the method includes:
and 31, the terminal equipment sends verification information to the enterprise credit information public system, wherein the verification information comprises identity information. Identity information includes, but is not limited to, the following: business name, business license expiration, legal representative, contact phone, account, timestamp.
And 32, verifying the identity information by the enterprise credit information publicizing system to obtain a verification result.
And step 33, the enterprise credit information publicizing system sends the verification result to the terminal equipment.
And step 34, the terminal equipment sends the identity information and the enterprise account number to the bank card system.
And step 35, the bank card system binds the identity information and the enterprise account number to obtain a binding result.
And step 36, the bank card system sends the binding result to the terminal equipment.
And step 37, the terminal equipment performs hash calculation on the identity information to obtain a hash value. Thereby using the hash value as the key value of the terminal equipment. And the terminal equipment stores the hash value and the encrypted identity information.
And step 38, the terminal equipment randomly generates a pair of encryption keys, and encrypts the hash value according to the encryption keys to obtain encrypted identity information.
And step 39, the terminal equipment uploads the hash value and the encrypted identity information to the block chain.
505. Scanning information on the wardrobe is scanned to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password.
In this embodiment, this step may refer to step 101 shown in fig. 2, and is not described again.
506. The first clothes information is uploaded to the block chain, so that consistency analysis is carried out on the first clothes information by other terminal equipment in the block chain according to an intelligent contract, and then a consistency result is obtained.
In this embodiment, this step may refer to step 102 shown in fig. 2, and is not described again.
507. And when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password.
In this embodiment, this step may refer to step 103 shown in fig. 2, and is not described again.
508. After the wardrobe is determined to be opened according to the wardrobe password, clothes sharing information is generated and uploaded to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information.
In this embodiment, this step may refer to step 104 shown in fig. 2, and is not described again.
In this embodiment, on the basis of the above embodiment, the terminal device of the individual user and the terminal device of the enterprise user perform operations such as authentication, and then both the terminal device of the individual user and the terminal device of the enterprise user can be added to the blockchain network, thereby forming a blockchain without limiting the type of the terminal device; furthermore, the terminal devices in the block chain can share clothes based on the block chain technology, a special third-party platform is not needed for maintenance, and the terminal devices can be added at any time. Based on the mode of the block chain and the intelligent contract, the information of the clothes is stored and transmitted in the block chain, but the information of the clothes cannot be modified, so that the reliability of the information of the clothes is ensured.
Fig. 10 is a schematic structural diagram of a terminal device provided in an embodiment of the present application, and as shown in fig. 10, the terminal device in this embodiment is a terminal device in a block chain, and the terminal device in this embodiment may include:
the scanning module 31 is configured to scan scanning information on the wardrobe to obtain first clothing information of clothing, where the first clothing information is uploaded to the wardrobe by a terminal device that actively shares the clothing, and the first clothing information includes a clothing sharing state and a wardrobe password.
The first uploading module 32 is configured to upload the first clothing information to the block chain, so that each of the other terminal devices in the block chain performs consistency analysis on the first clothing information according to the intelligent contract to obtain a consistency result.
And the first obtaining module 33 is configured to obtain the access right of the wardrobe password when it is determined that the number of the other terminal devices with consistent clothes is greater than the preset number.
The first generation module 34 is used for generating the clothes sharing information after the wardrobe is determined to be opened according to the wardrobe password.
A second uploading module 35, configured to upload the laundry sharing information to the block chain, so that each terminal device in the block chain updates the laundry sharing state of the laundry stored in the block chain according to the laundry sharing information.
The terminal device of this embodiment may execute the clothing sharing method based on the block chain provided in any of the above embodiments, and the implementation principle and technical effects are similar, which are not described herein again.
Fig. 11 is a schematic structural diagram of another terminal device provided in an embodiment of the present application, as shown in fig. 11, the terminal device in this embodiment is a terminal device in a block chain, and on the basis of the terminal device shown in fig. 10, the terminal device in this embodiment further includes:
the second obtaining module 41 is configured to obtain second clothes information of the clothes before the scanning module 31 scans the scanning information on the wardrobe to obtain the first clothes information of the clothes, where the second clothes information is the clothes information stored in the current terminal device, and the second clothes information includes a clothes sharing state.
And the checking module 42 is configured to, when it is determined that the clothes sharing state in the second clothes information is characterized as the sharable state, check the second clothes information with prestored third clothes information, where the third clothes information is uploaded to each terminal device in the block chain by the terminal device that actively shares clothes.
And an executing module 43, configured to execute the scanning module 31 when it is determined that the second laundry information is consistent with the third laundry information.
This implementation provides a terminal equipment, still includes:
a receiving module 44, configured to receive a viewing instruction before the second acquiring module 41 acquires the second laundry information of the laundry, where the viewing instruction is used to instruct to display the laundry to the user;
and the display module 45 is used for displaying the second clothes information of the clothes according to the viewing instruction.
This implementation provides terminal equipment, still includes:
and a second generating module 46, configured to generate clothing unshared information after determining that the wardrobe is not opened according to the wardrobe password, and upload the clothing unshared information to the block chain, so that after the wardrobe password is updated by the terminal device in the block chain that actively shares the clothing, the updated wardrobe password is uploaded to the block chain.
The terminal device provided in this embodiment further includes:
and a third uploading module 47, configured to upload, when it is detected that the laundry is returned to the wardrobe after the laundry sharing information is uploaded to the block chain by the second uploading module 35, laundry sharing end information to the block chain, so that after the terminal device in the block chain, which actively shares the laundry, updates the wardrobe password and the sharing times according to the laundry sharing end information, the updated wardrobe password and the updated sharing times are uploaded to the block chain.
The terminal device of this embodiment may execute the method for sharing clothes based on the block chain provided in any of the above embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 12 is a schematic structural diagram of another terminal device provided in an embodiment of the present application, as shown in fig. 12, the terminal device in this embodiment is a terminal device in a block chain, and on the basis of the terminal devices shown in fig. 10 to fig. 11, the terminal device in this embodiment further includes:
and a third obtaining module 51, configured to obtain shared information sent by a user, where the shared information includes basic clothing information, and generate a wardrobe password according to the shared information.
And a third generating module 52, configured to generate a laundry key value according to the laundry basic information and the preset unique identifier.
And the fourth generating module 53 is configured to generate fourth clothes information according to the clothes key value, the generated wardrobe password, and the preset wardrobe identifier.
And a fourth uploading module 54 for uploading the fourth clothing information to the block chain.
The terminal device provided in this embodiment further includes:
and a first updating module 55, configured to update the generated wardrobe password when it is determined that the access right of the generated wardrobe password is acquired and the wardrobe corresponding to the wardrobe identifier is not opened after the fourth uploading module 54 uploads the fourth clothes information to the block chain.
And the second updating module 56 is configured to update the fourth clothing information according to the clothing key value, the updated wardrobe password, and the wardrobe identifier.
And a fifth uploading module 57, configured to upload the updated fourth laundry information to the block chain.
The fourth laundry information includes sharing times; the terminal device provided in this embodiment further includes:
and a third updating module 58, configured to update the generated wardrobe password and the number of times of sharing when detecting that the clothes corresponding to the basic information of the clothes are returned to the wardrobe corresponding to the wardrobe identification after the fourth uploading module 54 uploads the fourth clothes information to the block chain.
And a fourth updating module 59, configured to update the fourth piece of clothes information according to the clothes key value, the updated wardrobe password, the updated wardrobe identifier, and the updated number of times of sharing.
A sixth uploading module 60, configured to upload the updated fourth clothing information to the block chain.
The fourth laundry information includes sharing times; the terminal device provided in this embodiment further includes:
a fourth obtaining module 61, configured to, after the fourth uploading module 54 uploads the fourth laundry information to the block chain, obtain laundry sharing end information when detecting that the laundry corresponding to the basic laundry information is returned to the wardrobe corresponding to the wardrobe identification, where the laundry sharing information includes the unique identification.
And a determining module 62, configured to determine that the current sharing process is ended when it is determined that the unique identifier in the laundry sharing information is consistent with the preset unique identifier.
The terminal device provided in this embodiment further includes:
a fifth obtaining module 63, configured to obtain the first clothes state information sent by the user, and obtain the identity information of the terminal device enjoying clothes corresponding to the first clothes state information.
And a sixth obtaining module 64, configured to obtain the second laundry state information uploaded by the other terminal device when it is determined that the first laundry state information represents that the laundry is usable.
A first configuration module 65, configured to configure a preset weight value for the identity information of the terminal device that enjoys the laundry corresponding to the first laundry state information when it is determined that the second laundry state information represents that the laundry is not available, so as to add the identity information of the terminal device that enjoys the laundry corresponding to the first laundry state information to a blacklist when the preset weight value is greater than a preset value.
The terminal device provided in this embodiment further includes:
a second configuration module 66, configured to configure a preset weight value for the identity information of the terminal device that enjoys the laundry corresponding to the first laundry state information when it is determined that the first laundry state information represents that the laundry is not available, so as to add the identity information of the terminal device that enjoys the laundry corresponding to the first laundry state information to the blacklist when the preset weight value is greater than the preset value.
And a fifth updating module 67, configured to update the generated wardrobe password when the information that the user sends out that the clothes can be used is acquired.
And a sixth updating module 68, configured to update the fourth clothing information according to the clothing key value, the updated wardrobe password, and the wardrobe identifier.
A seventh uploading module 69, configured to upload the updated fourth laundry information to the block chain.
The terminal device provided in this embodiment further includes:
the sending module 70 is configured to send verification information to the identity information system, where the verification information includes identity information, so that the identity information system returns a verification result after verifying the identity information.
And a fifth generating module 71, configured to generate a hash value according to the identity information after determining that the received verification result represents that the verification passes.
A sixth generating module 72, configured to randomly generate an encryption key, and encrypt the hash value according to the encryption key to obtain encrypted identity information.
An eighth uploading module 73, configured to upload the hash value and the encrypted identity information to the blockchain.
The terminal device of this embodiment may execute the clothing sharing method based on the block chain provided in any of the above embodiments, and the implementation principle and technical effects are similar, which are not described herein again.
Fig. 13 is a schematic structural diagram of a terminal device provided in an embodiment of the present application, and as shown in fig. 13, an embodiment of the present application provides a terminal device, which may be used to execute actions or steps of the terminal device in the embodiments shown in fig. 2 to 9, and specifically includes: a processor 2701, memory 2702, and a communication interface 2703.
The memory 2702 is used to store computer programs.
The processor 2701 is configured to execute the computer program stored in the memory 2702 to implement the actions of the terminal device in the embodiments shown in fig. 2 to fig. 9, which are not described again.
Optionally, the end device may also include a bus 2704. The processor 2701, the memory 2702, and the communication interface 2703 may be connected to each other via a bus 2704; the bus 2704 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 2704 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 7, but this does not indicate only one bus or one type of bus.
In the embodiments of the present application, the above embodiments may be referred to and referred to by each other, and the same or similar steps and terms are not repeated.
Alternatively, part or all of the above modules may be implemented by being embedded in a chip of the terminal device in the form of an integrated circuit. And they may be implemented separately or integrated together. That is, the above modules may be configured as one or more integrated circuits implementing the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 2702 comprising instructions, executable by the processor 2701 of the terminal device to perform the method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, instructions in which when executed by a processor of a terminal device, enable the terminal device to perform the above-described block chain-based clothing sharing method.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are generated in whole or in part when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, terminal device, or data center to another website, computer, terminal device, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device, such as a terminal device, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), etc.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (14)

1. A clothing sharing method based on a block chain is characterized in that the method is applied to a terminal device in the block chain, and the method comprises the following steps:
scanning information on a wardrobe to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password;
uploading the first clothes information to a block chain, so that other terminal devices in the block chain perform consistency analysis on the first clothes information and the uplink clothes information according to an intelligent contract to obtain a consistency result, wherein the uplink clothes information is the clothes information uploaded to the block chain by the terminal devices which actively share the clothes and are acquired by the other terminal devices;
when the consistency result is determined to represent that the number of other terminal devices with consistent clothes is larger than the preset number, acquiring the access authority of the wardrobe password;
after the wardrobe is determined to be opened according to the wardrobe password, generating clothes sharing information, and uploading the clothes sharing information to the block chain, so that each terminal device in the block chain updates the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information;
before scanning the scanning information on the wardrobe to obtain the first clothes information of the clothes, the method further comprises the following steps:
acquiring second clothes information of the clothes, wherein the second clothes information is the clothes information stored by the current terminal equipment, and the second clothes information comprises a clothes sharing state;
when the clothes sharing state in the second clothes information is determined to be characterized as a sharable state, checking the second clothes information with prestored third clothes information, wherein the third clothes information is the clothes information of the clothes broadcasted to each terminal device in the block chain by the terminal device actively sharing the clothes;
and when the second clothes information and the third clothes information are determined to be consistent, executing the step of scanning the scanning information on the wardrobe.
2. The method according to claim 1, further comprising, before acquiring the second laundry information of the laundry:
receiving a viewing instruction, wherein the viewing instruction is used for indicating that the clothing is displayed to a user;
and displaying second clothes information of the clothes according to the viewing instruction.
3. The method of claim 1, further comprising:
after the wardrobe is determined not to be opened according to the wardrobe password, generating clothes unshared information, uploading the clothes unshared information to the block chain, so that after the wardrobe password is updated by a terminal device which actively shares the clothes in the block chain, the updated wardrobe password is uploaded to the block chain.
4. The method of claim 1, further comprising, after uploading the clothing sharing information to the block chain:
and when the clothes are returned to the wardrobe, uploading clothes sharing end information to the block chain, so that the terminal equipment actively sharing the clothes in the block chain updates the wardrobe password and the sharing times according to the clothes sharing end information, and then uploading the updated wardrobe password and the updated sharing times to the block chain.
5. The method according to any one of claims 1-4, further comprising:
acquiring shared information sent by a user, wherein the shared information comprises basic clothes information, and generating a wardrobe password according to the shared information;
generating a clothes key value according to the clothes basic information and a preset unique identifier;
generating fourth clothes information according to the clothes key value, the generated wardrobe password and a preset wardrobe identification;
and uploading the fourth clothes information to the block chain.
6. The method of claim 5, further comprising, after uploading the fourth laundry information to the block chain:
updating the generated wardrobe password when the access authority of the generated wardrobe password is determined to be acquired and the wardrobe corresponding to the wardrobe identification is not opened;
updating the fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification;
and uploading the updated fourth clothes information to the block chain.
7. The method according to claim 5, wherein the fourth laundry information includes a sharing number; after uploading the fourth clothing information to the block chain, further comprising:
when the fact that the clothes corresponding to the clothes basic information are returned to the wardrobe corresponding to the wardrobe identification is detected, updating the generated wardrobe password and the sharing times;
updating the fourth clothes information according to the clothes key value, the updated wardrobe password, the wardrobe identification and the updated sharing times;
and uploading the updated fourth clothes information to the block chain.
8. The method according to claim 5, wherein the fourth laundry information includes a sharing number; after uploading the fourth clothing information to the block chain, further comprising:
when detecting that the clothes corresponding to the basic clothes information are returned to the wardrobe corresponding to the wardrobe identification, acquiring clothes sharing finishing information, wherein the clothes sharing information comprises a unique identification;
and when the unique identifier in the clothes sharing information is determined to be consistent with the preset unique identifier, determining that the current sharing process is ended.
9. The method of claim 5, further comprising:
acquiring first clothes state information sent by a user, and acquiring identity information of terminal equipment for enjoying clothes, which corresponds to the first clothes state information;
when the first clothes state information is determined to represent that clothes can be used, second clothes state information uploaded by other terminal equipment is obtained;
when the second clothes state information represents that clothes are not available, configuring a preset weight value for the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information, and adding the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information into a blacklist when the preset weight value is larger than the preset value.
10. The method of claim 9, further comprising:
when the first clothes state information represents that clothes are not available, configuring a preset weight for the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information, and adding the identity information of the terminal equipment for enjoying clothes corresponding to the first clothes state information into a blacklist when the preset weight is larger than a preset value;
when the available information of the clothes sent by the user is acquired, the generated wardrobe password is updated;
updating the fourth clothes information according to the clothes key value, the updated wardrobe password and the wardrobe identification;
and uploading the updated fourth clothes information to the block chain.
11. The method according to any one of claims 1-4, further comprising:
sending verification information to an identity information system, wherein the verification information comprises identity information, so that the identity information system returns a verification result after verifying the identity information;
after the received verification result is determined to represent that the verification passes, generating a hash value according to the identity information;
randomly generating an encryption key, and encrypting the hash value according to the encryption key to obtain encrypted identity information;
and uploading the hash value and the encrypted identity information to the block chain.
12. A terminal device, wherein the terminal device is a terminal device in a blockchain, and wherein the terminal device comprises:
the scanning module is used for scanning information on a wardrobe to obtain first clothes information of clothes, wherein the first clothes information is uploaded to the wardrobe by a terminal device which actively shares the clothes, and the first clothes information comprises a clothes sharing state and a wardrobe password;
the first uploading module is used for uploading the first clothes information to a block chain so that consistency analysis is performed on the first clothes information and the uplink clothes information by other terminal equipment in the block chain according to an intelligent contract to obtain a consistency result, wherein the uplink clothes information is the clothes information uploaded to the block chain by the terminal equipment which actively shares the clothes and is acquired by the other terminal equipment;
the first obtaining module is used for obtaining the access authority of the wardrobe password when the number of other terminal devices with consistent clothes is larger than the preset number according to the consistency result;
the first generation module is used for generating clothes sharing information after the wardrobe is determined to be opened according to the wardrobe password;
the second uploading module is used for uploading the clothes sharing information to the block chain so that each terminal device in the block chain can update the clothes sharing state of the clothes stored in the block chain according to the clothes sharing information;
further comprising: the second acquisition module is used for acquiring second clothes information of clothes before the scanning module scans scanning information on a wardrobe to obtain first clothes information of the clothes, wherein the second clothes information is the clothes information stored by current terminal equipment, and the second clothes information comprises a clothes sharing state;
a checking module, configured to, when it is determined that a clothes sharing state in the second clothes information is characterized as a sharable state, check the second clothes information with prestored third clothes information, where the third clothes information is the clothes information of the clothes broadcasted to each terminal device in the block chain by a terminal device that actively shares the clothes;
an execution module for executing the scanning module when it is determined that the second laundry information is consistent with the third laundry information.
13. A terminal device, comprising: a processor, a memory, and a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-11.
14. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to perform the method of any one of claims 1-11.
CN201911152644.1A 2019-11-22 2019-11-22 Block chain-based clothes sharing method, terminal device and storage medium Active CN111125749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911152644.1A CN111125749B (en) 2019-11-22 2019-11-22 Block chain-based clothes sharing method, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911152644.1A CN111125749B (en) 2019-11-22 2019-11-22 Block chain-based clothes sharing method, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN111125749A CN111125749A (en) 2020-05-08
CN111125749B true CN111125749B (en) 2022-12-27

Family

ID=70496190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911152644.1A Active CN111125749B (en) 2019-11-22 2019-11-22 Block chain-based clothes sharing method, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN111125749B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447800A (en) * 2015-11-14 2016-03-30 北京创美时代办公家具有限公司 Intelligent locker management system
CN107545659A (en) * 2017-10-16 2018-01-05 深圳市万为物联科技有限公司 A kind of article storage sharing method and its intelligent service system
CN107833385A (en) * 2017-11-20 2018-03-23 姜宗娥 A kind of shared raincoat on public bicycles
CN107886646A (en) * 2017-12-14 2018-04-06 吉林建筑大学 Shared wardrobe and kinds of goods rent method
CN109254975A (en) * 2018-09-21 2019-01-22 上海点融信息科技有限责任公司 Shared method, equipment and the readable storage medium storing program for executing of books is realized based on block chain
CN109493526A (en) * 2018-10-25 2019-03-19 广州云顶时代科技有限公司 A kind of books sharing method, device and computer readable storage medium
CN109710823A (en) * 2018-11-02 2019-05-03 远光软件股份有限公司 Archive management method, file administration network and electronic equipment based on block chain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11003855B2 (en) * 2018-03-26 2021-05-11 Entigenlogic Llc Resolving an undesired document artifact

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447800A (en) * 2015-11-14 2016-03-30 北京创美时代办公家具有限公司 Intelligent locker management system
CN107545659A (en) * 2017-10-16 2018-01-05 深圳市万为物联科技有限公司 A kind of article storage sharing method and its intelligent service system
CN107833385A (en) * 2017-11-20 2018-03-23 姜宗娥 A kind of shared raincoat on public bicycles
CN107886646A (en) * 2017-12-14 2018-04-06 吉林建筑大学 Shared wardrobe and kinds of goods rent method
CN109254975A (en) * 2018-09-21 2019-01-22 上海点融信息科技有限责任公司 Shared method, equipment and the readable storage medium storing program for executing of books is realized based on block chain
CN109493526A (en) * 2018-10-25 2019-03-19 广州云顶时代科技有限公司 A kind of books sharing method, device and computer readable storage medium
CN109710823A (en) * 2018-11-02 2019-05-03 远光软件股份有限公司 Archive management method, file administration network and electronic equipment based on block chain

Also Published As

Publication number Publication date
CN111125749A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN109583184B (en) Identity verification method and device and electronic equipment
US20200320222A1 (en) Information management method, apparatus, and information management system
JP6907679B2 (en) Cryptocurrency-based event participation verification
WO2016197934A1 (en) Barcode security authentication method
CN105933353A (en) Method and system for realizing secure login
US9124571B1 (en) Network authentication method for secure user identity verification
CN109011583A (en) virtual resource transfer method and device, storage medium and electronic device
CN109328348A (en) A kind of service authentication method, system and relevant device
CN106302332B (en) Access control method, the apparatus and system of user data
CN108616360A (en) User identity verification, register method and device
US20120159598A1 (en) User authentication system and method using personal identification number
CN108605037A (en) The method for sending digital information
CN111163467A (en) Method for 5G user terminal to access 5G network, user terminal equipment and medium
Marforio et al. Hardened setup of personalized security indicators to counter phishing attacks in mobile banking
CN111279341B (en) System for access confirmation, mobile terminal device, server, program, and method
CN105491004A (en) Transaction relationship building method, device and system
CN113179282A (en) Method and device for merging account numbers and server
CN113569263A (en) Secure processing method and device for cross-private-domain data and electronic equipment
CN109214166A (en) Smart machine authentication control method and system
CN107453871A (en) Password generated method, password authentication method, method of payment and device
CN106790036B (en) A kind of information tamper resistant method, device, server and terminal
CN107273147A (en) A kind of many SE management method and device
CN109389449B (en) Information processing method, server and storage medium
CN106888200B (en) Identification association method, information sending method and device
CN110278084A (en) EID method for building up, relevant device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Beijing Economic and Technological Development Zone, Beijing 100176

Applicant before: BEIJING HAIYI TONGZHAN INFORMATION TECHNOLOGY Co.,Ltd.

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant