CN114449019A - Operation data recording method, node, system and equipment - Google Patents

Operation data recording method, node, system and equipment Download PDF

Info

Publication number
CN114449019A
CN114449019A CN202011112511.4A CN202011112511A CN114449019A CN 114449019 A CN114449019 A CN 114449019A CN 202011112511 A CN202011112511 A CN 202011112511A CN 114449019 A CN114449019 A CN 114449019A
Authority
CN
China
Prior art keywords
node
timestamp
network
time
block
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.)
Pending
Application number
CN202011112511.4A
Other languages
Chinese (zh)
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.)
China Mobile Communications Group Co Ltd
China Mobile Group Liaoning Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Liaoning 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 China Mobile Communications Group Co Ltd, China Mobile Group Liaoning Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202011112511.4A priority Critical patent/CN114449019A/en
Publication of CN114449019A publication Critical patent/CN114449019A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • 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/3297Cryptographic 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 time stamps, e.g. generation of time stamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention relates to the technical field of block chains, and discloses an operation data recording method, a node, a system and equipment, wherein the method is applied to a network based on the block chains, and the network comprises a plurality of nodes; the method comprises the following steps: responding to an operation of a user on a first node, and acquiring a timestamp of the operation occurrence time; generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node; and sending the operation record to each node in the network, so that each node stores the operation record in a block by taking the operation occurrence time as the sequence according to the timestamp. Through the mode, the embodiment of the invention can accurately record the operation data of the user on the nodes in the network, and is convenient for backtracking and inheriting the historical operation data.

Description

Operation data recording method, node, system and equipment
Technical Field
The embodiment of the invention relates to the technical field of block chains, in particular to an operation data recording method, a node, a system and equipment.
Background
After entering the internet era, smart homes have gradually entered thousands of households as an important component of the field of smart internet.
The intelligent home system takes a house as a platform, and utilizes a comprehensive wiring technology, a network communication technology, a safety precaution technology, an automatic control technology and an audio and video technology to carry out networking integration on equipment facilities related to home life so as to construct an efficient management system of home facilities and daily household affairs and improve the safety, convenience, comfort and practicability of home living environment. At present, most of intelligent home systems adopt a centralized cloud server side mode to set and operate home equipment.
In the process of implementing the embodiment of the present invention, the inventors found that: in the existing intelligent household equipment management system, each piece of equipment is controlled through a cloud server, and the function of recording the operation of the intelligent household equipment is lacked.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide an operation data recording method, node and system, which are used to solve the problem in the prior art that the operation on the smart home device lacks a recording function.
According to an aspect of the embodiments of the present invention, there is provided an operation data recording method, applied to a network based on a block chain, where the network includes a plurality of nodes; the method comprises the following steps:
responding to an operation of a user on a first node, and acquiring a timestamp of the operation occurrence time;
generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node;
and sending the operation record to each node in the network, so that each node stores the operation record in a block by taking the operation occurrence time as the sequence according to the timestamp.
In an optional manner, the obtaining the timestamp of the operation occurrence time includes:
and obtaining the current time data from the clock source to generate the time stamp.
In an optional manner, the obtaining the timestamp of the operation occurrence time includes:
sending a timestamp acquisition request to a master node in the network;
and receiving a timestamp sent by the master node, wherein the timestamp is generated by the master node according to the current time data acquired from a clock source.
In an optional manner, the receiving the timestamp sent by the master node further includes:
and receiving a digital signature sent by the master node, wherein the digital signature is generated by encrypting the timestamp by the master node by using a private key of the master node.
In an alternative, the generating the operation record marked with the timestamp comprises:
after receiving the timestamp and the digital signature, decrypting the digital signature by using the main node public key to obtain a decrypted timestamp;
and comparing the time stamp with the decrypted time stamp, and if the time stamp is consistent with the decrypted time stamp, verifying that the time stamp is credible.
In an optional manner, each node stores an operation record through a first temporary block; the step of storing the operation records in the blocks by the nodes according to the time stamps by taking the operation occurrence time as a sequence comprises the following steps:
each node judges whether the number of operation records in the first temporary block exceeds a preset block height, and if not, the operation records are stored in the first temporary block in sequence by taking the operation occurrence time as the time stamp; and if the operation record exceeds the normal operation record, converting the first temporary block into a normal block, generating a second temporary block, and storing the operation record in the second temporary block by taking the operation occurrence time as the sequence according to the timestamp.
In an optional manner, the clock source includes a wireless base station, an internet clock source, a long-short wave time service system, or a satellite positioning system.
According to another aspect of the embodiments of the present invention, an operation data recording node is provided, which is applied to a network based on a block chain, where the network includes a plurality of nodes; the operation data recording node comprises:
the acquisition module is used for responding to the operation of a user on the first node and acquiring the timestamp of the operation occurrence time;
the generating module is used for generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node;
and the sending module is used for sending the operation records to each node in the network, so that each node stores the operation records in a block by taking the operation occurrence time as the sequence according to the time stamp.
According to another aspect of the embodiments of the present invention, an operation data recording system is provided, which is applied to a network based on a block chain, where the network includes a plurality of nodes; the system comprises:
the operation data recording node is used for responding to the operation of a user on the first node and acquiring the timestamp of the operation occurrence time; generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node; sending the operation records to each node in the network, and enabling each node to store the operation records in a block by taking the operation occurrence time as a sequence according to the time stamps;
the main node is used for receiving a timestamp acquisition request sent by the operation data recording node; acquiring current time data from a clock source to generate a timestamp, and sending the timestamp to the operation data recording node; receiving the operation record marked with the timestamp and sent by the operation node; and storing the operation records in a block in the sequence of the operation occurrence time according to the time stamp.
According to still another aspect of an embodiment of the present invention, there is provided an operation data recording apparatus including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation of the operation data recording method.
According to the operation data recording method provided by the embodiment of the invention, when a user operates a first node in an intelligent household equipment network based on a block chain, a timestamp of an operation occurrence is obtained, an operation record marked with the timestamp is generated, and the operation record is sent to each node in the network, so that each node can consistently store the operation record in a block according to the timestamp and by taking the operation occurrence time as a sequence. By the method, the operation data of the user on the equipment node can be accurately recorded, and the backtracking and inheritance of the historical operation data are facilitated. In addition, due to the adoption of a decentralized block chain distributed storage technology, operation records are uniformly stored in each node in the network, the problem that remote control records of intelligent equipment are unavailable easily when a server fails or equipment operation record time delay is large due to the fact that the cloud server is overloaded is solved due to the fact that single-point management of the cloud server is avoided, the safety, the stability and the timeliness of operation data records are guaranteed, and user experience is improved.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
The drawings are only for purposes of illustrating embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a schematic structural diagram of an intelligent home network provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a method for recording operation data according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram illustrating an operation data recording node according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an operation data recording system provided by an embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating an operation data recording apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein.
The embodiment of the invention is mainly applied to a small block chain network scene consisting of a plurality of intelligent household devices. Generally, a blockchain is a shared database in which data or information stored therein has characteristics of being unforgeable, being traceable throughout, being traceable, being maintained collectively, and the like. With the gradual maturity of the block chain technology, the block chain is used as a decentralized distributed database and is very suitable for scenes of the internet of things such as smart homes.
Fig. 1 shows a schematic structural diagram of an intelligent home network provided by an embodiment of the present invention. The smart home network is a small block chain network, and comprises a plurality of device nodes, such as user terminal devices (mobile phones, personal computers, tablet computers, vehicle-mounted terminals, special terminals and the like), gateways, refrigerators, washing machines, air conditioners, televisions, water heaters, electric rice cookers, smart speakers and other smart home devices. These nodes can be classified into master nodes and general nodes according to their functions. The main node comprises intelligent equipment such as a user terminal or a gateway and the like which can access the internet, and other intelligent home equipment can be called common nodes. The nodes in the network are connected with each other through a local area network constructed by the gateway, and when the user terminal is positioned outside the local area network, the user terminal is connected with the gateway through the Internet and is connected with other nodes through the gateway.
In order to accurately record the operation data of a user on a certain device node, the main node can obtain a time stamp for marking the occurrence time of the operation from a clock source. The clock source comprises: wireless base station, internet clock source, long-short wave time service system or satellite positioning system. For example, the smart phone serving as the master node can synchronously acquire accurate current time from the wireless base station in real time; the mobile phone, the gateway and the like can acquire accurate current Time from an internet clock source through a Network Time Protocol (NTP). If the long and short wave time service module is integrated in the node, the standard time can be obtained from a long and short wave time service system (BPL/BPM); if the node is integrated with a satellite positioning module, standard time can be obtained from a GPS or Beidou satellite positioning system. If the intelligent household equipment serving as the common node detects that the intelligent household equipment has the function of acquiring time data from the clock source, the intelligent household equipment broadcasts to the main node after the intelligent household equipment is added into the block chain network, the main node sets the intelligent household equipment as a timing backup node, and if the main node cannot directly acquire accurate time from the clock source due to faults, the standard time is acquired from the clock source through the timing backup node so as to ensure the accuracy and the stability of time stamp acquisition.
Optionally, according to the stability and the difficulty of timing of the clock source, setting the priority of the clock source from high to low as: the wireless base station > Internet clock source > long and short wave time service system > satellite positioning system. That is, the master node preferentially acquires the standard time from the wireless base station, and acquires the standard time from other clock sources when the master node fails to acquire the standard time.
In an optional embodiment, in order to ensure that the smart home network has the function of the block chain technology, each node structure in the network may include an application layer, a consensus layer, and a device layer.
The application layer may include a user manipulation module and a block chain management module. The user control module is used for man-machine interaction, and a user initiates operation to the equipment through the module; the block chain management module is used for managing the recording mode and the consensus mechanism of the block data.
The consensus layer may comprise a node interconnect module. The node interconnection module is used for managing and controlling network interconnection among the nodes and conversion of various protocols, and stable and effective network communication among the nodes is guaranteed. For the master node in the network, the consensus layer can further comprise a clock check module. The clock check module is used for providing a credible time base for a consensus mechanism of the intelligent home network, namely, the clock source can obtain reliable time data and provide credible timestamp query service for each node in the network.
The equipment layer can comprise a node block chain module and an equipment automatic control module. The node block chain module is used for being connected with each node in the network through the node interconnection module, and the operation of chain encryption, a recording mode or a consensus mechanism of each block in the whole block chain is realized under the control of the block chain management module. The equipment automatic control module is a control module of the equipment node own operating system, and interacts with the node block chain module through a specific protocol to realize the translation and execution of instructions.
Of course, the node structure is an exemplary example, and the specific structure may be set by an equipment manufacturer according to the equipment condition, and may be implemented in a hardware manner or a software manner, as long as it is ensured that the node structure can be linked with each node in the smart home network in a block chain function. The new smart home device with the blockchain function needs to be registered to join the smart home network and becomes a node in the blockchain network.
Fig. 2 is a flowchart of an operation data recording method provided by an embodiment of the present invention, which is applied in the above network based on a block chain. The method may be executed by each node in the smart home network, and for convenience of description, the node executing the method may be referred to as an operation data recording node. As shown in fig. 2, the method comprises the steps of:
step 210: and responding to the operation of the user on the first node, and acquiring the timestamp of the operation occurrence time.
The timestamp is used to mark the time of occurrence of the operation performed by the user on the first node. The first node is a target node operated by a user. For example, the user wants to set the cooling function of the air conditioner, which is the first node, to be turned on at six pm. The user can directly operate the first node, can operate the first node through the master node, and can operate the first node through a second node (such as an intelligent sound box) supporting an intelligent home management function. That is, the operation data recording node includes a master node, a first node, or a second node. Correspondingly, in an optional embodiment, step 210 specifically includes:
step 211: and responding to the operation of the user on the first node, and acquiring current time data from a clock source to generate a timestamp.
Under the condition that a user operates the first node through the master node, if the user sets that the air conditioner starts a refrigeration function at six afternoon through a mobile phone, the master node responds to the operation of the user on the first node, obtains current time data from the clock source and generates a timestamp.
Optionally, if the network includes a time correction backup node, the master node acquires the current time data from the clock source through the time backup node to generate a timestamp. In an optional embodiment, the master node periodically calibrates the local time to the clock source acquiring time data, and in some cases, when the current time data cannot be acquired from the clock source, the timestamp is generated by using the current time data provided by the clock source as the local time periodically calibrated to the clock source.
In an alternative embodiment, step 210 specifically includes:
step 212: and responding to the operation of the user on the first node, and sending a timestamp acquisition request to a main node in the network.
Under the condition that a user directly operates the first node or operates the first node through the second node, if the user directly sets on an air conditioner or sets that the air conditioner starts a refrigeration function at six pm through an intelligent sound box, the first node or the second node responds to the operation of the user on the first node and sends a timestamp acquisition request to a main node in a network. Specifically, the node block chain module in the first node or the second node may send a timestamp obtaining request to the master node.
Step 213: and receiving a timestamp sent by the master node, wherein the timestamp is generated by the master node according to the current time data acquired from a clock source.
Specifically, after receiving the timestamp obtaining request, the master node obtains current time data from the clock source to generate a timestamp, and sends the timestamp to the first node or the second node. Similarly, the master node may obtain the current time data from the clock source through the time backup node to generate the timestamp. In an alternative embodiment, the master node generates the time stamp using the local time periodically calibrated to the clock source as the current time data provided by the clock source.
Optionally, in order to ensure that the timestamp is authentic and authentic, the master node may encrypt the timestamp with a private key of the master node to generate a digital signature, and send the timestamp and the digital signature to the first node or the second node. In particular, the timestamp and the digital signature may be sent to a node blockchain module in the first node or the second node.
In particular, the operations associated with the master node in step 210 may be performed by a clock checking module in the master node.
Step 220: and generating an operation record marked with the time stamp, wherein the operation record comprises operation data of the user for operating the first node.
Optionally, if the operation data recording node is the first node or the second node, and the timestamp and the digital signature are obtained from the master node, step 220 may include:
step 220 a: and after receiving the timestamp and the digital signature, decrypting the digital signature by using the main node public key to obtain the decrypted timestamp.
Specifically, after receiving the timestamp and the digital signature from the master node, the node block chain module in the first node or the second node may obtain the public key of the master node from the block chain management module, and decrypt the digital signature with the public key to obtain the decrypted timestamp.
Step 220 b: and comparing the time stamp with the decrypted time stamp, and if the time stamp is consistent with the decrypted time stamp, verifying that the time stamp is credible.
Specifically, the first node or the second node compares the timestamp with the decrypted timestamp, and if the timestamp is consistent with the decrypted timestamp, the timestamp is verified to be authentic. If not, the verification fails, the first node or the second node feeds back a message of the trusted timestamp acquisition failure to the user, and the execution of the method is stopped.
Through the verification step of the timestamp, a malicious node can be prevented from falsifying a false timestamp to disturb data records by serving as a main node, so that the safety and the stability of operation record storage in a block chain are ensured.
The operation data in step 220 specifically includes an identifier of the first node, instruction data, and the like, where the instruction data includes instruction time and instruction content, such as six pm, refrigeration mode on, temperature 26 degrees, duration 1 hour, and the like. The operation record comprises a timestamp of the occurrence time of the operation and operation data.
Step 230: and sending the operation record to each node in the network, so that each node stores the operation record in a block by taking the operation occurrence time as the sequence according to the timestamp.
Specifically, the operation data recording node (the main node, the first node or the second node) broadcasts the operation record to the smart home blockchain network. After receiving the operation record, each node performs consensus operation and synchronously stores the operation record in a consistent way. Of course, the operation data recording node synchronously stores the operation records in the blocks in the sequence of the operation occurrence time according to the time stamp.
In an optional embodiment, each node stores an operation record through a first temporary block; the step of the above nodes storing the operation records in the block according to the time stamps and the operation occurrence time as the sequence may specifically include: each node judges whether the number of operation records in the first temporary block exceeds a preset block height, and if not, the operation records are stored in the first temporary block in sequence by taking the operation occurrence time as the time stamp; and if the operation record exceeds the normal operation record, converting the first temporary block into a normal block, generating a second temporary block, and storing the operation record in the second temporary block by taking the operation occurrence time as the sequence according to the timestamp.
The block height refers to the number of operation records that can be accommodated in one block. The block height may be uniformly set in advance in each node of the block chain network, for example, 100, each node writes 100 operation records in a temporary block and then converts the operation records into a formal block to generate a hash value, and simultaneously generates a new temporary block, and writes the hash value into a hash head of the newly generated temporary block to form chain encryption.
It should be noted that in the application scenarios of the blockchain technology in the fields of finance, big data, etc., each node in the blockchain needs a certain workload value to compete for the billing right, so the design of the consensus mechanism of the large blockchain is complex. Common Consensus mechanisms include workload certificates (PoW), rights and interests certificates (PoS), Stellar Consensus Protocol (SCP), Practical Byzantine Fault-tolerant mechanisms (PBFT), Pool verification mechanisms, etc., and because these Consensus mechanisms involve complicated mathematical and logical operations, the entire block chain network generates a very large system overhead, which makes it difficult to meet the requirements of real-time data interaction.
And block link points in the field of the internet of things of the smart home do not need to compete for the accounting right in most cases when the data records of the linked list are counted. If the user can operate the first node on the operation data recording node such as the main node, the first node or the second node, the main node, the first node or the second node has the accounting right, and the operation record of the first node can be broadcasted to each node in the blockchain network to perform the consensus operation. In order to solve the problem of ordering the operation records in the consensus mechanism, the method uses the time stamps to store the operation records in the blocks in the order of the operation occurrence time. Therefore, a simple, efficient and practical consensus mechanism is ingeniously realized, and the ordered distribution of the accounting rights of all the nodes is realized. Compared with the complex consensus algorithm, the block chain network adopting the operation data recording method provided by the embodiment of the invention has the advantages of low operation overhead, high response speed and the like, and is very suitable for small block chain networks such as smart homes.
After each node in the block chain network synchronously stores the operation record, when each node recognizes that the operation record is related to itself, namely the identifier of the first node in the operation data is consistent with the identifier of the node, the node executes the instruction content at the instruction time according to the instruction data in the operation data. If the air conditioner node recognizes that the identifier of the first node is consistent with the identifier of the first node, the cooling mode is started at six pm according to the instruction data, and the temperature is set to be 26 ℃ for 1 hour.
The operation records stored in the intelligent home block chain network can be queried and traced by a user, and new equipment can be inherited conveniently. For example, when a user changes a certain device node in the network, after a newly added node registers to join the network, an operation record in a certain time range can be acquired from any node in the network, the operation record of the previous device node of the same type is inquired, so that the operation preference of the user is found, and the personalized customization function is pushed to the user according to the user preference. If newly-added air conditioning equipment finds that the user often turns on the air conditioning refrigeration function at about 6 o 'clock in the afternoon by inquiring the historical operation records, the option of turning on the air conditioning refrigeration function at 6 o' clock in the afternoon can be pushed to the user for the user to select and set.
According to the operation data recording method provided by the embodiment of the invention, when a user operates a first node in an intelligent household equipment network based on a block chain, a timestamp of an operation occurrence is obtained, an operation record marked with the timestamp is generated, and the operation record is sent to each node in the network, so that each node can consistently store the operation record in a block according to the timestamp and by taking the operation occurrence time as a sequence. By the method, the operation data of the user on the equipment node can be accurately recorded, and the backtracking and inheritance of the historical operation data are facilitated. In addition, due to the adoption of a decentralized block chain distributed storage technology, operation records are uniformly stored in each node in the network, the problem that remote control records of intelligent equipment are unavailable easily when a server fails or equipment operation record time delay is large due to the fact that the cloud server is overloaded is solved due to the fact that single-point management of the cloud server is avoided, the safety, the stability and the timeliness of operation data records are guaranteed, and user experience is improved.
Fig. 3 shows a schematic structural diagram of an operation data recording node according to an embodiment of the present invention. The node is applied to the block chain-based network. The network includes a plurality of nodes, and the operation data recording node may specifically include the above-mentioned master node, first node, or second node. As shown in fig. 3, the node 300 includes:
an obtaining module 310, configured to, in response to an operation performed on a first node by a user, obtain a timestamp of an occurrence time of the operation;
a generating module 320, configured to generate an operation record marked with the timestamp, where the operation record includes operation data of the user operating the first node; and
a sending module 330, configured to send the operation record to each node in the network, so that each node stores the operation record in a block according to the timestamp and using the operation occurrence time as an order.
In an optional manner, the obtaining module 310 includes:
an obtaining unit 311, configured to obtain the current time data from the clock source to generate a timestamp.
In an optional manner, the obtaining module 310 includes:
a request sending unit 312, configured to send a timestamp obtaining request to a master node in the network;
a receiving unit 313, configured to receive a timestamp sent by the master node, where the timestamp is generated by the master node according to current time data obtained from a clock source.
In an optional manner, the receiving unit 313 is further configured to receive a digital signature sent by the master node, where the digital signature is generated by encrypting, by the master node, the timestamp with a private key of the master node.
In an optional manner, the node 300 further includes:
the decryption module 340 is configured to decrypt the digital signature by using the master node public key after receiving the timestamp and the digital signature, so as to obtain a decrypted timestamp;
a verification module 350, configured to compare the timestamp with the decrypted timestamp, and verify that the timestamp is authentic if the timestamp is consistent with the decrypted timestamp.
In an alternative manner, each node stores an operation record through a first temporary block; the node 300 further comprises:
a storage module 360, configured to determine whether the number of operation records in the first temporary block exceeds a preset block height, and if not, store the operation records in the first temporary block in the order of the operation occurrence time according to the timestamps; and if the operation record exceeds the normal operation record, converting the first temporary block into a normal block, generating a second temporary block, and storing the operation record in the second temporary block by taking the operation occurrence time as the sequence according to the timestamp.
It should be noted that the operation data recording node and the operation data recording method provided in the embodiment of the present invention are based on the same concept, and details can be referred to the description in the above embodiment of the operation data recording method, and are not described herein again.
According to the operation data recording node provided by the embodiment of the invention, when a user operates a first node in an intelligent household equipment network based on a block chain, a timestamp of an operation occurrence is obtained, an operation record marked with the timestamp is generated, and the operation record is sent to each node in the network, so that each node can consistently store the operation record in a block according to the timestamp and by taking the operation occurrence time as a sequence. Through the nodes, the operation data of the user on the equipment nodes can be accurately recorded, and the backtracking and inheritance of historical operation data are facilitated. In addition, due to the adoption of a decentralized block chain distributed storage technology, operation records are uniformly stored in each node in the network, the problem that remote control records of intelligent equipment are unavailable easily when a server fails or equipment operation record time delay is large due to the fact that the cloud server is overloaded is solved due to the fact that single-point management of the cloud server is avoided, the safety, the stability and the timeliness of operation data records are guaranteed, and user experience is improved.
Fig. 4 is a schematic structural diagram illustrating an operation data recording system according to an embodiment of the present invention. The system is applied to the network based on the block chain, and the network comprises a plurality of nodes. As shown in fig. 4, the system 400 includes:
the operation data recording node 300 is used for responding to the operation of a user on the first node and acquiring the timestamp of the operation occurrence time; generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node; sending the operation records to each node in the network, and enabling each node to store the operation records in a block by taking the operation occurrence time as a sequence according to the time stamps;
the master node 410 is configured to receive a timestamp obtaining request sent by the operation data recording node; acquiring current time data from a clock source to generate a timestamp, and sending the timestamp to the operation data recording node; receiving the operation record marked with the timestamp and sent by the operation node; and storing the operation records in a block in the sequence of the operation occurrence time according to the time stamp.
The specific structure of the operation data recording node 300 is the same as the structure of the operation data recording node 300 shown in fig. 3, and is not described herein again.
In an alternative manner, the master node 410 includes:
a request receiving module 411, configured to receive a timestamp obtaining request sent by an operation data recording node;
a timestamp sending module 412, configured to obtain current time data from a clock source to generate a timestamp after receiving the request, and send the timestamp to the operation data recording node;
an operation record receiving module 413, configured to receive an operation record marked with the timestamp and sent by the operation data recording node, where the operation record includes operation data of a user operating a first node;
a record storage module 414, configured to store the operation records in a block according to the time stamps in order of the operation occurrence time.
In an optional manner, the timestamp sending module 412 is further configured to encrypt the timestamp with a private key of the master node to generate a digital signature, and send the digital signature to the operation data recording node.
It should be noted that the operation data recording system and the operation data recording method provided in the embodiment of the present invention are based on the same concept, and details can be referred to the description in the embodiment of the operation data recording method, and are not described herein again.
According to the operation data recording system provided by the embodiment of the invention, when a user operates a first node in an intelligent home equipment network based on a block chain, a timestamp of an operation occurrence is obtained, an operation record marked with the timestamp is generated and sent to each node in the network, so that each node can consistently store the operation record in a block according to the timestamp and by taking the operation occurrence time as a sequence. Through the system, the operation data of the user on the equipment node can be accurately recorded, and the backtracking and inheritance of the historical operation data are facilitated. In addition, due to the adoption of a decentralized block chain distributed storage technology, operation records are uniformly stored in each node in the network, the problem that remote control records of intelligent equipment are unavailable easily when a server fails or equipment operation record time delay is large due to the fact that the cloud server is overloaded is solved due to the fact that single-point management of the cloud server is avoided, the safety, the stability and the timeliness of operation data records are guaranteed, and user experience is improved.
Fig. 5 is a schematic structural diagram of an operation data recording device according to an embodiment of the present invention, and a specific implementation of the operation data recording device is not limited in the specific embodiment of the present invention.
As shown in fig. 5, the operation data recording apparatus may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may specifically execute the relevant steps in the above-described embodiment of the method for operating data recording.
In particular, program 510 may include program code comprising computer-executable instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The one or more processors included in the operational data recording device may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Specifically, the program 510 may be invoked by the processor 502 to cause the operation data recording device to perform the following operations:
responding to an operation of a user on a first node, and acquiring a timestamp of the operation occurrence time;
generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node;
and sending the operation record to each node in the network, so that each node stores the operation record in a block by taking the operation occurrence time as the sequence according to the timestamp.
In an optional manner, the obtaining the timestamp of the operation occurrence time includes:
and obtaining the current time data from the clock source to generate the time stamp.
In an optional manner, the obtaining the timestamp of the operation occurrence time includes:
sending a timestamp acquisition request to a master node in the network;
and receiving a timestamp sent by the master node, wherein the timestamp is generated by the master node according to the current time data acquired from a clock source.
In an optional manner, the receiving the timestamp sent by the master node further includes:
and receiving a digital signature sent by the master node, wherein the digital signature is generated by encrypting the timestamp by the master node by using a private key of the master node.
In an alternative, the generating the operation record marked with the timestamp comprises:
after receiving the timestamp and the digital signature, decrypting the digital signature by using the main node public key to obtain a decrypted timestamp;
and comparing the time stamp with the decrypted time stamp, and if the time stamp is consistent with the decrypted time stamp, verifying that the time stamp is credible.
In an optional manner, each node stores an operation record through a first temporary block; the step of storing the operation records in the blocks by the nodes according to the time stamps by taking the operation occurrence time as a sequence comprises the following steps:
the operation data recording equipment judges whether the number of operation records in the first temporary block exceeds a preset block height, and if not, the operation records are stored in the first temporary block according to the time stamps by taking the operation occurrence time as a sequence; and if the operation record exceeds the normal operation record, converting the first temporary block into a normal block, generating a second temporary block, and storing the operation record in the second temporary block by taking the operation occurrence time as the sequence according to the timestamp.
The operation data recording device can execute the action of the operation data recording node in the operation data recording method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects. For technical details that are not described in detail in this embodiment, reference may be made to the above-described operation data recording method embodiment.
According to the operation data recording device provided by the embodiment of the invention, when a user operates a first node in an intelligent household equipment network based on a block chain, a timestamp of an operation occurrence is obtained, an operation record marked with the timestamp is generated, and the operation record is sent to each node in the network, so that each node can consistently store the operation record in a block according to the timestamp and by taking the operation occurrence time as a sequence. Through the equipment, the operation data of the user on the nodes in the network can be accurately recorded, and the backtracking and inheritance of the historical operation data are facilitated. In addition, due to the adoption of a decentralized block chain distributed storage technology, operation records are uniformly stored in each node in the network, the problem that remote control records of intelligent equipment are unavailable easily when a server fails or equipment operation record time delay is large due to the fact that the cloud server is overloaded is solved due to the fact that single-point management of the cloud server is avoided, the safety, the stability and the timeliness of operation data records are guaranteed, and user experience is improved.
An embodiment of the present invention provides a computer-readable storage medium, where the storage medium stores at least one executable instruction, and when the executable instruction runs on an operation data recording device, the operation data recording device is caused to execute an operation data recording method in any method embodiment described above. For technical details that are not described in detail in this embodiment, reference may be made to the embodiment of the operation data recording method provided by the present invention.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system is apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

Claims (10)

1. The operation data recording method is applied to a network based on a block chain, wherein the network comprises a plurality of nodes; the method comprises the following steps:
responding to an operation of a user on a first node, and acquiring a timestamp of the operation occurrence time;
generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node;
and sending the operation record to each node in the network, so that each node stores the operation record in a block by taking the operation occurrence time as the sequence according to the timestamp.
2. The method of claim 1, wherein obtaining the timestamp of the operation occurrence time comprises:
and obtaining the current time data from the clock source to generate the time stamp.
3. The method of claim 1, wherein obtaining the timestamp of the operation occurrence time comprises:
sending a timestamp acquisition request to a master node in the network;
and receiving a timestamp sent by the master node, wherein the timestamp is generated by the master node according to the current time data acquired from a clock source.
4. The method of claim 3, wherein receiving the timestamp sent by the master node further comprises:
and receiving a digital signature sent by the master node, wherein the digital signature is generated by encrypting the timestamp by the master node by using a private key of the master node.
5. The method of claim 4, wherein generating the operation record marked with the timestamp is preceded by:
after receiving the timestamp and the digital signature, decrypting the digital signature by using the main node public key to obtain a decrypted timestamp;
and comparing the time stamp with the decrypted time stamp, and if the time stamp is consistent with the decrypted time stamp, verifying that the time stamp is credible.
6. The method according to any one of claims 1 to 5, wherein each node stores an operation record by a first temporary block; the step of storing the operation records in the blocks by the nodes according to the time stamps by taking the operation occurrence time as a sequence comprises the following steps:
each node judges whether the number of operation records in the first temporary block exceeds a preset block height, and if not, the operation records are stored in the first temporary block in sequence by taking the operation occurrence time as the time stamp; and if the operation record exceeds the normal operation record, converting the first temporary block into a normal block, generating a second temporary block, and storing the operation record in the second temporary block by taking the operation occurrence time as the sequence according to the timestamp.
7. A method according to any of claims 2 to 5, wherein the clock source comprises a wireless base station, an Internet clock source, a long and short wavelength time service system or a satellite positioning system.
8. An operation data recording node is applied to a network based on a block chain, wherein the network comprises a plurality of nodes; the operation data recording node comprises:
the acquisition module is used for responding to the operation of a user on the first node and acquiring the timestamp of the operation occurrence time;
the generating module is used for generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node;
and the sending module is used for sending the operation records to each node in the network, so that each node stores the operation records in a block by taking the operation occurrence time as the sequence according to the time stamp.
9. An operation data recording system is applied to a network based on a block chain, wherein the network comprises a plurality of nodes; the system comprises:
the operation data recording node is used for responding to the operation of a user on the first node and acquiring the timestamp of the operation occurrence time; generating an operation record marked with the timestamp, wherein the operation record comprises operation data of the user for operating the first node; sending the operation records to each node in the network, and enabling each node to store the operation records in a block by taking the operation occurrence time as a sequence according to the time stamps;
the main node is used for receiving a timestamp acquisition request sent by the operation data recording node; acquiring current time data from a clock source to generate a timestamp, and sending the timestamp to the operation data recording node; receiving the operation record marked with the timestamp and sent by the operation node; and storing the operation records in a block by taking the operation occurrence time as the sequence according to the time stamp.
10. An operational data recording apparatus, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction which causes the processor to execute the operation of the operation data recording method according to any one of claims 1-5.
CN202011112511.4A 2020-10-16 2020-10-16 Operation data recording method, node, system and equipment Pending CN114449019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011112511.4A CN114449019A (en) 2020-10-16 2020-10-16 Operation data recording method, node, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011112511.4A CN114449019A (en) 2020-10-16 2020-10-16 Operation data recording method, node, system and equipment

Publications (1)

Publication Number Publication Date
CN114449019A true CN114449019A (en) 2022-05-06

Family

ID=81357068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011112511.4A Pending CN114449019A (en) 2020-10-16 2020-10-16 Operation data recording method, node, system and equipment

Country Status (1)

Country Link
CN (1) CN114449019A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117408846A (en) * 2023-12-14 2024-01-16 陕西华海信息技术有限公司 School educational administration data processing system based on cloud computing

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767478A (en) * 2017-09-06 2018-03-06 阿里巴巴集团控股有限公司 A kind of method and device for preserving logging
CN107846282A (en) * 2017-11-03 2018-03-27 法信公证云(厦门)科技有限公司 A kind of electronic data distribution keeping method and system based on block chain technology
CN108632293A (en) * 2018-05-16 2018-10-09 山东建筑大学 Architectural Equipment Internet of things system based on block chain technology and method
CN108881169A (en) * 2018-05-21 2018-11-23 西安电子科技大学 Time distribution and synchronous method and system, data processing system based on block chain
CN109815226A (en) * 2018-12-13 2019-05-28 平安科技(深圳)有限公司 Date storage method, device, equipment and storage medium based on block chain
CN109978451A (en) * 2019-03-20 2019-07-05 深圳职业技术学院 The data safety processing method and device of logistics block chain
CN110417502A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 A kind of block chain nodal clock common recognition method and device
WO2020108050A1 (en) * 2018-11-27 2020-06-04 阿里巴巴集团控股有限公司 Data evidence preservation method and system based on multiple blockchain networks

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767478A (en) * 2017-09-06 2018-03-06 阿里巴巴集团控股有限公司 A kind of method and device for preserving logging
CN107846282A (en) * 2017-11-03 2018-03-27 法信公证云(厦门)科技有限公司 A kind of electronic data distribution keeping method and system based on block chain technology
CN108632293A (en) * 2018-05-16 2018-10-09 山东建筑大学 Architectural Equipment Internet of things system based on block chain technology and method
CN108881169A (en) * 2018-05-21 2018-11-23 西安电子科技大学 Time distribution and synchronous method and system, data processing system based on block chain
WO2020108050A1 (en) * 2018-11-27 2020-06-04 阿里巴巴集团控股有限公司 Data evidence preservation method and system based on multiple blockchain networks
CN109815226A (en) * 2018-12-13 2019-05-28 平安科技(深圳)有限公司 Date storage method, device, equipment and storage medium based on block chain
CN109978451A (en) * 2019-03-20 2019-07-05 深圳职业技术学院 The data safety processing method and device of logistics block chain
CN110417502A (en) * 2019-07-31 2019-11-05 中国工商银行股份有限公司 A kind of block chain nodal clock common recognition method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
闫树;卿苏德;魏凯;: "区块链在数据流通中的应用", 大数据, no. 01 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117408846A (en) * 2023-12-14 2024-01-16 陕西华海信息技术有限公司 School educational administration data processing system based on cloud computing
CN117408846B (en) * 2023-12-14 2024-03-01 陕西华海信息技术有限公司 School educational administration data processing system based on cloud computing

Similar Documents

Publication Publication Date Title
US11770296B2 (en) Decentralized data storage and processing for IoT devices
Sinha et al. Building an E Ective IoT Ecosystem for Your Business
US9762392B2 (en) System and method for trusted provisioning and authentication for networked devices in cloud-based IoT/M2M platforms
US11516200B2 (en) Controlled token distribution to protect against malicious data and resource access
US11646886B2 (en) Data offload and time synchronization for ubiquitous visual computing witness
TWI524806B (en) Systems, methods, and/or apparatus for enabling communication between devices using different communication protocols
EP2487863B1 (en) Enabling secure access to sensor network infrastructure using multiple interfaces and application based group key selection
Fan et al. Diam-iot: A decentralized identity and access management framework for internet of things
CN110113427A (en) Relay services for the communication between controller and attachment
CN113163162B (en) Service providing method based on video cloud and video cloud system
CN109983748A (en) The group command management of equipment group
CN110506413A (en) For network equipment safety and trust the determining system and method for score
CN112333213B (en) Privacy protection method and device for business data of power Internet of things
EP2781057A1 (en) Data distribution platform
US20230208831A1 (en) Service processing method and apparatus, server, and storage medium
CN111460400A (en) Data processing method and device and computer readable storage medium
CN114449019A (en) Operation data recording method, node, system and equipment
CN115114630A (en) Data sharing method and device and electronic equipment
US10652201B1 (en) Cloud service registry
CN112381599A (en) Shared charger rental system and method based on block chain technology
JP2023120287A (en) Scalable certificate management system architecture
CN112507301B (en) Internet of things equipment control method, device, equipment and storage medium
CN113590711A (en) High-elasticity extensible multi-chain data hierarchical shared storage system and method
CN116032494B (en) Data interaction method, blockchain predictor, device and medium
CN112565211B (en) Block chain network service platform, information processing method, equipment and storage medium

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