Label sharing method and system, electronic equipment and readable storage medium

Through blockchain technology, the user's public key is used to encrypt the data to be issued in the tag sharing system, and through the verification of the target tag rules, the problem of tag leakage and abuse in cross-system tag sharing is solved, and the secure sharing and credibility verification of the tag data set is realized.

CN119814382AActive Publication Date: 2025-04-11CHINA MOBILE INTERNET CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411828618.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-11
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

Label sharing across systems in the prior art usually adopts plaintext sharing or simple encryption, which poses a risk of tag leakage and abuse, and the user of the shared tag cannot determine the credibility of the shared tag.

Method used

Through blockchain technology, the data to be issued and the target tag identification information sent by the tag user is received, the target encryption tag data set and target tag rules are determined, the data to be issued is encrypted using the user's public key, and the encrypted data is sent to the designated user terminal.

Benefits of technology

This achieves the avoidance of exposing the tag data set to the tag user, ensures the security of the shared tag data set, and ensures the credibility of the target encrypted tag data set selected by the tag user by checking the data to be issued and the target tag rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814382A_ABST
    Figure CN119814382A_ABST
Patent Text Reader

Abstract

The invention discloses a label sharing method and system, electronic equipment and a readable storage medium, and is applied to a block chain, the method comprises the following steps: receiving to-be-issued data and target label identification information sent by a label user; according to the target label identification information, determining a target encrypted label data set and a target label rule from at least one encrypted label data set and a label rule corresponding to each encrypted label data set; wherein the target encrypted label data set comprises a user public key and encrypted user identification information; when it is determined that the to-be-issued data conforms to the target label rule, encrypting the to-be-issued data through the user public key to obtain target encrypted data; and sending the target encrypted data to a user terminal corresponding to the encrypted user identification information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of blockchain technology, and specifically relates to a tag sharing method, system, electronic device and readable storage medium. Background Art

[0002] At present, user tags in various systems can be used for product operations and are digital assets accumulated by the system during its development. In order to improve the ability and efficiency of product operations, a system will also use user tags from other systems, but this cross-system tag sharing is usually implemented in plain text sharing or simple encryption, which poses the risk of tag leakage and abuse, and the user of the shared tag cannot determine the credibility of the shared tag. Summary of the invention

[0003] The embodiments of the present application provide a label sharing method, system, electronic device and readable storage medium, which can solve the problem that cross-system label sharing in related technologies is usually implemented by plain text sharing or simple encryption, there is a risk of label leakage and abuse, and the user of the shared label cannot determine the credibility of the shared label.

[0004] In a first aspect, an embodiment of the present application provides a label sharing method, which is applied to a blockchain, and the method includes: receiving data to be sent and target label identification information sent by a label user; determining a target encrypted label data set and a target label rule from at least one encrypted label data set and a label rule corresponding to each encrypted label data set according to the target label identification information; wherein the target encrypted label data set includes a user public key and encrypted user identification information; when it is determined that the data to be sent meets the target label rule, encrypting the data to be sent by using the user public key to obtain target encrypted data; and sending the target encrypted data to a user terminal corresponding to the encrypted user identification information.

[0005] In the second aspect, an embodiment of the present application provides a label sharing method, which is applied to a label user, and the method includes: determining the target label identification information corresponding to the target encrypted label data set from the blockchain; wherein the blockchain stores the encrypted label data set uploaded by the label provider and the label rules corresponding to the encrypted label data set; and sending the data to be sent and the target label identification information corresponding to the target encrypted label data set to the blockchain.

[0006] In a third aspect, an embodiment of the present application provides a label sharing method, which is applied to a label provider, and the method includes: encrypting at least one label data set by a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set; uploading at least one of the encrypted label data sets, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets to a blockchain.

[0007] In a fourth aspect, an embodiment of the present application provides a label sharing system, which includes: a blockchain, a label user, and a label provider; wherein the label user is used to determine the target label identification information corresponding to the target encrypted label data set from the blockchain; wherein the blockchain stores the encrypted label data set uploaded by the label provider and the label rules corresponding to the encrypted label data set; and sends the data to be sent and the target label identification information corresponding to the target encrypted label data set to the blockchain; the blockchain is used to receive the data to be sent and the target label identification information sent by the label user; according to the target label identification information, determine the target encrypted label data set and the target label rule from at least one encrypted label data set and the label rules corresponding to each of the encrypted label data sets; wherein the target encrypted label data set includes a user public key and encrypted user identification information; when it is determined that the data to be sent meets the target label rule, encrypt the data to be sent by the user public key to obtain the target encrypted data; and send the target encrypted data to the user terminal corresponding to the encrypted user identification information.

[0008] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect, or the steps of the method described in the second aspect, or the steps of the method described in the third aspect.

[0009] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect, or the steps of the method described in the second aspect, or the steps of the method described in the third aspect are implemented.

[0010] In the seventh aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instructions to implement the steps of the method described in the first aspect, or the steps of the method described in the second aspect, or the steps of the method described in the third aspect.

[0011] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the method described in the first aspect, or the steps of the method described in the second aspect, or the steps of the method described in the third aspect are implemented.

[0012] In an embodiment of the present application, the blockchain receives the data to be sent and the target tag identification information sent by the tag user. The tag data set selected by the tag user can be known through the target tag identification information, so as to determine the target encrypted tag data set and the target tag rule from at least one encrypted tag data set and the tag rule corresponding to each encrypted tag data set according to the target tag identification information. Then, the target tag rule corresponding to the target encrypted tag data set selected by the tag user and the data to be sent is verified to determine whether the data to be sent can be sent based on the target encrypted tag data set. When it is determined that the data to be sent meets the target tag rule, the data to be sent is encrypted by the user public key in the target encrypted tag data set to obtain the target encrypted data; the target encrypted data is sent to the user terminal corresponding to the encrypted user identification information in the target encrypted tag data set. Thus, it is achieved to avoid exposing the tag data set to the tag user, ensure the security of the shared tag data set, and ensure the credibility of the target encrypted tag data set selected by the tag user by verifying the data to be sent and the target tag rule. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flowchart of a label sharing method provided in an embodiment of the present application; Figure 2 This is a schematic diagram of a queue for sending multiple target encrypted data packets provided in an embodiment of the present application; Figure 3 It is a flowchart of a label sharing method provided in an embodiment of the present application; Figure 4 It is a flowchart of a label sharing method provided in an embodiment of the present application; Figure 5 It is a structural diagram of a label sharing system provided in an embodiment of the present application; Figure 6 is a flowchart of another label sharing method provided in an embodiment of the present application; Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0015] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0016] In conjunction with the accompanying drawings, a tag sharing method, system, electronic device, and readable storage medium provided by an embodiment of the present application are described in detail below through specific embodiments and their application scenarios.

[0017] Figure 1 A flowchart of a tag sharing method provided by an embodiment of the present application is shown, which is applied to blockchain and can be executed by an electronic device. Figure 1 , the method may include the following steps.

[0018] Step 102: receiving the data to be sent and the target tag identification information sent by the tag user.

[0019] Among them, the tag user is a party that has the need to use tag data maintained in other systems, platforms, or institutions. The data to be sent is the data required by the user terminal sent by the tag user according to the needs of the user terminal. Each encrypted tag data set in the blockchain has corresponding tag identification information, and the target tag identification information is one of them, which is used to indicate the currently selected encrypted tag data set.

[0020] Step 104, according to the target tag identification information, determine the target encrypted tag data set and the target tag rule from at least one encrypted tag data set and the tag rule corresponding to each encrypted tag data set; wherein the target encrypted tag data set includes a user public key and encrypted user identification information.

[0021] Among them, in the blockchain, the user public key and encrypted user identification information are encapsulated in the encrypted tag data set and are not displayed in plain text. Different encrypted tag data sets can be distinguished by the tag identification information corresponding to the encrypted tag data set, so that the corresponding target tag data set can be determined from the stored encrypted tag data set by the target tag identification information selected by the tag user.

[0022] Step 106: When it is determined that the data to be sent meets the target tag rule, the data to be sent is encrypted using the user public key to obtain target encrypted data.

[0023] Among them, the target label rule is used to specify which data can be sent to the user terminal indicated in the target encrypted label data set based on the target encrypted label data set. That is to say, the target label rule limits the use of the target encrypted label data set and can ensure that the target encrypted label data set is not abused.

[0024] Step 108: Send the target encrypted data to the user terminal corresponding to the encrypted user identification information.

[0025] In an embodiment of the present application, the blockchain receives the data to be sent and the target tag identification information sent by the tag user. The tag data set selected by the tag user can be known through the target tag identification information, so as to determine the target encrypted tag data set and the target tag rule from at least one encrypted tag data set and the tag rule corresponding to each encrypted tag data set according to the target tag identification information. Then, the target tag rule corresponding to the target encrypted tag data set selected by the tag user and the data to be sent is verified to determine whether the data to be sent can be sent based on the target encrypted tag data set. When it is determined that the data to be sent meets the target tag rule, the data to be sent is encrypted by the user public key in the target encrypted tag data set to obtain the target encrypted data; the target encrypted data is sent to the user terminal corresponding to the encrypted user identification information in the target encrypted tag data set. Thus, it is achieved to avoid exposing the tag data set to the tag user, ensure the security of the shared tag data set, and ensure the credibility of the target encrypted tag data set selected by the tag user by verifying the data to be sent and the target tag rule.

[0026] In one implementation, before determining the target encrypted label data set and the target label rules in the above-mentioned step 104 based on the target label identification information from at least one encrypted label data set and the label rules corresponding to each of the encrypted label data sets, the method also includes: receiving and storing at least one encrypted label data set uploaded by a label provider, the label identification information corresponding to each of the encrypted label data sets, and the label rules corresponding to each of the encrypted label data sets.

[0027] In an embodiment of the present application, a label provider uploads at least one encrypted label data set, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets to a blockchain, which is received and stored by the blockchain. Thus, the blockchain can serve as a platform covering shareable label data sets, allowing label users to select the target encrypted label data set currently required from the blockchain, thereby achieving the sharing of label data sets while ensuring the security of the label data sets.

[0028] In one implementation, in the above step 106, when it is determined that the data to be sent meets the target tag rule, the data to be sent is encrypted by the user public key to obtain the target encrypted data, and the method further includes the following steps.

[0029] Step 1061: extract a first feature vector corresponding to the data to be sent and a second feature vector corresponding to the target label rule.

[0030] The first feature vector is used to characterize the characteristics of the data to be sent, and the second feature vector is used to characterize the characteristics of the target label rule. The characteristics of the two are represented in vector form to facilitate measuring the relationship between the two.

[0031] Step 1062: Calculate the similarity between the first feature vector and the second feature vector.

[0032] One implementation of calculating the similarity between the first eigenvector and the second eigenvector is to calculate the Euclidean distance between the first eigenvector and the second eigenvector, and measure the similarity between the first eigenvector and the second eigenvector by the Euclidean distance.

[0033] Step 1063: Determine whether the data to be sent meets the target tag rule based on the similarity.

[0034] Among them, when measuring the similarity between the first feature vector and the second feature vector based on the Euclidean distance, a larger Euclidean distance (greater than or equal to a preset Euclidean distance threshold) indicates that the similarity between the first feature vector and the second feature vector is lower, and a smaller Euclidean distance (less than the preset Euclidean distance threshold) indicates that the similarity between the first feature vector and the second feature vector is higher.

[0035] In an embodiment of the present application, by extracting the first feature vector corresponding to the data to be sent and the second feature vector corresponding to the target label rule, and calculating the similarity between the first feature vector and the second feature vector, it is determined whether the data to be sent complies with the target label rule by measuring the similarity between the first feature vector and the second feature vector, so as to judge whether the data to be sent can be sent based on the target encrypted label data set, and determine the credibility of the target encrypted label data set.

[0036] In one implementation, the above step 1063 determines whether the data to be sent meets the target tag rule according to the similarity, including: when the similarity is greater than a similarity threshold, determining that the data to be sent meets the target tag rule.

[0037] Among them, the size of the similarity between the first feature vector and the second feature vector is determined by a preset similarity threshold, so that the subsequent operation is determined according to the size of the similarity. When the similarity is greater than the similarity threshold, that is, when the first feature vector is relatively similar to the second feature vector, the data to be sent meets the target label rule, and the data can be sent based on the target encrypted label data set. When the similarity is less than the similarity threshold, that is, when the first feature vector is not very similar to the second feature vector, the data to be sent does not meet the target label rule, and the data cannot be sent based on the target encrypted label data set. Other encrypted label data sets can be reselected for further judgment.

[0038] In an embodiment of the present application, when the similarity between the first feature vector and the second feature vector is greater than the similarity threshold, it means that the first feature vector and the second feature vector have greater similarity, thereby indicating that the data to be sent meets the target label rule, and the data to be sent can be sent based on the target encrypted label data set, thereby ensuring the credibility of the target encrypted label data set selected by the label user.

[0039] In one implementation, the above step 108 of sending the target encrypted data to the user terminal corresponding to the encrypted user identification information may include the following steps.

[0040] Step 1081, encrypt the target encrypted data using the public key of the fully homomorphic encryption algorithm to obtain a homomorphic ciphertext.

[0041] Among them, the fully homomorphic encryption algorithm can directly encrypt the ciphertext without decrypting it. Therefore, when the target encrypted data is encrypted again based on the fully homomorphic encryption algorithm, there is no need to decrypt the target encrypted data first, which further protects the privacy and security of the data to be sent during the data sending process.

[0042] Step 1082: Pack the encrypted user identification information and the homomorphic ciphertext into a target encrypted data packet.

[0043] The encrypted user identification information is used to identify the user terminal, and the user terminal with demand to receive the data to be sent is determined according to the encrypted user identification information, instead of sending the data to be sent to all user terminals.

[0044] Step 1083: Send the target encrypted data packet to the user terminal corresponding to the encrypted user identification information.

[0045] In the embodiment of the present application, the target encrypted data is encrypted by the public key of the fully homomorphic encryption algorithm to obtain homomorphic ciphertext, thereby realizing secondary encryption of the target encrypted data and further ensuring the security of the data to be sent. The encrypted user identification information and the homomorphic ciphertext are then packaged into a target encrypted data packet, so that the recipient of the target encrypted data packet can send the target encrypted data packet to the user terminal corresponding to the encrypted user identification information based on the encrypted user identification information, thereby ensuring the security and accuracy of the data to be sent when it is sent.

[0046] In one implementation, the above-mentioned step 1083 of sending the target encrypted data packet to the user terminal corresponding to the encrypted user identification information may include: sending the target encrypted data packet to the user terminal corresponding to the encrypted user identification information via a message sending platform.

[0047] Among them, the message sending platform is used to decrypt the encrypted user identification information and the homomorphic ciphertext based on the private key of the fully homomorphic encryption algorithm to obtain the user identification information and the target encrypted data, and send the target encrypted data to the user terminal corresponding to the user identification information.

[0048] In an embodiment of the present application, a message sending platform is introduced between the blockchain and the user terminal, and the blockchain sends the target encrypted data packet to the user terminal corresponding to the encrypted user identification information through the message sending platform. The message sending platform receives the target encrypted data packet, and decrypts the encrypted user identification information and the homomorphic ciphertext in the target encrypted data packet based on the private key of the fully homomorphic encryption algorithm, thereby obtaining the user identification information and the target encrypted data. At this time, the message sending platform can determine the user terminal receiving the target encrypted data through the user identification information. The target encrypted data is the data to be sent, which is encrypted based on the user public key in the target encrypted label data set. The decryption of the target encrypted data needs to be realized through the user private key, which is on the user terminal side, thereby also ensuring the security of the target encrypted data on the message sending platform.

[0049] In one implementation, when the tag user includes multiple data to be sent, the above-mentioned step 108 sends the target encrypted data to the user terminal corresponding to the encrypted user identification information, including: sending the target encrypted data packets corresponding to the multiple data packets to be sent to the user terminal corresponding to the encrypted user identification information in a preset sending order.

[0050] In the embodiment of the present application, the data to be sent includes multiple data, the target encrypted tag data set selected for the data to be sent also includes multiple data, and the corresponding target encrypted data packet also includes multiple data. Figure 2 For multiple target encrypted data packets to be sent, they can be sent in a preset sending order, for example, the preset sending order is a random order, and target encrypted data packets with a logical order (for example, S1 and S2, which are target encrypted data packets sent to two user terminals in the target label data set T1) are not sent in a logical order, but can be sent in a random order (for example, S3 and S4, which are encrypted data packets sent to user terminals in other label data sets T2 and T3, and other encrypted data packets S3 and S4 are sent before S2), thereby further enhancing the security of data sending.

[0051] Figure 3 A schematic diagram of a label sharing method provided in an embodiment of the present application is shown. Figure 3 The method is applied to the tag user and can be executed by an electronic device. The method may include the following steps.

[0052] Step 302: Determine the target tag identification information corresponding to the target encrypted tag data set from the blockchain.

[0053] The blockchain stores at least one encrypted label data set uploaded by the label provider.

[0054] Step 304: Send the data to be sent and the target tag identification information corresponding to the target encrypted tag data set to the blockchain.

[0055] The data to be sent is data required by the user terminal and sent by the tag user according to the needs of the user terminal.

[0056] In an embodiment of the present application, the blockchain stores at least one encrypted label data set uploaded by the label provider and the label rules corresponding to each of the encrypted label data sets. The blockchain can be used as a platform covering sharable label data sets, so that the label user can select the currently required target encrypted label data set from the blockchain, and determine the target label identification information corresponding to the target encrypted label data set, thereby sending the data to be sent and the target label identification information corresponding to the target encrypted label data set to the blockchain, and then the blockchain verifies the target label rules corresponding to the target encrypted label data set selected by the label user to determine whether the data to be sent can be sent based on the target encrypted label data set. When it is determined that the data to be sent meets the target label rules, the data to be sent is encrypted by the user public key in the target encrypted label data set to obtain the target encrypted data; the target encrypted data is sent to the user terminal corresponding to the encrypted user identification information in the target encrypted label data set. This enables the label user to determine the required target encrypted label data set from the encrypted label data set shared by the label uploader on the blockchain, and to send the data to be sent based on the target encrypted label data set. This can not only avoid exposing the label data set to the label user and ensure the security of the shared label data set, but also ensure the credibility of the target encrypted label data set selected by the label user by verifying the data to be sent and the target label rules.

[0057] In one implementation, the above step 304 of sending the data to be sent to the blockchain may include the following steps.

[0058] Step 3041, encrypt the data to be sent using the public key of the fully homomorphic encryption algorithm.

[0059] Step 3042: Send the encrypted data to be sent to the blockchain.

[0060] In an embodiment of the present application, the tag user encrypts the data to be sent using the public key of a fully homomorphic encryption algorithm, and then sends the encrypted data to be sent to the blockchain, thereby ensuring the security of the data to be sent during transmission to the blockchain.

[0061] Figure 4 A schematic diagram of a label sharing method provided in an embodiment of the present application is shown. Figure 4The method is applied to a label provider and can be executed by an electronic device. The method may include the following steps.

[0062] Step 402: encrypt at least one label data set using a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set.

[0063] Step 404: Upload at least one of the encrypted label data sets, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets to the blockchain.

[0064] In an embodiment of the present application, a label provider encrypts at least one label data set by using a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set, and then uploads at least one of the encrypted label data sets, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets to a blockchain, thereby ensuring the security of the label data set while achieving sharing of the label data set by uploading the encrypted label data set to the blockchain.

[0065] In one implementation, the label data set includes user identification information and a user public key; the above-mentioned step 402 encrypts at least one label data set by a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set, including the following steps.

[0066] Step 4021, encrypt the user identification information in the label data set using the public key of the fully homomorphic encryption algorithm to obtain encrypted user identification information.

[0067] Among them, the user identification information in the label data set is private information that needs to be protected. The user identification information is encrypted to ensure the security of the user identification information.

[0068] Step 4022: Store the encrypted user identification information and the user public key in correspondence as an encrypted label data set.

[0069] Among them, the encrypted user identification information corresponds one-to-one to the user public key. That is to say, when sending the data to be sent to the user terminal corresponding to the encrypted user identification information, it is necessary to encrypt the data to be sent by the user public key corresponding to the encrypted user identification information, so that the user terminal can receive the target encrypted data and use the user private key private to the user terminal to decrypt the target encrypted data, thereby obtaining the data to be sent.

[0070] In an embodiment of the present application, the label provider encrypts the user identification information in the label data set by using the public key of the fully homomorphic encryption algorithm to obtain encrypted user identification information, and stores the encrypted user identification information and the user public key in correspondence as an encrypted label data set. The label provider uploads the encrypted label data set to the blockchain to achieve secure sharing of the label data set.

[0071] Figure 5 FIG. 1 shows a schematic diagram of a label sharing system provided by an embodiment of the present application. Figure 5 As shown, the label sharing system 500 includes: a blockchain 51, a label user 52, and a label provider 53.

[0072] Among them, the label user 52 is used to determine the target label identification information corresponding to the target encrypted label data set from the blockchain 51; wherein the blockchain 51 stores the encrypted label data set uploaded by the label provider 53 and the label rules corresponding to the encrypted label data set; and sends the data to be sent and the target label identification information corresponding to the target encrypted label data set to the blockchain 51; the blockchain 51 is used to receive the data to be sent and the target label identification information sent by the label user 52; according to the target label identification information, determine the target encrypted label data set and the target label rules from at least one encrypted label data set and the label rules corresponding to each of the encrypted label data sets; wherein the target encrypted label data set includes a user public key and encrypted user identification information; when it is determined that the data to be sent meets the target label rules, encrypt the data to be sent by the user public key to obtain the target encrypted data; and send the target encrypted data to the user terminal corresponding to the encrypted user identification information.

[0073] In one implementation, the label provider 53 is used to encrypt at least one label data set using a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set; and upload at least one of the encrypted label data sets, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets to the blockchain 51; the blockchain 51 is also used to receive and store at least one encrypted label data set uploaded by the label provider 53, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets.

[0074] In one implementation, the blockchain 51 is used to send the target encrypted data to the user terminal corresponding to the encrypted user identification information, including: encrypting the target encrypted data by using the public key of the fully homomorphic encryption algorithm to obtain a homomorphic ciphertext; packaging the encrypted user identification information and the homomorphic ciphertext into a target encrypted data packet; and sending the target encrypted data packet to the user terminal corresponding to the encrypted user identification information.

[0075] In one implementation, see Figure 5 The above-mentioned tag sharing system 500 also includes: a message sending platform 54.

[0076] Among them, the blockchain 51 is also used to send the target encrypted data packet to the message sending platform 54; the message sending platform 54 is used to decrypt the encrypted user identification information and the homomorphic ciphertext based on the private key of the fully homomorphic encryption algorithm to obtain the user identification information and the target encrypted data, and send the target encrypted data to the user terminal corresponding to the user identification information.

[0077] In one implementation, the blockchain 51 can also be used to extract a first feature vector corresponding to the data to be sent and a second feature vector corresponding to the target label rule; calculate the similarity between the first feature vector and the second feature vector; and determine whether the data to be sent complies with the target label rule based on the similarity.

[0078] In one implementation, the blockchain 51 is used to determine whether the data to be sent complies with the target tag rule based on the similarity, which may include: when the similarity is greater than a similarity threshold, determining that the data to be sent complies with the target tag rule.

[0079] In one implementation, when the tag user includes multiple data to be sent, the blockchain 51 for sending the target encrypted data packet to the user terminal corresponding to the encrypted user identification information may include: sending multiple target encrypted data packets corresponding to the data to be sent to the user terminal corresponding to the encrypted user identification information in a preset sending order.

[0080] In one implementation, the tag user 52 is used to send the data to be sent to the blockchain 51, which may include: encrypting the data to be sent by using the public key of the fully homomorphic encryption algorithm; and sending the encrypted data to be sent to the blockchain 51.

[0081] In one implementation, the label data set includes user identification information and a user public key; the label provider 53 is used to encrypt at least one label data set using the public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set, which may include: encrypting the user identification information in the label data set using the public key of a fully homomorphic encryption algorithm to obtain encrypted user identification information; and storing the encrypted user identification information and the user public key in correspondence as an encrypted label data set.

[0082] Figure 6 A schematic diagram of another label sharing method provided in an embodiment of the present application is shown. The method can be applied to Figure 5 The label sharing system shown in Figure 6 , the method comprises the following steps.

[0083] Step 601: The message sending platform generates a fully homomorphic private key and a fully homomorphic public key based on a fully homomorphic encryption algorithm, and sends the fully homomorphic public key to the blockchain, the label user, and the label provider.

[0084] Step 602: The label provider uploads the encrypted label data set and the label rules corresponding to the encrypted label data set to the blockchain.

[0085] Among them, the label data set of the label provider for:

[0086] Encrypted label dataset of label provider for:

[0087] in, is the user identification information of the nth user terminal, To use a fully homomorphic public key The encrypted user identification information of the nth user terminal is obtained by encrypting the user identification information, is the user public key of the nth user terminal, and correspondingly, the user private key of the nth user terminal is stored on the user terminal side. The label data set has label identification information, such as the name of the label data set.

[0088] Step 603: The tag user uploads the encrypted data to be sent and the target tag identification information corresponding to the target encrypted tag data set to the blockchain.

[0089] Among them, the tag user selects the required target tag identification information on the blockchain based on the public tag identification information.

[0090] Step 604: The blockchain extracts the first feature vector corresponding to the encrypted data to be sent and the second feature vector corresponding to the target tag rule, and calculates the Euclidean distance between the first feature vector and the second feature vector.

[0091] Among them, the blockchain can extract the first feature vector corresponding to the encrypted data to be sent through the artificial intelligence model (AI) model And the second eigenvector corresponding to the target label rule . , . Thus, the Euclidean distance between the first eigenvector and the second eigenvector is: .

[0092] Among them, since the Euclidean distance is calculated based on the encrypted data to be sent and the target label rule, the obtained Euclidean distance is ciphertext data, which is sent to the message sending platform for decryption to judge the size of the decrypted Euclidean distance, thereby determining the subsequent operations.

[0093] Step 605a, when the blockchain determines that the Euclidean distance is greater than the preset distance threshold, it returns an error notification message.

[0094] The error notification message indicates to the tag user that the data to be sent does not conform to the target tag rule corresponding to the currently selected target encrypted tag data set, so that the tag user reselects another encrypted tag data set.

[0095] Step 605b, when the blockchain determines that the Euclidean distance is less than the preset distance threshold, the blockchain encrypts the data to be sent using the user public key in the target encrypted label data set to obtain the target encrypted data.

[0096] Among them, the Euclidean distance is less than the preset distance threshold, which means that the data to be sent meets the target label rule, and the data to be sent can be sent based on the target encrypted label data set.

[0097] Among them, the user's public key , where x is the length of the nth user's public key and e is a random number.

[0098] Step 606: The blockchain sends the homomorphic ciphertext and the encrypted user identification information to the message sending platform.

[0099] Among them, the homomorphic ciphertext is obtained by encrypting the target encrypted data with a fully homomorphic public key, further ensuring the security of the data to be sent. The homomorphic ciphertext and the encrypted user identification information can be encapsulated into a data packet:

[0100] in, Represents a labeled dataset The data packet sent by the nth user terminal indicated, To pass Treating sent data The target encrypted data is obtained by encryption. When the blockchain also receives other data to be sent from the tag user (such as , , ), other label data sets are selected for other data label users to be sent, so the blockchain also needs to send other data to be sent based on other label data sets. At this time, the blockchain includes multiple target encrypted data to be sent, and the target encrypted data corresponding to different label data sets can be sent to the message sending platform in random order, such as Figure 2 As shown, the security of the data to be sent is enhanced.

[0101] Step 607: The message sending platform decrypts the homomorphic ciphertext and the encrypted user identification information using the fully homomorphic private key to obtain the target encrypted data and user identification information.

[0102] Step 608: The message sending platform sends the target encrypted data to the user terminal corresponding to the user identification information.

[0103] Step 609: The user terminal decrypts the target encrypted data using the user private key to obtain the data to be sent.

[0104] Through the embodiments of the present application, the fully homomorphic public key and the fully homomorphic private key generated by the fully homomorphic encryption algorithm are used to encrypt and decrypt the label data set, thereby protecting the privacy and security of the shareable label data set uploaded by the label provider, and encrypting and decrypting the target encrypted data to protect the privacy and security of the data to be sent. By verifying the data to be sent and the target label rules, the credibility of the data to be sent based on the target encrypted label data set is ensured. By storing the shareable encrypted label data set through the blockchain, the label data set does not need to be exposed to the label user in plain text, further ensuring the security of the label data set.

[0105] The embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned tag sharing method. Figure 7A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 701, a communication interface (CommunicationsInterface) 702, a memory (memory) 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. The processor 701 can call a computer program stored in the memory 703 and can be run on the processor 701 to execute the various steps of the above-mentioned label sharing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0106] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0107] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0108] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0109] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned label sharing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0110] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0111] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned label sharing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0112] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0113] An embodiment of the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes a program or instructions. When the program or instructions are executed, the various processes of the above-mentioned label sharing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

[0114] It should be noted that, in this article, the term "comprises", "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0116] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A label sharing method, characterized in that: Applications in blockchain include: Receive the data to be sent and the target tag identification information sent by the tag user; According to the target tag identification information, determine a target encrypted tag data set and a target tag rule from at least one encrypted tag data set and a tag rule corresponding to each of the encrypted tag data sets; wherein the target encrypted tag data set includes a user public key and encrypted user identification information; When it is determined that the data to be sent meets the target tag rule, the data to be sent is encrypted by using the user public key to obtain target encrypted data; The target encrypted data is sent to a user terminal corresponding to the encrypted user identification information.

2. The method according to claim 1, characterized in that Before determining the target encrypted label data set and the target label rule from at least one encrypted label data set and the label rule corresponding to each encrypted label data set according to the target label identification information, the method further includes: Receive and store at least one encrypted label data set uploaded by a label provider, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets.

3. The method according to claim 1, characterized in that: In the case where it is determined that the data to be sent meets the target tag rule, before encrypting the data to be sent by using the user public key to obtain the target encrypted data, the method further includes: Extracting a first feature vector corresponding to the data to be sent and a second feature vector corresponding to the target label rule; Calculating the similarity between the first feature vector and the second feature vector; According to the similarity, it is determined whether the data to be sent meets the target tag rule.

4. The method according to claim 3, characterized in that The determining, based on the similarity, whether the data to be sent meets the target tag rule includes: When the similarity is greater than a similarity threshold, it is determined that the data to be sent meets the target tag rule.

5. The method according to claim 1, characterized in that The step of sending the target encrypted data to a user terminal corresponding to the encrypted user identification information comprises: Encrypt the target encrypted data using a public key of a fully homomorphic encryption algorithm to obtain a homomorphic ciphertext; Packing the encrypted user identification information and the homomorphic ciphertext into a target encrypted data packet; The target encrypted data packet is sent to a user terminal corresponding to the encrypted user identification information.

6. The method according to claim 5, characterized in that The step of sending the target encrypted data packet to a user terminal corresponding to the encrypted user identification information includes: Sending the target encrypted data packet to the user terminal corresponding to the encrypted user identification information through a message sending platform; Among them, the message sending platform is used to decrypt the encrypted user identification information and the homomorphic ciphertext based on the private key of the fully homomorphic encryption algorithm to obtain the user identification information and the target encrypted data, and send the target encrypted data to the user terminal corresponding to the user identification information.

7. The method according to claim 5, characterized in that In the case that the to-be-delivered data sent by the tag user includes a plurality of data, sending the target encrypted data packet to the user terminal corresponding to the encrypted user identification information includes: The target encrypted data packets corresponding to the data to be sent are sent to the user terminal corresponding to the encrypted user identification information in a preset sending order.

8. A label sharing method, characterized in that: Applicable to label users, including: Determine the target label identification information corresponding to the target encrypted label data set from the blockchain; wherein the blockchain stores at least one encrypted label data set uploaded by the label provider; The data to be sent and the target tag identification information corresponding to the target encrypted tag data set are sent to the blockchain.

9. The method according to claim 8, characterized in that The sending of the data to be sent to the blockchain includes: Encrypt the data to be sent using the public key of the fully homomorphic encryption algorithm; The encrypted data to be sent is sent to the blockchain.

10. A label sharing method, characterized in that: Applicable to label providers, including: Encrypting at least one label data set by using a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set; Upload at least one of the encrypted label data sets, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets to the blockchain.

11. The method according to claim 10, characterized in that The tag data set includes user identification information and user public key; The method of encrypting at least one label data set by using a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set includes: Encrypting the user identification information in the tag data set by using a public key of a fully homomorphic encryption algorithm to obtain encrypted user identification information; The encrypted user identification information and the user public key are stored correspondingly as an encrypted label data set.

12. A label sharing system, characterized in that: The label sharing system includes: a blockchain, a label user, and a label provider; The tag user is used to determine the target tag identification information corresponding to the target encrypted tag data set from the blockchain; the blockchain stores the encrypted tag data set uploaded by the tag provider and the tag rules corresponding to the encrypted tag data set; and sends the data to be sent and the target tag identification information corresponding to the target encrypted tag data set to the blockchain; The blockchain is used to receive the data to be sent and the target label identification information sent by the label user; according to the target label identification information, determine the target encrypted label data set and the target label rule from at least one encrypted label data set and the label rule corresponding to each encrypted label data set; wherein the target encrypted label data set includes a user public key and encrypted user identification information; when it is determined that the data to be sent meets the target label rule, encrypt the data to be sent by using the user public key to obtain the target encrypted data; and send the target encrypted data to the user terminal corresponding to the encrypted user identification information.

13. The label sharing system according to claim 12, characterized in that: The label provider is used to encrypt at least one label data set by using a public key of a fully homomorphic encryption algorithm to obtain at least one encrypted label data set; and upload at least one of the encrypted label data sets, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets to the blockchain; The blockchain is also used to receive and store at least one encrypted label data set uploaded by the label provider, label identification information corresponding to each of the encrypted label data sets, and label rules corresponding to each of the encrypted label data sets.

14. The label sharing system according to claim 12, characterized in that: The blockchain is used to send the target encrypted data to a user terminal corresponding to the encrypted user identification information, including: Encrypt the target encrypted data using a public key of a fully homomorphic encryption algorithm to obtain a homomorphic ciphertext; Packing the encrypted user identification information and the homomorphic ciphertext into a target encrypted data packet; The target encrypted data packet is sent to a user terminal corresponding to the encrypted user identification information.

15. The label sharing system according to claim 14, characterized in that: The tag sharing system also includes: a message sending platform; Wherein, the blockchain is also used to send the target encrypted data packet to the message sending platform; The message sending platform is used to decrypt the encrypted user identification information and the homomorphic ciphertext based on the private key of the fully homomorphic encryption algorithm to obtain the user identification information and the target encrypted data, and send the target encrypted data to the user terminal corresponding to the user identification information.

16. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the label sharing method according to any one of claims 1 to 11.

17. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, the steps of the label sharing method according to any one of claims 1 to 11 are implemented.

18. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises a program or instructions, and when the program or instructions are executed, the steps of the tag sharing method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Data sharing method and system based on blockchain

    CN112995224A

  • Multi-owner RFID authentication method based on block chain

    CN113407928A

  • User data processing method, device and system based on block chain

    CN115017532A

  • Data sharing method, system and apparatus, and device and storage medium

    WO2022120938A1