CN113269637A - Intelligent device data evidence storing and verifying method based on block chain - Google Patents

Intelligent device data evidence storing and verifying method based on block chain Download PDF

Info

Publication number
CN113269637A
CN113269637A CN202011575412.XA CN202011575412A CN113269637A CN 113269637 A CN113269637 A CN 113269637A CN 202011575412 A CN202011575412 A CN 202011575412A CN 113269637 A CN113269637 A CN 113269637A
Authority
CN
China
Prior art keywords
data
network
contract
value
node
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.)
Granted
Application number
CN202011575412.XA
Other languages
Chinese (zh)
Other versions
CN113269637B (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.)
Neng Lian Tech Ltd
Original Assignee
Neng Lian Tech 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 Neng Lian Tech Ltd filed Critical Neng Lian Tech Ltd
Priority to CN202011575412.XA priority Critical patent/CN113269637B/en
Publication of CN113269637A publication Critical patent/CN113269637A/en
Application granted granted Critical
Publication of CN113269637B publication Critical patent/CN113269637B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Technology Law (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a certificate storing and verifying method of intelligent equipment data based on a block chain, which comprises three steps, namely, a first step of establishing a certificate storing platform, and a second step of performing a certificate storing process on the certificate storing platform; thirdly, carrying out a verification process on a certificate storage platform; according to the invention, a double-ladder representation method is adopted in data representation, and larger data can be represented on the basis of saving bits; the administrator has the authority to specify the number of bits represented therein to reduce the number of augmentation bits as needed; before the process of evidence saving, nodes in a node network system are set in advance to serve data storage on a block chain module, and an election mechanism of a leader node is set; in the process of storing the certificate, fully transferring resources so as to call a storage contract to store more data each time; and finally, setting a data query method.

Description

Intelligent device data evidence storing and verifying method based on block chain
Technical Field
The invention relates to the technical field of data storage and verification, in particular to a block chain-based intelligent device data storage and verification method.
Background
In recent years, with the rapid development of the development and utilization of distributed renewable energy resources in China and the further deepening of the reform of the national power system, the construction speed of the power spot market in China is obviously accelerated, and with the large-scale construction of the spot market, a large number of energy market transaction main bodies can appear, but the traditional centralized power transaction system cannot adapt to the development of the future distributed power market due to the fact that the operation and maintenance cost is high, the source charge cannot be effectively matched, and the bottleneck problem of a single-point fault system is easily caused. In the distributed power generation trading market, due to the fact that the number of participating bodies is large and trust is lacked among the participating bodies, higher requirements are put forward on fairness, privacy and traceability of the trading market. Therefore, how to construct an efficient, transparent, safe and reliable trading system is an urgent problem to be solved in the development of the distributed power market in China, and the block chain technology has undeniable advantages, and the problem that how to design and store collected data and perform specific evidence and verification is worth researching is solved.
Disclosure of Invention
In view of the above, the present invention provides a method for verifying and verifying data of a smart device based on a block chain, which solves or partially solves the above problems.
In order to achieve the effect of the technical scheme, the technical scheme of the invention is as follows:
the method comprises the following three steps that firstly, a certificate storage platform is established, the certificate storage platform comprises a service module, a dispatching packet, a block chain module and a node network system, and the service module is used for serving a user and is responsible for collecting and storing service data of intelligent equipment; the node network system comprises all nodes served in the evidence storage platform, and the nodes are responsible for carrying out specific service on the business on the evidence storage module; the dispatch packet is responsible for assisting the service module to store data into the block chain module; the block chain module is internally provided with a block chain, the block chain module provides specific certificate storage and verification services, the block chain is used for storing data to be stored on all certificate storage platforms, and the block chain is divided into a main chain and a side chain; secondly, carrying out a certificate storing process on a certificate storing platform; thirdly, carrying out a verification process on a certificate storage platform;
wherein, the certificate storing process of the second step is as follows:
d. the service module starts to collect service data of the intelligent equipment and represents the service data of the intelligent equipment;
the service data of the intelligent equipment consists of key items and key item values, and the service data of the intelligent equipment is used for representing the data stored on each intelligent equipment; the key items are used for representing names of specific indexes of the intelligent equipment, the key items comprise order IDs, order transaction amounts and order transaction numbers, on the evidence storage platform, an administrator uses a combination of capital letters and small letters to represent the key items, the capital letters and small letters are not distinguished in the representation, and the initial letters of the specified key items are different; the key item value is a specific numerical value of a specific index represented by the key item, and the key item value comprises a specific numerical value of the order transaction amount and a specific numerical value of the order transaction quantity; the ID of the order is a first key item of the service data of the intelligent equipment; the order ID is specified to be unique and consists of D numbers, and D is a natural number and is determined by an administrator, and the number of D can be increased as required; the order ID is finally converted into a binary system to be expressed; key item values in the service data of the intelligent equipment are sorted according to the sequence of the key items, and a representation method of the key item values is set; the unit of the order transaction amount is uniformly specified by an administrator of the evidence storage platform;
the key term values are expressed as follows:
the specific numerical value of the order deal amount adopts an advanced real number representation method, and the advanced real number representation method adopts M as the specific numerical value of the order deal amountdRepresented by a binary bit, MdThe number is a natural number not exceeding 32, d represents the grade represented by the progressive real number representation, d is less than or equal to 3, d is equal to 0 by default and is a natural number, and M is the binary digit represented by the key item value by adopting the progressive real number representation; for each level d, M represented by the progressive real number representationdThe larger the value of the level d, the more MdThe greater the value of (d), the more specifically the number of digits M per level d is specified by the administrator of the credentialing platformd;MdEach binary digit consists of a scale digit followed by a numerical digit, the scale digit being MdThe first four bits of a binary bit, the numerical bit being MdThe remaining bits of the binary digits, excluding the first four bits of the size digits, are used for specifically representing specific numerical values of the order deal amount; the scale bit is composed of a grade bit and a ladder bit, and the scale bit is used for limiting the number of bits of a specific numerical value representing the order transaction amount and the represented scale; the first two digits of the scale bit are the level bit, the value of the level bit is converted into decimal equal to d, i.e. equalThe level bit is used for representing the level represented by the real number representation of the advanced order; the last two of the gauge positions being stepped positions, i.e. MdThe third bit and the fourth bit in the binary digits are used as step digits, the step digits are natural numbers, the numerical value of each step digit is less than or equal to 3, the step digits are used for representing the step value when the specific numerical value of the order deal amount adopts an advanced real number representation method, the step value is equal to the quotient obtained by dividing the integer part of the specific numerical value of the order deal amount by the maximum numerical value represented by the integer part and then is rounded, and the step value is used for representing the scale when the numerical value of the order deal amount adopts the advanced real number representation method; the numerical digits comprise decimal digits and integer digits, the decimal digits are front, the integer digits are back, the decimal digits have a fixed digit h, the value of h is determined by an administrator, h is a positive integer, and the value of h is not more than 8; the decimal place is used for expressing that the decimal part in the specific numerical value of the order transaction amount is converted into a binary numerical value, the value of the decimal place is equal to zero before the decimal place after the decimal place is placed, and then the obtained number is converted into a decimal value; the integer number is used for expressing the integer part of the concrete numerical value of the order transaction amount and converting the integer part into a binary numerical value; the digit of the integer digit is the digit left by subtracting the digit h of the decimal place from the numerical digit, the integer digit is divided into an effective numerical digit and a step digit, the effective numerical digit is in front, the step digit is in back, the value represented by the integer digit is equal to the product of the value represented by the effective numerical digit and the step digit, and the sum is obtained by adding the minimum transaction amount of the order; the minimum transaction amount of the order is the minimum transaction amount of each order specified by the evidence storage platform, and the minimum transaction amount is specified as an integer; the effective value bit is used for representing the value in the integer bit, the effective value bit is calculated by subtracting the difference of the minimum transaction amount of the order from the specific value of the transaction amount of the order, subtracting one from the difference, converting the subtracted result into a binary system, and naming the binary system as the effective representation bit, the effective representation bit is used for representing the form of the effective value bit before format adjustment, and the format adjustment process of the effective representation bit is that redundant bits of a plurality of bits after the effective representation bit are removed or 0 is added behind the effective representation bit for representing (M)d-4-h) binary bits as significant digits; the significand bit represents a value equal to the significand bit placed after the decimal pointBefore the decimal point, the number is equal to 1, and then the obtained number is converted into a decimal value; the code bit is used for the code corresponding to the value represented by the effective numerical value, the code bit is converted into decimal from binary system and named as code value J, the code value is the numerical value when the code value is decimal, and the code is equal to 2J(ii) a The number of the effective numerical value bits and the number of the order code bits are determined by an administrator; the maximum value represented by an integer bit is calculated as a value represented by the integer part calculated when the significant value bit of the integer bit and the bit of the order bit are both equal to 1;
when the integral part of the specific numerical value of the order deal amount is less than or equal to the maximum numerical value represented by the integral digit, the numerical value of the step digit is equal to 00 by adopting an advanced real number representation method, and the specific numerical value of the order deal amount is directly represented by using the representation method of the advanced real number representation method;
when the integral part of the specific numerical value of the order deal amount is larger than the maximum numerical value represented by the integer digit, the specific numerical value of the order deal amount is smaller than or equal to four times of the maximum numerical value represented by the integer digit and the sum of the numerical values of the decimal digits when all the numerical digits are 1, the value of the step position in the advanced real number representation method is equal to the quotient obtained by dividing the specific numerical value of the order deal amount by the maximum numerical value represented by the integer digit and then rounding, the integral part of the specific numerical value of the order deal amount is divided by the maximum numerical value represented by the integer digit to obtain the remainder, and the value of the decimal digits when all the numerical digits are 1 is added, the obtained sum is re-assigned to the specific numerical value of the order deal amount, and then the advanced real number representation method is adopted;
defining an upper limit value S when the specific value of the order-deal amount is greater than four times the maximum value represented by the integer digits plus the sum of the values of the decimal places when all the decimal places are 1dUpper limit value SdFor recording the sum of four times the maximum value represented by the integer bits plus the value of the decimal bits all 1 hour when the values of the levels d represented by the real number representation of the order differ, S0、S1、S2、S3Respectively representing the sum of four times of the maximum value represented by the integer digits when the grade d is equal to 0, d is equal to 1, d is equal to 2 and d is equal to 3 plus the value of the decimal digit when the decimal digits are all 1Upper limit value S when d is equal to 1, 2 and 31、S2、S3The calculation method is the same, and the difference is MdThe number of bits represented is different; respectively calculating S by the service module0、S0+S1、S0+S1+S2、 S0+S1+S2+S3The order is compared according to the sequence, and the sequence comparison process is that when the specific value of the order transaction amount is greater than S0+S1+S2+S3When the sum exceeds the representation range of the real number representation of the progress order, the sum cannot be represented, and when the specific value of the order-making sum is more than or equal to S0+S1+S2Subtracting S from the specific value of the order deal amount0+S1+S2Re-assigning the difference to a specific value of the order settlement amount, and meanwhile, enabling d to be equal to 3; when the specific value of the order transaction amount is more than or equal to S0+S1Subtracting S from the specific value of the order deal amount0+S1Re-assigning the difference to a specific value of the order transaction amount, and meanwhile, enabling d to be equal to 2; when the specific value of the order transaction amount is larger than S0The specific value of the order deal amount is equal to the specific value of the order deal amount minus S0Re-assigning the difference to a specific value of the transaction amount of the order, and meanwhile, enabling d to be equal to 1; then, after the specific numerical value of the order deal amount is compared, expressing the specific numerical value by adopting an advanced real number expression method;
the representation of the amount of order deals is realized by carrying out scale reduction on the basis of an advanced real number representation method, namely MdThe number of bits contained in each binary system is reduced, the proportional reduction process is that a user provides a guide unit price, the guide unit price is equal to the average value of unit prices of previous historical deals represented by an advanced real number representation, and the unit prices of the historical deals are divided into positive integers by four or five when the average value is obtained; m in the progressive real number representationdDividing the integer number of the integer number in the numerical digit by the quotient integer obtained by the unit price guide to obtain the integer number as the number of the integer number in the scaled-down progressive real number representation, and scaling down the progressive numberThe other parts of the order real number representation method are the same as the rules of the order real number representation method; the progressive real number representation after the scale reduction is consistent with the progressive real number representation adopted by the order deal amount, and the difference is that the number of digits of the integer part in the numerical digits in the progressive real number representation after the scale reduction is reduced;
the storage format of the service data of the intelligent equipment in the evidence storage platform is represented as the representation of key items and the representation splicing of key item values, the splicing method comprises the steps of sequencing the key items contained in the service data of the intelligent equipment, a sequencing counter is arranged in a service module and used for sequencing the key items in the service data of the intelligent equipment according to the lexicographic sequence of the initial letters of the representation of capital and small letters represented by the key items and classifying the service data of the intelligent equipment, and the sequencing counter does not distinguish large letters from small letters when sequencing; splicing according to the sequence of the key items after sequencing, splicing the key items in the front sequence, and splicing the key items in the back sequence; the splicing method comprises the steps that an equal sign is added between a key item and a key item value corresponding to the key item by a service module, the key item value and the next key item are spliced by using a symbol, the splicing arrangement sequence is arranged according to the dictionary sequence of the first letter of the key item, wherein the equal sign and the symbol are expressed by using an ASII code; the service module carries out representation conversion on the storage format of the service data of the intelligent equipment by using a UTF-8 mode, the converted storage format of the service data of the intelligent equipment is named as a conversion stream, the conversion stream is used for representing binary characters of the storage format of the service data of the intelligent equipment after the UTF-8 mode conversion, and finally the conversion stream is subjected to hash encryption through sha3-256 to obtain a hash-encrypted conversion stream;
e. setting a node network system to prepare for storing the service data of the intelligent equipment on a block chain system;
before the node network system is set, the sorting counter classifies the storage formats of the service data of the intelligent equipment, the service data of the intelligent equipment of the same type are placed in a service pool, the storage format of the service data of the intelligent equipment is the storage format of the service data of the intelligent equipment containing the same key items, and the service pool is a storage space for placing the service data of the intelligent equipment of the same type; the service module divides the service pool into measurement grids, the capacity of one measurement grid is equal to the capacity of one block in the block chain, the measurement grids are used for measuring the size of the storage amount of the service data of the received intelligent equipment, the storage format of the service data of the intelligent equipment is placed into the measurement grids, and when one measurement grid is full, the measurement grids are placed into another measurement grid in the same service pool;
setting a node network system, wherein the node network system consists of more than one node sub-network, the node sub-network comprises more than one node, each node sub-network corresponds to the service data of one intelligent device, and the service data of each intelligent device is served by the node in one node sub-network; the number of the node sub-networks is one more than the types of the service data of the intelligent equipment, the nodes in one more node sub-network are used as service nodes, and the service nodes serve the inquiry process; each node sub-network corresponds to one service pool, the sequencing counter counts the number of full measurement grids stored in each service pool during each tenure period, and the tenure period is used for representing a time period in which the leader node has authority in the node sub-network; if the number of the full measurement lattices stored in the service pool corresponding to the node sub-network in the last optional period exceeds the limit C but is less than 120% of the limit C, selecting two leader nodes by election in the node sub-network in the current optional period, and if the number of the full measurement lattices stored in the service pool corresponding to the node sub-network in the last optional period is more than or equal to 120% of the limit C, selecting three leader nodes by election in the node sub-network in the current optional period; wherein, the limit C is a natural number not exceeding 100 and is determined by an administrator, and the limit C is used for setting the number of leader nodes in each node sub-network and the end of the tenure; if the node is the first optional period, each node sub-network selects two leader nodes through election, the leader node in each node sub-network is used for communicating with nodes in other node sub-networks, and the communication result is broadcasted to the nodes in the same node sub-network; setting the tenure of the leader node in the node sub-network to be that after the first tenure begins to run for the evidence storage platform and the rest of the tenure except the first tenure begins to run after the last tenure ends and the leader node is selected in the node sub-network, the number of the full measurement grids stored in the service pool with the tenure ending more than 50% exceeds the limit C; each node sub-network is provided with a common account which is used for placing a common required fuel volume in the node sub-network; the fuel rolls are used for paying a fund substitution roll for the transaction required by the calling of the intelligent contract by the nodes in the node sub-network, each fuel roll has a unit price which is used as the price represented by each fuel roll, the unit price of the fuel roll changes along with time, and the unit price of the fuel roll is specified by an administrator in real time;
in each optional period, all nodes except the leader node in one node sub-network are responsible for receiving the conversion flow subjected to hash encryption, and the nodes in each node sub-network only receive the conversion flow subjected to hash encryption converted by the storage format of the service data of the corresponding intelligent equipment of the specified type; all the other nodes except the leader node in the node subnet are named as nodes participating in election so as to participate in election of the leader node in the next free period; when nodes participating in election receive the conversion flow after Hash encryption, the nodes start to be transferred from a common state to an election state; the common state is used for collectively indicating the state of the nodes participating in the election before the election, and the election state is used for indicating the state that the nodes participating in the election can participate in the election; the node sub-network establishes an intermediate state between a common state and a competition state, wherein the intermediate state comprises an intermediate state 1, an intermediate state 2, an intermediate state 3, an intermediate state N, the intermediate state is used for recording a state which represents that nodes participating in the competition reach the competition state before the common state, the intermediate state 1, the intermediate state 2 and the intermediate state 3 are used, the intermediate state N is respectively and sequentially used for representing a state that the nodes participating in the competition are sequentially transferred and transited from the common state to the competition state, and the value of N is determined by an administrator of a storage platform and is a natural number not exceeding 10; when the node participating in the election receives the accumulated conversion flow after the Hash encryption and exceeds one election capacity, the node participating in the election starts to transfer the state, and the election capacity is a unit defined by an administrator and used for measuring the size of the data of the conversion flow after the Hash encryption is received; each time the nodes participating in the election receive and accumulate one election capacity, if the nodes participating in the election are in the ordinary state, the ordinary state is changed into the intermediate state 1, if the nodes participating in the election are in the intermediate state e, e is a natural number smaller than N, the nodes participating in the election are changed into the intermediate state e +1 from the intermediate state e, and if the nodes participating in the election are in the intermediate state N, the nodes participating in the election are changed into the election state; starting the election after each optional period, wherein all nodes in the election state can formally participate in the election, the block chain module generates and adds blocks on the main chain, and the blocks to be added into the main chain are blocks to be added in preparation; after the election is started, the election time is started, wherein the election time is the time for adding the transaction in the block to be added by the nodes which participate in the election formally;
all nodes in the election state can add transactions in the block to be added in the election time, a sender of the transactions is an account of the node in the election state, a receiver of the transactions is a public account of a node sub-network in which the node in the election state is located, the contents of the transactions are null, after the transactions are successfully added, the hash value of the transactions is returned, the contents in the block to be added are invisible to all the nodes in the election time, when the election time is over, the contents in the block to be added are visible to all the nodes, all the nodes check the contents in the block to be added, the nodes in which the transactions are placed in the block to be added are voted, more than half of voted nodes are won for election, and otherwise, the original leader node is still used in the next optional period; if no node election exists, the original leader node in the last optional period is directly used without starting election time; after the node winning the election is determined, a consensus is achieved, the result of the election is written into the block to be added and is positively added to the main chain, and all the nodes can be seen after the election is added; finally, all nodes return to the normal state;
f. the node sub-networks store data into the block chain module by using the dispatch packets;
the dispatching package stores a calling private key, the calling private key is used for checking the authority of calling the storage contract, and each appointment of the calling private key is replaced; the storage contract is a prewritten intelligent contract used for storing data; each dispatching package is provided with more than one calling interface, each calling interface is provided with a fixed account, and the fixed accounts are locked before the calling interfaces are used; the fixed account of the calling interface is used for receiving a fuel volume required by transaction during storage after unlocking and starting the storage contract during calling the storage contract; the calling interface is used for providing an interface of the storage contract when the storage contract is called, and the storage contract is used and is called through the calling interface; nodes in the node sub-networks receive the switching flow obtained by the service data of the same intelligent equipment after hash encryption, a sharing process is started in the same node sub-network by default, all nodes in the node sub-networks share the received switching flow after hash encryption in the sharing process, and the sharing of the received switching flow after hash encryption is named as network sharing data; the sharing process is a process of sharing the received network sharing data by the nodes in the node sub-network; the blockchain module specifies a contract time t1Contract time t1The length of a time period reserved for each node sub-network and used for receiving data needing to be stored is about for each storage contract, and the unit of the contract time is uniformly specified by an administrator;
starting timing of the shared process from the first node sub-network, the length of timing being the contract time t1If the time length of the timing is reached, the size of the network sharing data generated by one node sub-network does not exceed one contract capacity, then the data of the switching stream after the node sharing hash encryption in one node sub-network are all used as the data needing to be integrated; if the network sharing data generated by one node sub-network exceeds a contract capacity, the network sharing data generated by one node sub-network is packaged in advance according to the size of the contract capacity and is packaged into the size of the contract capacity, and the residual redundant data is packaged to be used as data needing to be integrated; the contract capacity being the number that can be placed in a storage contractThe maximum capacity according to; integrating the data to be integrated of each node sub-network with leader nodes in other node sub-networks with the data to be integrated by the leader nodes of the node sub-networks, and performing an integration process; the integration procedure is to start the shared procedure of the first node sub-network to a contract time t1Within the time length of the node sub-network, the data which needs to be integrated by all the node sub-networks are packed into data with individual contract capacity, the data with the contract capacity is packed into packets, the data belonging to the same node sub-network is placed in one packet, and an address switching instruction is added into the packet; the address switching instruction is used for storing the data with a contract capacity into different specified side chains after starting the storage contract according to different sub-networks of the nodes providing the data; the address switching instruction marks the number of the side chain, and after a storage contract is started, the data of the packet where the address switching instruction is located is stored into the side chain corresponding to the number of the side chain;
each side chain is specified to be responsible for recording data of one node sub-network, the side chains correspond to one node sub-network and business data of one type of intelligent equipment, and the block chain module is used for numbering each side chain so as to distinguish different side chains; in the packing process, packed data with a contract capacity belongs to the same node sub-network without adding an address switching instruction, and packed data with a contract capacity belongs to different node sub-networks and is packed into small packets in the contract data, and the address switching instruction is added into the small packets; packaging the residual data which is not enough for one contract capacity and is also used as the data of one contract capacity, and packaging the data into a packet; all data packed as a contract capacity is named as contract data, and the contract data is data for which a storage contract is responsible for storage; when packing, the data of the same node sub-network is placed in the same contract data, if the residual space in the contract data is not enough, the data is placed in the next contract data; the contract capacity is the maximum capacity of data which can be placed in a storage contract, and the address switching instruction is not counted in the calculation of the contract capacity;
the data of contract capacity formed by packaging network sharing data generated by a node sub-network and the data of contract capacity formed by integrating and packaging are transferred to a storage contract and stored in a block chain module; the storage contract needs to be called through a calling interface, a calling private key is obtained from a dispatching package, a fixed account configured by the calling interface is unlocked immediately after calling, and then the storage contract is executed for storage; the first parameter in the input parameters of the storage contract is the address of a fixed account configured by a calling interface, and when the fixed account is called, the fixed account is automatically written according to the called calling interface; when the data required to be stored for storing the contract is the data of contract capacity formed by packaging the network sharing data generated by one node sub-network, namely the data required to be stored for storing the contract comes from the same node sub-network, the second parameter of the input parameter of the storage contract is the account address of the common account of the node sub-network providing the data; when the data required to be stored by the storage contract is the data of contract capacity formed by integration and packaging, namely the data required to be stored by the storage contract comes from different node sub-networks, one leader node is designated by the management node to be responsible for initiating the storage contract in all the leader nodes participating in the integration, and the second parameter of the input parameter of the storage contract is the account address of the leader node responsible for initiating the storage contract; executing a storage contract to finish storage, carrying out mining to finish transaction, unlocking the packed data, and directly storing the data to be stored into a side chain corresponding to a node sub-network providing the data if the address switching instruction is not included; if the packet contains the address switching instruction, executing the address switching instruction in the packed packet, and storing the data in the packet into the corresponding side chain; after the execution of the storage contract is successful, returning to the transaction hash; after the transaction is completed, deducting the fuel volume in the account address in the second parameter of the input parameter for storing the contract, and sending the deducted fuel volume to the account address in the first parameter of the input parameter for storing the contract; broadcasting, by a leader node in a node subnetwork providing data stored by the storage contract, a result of the execution to the remaining nodes in the node subnetwork when the storage contract is successfully invoked for execution;
the verification process on the certificate storage platform in the third step is as follows:
dispatching the package and providing an inquiry interface at the same time, wherein the inquiry interface only allows the service node to use, the service node calls a transaction inquiry function on the side chain, and the transaction inquiry function can inquire the data stored on the side chain and compare the data; the service node receives service data of the intelligent equipment needing to be compared, which is provided by a user, represents the service data according to a method for representing the service data of the intelligent equipment by a service module, then inputs the service data into a transaction query function, searches a side chain corresponding to the service data of the intelligent equipment of the same type as the service data of the intelligent equipment needing to be compared, queries the searched side chain, returns true if the comparison result is the same, otherwise, returns false
The beneficial results of the invention are: the invention has proposed a deposit certificate and verification method based on intellectual apparatus data of the block chain, the invention on the representation of the data, has adopted the representation method of the double ladder, on the basis of saving the figure, can represent the bigger data; the administrator has the right to specify the number of bits represented therein to reduce the number of augmented bits as needed; before the process of evidence saving, nodes in a node network system are set in advance to serve data storage on a block chain module, and an election mechanism of a leader node is set; in the process of storing the certificate, fully transferring resources so as to call a storage contract to store more data each time; and finally, setting a data query method.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more apparent, the present invention is described in detail below with reference to the embodiments. It should be noted that the specific embodiments described herein are only for illustrating the present invention and are not to be construed as limiting the present invention, and products for realizing the same functions are included in the scope of the present invention by equivalent substitution and modification.
Example 1: the order ID is formed by splicing the ID of the intelligent equipment and the sequence number of the order stored on the intelligent equipment, the sequence number of the order of the user is the positive integer sequence number of the order on each intelligent equipment, the ID of the intelligent equipment is M, M is a positive integer, the value of M is less than D, and the sequence number of the order stored on the intelligent equipment starts from (D-M) 0;
data in the contract data is stored in a dynamic linear mode, namely the data are arranged according to the service data of one piece of intelligent equipment no matter the size of the service data of each piece of intelligent equipment; the number of the fuel volumes deducted in the calling execution of the storage contract is uniformly specified by an administrator to be written into the storage contract in advance;
and (3) certificate storage process:
1. the target service system, also called a service module, acquires key service data, such as order ID, order amount, charging amount and the like, organizes and codes the key service data according to a certain rule, and then generates a byte stream. A hash of the byte stream is calculated.
A web3SDK (name can be changed arbitrarily) runs in the target service system, device, where the private key of the target service system is stored. The web3SDK invokes a proof of presence smart contract on the blockchain using the saved private key.
3. After receiving the intelligent contract calling transaction, the block chain nodes broadcast the transaction to all the nodes after consensus. And simultaneously returning the hash value of the transaction.
And (3) verification flow:
1. and acquiring the original input data of the transaction, the time of the transaction, the sender of the transaction and the height of the block where the transaction is located from the distributed database of the block chain through the transaction hash.
2. The input of the transaction is deserialized according to the rules as: "transaction input". If the transaction input is equal to the hash of the key data in the step 1 of the certificate storing process, the verification is successful, and the certificate storing process indicates that the certificate is stored; if not, the evidence does not exist;
in the aspect of technical development, with the rapid development of energy internet technology, the trend of fusion development of energy flow, information flow and financial flow in the energy internet is obvious, and a new generation internet technology represented by a block chain technology has become a research hotspot in the field of energy internet. The blockchain is a data structure which takes a cryptographic correlation algorithm as a basis and uniformly organizes and maintains a large amount of data in a decentralized mode through a consensus algorithm and a P2P network. The advantages of decentralized interaction, difficulty in falsification, convenience in tracing, encrypted communication and the like of the block chain technology are matched with the characteristics of equal participation main bodies, transaction disclosure, mutual help and sharing, safety and reliability and the like of the energy internet exchange, so that the corresponding technology of the block chain is applied to the energy internet, and the development of the energy internet can be greatly promoted.
Example 2: the energy is a fundamental stone on which the human society lives and develops, and is a power for maintaining the stable operation of the economic society, and the existing energy system is a complex system of distributed energy such as solar energy, wind energy, geothermal energy and the like on the basis of fossil energy. With the gradual depletion of fossil energy and the continuous deterioration of ecological environment, distributed energy must become an indispensable part of future energy systems. Some scholars try to introduce more distributed energy into the existing energy system by combining the electronic information technology with the distributed energy technology and integrate multiple energy systems, and the energy internet is proposed. The energy internet related concept is introduced in the book of the third industrial revolution for the first time, and the method advocates that on the basis of combining an electronic information technology and a new energy technology, distributed renewable energy is used as main primary energy, and the distributed renewable energy is tightly combined with other energy system systems such as an air network, a heat network and the like to form a complex multi-network flow system.
Compared with the traditional power grid, the energy Internet relates to more general participating bodies and wider energy forms, and more diversified information interaction modes are added on the basis. In the form of energy, the energy interconnection network not only comprises a power grid, but also comprises various renewable energy sources including solar energy, wind energy, geothermal energy and fuel cells, and traditional energy networks such as a heat supply network and an air network. On the participating subjects, the energy internet not only covers the traditional links involved in the production and use of electricity energy such as 'sending, delivering, distributing and using', but also introduces a plurality of participating subjects such as agents providing electricity purchasing services, operators providing basic platforms and contractors providing value-added services. In addition, point-to-point ubiquitous interaction is also an indispensable or scarce mark in the energy Internet, and decentralized interaction can greatly improve the utilization efficiency of the whole energy system. The above features of the energy interconnection network not only increase the overall system complexity, but also present a series of challenges to the achievement of mutual trust among diverse participants.
Since anonymous interaction between participating principals is required through peer-to-peer network and other schemes, features such as 'precise metering, optimized collaboration, autonomous interaction' advocated by the energy internet must be achieved under the condition that wide consensus and trust exist between participating principals. Therefore, a technical scheme which can quickly and conveniently construct decentralized applications and can support trusted interaction at low cost is urgently needed. The advantages of decentralization interaction, difficulty in falsification, convenience in tracing, encryption communication and the like of the block chain technology are matched with the characteristics of equal participation main bodies, transaction disclosure, mutual help and sharing, safety and reliability and the like of the energy internet exchange, so that the block chain technology can be applied to the energy internet. The distributed transaction characteristic of the block chain technology allows a user to manage mutual interaction between energy internet participation main bodies, and multiple energy transaction systems are prevented from being reestablished. In addition, the characteristics of decentralization, data collective maintenance, programmability, high safety and the like of the block chain can further ensure the stable, safe and efficient operation of the distributed energy system, and the rapid and healthy development of intelligent electricity utilization new services in the energy interconnection network and the open market can be powerfully promoted.
Most of the existing energy source block chain researches focus on building DAPP (application data protocol) rich in energy special colors on an open source block chain platform, and a power system is connected with the block chain platform in series through distributed application. However, the energy scenario is different from the financial scenario addressed by the traditional blockchain platform, which is limited by physical links and electric energy suppliers, and the traditional blockchain platform is difficult to customize according to the characteristics of the traditional blockchain platform.
The above description is only for the preferred embodiment of the present invention, and should not be used to limit the scope of the claims of the present invention. While the foregoing description will be understood and appreciated by those skilled in the relevant art, other equivalents may be made thereto without departing from the scope of the claims.

Claims (1)

1. A method for storing and verifying intelligent equipment data based on a block chain is characterized by comprising the following steps:
the certificate storing and verifying method comprises three steps, wherein in the first step, a certificate storing platform is established in the method, the certificate storing platform comprises a service module, a dispatching package, a block chain module and a node network system, and the service module is used for serving a user and is responsible for collecting and storing service data of intelligent equipment; the node network system comprises all nodes served in the evidence storage platform, and the nodes are responsible for specifically serving the services on the evidence storage module; the dispatch packet is responsible for assisting the business module to store data into the blockchain module; the block chain module is internally provided with a block chain, the block chain module provides specific certificate storage and verification services, the block chain is used for storing data to be stored on all certificate storage platforms, and the block chain is divided into a main chain and a side chain; secondly, carrying out a certificate storing process on the certificate storing platform; thirdly, carrying out a verification process on the certificate storage platform;
wherein, the certificate storing process of the second step is as follows:
a. the service module starts to collect service data of the intelligent equipment and represents the service data of the intelligent equipment;
the service data of the intelligent equipment consists of key items and key item values, and the service data of the intelligent equipment is used for representing the data stored on each intelligent equipment; the key items are used for representing names of specific indexes of the intelligent equipment, the key items comprise order IDs, order transaction amounts and order transaction quantities, on the evidence storage platform, an administrator represents the key items by using a combination of capital letters and small letters, the capital letters in the representation are not distinguished, and initial letters of the key items are specified to be different; the key item value is a specific numerical value of a specific index represented by a key item, and the key item value comprises a specific numerical value of an order deal amount and a specific numerical value of an order deal quantity; the ID of the order is a first key item of the service data of the intelligent equipment; the order ID is specified to be unique and consists of D numbers, wherein D is a natural number and is determined by an administrator, and the number of D can be increased according to the requirement; the order ID is finally converted into a binary system to be expressed; key item values in the service data of the intelligent equipment are sorted according to the sequence of the key items, and a representation method of the key item values is set; the unit of the order transaction amount is uniformly specified by an administrator of the evidence storage platform;
the key term value is expressed as follows:
the specific numerical value of the order deal amount adopts an advanced real number representation method, and the advanced real number representation method is characterized in that the specific numerical value of the order deal amount uses MdRepresented by a binary bit, MdD is a natural number not exceeding 32, represents the grade represented by the progressive real number representation, d is less than or equal to 3, d is equal to 0 by default and is a natural number, and M is the binary digit of the key item value represented by the progressive real number representation; for each of said levels d, M represented by said progressive real number representationdThe larger the value of the level d, the more MdThe greater the value of (d), the more specifically the number of digits M per level d is specified by the administrator of the credentialing platformd;MdEach binary digit consists of a scale digit and a numerical digit, the scale digit is at the front and the numerical digit is at the back, and the scale digit is MdThe first four bits of binary bit, the value bit is MdThe remaining bits of the binary digits except the first four bits of the size digits are used for specifically representing specific numerical values of the order transaction amount; the scale bit is composed of a grade bit and a step bit, and the scale bit is used for limiting the number of bits of a specific numerical value representing the order deal amount and the scale represented; the first two digits of the scale bit are level bits, the value of the level bits is converted into decimal and is equal to d, namely the level bits are used for representing the level represented by the progressive real number representation; the last two of the gauge positionsThe bit being a stepped bit, i.e. MdThe third bit and the fourth bit in the binary digits are used as step positions, the step positions are natural numbers, the numerical values of the step positions are less than or equal to 3, the step positions are used for representing step values when the specific numerical values of the order deal amount adopt the step real number representation method, the step values are equal to quotient obtained by dividing the integer part of the specific numerical values of the order deal amount by the maximum numerical value represented by the integer part and then rounding, and the step values are used for the scale represented when the numerical values of the order deal amount adopt the step real number representation method; the numerical digits comprise decimal digits and integer digits, the decimal digits are front, the integer digits are rear, the decimal digits have a fixed digit number h, the value of h is determined by an administrator, h is a positive integer, and the value of h is not more than 8; the decimal place is used for converting the decimal part in the specific numerical value of the order transaction amount into a binary numerical value, the value of the decimal place is equal to zero before the decimal place after the decimal place is placed, and then the obtained number is converted into a decimal value; the integer number is used for converting an integer part of a specific numerical value representing the order transaction amount into a binary numerical value; the digit of the integer digit is the digit left by subtracting the digit h of the decimal place from the numerical digit, the integer digit is divided into an effective numerical digit and a code digit, the effective numerical digit is in front, the code digit is in back, and the value represented by the integer digit is equal to the product of the value represented by the effective numerical digit multiplied by the code digit and added with the sum of the minimum transaction amount of the order; the minimum transaction amount of the order is the minimum transaction amount of each order specified by the evidence storage platform, and the minimum transaction amount is specified as an integer; the effective value bit is used for representing the value in the integer bit, the effective value bit is calculated by subtracting the difference of the minimum transaction amount of the order from the specific value of the transaction amount of the order, subtracting one value from the specific value of the transaction amount of the order, converting the result into a binary system, and naming the binary system as the effective representation bit, the effective representation bit is used for representing the form of the effective value bit before format adjustment, and the format adjustment process of the effective representation bit is that redundant bits of a plurality of bits after the effective representation bit are removed or 0 is added behind the effective representation bit to represent the result (M is represented by (M is)d-4-h) twoA carry bit as a valid value bit; the value represented by the significant digit is equal to the value obtained by placing the significant digit after the decimal point and before the decimal point equal to 1, and then converting the obtained number into a decimal number; the code bit is used for the code corresponding to the value represented by the effective numerical value, the code bit is converted into decimal from binary and is named as code value J, the code value is the numerical value when the code value is decimal, and the code is equal to 2J(ii) a The number of the effective numerical value bits and the number of the order code bits are determined by an administrator; the maximum value represented by an integer bit is calculated as a value represented by the integer part calculated when the significant value bit of the integer bit and the bit of the order bit are both equal to 1;
when the integral part of the specific numerical value of the order deal amount is less than or equal to the maximum numerical value represented by the integral digit, the numerical value of the step is equal to 00 when the progressive real number representation method is adopted, and the specific numerical value of the order deal amount is directly represented by the representation method of the progressive real number representation method;
when the integral part of the specific numerical value of the order deal amount is larger than the maximum numerical value represented by the integer digit, and the specific numerical value of the order deal amount is less than or equal to four times of the maximum numerical value represented by the integer digit plus the sum of the numerical values of the decimal digits when all the numerical digits are 1, the value of the step in the progressive real number representation method is equal to the quotient obtained by dividing the specific numerical value of the order deal amount by the maximum numerical value represented by the integer digit and then rounded, the integral part of the specific numerical value of the order deal amount is divided by the maximum numerical value represented by the integer digit to obtain a remainder, and the value of the decimal digit plus the value when all the numerical digits are 1, the obtained sum is re-assigned to the specific numerical value of the order deal amount, and then the progressive real number representation method is adopted;
when the specific value of the order transaction amount is more than four times of the maximum value represented by the integer digits and the sum of the values of the decimal places is 1, defining an upper limit value SdUpper limit value SdFor recording the sum of four times the maximum value represented by the integer digits when the values of the levels d represented by said advanced real number representation differ by four times the value of said decimal digit when all the decimal digits are 1, S0、S1、S2、S3Respectively representing the sum of four times of the maximum value represented by the integer digits when the grade d is equal to 0, d is equal to 1, d is equal to 2 and d is equal to 3 and the value of the decimal digit when all the decimal digits are 1, and respectively calculating the upper limit value S when d is equal to 1, 2 and 31、S2、S3The calculation method is the same, and the difference is MdThe number of bits represented is different; the service modules respectively calculate S0、S0+S1、S0+S1+S2、S0+S1+S2+S3Comparing according to the sequence, wherein the sequence comparison process is that when the specific numerical value of the order transaction amount is greater than S0+S1+S2+S3When the sum exceeds the representation range of the progressive real number representation method, the sum cannot be represented, and when the specific numerical value of the order transaction amount is more than or equal to S0+S1+S2Subtracting S from the specific value of the order deal amount0+S1+S2Re-assigning the difference to a specific value of the transaction amount of the order, and meanwhile, enabling d to be equal to 3; when the specific numerical value of the order transaction amount is more than or equal to S0+S1Subtracting S from the specific value of the order deal amount0+S1Re-assigning the difference to a specific value of the transaction amount of the order, and meanwhile, making d equal to 2; when the specific value of the order transaction amount is larger than S0The specific value of the order transaction amount is equal to the specific value of the order transaction amount minus S0Re-assigning the difference to a specific value of the transaction amount of the order, and meanwhile, making d equal to 1; then, after the specific numerical value of the order deal amount is compared, expressing the specific numerical value by adopting a progressive real number expression method;
the representation of the amount of the order deal is that the order deal is reduced in proportion on the basis of the progressive real number representation method, and the order deal is used as the progressive real number representation method after the order deal is reduced in proportion, namely M is representeddThe number of bits contained in each binary is reduced, and the reduction of the ratio is such that the user provides a guiding unit price equal to the guiding unit price by using the advanced real number representation methodThe average value of the unit prices of the previous historical deals is represented, and when the average value is obtained, the unit prices of the historical deals are rounded to be positive integers; m in the advanced real number representationdDividing the number of integer digits in the numerical digits by the quotient integer obtained by the guiding unit price to be used as the number of the integer digits in the progressive real number representation after the scaling reduction, wherein other parts of the progressive real number representation after the scaling reduction have the same rule with the progressive real number representation; the reduced real number representation of the progression is consistent with the real number representation of the progression adopted by the order deal amount, and the difference is that the number of digits of the integer part in the numerical digits in the reduced real number representation of the progression is reduced;
the storage format of the service data of the intelligent equipment in the evidence storage platform is represented by key items and the representation of key item values are spliced, the splicing method comprises the steps of firstly sequencing the key items contained in the service data of the intelligent equipment, the service module internally contains a sequencing counter, the sequencing counter is used for sequencing the key items in the service data of the intelligent equipment according to the lexicographic order of the initial letters represented by capital letters and small letters represented by the key items and classifying the service data of the intelligent equipment, and the sequencing counter does not distinguish capital and small letters when sequencing; splicing according to the sequence of the key items after sequencing, splicing the key items sequenced at the front, and then splicing the key items sequenced at the back; the splicing method is that an equal sign is added between a key item and a key item value corresponding to the key item by the service module, the key item value and the next key item are spliced by using a symbol, the splicing and arranging sequence is arranged according to the dictionary sequence of the first letter of the key item, wherein the equal sign and the symbol are expressed by using an ASII code; the service module performs representation conversion on the storage format of the service data of the intelligent equipment in a UTF-8 mode, the converted storage format of the service data of the intelligent equipment is named as a conversion stream, the conversion stream is used for representing a binary character of the storage format of the service data of the intelligent equipment after the UTF-8 mode conversion, and finally the conversion stream is encrypted through sha3-256 hash to obtain a hash-encrypted conversion stream;
b. setting the node network system to prepare for storing the service data of the intelligent equipment on the blockchain system;
before the node network system is set, the sorting counter classifies storage formats of the service data of the intelligent equipment, the service data of the intelligent equipment of the same type are placed in a service pool, the storage format of the service data of the intelligent equipment is the storage format of the service data of the intelligent equipment containing the same key items, and the service pool is a storage space for placing the service data of the intelligent equipment of the same type; the service module divides the service pool into measurement grids, the capacity of one measurement grid is equal to the capacity of one block in the block chain, the measurement grids are used for measuring the storage capacity of the service data of the received intelligent equipment, the storage format of the service data of the intelligent equipment is placed into the measurement grids, and when one measurement grid is full, the measurement grids are placed into another measurement grid in the same service pool;
setting the node network system, wherein the node network system is composed of more than one node sub-network, the node sub-network comprises more than one node, each node sub-network corresponds to the service data of one intelligent device, and the service data of each intelligent device is served by the node in one node sub-network; the number of the node sub-networks is one more than the types of the service data of the intelligent equipment, and the nodes in one more node sub-network are used as service nodes which serve the inquiry process; each node sub-network corresponds to one service pool, the sequencing counter counts the number of full measurement grids stored in each service pool in each tenure, and the tenure is used for representing a time period in which the leader node has authority in the node sub-network; if the number of the full measurement lattices stored in the service pool corresponding to the node sub-network in the last optional period exceeds the limit C but is less than 120% of the limit C, selecting two leader nodes by election by the node sub-network in the current optional period, and if the number of the full measurement lattices stored in the service pool corresponding to the node sub-network in the last optional period is more than or equal to 120% of the limit C, selecting three leader nodes by the node sub-network in the current optional period by election; the limit C is a natural number not exceeding 100 and is determined by an administrator, and is used for setting the number of leader nodes in each node sub-network and the end of an expiration date; if the node is the first optional period, each node sub-network selects two leader nodes through election, the leader node in each node sub-network is used for communicating with nodes in other node sub-networks, and the communication result is broadcasted to the nodes in the same node sub-network; setting the tenure of the leader node in the node sub-network to be that after the first tenure starts to run for the evidence storage platform, the start of the rest of the tenures except the first tenure is after the end of the last tenure and when the leader node is selected in the node sub-network, the number of the metrics stored in the service pool with the tenure ending more than 50% exceeds the limit C; and each node sub-network is provided with a common account which is used for placing the required fuel volume which is commonly used in the node sub-network; the fuel rolls are used for paying a fund-substituting roll for the transaction cost required by the calling of the intelligent contract by the nodes in the node sub-network, each fuel roll has a unit price which is used as the price represented by each fuel roll, the unit price of the fuel roll changes along with the time, and the unit price of the fuel roll is specified by an administrator in real time;
in each optional period, all nodes except the leader node in one node sub-network are responsible for receiving the conversion flow subjected to hash encryption, and the nodes in each node sub-network only receive the conversion flow subjected to hash encryption converted by the storage format of the service data of the corresponding intelligent equipment of the specified type; all the other nodes except the leader node in one node sub-network are named as nodes participating in election so as to participate in election of the leader node in the next period; when nodes participating in election receive the conversion flow after hash encryption, starting to transfer from a common state to an election state; the common state is used for collectively referring to the state of the nodes participating in the election before the election, and the election state is used for representing the state that the nodes participating in the election can participate in the election; the node sub-network establishes an intermediate state between a common state and a competition state, wherein the intermediate state comprises an intermediate state 1, an intermediate state 2, an intermediate state 3, and an intermediate state N, the intermediate state is used for recording a state which represents that nodes participating in the competition reach the competition state before the common state, the intermediate state 1, the intermediate state 2 and the intermediate state 3 are used for representing states of transition of the nodes participating in the competition from the common state to the competition state in sequence, and the value of N is determined by an administrator of the evidence storage platform and is a natural number not exceeding 10; when the node participating in the election receives the accumulated conversion flow after the Hash encryption and exceeds an election capacity, the node participating in the election starts the state transition, wherein the election capacity is a unit defined by an administrator and used for measuring the size of the data of the conversion flow after the Hash encryption is received; each time the nodes participating in the election receive and accumulate one election capacity, if the nodes participating in the election are in the ordinary state, the ordinary state is changed into the intermediate state 1, if the nodes participating in the election are in the intermediate state e, e is a natural number smaller than N, the nodes participating in the election are changed into the intermediate state e +1 from the intermediate state e, and if the nodes participating in the election are in the intermediate state N, the nodes participating in the election are changed into the election state; starting the election after each optional period, wherein all nodes in the election state can formally participate in the election, the block chain module generates and adds blocks on the main chain, and the blocks to be added into the main chain are blocks to be added in preparation; after the election is started, the election time is started, wherein the election time is the time for adding the transaction in a block to be added by nodes which participate in the election formally;
all nodes in the election state can add transactions in the block to be added in the election time, a sender of the transactions is an account of the node in the election state, a receiver of the transactions is a public account of a node sub-network where the node in the election state is located, the contents of the transactions are null, after the transactions are successfully added, the hash value of the transactions is returned, the contents in the block to be added are invisible to all the nodes in the election time, when the election time is over, the contents in the block to be added are visible to all the nodes, all the nodes check the contents in the block to be added, the nodes where the transactions are placed in the block to be added are voted, more than half of the voted nodes win election, and otherwise, the original leader node is still used in the next election period; if no node is selected for election, the original leader node in the last optional period is directly used without starting election time; after the node winning the election is determined, a consensus is achieved, the election result is written in the block to be added and formally added to the main chain, and all the nodes can be seen after the election result is added; finally, all nodes return to the normal state;
c. the node sub-networks store data into the block chain module by using the dispatch packets;
the dispatching package stores a calling private key, the calling private key is used for checking the authority of calling the storage contract, and the calling private key is replaced at each random period; the storage contract is a prewritten intelligent contract used for storing data; each dispatching package is provided with more than one calling interface, each calling interface is provided with a fixed account, and the fixed accounts are locked before the calling interfaces are used; the fixed account of the calling interface is used for receiving a fuel volume required by transaction during storage after unlocking and starting the storage contract during calling the storage contract; the calling interface is used for providing an interface of the storage contract when the storage contract is called, and the storage contract is used and must be called through the calling interface; the nodes in the node sub-networks receive the switching flow obtained by the service data of the same intelligent equipment after hash encryption, the sharing process is started in the same node sub-network by default, all the nodes in the node sub-networks share the received switching flow after hash encryption in the sharing process, and the sharing of the received switching flow after hash encryption is named as network sharing data; the sharing process is a process of sharing the received network sharing data by the nodes in the node sub-network; the blockchain module specifies a contract time t1Contract time t1The length of a time period reserved for each node sub-network and used for receiving data needing to be stored is regulated for each storage contract, and the unit of the contract time is uniformly specified by an administrator;
starting timing of sharing procedure from first node sub-network, timing time is longDegree is contract time t1If the time length of the timing is reached, the size of the network shared data generated by one node sub-network does not exceed a contract capacity, then the data of the switching flow after the node shared hash encryption in one node sub-network is all used as the data needing to be integrated; if the network sharing data generated by one node sub-network exceeds a contract capacity, the network sharing data generated by one node sub-network is packaged in advance according to the size of the contract capacity to form the size of the contract capacity, and the residual redundant data is packaged to be used as the data needing to be integrated; the contract capacity is a maximum capacity for storing data that can be placed in the contract; integrating the data to be integrated of each node sub-network with leader nodes in other node sub-networks with the data to be integrated by the leader nodes of the node sub-networks, and performing an integration process; the integration procedure is to start the shared procedure of the first node sub-network to a contract time t1Within the time length of the node sub-networks, data which need to be integrated by all the node sub-networks are packed into data with individual contract capacity, packets are packed in the data with the contract capacity, the data belonging to the same node sub-network are placed in one packet, and an address switching instruction is added into the packet; the address switching instruction is used for storing the data with a contract capacity into different specified side chains after starting a storage contract according to different node sub-networks providing the data; the address switching instruction marks the number of the side chain, and after a storage contract is started, the data of the small packet where the address switching instruction is located is stored into the side chain corresponding to the number of the side chain;
each side chain is specified to be responsible for recording data of one node sub-network, the data correspond to one node sub-network and the service data of one type of intelligent equipment, and the block chain module numbers each side chain to distinguish different side chains; in the packing process, packed data with a contract capacity belongs to the same node sub-network without adding an address switching instruction, and packed data with a contract capacity belongs to different node sub-networks and is packed into small packets in the contract data, and the address switching instruction is added into the small packets; packaging the residual data which is not enough for one contract capacity as the data of one contract capacity, and packaging the data into a packet; all data packed as one contract capacity is named as contract data, and the contract data is data for which one storage contract is responsible for storage; when packing, the data of the same node sub-network is placed in the same contract data, if the residual space in the contract data is not enough, the data is placed in the next contract data; the contract capacity is the maximum capacity for storing data which can be placed in the contract, and the address switching instruction is not included in the calculation of the contract capacity;
the data of contract capacity formed by packaging network sharing data generated by a node sub-network and the data of contract capacity formed by integrating and packaging are transferred to a storage contract and stored in a block chain module; the storage contract needs to be called through a calling interface, a calling private key is obtained from the dispatching package, a fixed account configured by the calling interface is unlocked immediately after calling, and then the storage contract is executed for storage; the first parameter in the input parameters of the storage contract is the address of a fixed account configured by a calling interface, and when the fixed account is called, the fixed account is automatically written according to the called calling interface; when the data required to be stored for storing the contract is the data of contract capacity formed by packaging the network sharing data generated by one node sub-network, namely the data required to be stored for storing the contract comes from the same node sub-network, the second parameter of the input parameter of the storage contract is the account address of the common account of the node sub-network providing the data; when the data required to be stored by the storage contract is the data of contract capacity formed by integration and packaging, namely the data required to be stored by the storage contract comes from different node sub-networks, one leader node is designated by the management node to be responsible for initiating the storage contract in all the leader nodes participating in the integration, and the second parameter of the input parameter of the storage contract is the account address of the leader node responsible for initiating the storage contract; executing a storage contract to finish storage, carrying out mining to finish transaction, unlocking the packed data, and directly storing the data to be stored into a side chain corresponding to a node sub-network providing the data if the address switching instruction is not included; if the packet contains the address switching instruction, executing the address switching instruction in the packed packet, and storing the data in the packet into the corresponding side chain; after the execution of the storage contract is successful, returning to the transaction hash; after the transaction is completed, deducting the fuel volume in the account address in the second parameter of the input parameter of the storage contract, and sending the deducted fuel volume to the account address in the first parameter of the input parameter of the storage contract; when the storage contract is successfully invoked for execution, broadcasting the execution result to other nodes in the node sub-network by a leader node in the node sub-network providing the data stored by the storage contract;
the third step is that the verification process on the certificate storage platform is as follows:
the dispatch packet provides a query interface at the same time, the query interface only allows a service node to use, the service node calls a transaction query function on a side chain, and the transaction query function can query data stored on the side chain and compare the data; the service node receives service data of the intelligent equipment which needs to be compared and is provided by a user, the service data is expressed according to a method for expressing the service data of the intelligent equipment by the service module, the service data is input into the transaction query function, a side chain corresponding to the service data of the intelligent equipment of the same type as the service data of the intelligent equipment which needs to be compared is searched, query is carried out on the searched side chain, if the comparison result is the same, true is returned, otherwise, false is returned.
CN202011575412.XA 2020-12-28 2020-12-28 Block chain-based intelligent device data certification and verification method Active CN113269637B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011575412.XA CN113269637B (en) 2020-12-28 2020-12-28 Block chain-based intelligent device data certification and verification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011575412.XA CN113269637B (en) 2020-12-28 2020-12-28 Block chain-based intelligent device data certification and verification method

Publications (2)

Publication Number Publication Date
CN113269637A true CN113269637A (en) 2021-08-17
CN113269637B CN113269637B (en) 2024-06-18

Family

ID=77227869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011575412.XA Active CN113269637B (en) 2020-12-28 2020-12-28 Block chain-based intelligent device data certification and verification method

Country Status (1)

Country Link
CN (1) CN113269637B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611838A (en) * 2023-07-18 2023-08-18 湖南益友新材料有限公司 Block chain-based environment-friendly concrete carbon reduction product carbon footprint accounting method

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4980840A (en) * 1987-09-23 1990-12-25 Beijing Stone New Technology Research Institute Computerized editing and composing system
CN107464106A (en) * 2017-07-25 2017-12-12 北京果仁宝科技有限公司 The method and system merchandised between block chain main chain and side chain
CN108769173A (en) * 2018-05-21 2018-11-06 阿里体育有限公司 The block chain implementation method and equipment of the intelligent contract of operation
CN109035796A (en) * 2018-08-27 2018-12-18 山东飞天激光光电科技有限公司 A kind of laser radar Overheight Vehicles linear detector and detection method
CN109658238A (en) * 2018-10-26 2019-04-19 阿里巴巴集团控股有限公司 Data processing method and device
CN110046828A (en) * 2019-04-23 2019-07-23 上海能链众合科技有限公司 A kind of intelligence based on block chain divides account protocol system
CN110046896A (en) * 2019-04-26 2019-07-23 腾讯科技(深圳)有限公司 A kind of block processes method and node and system
CN110235125A (en) * 2017-02-01 2019-09-13 美国联合包裹服务公司 Comprising multilingual coded data can index data base profile and the method for generating it
AU2020202793A1 (en) * 2017-09-29 2020-05-21 Leverage Rock Llc Scalable distributed ledger system, transaction privacy and combating fraud, theft and loss
CN111327414A (en) * 2020-01-20 2020-06-23 布比(北京)网络技术有限公司 Block chain consensus method and system, computer storage medium and electronic device
CN111680083A (en) * 2020-04-30 2020-09-18 四川弘智远大科技有限公司 Intelligent multi-stage government financial data acquisition system and data acquisition method
US20200358812A1 (en) * 2018-05-02 2020-11-12 Baidu Online Network Technology (Beijing) Co., Ltd. Method for determining main chain of blockchain, device, and storage medium
CN112035796A (en) * 2020-09-04 2020-12-04 金陵科技学院 Optimization method of integrated circuit-oriented ultra-low-delay integer power calculation circuit
CA3141042A1 (en) * 2019-06-13 2020-12-17 Luis Eduardo Gutierrez-Sheris System and method using a fitness-gradient blockchain consensus and providing advanced distributed ledger capabilities via specialized data records

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4980840A (en) * 1987-09-23 1990-12-25 Beijing Stone New Technology Research Institute Computerized editing and composing system
CN110235125A (en) * 2017-02-01 2019-09-13 美国联合包裹服务公司 Comprising multilingual coded data can index data base profile and the method for generating it
CN107464106A (en) * 2017-07-25 2017-12-12 北京果仁宝科技有限公司 The method and system merchandised between block chain main chain and side chain
AU2020202793A1 (en) * 2017-09-29 2020-05-21 Leverage Rock Llc Scalable distributed ledger system, transaction privacy and combating fraud, theft and loss
US20200358812A1 (en) * 2018-05-02 2020-11-12 Baidu Online Network Technology (Beijing) Co., Ltd. Method for determining main chain of blockchain, device, and storage medium
CN108769173A (en) * 2018-05-21 2018-11-06 阿里体育有限公司 The block chain implementation method and equipment of the intelligent contract of operation
CN109035796A (en) * 2018-08-27 2018-12-18 山东飞天激光光电科技有限公司 A kind of laser radar Overheight Vehicles linear detector and detection method
CN109658238A (en) * 2018-10-26 2019-04-19 阿里巴巴集团控股有限公司 Data processing method and device
CN110046828A (en) * 2019-04-23 2019-07-23 上海能链众合科技有限公司 A kind of intelligence based on block chain divides account protocol system
CN110046896A (en) * 2019-04-26 2019-07-23 腾讯科技(深圳)有限公司 A kind of block processes method and node and system
CA3141042A1 (en) * 2019-06-13 2020-12-17 Luis Eduardo Gutierrez-Sheris System and method using a fitness-gradient blockchain consensus and providing advanced distributed ledger capabilities via specialized data records
CN111327414A (en) * 2020-01-20 2020-06-23 布比(北京)网络技术有限公司 Block chain consensus method and system, computer storage medium and electronic device
CN111680083A (en) * 2020-04-30 2020-09-18 四川弘智远大科技有限公司 Intelligent multi-stage government financial data acquisition system and data acquisition method
CN112035796A (en) * 2020-09-04 2020-12-04 金陵科技学院 Optimization method of integrated circuit-oriented ultra-low-delay integer power calculation circuit

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
宁蕊等: ""浅析‘区块链+’在金融领域的应用"", 《现代商业》, 31 May 2018 (2018-05-31), pages 87 - 88 *
张小红;孙岚岚;: "属性代理重加密的区块链密文云存储共享研究", 系统仿真学报, no. 06, 28 February 2019 (2019-02-28), pages 1009 - 1020 *
王磊等: ""基于区块链机制的云计算环境下服务组合策略的研究"", 《计算机应用研究》, 31 May 2019 (2019-05-31), pages 81 - 86 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611838A (en) * 2023-07-18 2023-08-18 湖南益友新材料有限公司 Block chain-based environment-friendly concrete carbon reduction product carbon footprint accounting method
CN116611838B (en) * 2023-07-18 2023-09-22 湖南益友新材料有限公司 Block chain-based environment-friendly concrete carbon reduction product carbon footprint accounting method

Also Published As

Publication number Publication date
CN113269637B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
Wang et al. AEBIS: AI-enabled blockchain-based electric vehicle integration system for power management in smart grid platform
CN109034840B (en) Green certificate transaction method and system based on clean energy generation
CN112434343B (en) Virtual power plant safety scheduling and trading method based on dual block chain technology
CN107480847A (en) Energy block chain network and the virtual plant operation based on the network and dispatching method
CN110348643A (en) A kind of distributed power transaction contract common recognition method based on energy block chain
CN110119963A (en) A kind of micro-capacitance sensor power trade method based on principal and subordinate's intelligence contract
CN111833184A (en) Distributed energy source P2P trading system and method based on block chain
CN111861468B (en) Regional energy Internet energy trading method based on block chain
CN110969436A (en) Block chain ammeter with digital assets
CN111416708A (en) Block chain Byzantine fault-tolerant consensus method and system
US20190393721A1 (en) Transmission of electrical energy between user entities of a distribution network
CN113448694B (en) Block chain consensus method for improving transaction processing capability
CN113763169A (en) Energy routing device based on block chain and energy management method
CN113269637B (en) Block chain-based intelligent device data certification and verification method
CN113468551A (en) Domestic intelligent electric meter data storage system and method based on alliance block chain
CN111506585A (en) Power distribution network energy metering system based on block chain technology
CN106557956A (en) A kind of method with regard to configuring client's paying service information pushing strategy
CN114663091A (en) Power transaction method based on multi-chain block chain architecture
Ge et al. Blockchain and green certificates based market structure and transaction mechanism of direct power-purchase for industrial users
CA3047500C (en) Management of composite electrical energy
Islam et al. A review on blockchain technology for distribution of energy
CN117172916A (en) Side flexibility resource end-to-end decentralized transaction method
CN113554511B (en) Active power distribution network power transaction method based on blockchain and particle swarm optimization
CN115706413A (en) Micro-grid scheduling device and method
CN116361385A (en) Block chain consensus method and system

Legal Events

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

Address after: C3, 101 Eshan Road, Pudong New Area, Shanghai, 200120

Applicant after: Shanghai Lingshuzhonghe Information Technology Co.,Ltd.

Address before: C3, 101 Eshan Road, Pudong New Area, Shanghai, 200120

Applicant before: NENG LIAN TECH. LTD.

GR01 Patent grant