CN113114465B - Method and device for processing attribution authority, storage medium and electronic device - Google Patents

Method and device for processing attribution authority, storage medium and electronic device Download PDF

Info

Publication number
CN113114465B
CN113114465B CN202110296980.4A CN202110296980A CN113114465B CN 113114465 B CN113114465 B CN 113114465B CN 202110296980 A CN202110296980 A CN 202110296980A CN 113114465 B CN113114465 B CN 113114465B
Authority
CN
China
Prior art keywords
account
transactions
target
block
authority
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
CN202110296980.4A
Other languages
Chinese (zh)
Other versions
CN113114465A (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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110296980.4A priority Critical patent/CN113114465B/en
Publication of CN113114465A publication Critical patent/CN113114465A/en
Application granted granted Critical
Publication of CN113114465B publication Critical patent/CN113114465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/065Network architectures or network communication protocols for network security for supporting key management in a packet data network for group communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a processing method and a device of attribution authority, a storage medium and an electronic device, wherein the method comprises the following steps: determining the attribution authority of the control equipment; according to the format of a preset transfer chain, converting the attribution authority into a plurality of transactions which are connected in front and back, and calculating the total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained; sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: a block header and a block body, the block body is used for indicating that the attribution authority of the control device is transferred from the second account number to the first account number, and the block header is used for storing the total hash value of a plurality of transactions.

Description

Method and device for processing attribution authority, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for processing an affiliation authority, a storage medium, and an electronic apparatus.
Background
In the field of Internet of things, especially in the field of smart homes, as the number of intelligent devices in a home increases, the device connection technology is diversified, but in the current home Internet of things structure, devices in the home are basically connected to respective IOT (Internet of things, IOT for short) cloud platforms, when a user home has devices of multiple platforms, different APPs are required to be used for control, and if mutual control of the devices between the platforms is to be realized, a control protocol is also required to be realized between the platforms.
Aiming at the problems that the mutual control of equipment between different platforms cannot be realized quickly and the like in the related technology, an effective solution is not provided yet.
Disclosure of Invention
The embodiment of the invention provides a processing method and device of attribution authority, a storage medium and an electronic device, and at least solves the problem that mutual control of equipment between different platforms cannot be realized quickly in the related technology.
According to an embodiment of the present invention, a method for processing attribution authority is provided, including: determining the attribution authority of the control equipment, wherein the attribution authority comprises the following steps: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers; converting the attribution authority into a plurality of transactions which are connected in front and back according to a preset transfer chain format, and calculating a total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account number, second address information of each second account number in a group account number, a signature key of the first account number, a public key of the first account number, a signature key of each second account number in the group account number, a public key of each second account number in the group account number, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained; sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions.
In an exemplary embodiment, converting the attribution authority into a plurality of transactions connected in series according to a format of a preset transfer chain, and calculating a total hash value of the plurality of transactions, includes: acquiring transfer information of an attribution authority between a first account and a group account to determine a plurality of target transactions, wherein the transfer information is used for indicating a transfer sequence of the attribution authority of the control equipment between the first account and the group account; determining a target hash value for performing attribution authority transfer each time according to the transfer information, and corresponding the target transaction and the target hash value one by one; and calculating the target hash values of the target transactions through a preset hash function to obtain the total hash value of the target transactions.
In an exemplary embodiment, after sending the block corresponding to the attribution authority to a blockchain server for recording, the method further includes: acquiring the number of transactions recorded in each block in a block chain; and determining the number of the devices in the current block chain according to the number of the transactions.
In an exemplary embodiment, after determining the number of devices in the current block chain according to the number of transactions, the method further includes: acquiring target address information identification contained in each transaction; and determining a device set of the block chain according to the target address information identifier, wherein the device set is used for indicating a device list of control devices contained in the block chain.
In an exemplary embodiment, after sending the block corresponding to the attribution authority to a blockchain server for recording, the method further includes: receiving a control instruction sent by a first account currently bound with the control equipment, wherein the control instruction comprises a signature key of the first account and an identifier of first address information; searching in a plurality of blockchains in a blockchain server according to the control instruction to determine whether a target blockchain matched with the control instruction exists, wherein similar transactions related to the control instruction exist in the target blockchain.
In an exemplary embodiment, after searching a plurality of blockchains in a blockchain server according to the control instruction to determine whether a target blockchain matching the control instruction exists, the method includes: acquiring target actual data information of the similar transaction, wherein the target actual data information is used for indicating a target signature key and a target address information identifier recorded in a block chain in real time; comparing the similarity between the signature key of the first account and the identifier of the first address information and the similarity between the target signature key and the identifier of the target address information; and allowing the first account with the attribution authority to control the equipment under the condition that the similarity meets the preset condition.
According to another embodiment of the present invention, there is also provided an apparatus for processing an attribution authority, including: the determining module is used for determining the attribution authority of the control equipment, wherein the attribution authority comprises: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers; the conversion module is used for converting the attribution authority into a plurality of transactions which are connected in front and back according to the format of a preset transfer chain, and calculating the total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account number, second address information of each second account number in a group account number, a signature key of the first account number, a public key of the first account number, a signature key of each second account number in the group account number, a public key of each second account number in the group account number, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained; a sending module, configured to send the block corresponding to the affiliation authority to a block chain server for recording, where the block includes: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions.
In an exemplary embodiment, the conversion module is further configured to acquire transfer information of an attribution authority between the first account and the group account to determine a plurality of target transactions, where the transfer information is used to indicate a transfer sequence of the attribution authority for the control device between the first account and the group account; determining a target hash value for performing attribution authority transfer each time according to the transfer information, and corresponding the target transaction and the target hash value one by one; and operating the target hash values of the target transactions through a preset hash function to obtain the total hash value of the target transactions.
In an exemplary embodiment, the apparatus further includes: the acquisition module is used for acquiring the number of the transactions recorded in each block in the block chain; and determining the number of devices in the current block chain according to the number of the transactions.
In an exemplary embodiment, the obtaining module is further configured to obtain a target address information identifier included in each transaction; and determining a device set of the block chain according to the target address information identifier, wherein the device set is used for indicating a device list of the control device contained in the block chain.
In an exemplary embodiment, the apparatus further includes: the control device comprises a receiving module, a judging module and a judging module, wherein the receiving module is used for receiving a control instruction sent by a first account currently bound with the control device, and the control instruction comprises a signature key of the first account and an identifier of first address information; searching in a plurality of blockchains in a blockchain server according to the control instruction to determine whether a target blockchain matched with the control instruction exists, wherein similar transactions related to the control instruction exist in the target blockchain.
In an exemplary embodiment, the receiving module is further configured to obtain target actual data information of the similar transaction, where the target actual data information is used to indicate an identifier of a target signature key and target address information recorded in a blockchain in real time; comparing the similarity between the signature key of the first account and the identifier of the first address information and the similarity between the target signature key and the identifier of the target address information; and allowing the first account with the attribution authority to control the equipment under the condition that the similarity meets the preset condition.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to carry out the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the attribution authority of the control equipment is determined, wherein the attribution authority comprises the following steps: the method comprises the following steps that a first account of the control device and a group account unbound with the control device currently are bound, wherein the group account comprises: one or more second account numbers; converting the attribution authority into a plurality of transactions which are connected in front and back according to the format of a preset transfer chain, and calculating the total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained; sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: the block head is used for storing the total hash value of a plurality of transactions, namely the transfer process of the attribution authority is converted into the block to be stored on the block chain server, so that different platforms can realize control over the same device when acquiring the same block chain. By adopting the technical scheme, the problems that mutual control of equipment between different platforms cannot be rapidly realized and the like in the related technology are solved, the accuracy of processing of attribution authority is improved, the complexity of cross-platform authority authentication of the equipment is avoided, and the cross-platform equipment interoperation efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a method for processing an attribution authority according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a method of processing attribution privileges, according to an embodiment of the present invention;
fig. 3 is a block diagram of a blockchain ledger in accordance with an alternative embodiment of the present invention;
FIG. 4 is a diagram illustrating a transfer of ownership rights of a device in accordance with an alternative embodiment of the present invention;
FIG. 5 is a diagram of a structure of data in a transaction in accordance with an alternative embodiment of the present invention;
FIG. 6 is a flowchart of a transfer process of a transaction chain according to an alternative embodiment of the invention;
FIG. 7 is a block diagram illustrating control commands in accordance with an alternative embodiment of the present invention;
fig. 8 is a block diagram of a device for processing an attribution authority according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the embodiment of the application can be executed in a computer terminal, a cloud platform or a similar computing device. Taking the example of running on a computer terminal, fig. 1 is a hardware structure block diagram of a computer terminal of a method for processing attribution authority according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 can be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the processing method of the attribution authority in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for processing attribution authority is provided, and is applied to the above computer terminal, and fig. 2 is a flowchart of a method for processing attribution authority according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, determining the attribution authority of the control equipment, wherein the attribution authority comprises: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers;
step S204, according to the format of a preset transfer chain, converting the attribution authority into a plurality of transactions which are connected in front and back, and calculating the total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following: the method comprises the steps that first address information of a first account number, second address information of each second account number in a group account number, a signature key of the first account number, a public key of the first account number, a signature key of each second account number in the group account number, a public key of each second account number in the group account number, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained;
step S206, sending the block corresponding to the attribution authority to a block chain server for recording, where the block includes: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions.
Through the technical scheme, the attribution authority of the control equipment is determined, wherein the attribution authority comprises: the method comprises the following steps that a first account of the control device and a group account unbound with the control device currently are bound, wherein the group account comprises: one or more second account numbers; converting the attribution authority into a plurality of transactions which are connected in front and back according to the format of a preset transfer chain, and calculating the total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained; sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: the block head is used for storing the total hash value of a plurality of transactions, namely the transfer process of the attribution authority is converted into the block to be stored on the block chain server, so that different platforms can realize control over the same device when acquiring the same block chain. By adopting the technical scheme, the problems that mutual control of equipment between different platforms cannot be rapidly realized and the like in the related technology are solved, the accuracy of processing of attribution authority is improved, the complexity of cross-platform authority authentication of the equipment is avoided, and the cross-platform equipment interoperation efficiency is improved.
It should be noted that the above-mentioned blockchain server may be associated with one or more platforms at the same time, and each platform may perform parsing and validation on the blockchain in the blockchain server, which is not limited by the present invention.
In an exemplary embodiment, converting the attribution authority into a plurality of transactions connected in series according to a format of a preset transfer chain, and calculating a total hash value of the plurality of transactions, includes: acquiring transfer information of an attribution authority between a first account and a group account to determine a plurality of target transactions, wherein the transfer information is used for indicating a transfer sequence of the attribution authority of the first account and the group account to control equipment; determining a target hash value for performing attribution authority transfer each time according to the transfer information, and corresponding the target transaction and the target hash value one by one; and operating the target hash values of the target transactions through a preset hash function to obtain the total hash value of the target transactions.
In short, the transfer sequence of the attribution authority among the accounts can be determined by confirming the transfer information of the attribution authority among the accounts, and the determination of the total hash value can be realized by determining the target hash value of each transfer of the attribution authority.
In an exemplary embodiment, after sending the block corresponding to the attribution authority to a blockchain server for recording, the method further includes: acquiring the number of transactions recorded in each block in a block chain; and determining the number of devices in the current block chain according to the number of the transactions. In other words, in order to facilitate understanding of the number of devices corresponding to the device ownership rights included in each block chain, the number of transactions in each block chain is counted to realize the judgment.
In an exemplary embodiment, after determining the number of devices in the current block chain according to the number of transactions, the method further includes: acquiring a target address information identifier contained in each transaction; and determining a device set of the block chain according to the target address information identifier, wherein the device set is used for indicating a device list of control devices contained in the block chain.
For example, whether the device belongs to the account is judged by matching the address of the transfer-out person (corresponding to the group account number in the embodiment of the present invention) at the very end of the transaction chain in the block corresponding to the transaction with the address of the user account number, and when the address of the transfer-out person matches with the address of the user account number, the device is proved to belong to the account. When not matched, the device is certified as not belonging to the account. In addition, the determination of the account corresponding device list may also be implemented by determining a plurality of roll-out addresses, for example: the referrer address at the end of all transaction chains in the illustration of figure 6 is equal to the device set for account number C.
In an exemplary embodiment, after sending the block corresponding to the attribution authority to a blockchain server for recording, the method further includes: receiving a control instruction sent by a first account currently bound with the control equipment, wherein the control instruction comprises a signature key of the first account and an identifier of first address information; searching in a plurality of block chains in a block chain server according to the control instruction to determine whether a target block chain matched with the control instruction exists, wherein similar transactions related to the control instruction exist in the target block chain.
In an exemplary embodiment, after searching a plurality of blockchains in a blockchain server according to the control instruction to determine whether a target blockchain matching the control instruction exists, the method includes: acquiring target actual data information of the similar transaction, wherein the target actual data information is used for indicating a target signature key and a target address information identifier recorded in a block chain in real time; comparing the similarity between the signature key of the first account and the identifier of the first address information and the similarity between the target signature key and the identifier of the target address information; and allowing the first account with the attribution authority to control the equipment under the condition that the similarity meets the preset condition.
For example, the account C needs to control the device, and the device command includes a public key of the account C, a signature of the account C, and a signature = C private key encryption (C address + deviceId of the account C), and when the device receives the control command, the public key of the account C is used to decrypt the signature of the account C. And comparing the resolved identifiers deviceId of the address of the C and the address information of the C account with the addresses of the receivers (which are equivalent to the first account in the embodiment of the invention) in the final roll-out of the transaction chain and the identifiers deviceId of the address information, and if the comparison is successful, successfully authenticating and allowing control. If the comparison fails, control is denied.
In order to better understand the process of the processing method of the attribution authority, the following describes a flow of the processing method of the attribution authority with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
In an optional embodiment, a device ownership transfer transaction model and a control authentication scheme are provided, the ownership of a device is converted into a blockchain through a blockchain distributed ledger format, specifically, as shown in fig. 3, the blockchain ledger is a smart chain storage, a traceable and difficult-to-tamper blockchain is formed by looping end-to-end loops between blocks, and a Hash (Hash value) = Hash algorithm (front block Hash + + block head other elements) of the block, so that a plurality of transaction transactions are packed in the blockchain blocks. And these transactions are not tamperable once they are successfully recorded in the blockchain. In addition, transactions in the blockchain can only be added, and cannot be modified or deleted.
As an alternative embodiment, the intelligent device ownership conversion model is established on the block chain ledger, and then the transfer chain of device ownership is organized into one transaction connected in tandem and recorded in the block of the block chain. Optionally, as shown in fig. 4, the ownership right of the device is transferred from the account a to the account B, and then from the account B to the account C, it should be noted that the transfer process is a unidirectional chain, the latter transaction depends on the former transaction, the transfer-in of each transfer transaction points to the transfer-out of the former transaction, and each transaction is recorded in the block chain of the chain.
Optionally, the detailed structure of the transaction includes the following contents: the device total transaction consists of three parts, namely transaction Hash (which is equivalent to a Hash value corresponding to the transaction in the embodiment of the invention), transfer-in information and transfer-out information. The transfer-in information, each transfer-in of the whole genus comes from the transfer-out of the previous transaction, namely the source must have a place of departure. The transfer-in information comprises a pre-transfer-out transaction ID, a master public key and a master signature. The roll-out information comprises the recipient address and the identification deviceId of the address information. Account address = Hash (platform address + user ID). Specifically, the structure of the data in the transaction is shown in fig. 5.
Optionally, fig. 6 is a schematic flow chart of a transfer process of the transaction chain, which includes the following steps:
step one, in an initial stage, a platform transfers equipment attribution to an account A. And (4) transferring information: the Hash of the transaction where the forwarding is located =0+ platform public key + platform signing; wherein platform sign-in = platform private key encryption (0 + platform address + deviceid of platform); and the information of the target receiver A address + the diviceId of the account A is transferred out.
And step two, the account A transfers the equipment attribution to an account B. And (4) transferring information: the forwarded transaction Hash = initial transaction Hash + Account A public key + Account A sign-in; account a sign-in = account private key encryption (initial transaction Hash + account a address + deviceid of account a); and the information of the target receiver B address + deviceId of the account B is transferred out.
Step three, the account B transfers the equipment attribution to an account C, and the transfer information is as follows: the forwarded transaction Hash = transaction 1+ Account B public key + Account B sign-in; account B sign-in = account B private key encryption (transaction 1+ account B address + deviceid of account B); and the output information comprises the address of the target receiver C + deviceId of the account C.
Optionally, whether the device belongs to the account may be determined by matching the transfer destination address at the end of the transaction chain in the block corresponding to the transaction with the user account address, and when the transfer destination address matches with the user account address, it is verified that the device belongs to the account. When not matched, the device is certified as not belonging to the account. In addition, the determination of the account corresponding device list may also be implemented by determining a plurality of roll-out addresses, for example: the referrer address at the end of all transaction chains in the illustration of figure 6 is equal to the device set for account number C.
Optionally, the device control authority may also be authenticated through a transaction chain, for example, the account C needs to control the device, the device command includes a public key of the account C, a signature of the account C, and a signature = C private key encryption (C address + deviceId of the account C), and when the device receives the control command, the public key of the account C is used to decrypt the signature of the account C. And comparing the resolved address and deviceId of the C with the address and deviceId of the receiver in the tail-most roll-out of the transaction chain, and if the comparison is successful, successfully authenticating and allowing control. If the comparison fails, control is denied. Fig. 7 is a schematic structural diagram of a control command according to an alternative embodiment of the present invention.
As an optional implementation manner, the overall interaction process of the attribution authority of the present invention is: assume that platform 1, platform 2, and the device to be operated are all a node of the blockchain. Platform 1 creates an initial transaction authorizing device x to account a address and issues the transaction to the blockchain. Platform 2 creates an initial transaction authorizing device y to account a address and issues the transaction to the blockchain. And all the nodes are stored to the local after transaction verification is completed. An account A logs in an APP of any platform, and an equipment list [ x, y ] can be inquired from a block chain through an address A and a private key signature; when the account a needs to control the device y of the platform B on the APP of the platform 1, only the public key of the account a and the command signed by the account a need to be sent to the device y. The sending mode may be through an interface provided by the platform B or may be performed in a local device protocol.
In the optional embodiment of the invention, based on the intelligent equipment attribution authority transfer model and the transaction structure, the equipment attribution authority is linked up through block chain decentralization, so that the equipment attribution authority cannot be tampered, and the reliability of attribution authority interaction is improved. And when the cross-platform equipment interoperation is carried out, the operation efficiency is greatly improved. For some edge devices, verification and operation can be completed locally, so that the applicable scene of the device cross-platform authority authentication is expanded.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for processing an attribution authority is further provided, where the device is used to implement the foregoing embodiment and preferred embodiments, and details are not described again after the description is given. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of a device for processing an attribution authority according to an embodiment of the present invention; as shown in fig. 8, includes:
a determining module 82, configured to determine an attribution authority of the control device, where the attribution authority includes: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers;
a conversion module 84, configured to convert the attribution authority into a plurality of transactions connected in series according to a format of a preset transfer chain, and calculate a total hash value of the plurality of transactions, where the transaction includes at least one of: the method comprises the steps that first address information of a first account number, second address information of each second account number in a group account number, a signature key of the first account number, a public key of the first account number, a signature key of each second account number in the group account number, a public key of each second account number in the group account number, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained;
a sending module 86, configured to send the block corresponding to the attribution authority to a block chain server for recording, where the block includes: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions.
Through the technical scheme, the attribution authority of the control equipment is determined, wherein the attribution authority comprises: the method comprises the following steps that a first account of the control device and a group account unbound with the control device currently are bound, wherein the group account comprises: one or more second account numbers; converting the attribution authority into a plurality of transactions which are connected in front and back according to the format of a preset transfer chain, and calculating the total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained; sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: the block head is used for storing the total hash value of a plurality of transactions, namely the transfer process of the attribution authority is converted into the block to be stored on the block chain server, so that different platforms can realize control over the same device when acquiring the same block chain. By adopting the technical scheme, the problems that mutual control of equipment between different platforms cannot be rapidly realized and the like in the related technology are solved, the accuracy of processing of attribution authority is improved, the complexity of cross-platform authority authentication of the equipment is avoided, and the cross-platform equipment interoperation efficiency is improved.
In an exemplary embodiment, the conversion module is further configured to acquire transfer information of an attribution authority between the first account and the group account to determine a plurality of target transactions, where the transfer information is used to indicate a transfer sequence of the attribution authority for the control device between the first account and the group account; determining a target hash value for performing attribution authority transfer each time according to the transfer information, and corresponding the target transaction and the target hash value one by one; and operating the target hash values of the target transactions through a preset hash function to obtain the total hash value of the target transactions. In short, the transfer sequence of the attribution authority among the accounts can be determined by confirming the transfer information of the attribution authority among the accounts, and the determination of the total hash value can be realized by determining the target hash value of each transfer of the attribution authority.
In an exemplary embodiment, the apparatus further includes: the acquisition module is used for acquiring the number of the transactions recorded in each block in the block chain; and determining the number of devices in the current block chain according to the number of the transactions. In other words, in order to facilitate understanding of the number of devices corresponding to the device ownership right included in each block chain, the determination is implemented by counting the number of transactions in each block chain.
In an exemplary embodiment, the obtaining module is further configured to obtain a target address information identifier included in each transaction; and determining a device set of the block chain according to the target address information identifier, wherein the device set is used for indicating a device list of the control device contained in the block chain. For example, whether the device belongs to the account is judged by matching the address of the transfer-out person (corresponding to the group account number in the embodiment of the present invention) at the very end of the transaction chain in the block corresponding to the transaction with the address of the user account number, and when the address of the transfer-out person matches with the address of the user account number, the device is proved to belong to the account. When not matched, the device is certified as not belonging to the account. In addition, the determination of the device list corresponding to the account may be implemented by determining a plurality of roll-out addresses, for example: the referrer address at the end of all transaction chains in the illustration of figure 6 is equal to the device set for account number C.
In an exemplary embodiment, the apparatus further includes: the control device comprises a receiving module, a judging module and a judging module, wherein the receiving module is used for receiving a control instruction sent by a first account currently bound with the control device, and the control instruction comprises a signature key of the first account and an identifier of first address information; searching in a plurality of blockchains in a blockchain server according to the control instruction to determine whether a target blockchain matched with the control instruction exists, wherein similar transactions related to the control instruction exist in the target blockchain.
In an exemplary embodiment, the receiving module is further configured to obtain target actual data information of the similar transaction, where the target actual data information is used to indicate an identifier of a target signature key and target address information recorded in a blockchain in real time; comparing the similarity between the signature key of the first account and the identifier of the first address information and the similarity between the target signature key and the identifier of the target address information; and allowing the first account with the attribution authority to control the equipment under the condition that the similarity meets the preset condition.
For example, the account C is to control the device, the device command includes a public key of the account C, a signature of the account C, and a signature = C private key encryption (C address + deviceId of the account C), and when the device receives the control command, the public key of the account C is used to decrypt the signature of the account C. And comparing the resolved identifiers deviceId of the address of the C and the address information of the C account with the addresses of the receivers (which are equivalent to the first account in the embodiment of the invention) in the final roll-out of the transaction chain and the identifiers deviceId of the address information, and if the comparison is successful, successfully authenticating and allowing control. If the comparison fails, control is denied.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
In an exemplary embodiment, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, determining the attribution authority of control equipment, wherein the attribution authority comprises: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers;
s2, converting the attribution authority into a plurality of transactions which are connected in front and back according to a preset transfer chain format, and calculating a total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained;
s3, sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions.
In an exemplary embodiment, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an exemplary embodiment, in the present embodiment, the processor may be configured to execute the following steps by a computer program:
s1, determining the attribution authority of control equipment, wherein the attribution authority comprises: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers;
s2, converting the attribution authority into a plurality of transactions which are connected in front and back according to a preset transfer chain format, and calculating a total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained;
s3, sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions.
In an exemplary embodiment, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details of this embodiment are not described herein again.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, which may be centralized on a single computing device or distributed across a network of computing devices, and in one exemplary embodiment may be implemented using program code executable by a computing device, such that the steps shown and described may be executed by a computing device stored in a memory device and, in some cases, executed in a sequence different from that shown and described herein, or separately fabricated into individual integrated circuit modules, or multiple ones of them fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for processing attribution authority, comprising:
determining the attribution authority of the control equipment, wherein the attribution authority comprises the following steps: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers;
converting the attribution authority into a plurality of transactions which are connected in front and back according to a preset transfer chain format, and calculating a total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained;
sending the block corresponding to the attribution authority to a block chain server for recording, wherein the block comprises: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions;
wherein, according to the format of the preset transfer chain, the attribution authority is converted into a plurality of transactions which are connected in front and back, and the total hash value of the plurality of transactions is calculated, including:
acquiring transfer information of an attribution authority between a first account and a group account to determine a plurality of target transactions, wherein the transfer information is used for indicating a transfer sequence of the attribution authority of the first account and the group account to control equipment;
determining a target hash value for performing attribution authority transfer each time according to the transfer information, and corresponding the target transaction and the target hash value one by one;
and operating the target hash values of the target transactions through a preset hash function to obtain the total hash value of the target transactions.
2. The method according to claim 1, wherein after sending the block corresponding to the attribution authority to a blockchain server for recording, the method further comprises:
acquiring the number of transactions recorded in each block in a block chain;
and determining the number of the devices in the current block chain according to the number of the transactions.
3. The method of claim 2, wherein after determining the number of devices in the current blockchain based on the number of transactions, the method further comprises:
acquiring target address information identification contained in each transaction;
and determining a device set of the block chain according to the target address information identifier, wherein the device set is used for indicating a device list of control devices contained in the block chain.
4. The method according to claim 1, wherein after sending the block corresponding to the attribution authority to a blockchain server for recording, the method further comprises:
receiving a control instruction sent by a first account currently bound with the control device, wherein the control instruction comprises a signature key of the first account and an identifier of first address information;
searching in a plurality of blockchains in a blockchain server according to the control instruction to determine whether a target blockchain matched with the control instruction exists, wherein similar transactions related to the control instruction exist in the target blockchain.
5. The method of claim 4, wherein searching a plurality of blockchains in a blockchain server according to the control command to determine whether a target blockchain matching the control command exists comprises:
acquiring target actual data information of the similar transaction, wherein the target actual data information is used for indicating a target signature key and a target address information identifier recorded in a block chain in real time;
comparing the similarity between the signature key of the first account and the identifier of the first address information and the similarity between the target signature key and the identifier of the target address information;
and allowing the first account with the attribution authority to control the equipment under the condition that the similarity meets the preset condition.
6. An apparatus for processing attribution authority, comprising:
the determining module is used for determining the attribution authority of the control equipment, wherein the attribution authority comprises: a first account currently binding the control device and a group account that has been unbound from the control device, the group account including: one or more second account numbers;
the conversion module is used for converting the attribution authority into a plurality of transactions which are connected in front and back according to a preset transfer chain format and calculating a total hash value of the plurality of transactions, wherein the transactions comprise at least one of the following matters: the method comprises the steps that first address information of a first account, second address information of each second account in a group account, a signature key of the first account, a public key of the first account, a signature key of each second account in the group account, a public key of each second account in the group account, an identifier of the first address information, an identifier of the second address information and a hash value corresponding to a transaction are obtained;
a sending module, configured to send the block corresponding to the affiliation authority to a block chain server for recording, where the block includes: a block header and a block body, the block body being used to indicate that the ownership rights of the control device have been transferred from the second account to the first account, the block header being used to store a total hash value of the plurality of transactions;
the conversion module is further configured to acquire transfer information of the affiliation authority between the first account and the group account to determine a plurality of target transactions, where the transfer information is used to indicate a transfer sequence of the affiliation authority between the first account and the group account for the control device; determining a target hash value for performing attribution authority transfer each time according to the transfer information, and corresponding the target transaction and the target hash value one by one; and calculating the target hash values of the target transactions through a preset hash function to obtain the total hash value of the target transactions.
7. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN202110296980.4A 2021-03-19 2021-03-19 Method and device for processing attribution authority, storage medium and electronic device Active CN113114465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110296980.4A CN113114465B (en) 2021-03-19 2021-03-19 Method and device for processing attribution authority, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110296980.4A CN113114465B (en) 2021-03-19 2021-03-19 Method and device for processing attribution authority, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113114465A CN113114465A (en) 2021-07-13
CN113114465B true CN113114465B (en) 2022-10-11

Family

ID=76712047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110296980.4A Active CN113114465B (en) 2021-03-19 2021-03-19 Method and device for processing attribution authority, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113114465B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114584313B (en) * 2022-02-25 2023-11-03 杭州萤石软件有限公司 Equipment physical identity authentication method, system, device and first platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110310205A (en) * 2019-06-28 2019-10-08 百度在线网络技术(北京)有限公司 A kind of block chain data monitoring method, device, equipment and medium
WO2020252479A1 (en) * 2019-06-13 2020-12-17 Gutierrez Sheris Luis Eduardo System and method using a fitness-gradient blockchain consensus

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190238550A1 (en) * 2016-12-26 2019-08-01 Cloudminds (Shenzhen) Robotics Systems Co., Ltd. Permission control method, apparatus and system for block chain, and node device
CN106796685A (en) * 2016-12-30 2017-05-31 深圳前海达闼云端智能科技有限公司 Block chain authority control method and device and node equipment
CN107066893B (en) * 2017-02-28 2018-11-09 腾讯科技(深圳)有限公司 The treating method and apparatus of account information in block chain
CN108737440B (en) * 2018-06-05 2020-08-28 朔联科技(上海)有限公司 Method, server and computer readable storage medium for equipment management
US10826682B2 (en) * 2018-07-03 2020-11-03 Servicenow, Inc. Multi-instance architecture supporting trusted blockchain-based network
CN109146681A (en) * 2018-07-26 2019-01-04 百度在线网络技术(北京)有限公司 A kind of element processing method, device, equipment and the storage medium of block chain
US11223483B2 (en) * 2019-06-28 2022-01-11 Intel Corporation Odd index precomputation for authentication path computation
CN111314066B (en) * 2020-01-23 2022-02-11 腾讯科技(深圳)有限公司 Block chain-based data transfer method, terminal and computer-readable storage medium
CN111371905B (en) * 2020-03-27 2023-08-01 中国人民解放军国防科技大学 Block chain layering consensus proving system and method based on cloud computing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020252479A1 (en) * 2019-06-13 2020-12-17 Gutierrez Sheris Luis Eduardo System and method using a fitness-gradient blockchain consensus
CN110310205A (en) * 2019-06-28 2019-10-08 百度在线网络技术(北京)有限公司 A kind of block chain data monitoring method, device, equipment and medium

Also Published As

Publication number Publication date
CN113114465A (en) 2021-07-13

Similar Documents

Publication Publication Date Title
CN111277549B (en) Security service method and system adopting block chain
CN102333100B (en) Authentication method and terminal
CN108965484A (en) A kind of transmission method of internet of things data, system and terminal
CN109447645B (en) Equipment linkage method, block chain network and storage medium
CN110430235B (en) Method, apparatus, storage medium and computing device for cross-chain transmission of authenticatable messages
CN111885144B (en) Equipment binding method and device
EP3477561A1 (en) System for goods delivery
CN110601906A (en) Data transmission method and device based on block chain
CN113785532B (en) Method and apparatus for managing and verifying certificates
CN105187444A (en) Key information burning method and device
CN110351316A (en) A kind of remote software upgrade method and device
CN109617994A (en) A kind of method and system positioning block chain interior joint position
CN110176091A (en) A method of smart lock safety is improved by mobile terminal device code
CN107948970A (en) System of real name method of network entry, system and the mobile terminal of subordinate terminal
CN112637931A (en) Method and device for establishing network connection
CN104604295B (en) For in a wireless communication system by server management of terminal to the method and its equipment of the access rights of resource
CN110602252A (en) Block chain enhanced open Internet of things access architecture
CN113055176A (en) Terminal authentication method and system, terminal device, P2P verification platform and medium
CN113114465B (en) Method and device for processing attribution authority, storage medium and electronic device
CN106453349A (en) An account number login method and apparatus
CN112689006B (en) Internet of things equipment control method and device, storage medium and electronic device
CN113259918A (en) Equipment binding method and system
CN107318100B (en) Method, device and system for binding mobile phone number
CN109089299A (en) It is a kind of to allow facility registration to cloud with network method based on SmartConfig mode
CN105704705A (en) Method for switching terminals with shared eSIM information, terminal and server

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
GR01 Patent grant
GR01 Patent grant