CN112347190A - Block chain-based shared office joining park management system - Google Patents

Block chain-based shared office joining park management system Download PDF

Info

Publication number
CN112347190A
CN112347190A CN202011268982.4A CN202011268982A CN112347190A CN 112347190 A CN112347190 A CN 112347190A CN 202011268982 A CN202011268982 A CN 202011268982A CN 112347190 A CN112347190 A CN 112347190A
Authority
CN
China
Prior art keywords
transaction
park
data
contract
block chain
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.)
Withdrawn
Application number
CN202011268982.4A
Other languages
Chinese (zh)
Inventor
浠昏豹
任豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Diandian Office Technology Co ltd
Original Assignee
Guangzhou Diandian Office Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Diandian Office Technology Co ltd filed Critical Guangzhou Diandian Office Technology Co ltd
Priority to CN202011268982.4A priority Critical patent/CN112347190A/en
Publication of CN112347190A publication Critical patent/CN112347190A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/02Reservations, e.g. for tickets, services or events
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/16Real estate

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Human Resources & Organizations (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Primary Health Care (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a block chain-based shared office joining park management system, which comprises a service logic module, an API gateway, a relational database and a union chain, wherein the API gateway, the relational database and the union chain are respectively connected with the service logic module; the business logic module comprises a park management module, a house source management module, a contract management module and a rent management module; when a park management module creates a block chain account for a park, the park management module initiates an account generation operation to a block chain service system, the block chain service system responds to a request, interacts with a union chain, creates the block chain account and activates the account to allocate a certain native Token; the house source management module, the contract management module and the rent management module are used for respectively managing house source information and linking related information. The invention utilizes the characteristic that the block chain can not be tampered, once important data such as transaction records, settlement records and the like of the franchised garden are generated, the data can not be tampered, the trust between the franchised parks is enhanced, and the reliability of the system is enhanced.

Description

Block chain-based shared office joining park management system
Technical Field
The invention relates to the field of park management, in particular to a block chain-based shared office joining park management system.
Background
The blockchain can be essentially understood as a distributed book or a shared database, and the data or information stored in the blockchain has the characteristics of being unforgeable, having trace in the whole process, being traceable, being publicly transparent, being maintained collectively and the like. Based on the characteristics, the block chain technology lays a solid 'trust' foundation, creates a reliable 'cooperation' mechanism and has wide application prospect. Federation chain: one type of blockchain internally designates a number of preselected nodes as billers for only members of a particular group and limited third parties, with the creation of each block being determined by all of the preselected nodes.
The shared office is also called flexible office, short-renting office and joint office space, is also called guest-creating space or crowd-creating space, and is a shared office.
In the prior art, the franchise park is managed in a centralized mode, all data is managed by an initiator, and the franchise park has the trust problem on the initiator. Under such circumstances, it is necessary and commercially promising to combine the blockchain technology with the franchise campus management to solve the problems of the franchise campus management system.
Disclosure of Invention
The invention aims to overcome the defects and shortcomings of the prior art and provide a block chain-based shared office joining park management system, which utilizes the characteristic that a block chain cannot be tampered, and once important data such as transaction records, settlement records and the like of a joining park are generated and cannot be tampered, the trust between joining parks is enhanced, and the reliability of the system is enhanced.
The purpose of the invention is realized by the following technical scheme:
a block chain-based shared office joining park management system comprises a service logic module, an API gateway, a relational database and a union chain, wherein the API gateway, the relational database and the union chain are respectively connected with the service logic module; the business logic module comprises a park management module, a house source management module, a contract management module and a rent management module;
the park management module is used for establishing a block chain account by taking a park as a unit, one park corresponds to an exclusive block chain account number, when the block chain account is established for the park, an account generation operation is initiated to a block chain service system, the block chain service system responds to a request, interacts with a alliance chain, establishes the block chain account and activates the account to distribute a certain native Token;
when a house source is added, if the name of the added house source is repeated with the name of the existing house source, a new house source cannot be added, and if the name of the added house source is not repeated with the name of the existing house source, the addition is successful; after the successful addition, the operation of assembling and storing the certificate information is carried out;
modifying the house source information, wherein if the modified house source name is repeated with the existing house source name, the modification fails, and if the modified house source name is not repeated with the existing house source name, the modification succeeds; after the modification is successful, the system can reassemble the house source information into the certificate storage information, the key is the key for storing the certificate before the modification, and the value is the modified house source information; then, a request for crediting transaction is sent to the block chain service system again to obtain a new transaction hash; when the key of the certificate of deposit is the same, the value of the block chain is covered by the latest certificate of deposit transaction;
deleting the house source information, and verifying the contract under the house source; if the house source contains the effective contract, the deletion fails; if the house source does not contain the effective contract, the deletion is successful;
the contract management module is used for managing the house source leasing contract and linking up related information;
the rent management module manages house source rent information and links up related information.
The park management module is used for binding the generated block chain account with a designated park by the shared office franchise park management system in a hosting state, wherein the mode is a hosted block chain account; when in hosting, the block chain service system uniformly manages the private key, so that the condition that an account is unavailable due to forgetting and losing of a user is avoided;
under the state of non-hosting, the block chain service system generates an account and a public and private key of a block chain, then sends a request of an account to be activated to the block chain service system, the block chain service system activates the account and distributes a certain original Token, then the system carries out signature, returns signed data and a public key, and then the signed data and the public key are submitted by the block chain service system together, thereby completing the creation of the block chain account; in all subsequent transactions, the user signs the transactions, and returns the signed data to the blockchain service system, and the blockchain transactions are completed by the blockchain account; one blockchain account comprises a private key, a public key and an address, wherein the private key is equivalent to the identification of your account number, and the private key can unlock the data encrypted by the public key to show that the payer is really you; the private key must be properly stored, and once lost, all data in the account, i.e., all properties, are lost; the public key is equivalent to the account number, and the other people pay the public key when paying money; the public key is used for payment confirmation in a transaction, similar to a "payee" in a banking transaction.
The generation of the private key comprises the following steps:
(1) generating a 256-bit random number by using a random algorithm to obtain a byte array, namely raw private key;
(2) adding a prefix of 3 bytes in front of the raw private key, then adding a version number of 1 byte, and adding a filling bit of 1 byte in the back to obtain a new byte array;
(3) performing SHA256 calculation twice on the byte array obtained in the step (2), and taking the first 4 bytes of the operation result to obtain the byte array of the check code;
(4) connecting the byte array in the step (2) and the check code byte array in the step (3) together according to the sequence to obtain a new byte array;
(5) carrying out Base58 encoding on the byte array generated in the step (5) to obtain a character string starting from priv, namely a private key;
this completes the generation of the private key.
The generation of the public key comprises the following steps:
(1) processing the raw private key by an ED25519 algorithm to generate a 32-bit byte array, namely a raw public key;
(2) adding a prefix of 1 byte in front of the raw public key, and then adding a version number of 1 byte to obtain a new byte array;
(3) performing SHA256 calculation twice on the byte array in the step (2), and taking the first 4 bytes of the operation result to obtain the byte array of the check code;
(4) connecting the byte array in the step (2) and the check code byte array in the step (3) together according to the sequence to obtain a new byte array;
(5) carrying out 16-system coding on the byte array in the step (4) to obtain a 16-system character string, namely a public key;
the generation of the public key is completed.
When the park management module adds a park, if the name of the newly added park is repeated with the name of the existing park, the park cannot be added successfully; if the new park name is not repeated with the existing park name, the addition can be successful; in the adding process, a unique identification key is defined, wherein the key consists of a park database table name and a database id; then, assembling the value of the certificate; value is to assemble the park number, park name, park address, purchase time, purchase amount, tax and company ID;
then, a request for storing the certificate is sent to the block chain service system, and the block chain service system responds to the request and interacts with the chain; returning a unique identifier of the blockchain transaction, namely a transaction hash; the hash value is obtained after the certification is stored on the block chain, and the hash value is obtained by calculating the original data by using a hash function; the hash function is a function that can map original data of any size into a fixed length value, and a result obtained by the hash function is called a "hash value"; alternatively, the raw data may be referred to as a "message" and the hash value as a "digest"; the data can be operated through the Hash algorithm, so that the data is prevented from being tampered, and the correctness of the data is ensured; therefore, the cochain certificate of the park information is stored, and the purposes of data transparency, tampering prevention and traceability of the park information are achieved;
if the information of a certain park is modified, the modified park information is reassembled, the assembled data type is consistent with the data type of the park addition, meanwhile, a certificate storage request is initiated to the block chain service system again by using a key defined during park addition, and a transaction hash returned by the block chain service system covers the previous transaction hash, so that the park modification is completed; the same key is used to update the information on the block chain; when the keys of the certificates are the same, the value of the block chain is covered by the latest certificate-storing transaction, so that the data on the block chain is updated, and the consistency of the data on the chain and the local data is ensured;
if the park information is deleted, judging whether the park contains an effective house source, and if the park does not have an effective house source, deleting the park; if the park contains an effective house source, the park cannot be deleted.
The house source management module simultaneously defines a key and a value by using the block chain account address of the park to perform evidence storage operation; the value of Key is composed of a house source database table name-database id; value is the basic information of the house source and is also the data item needing to be linked up;
after the evidence storing information is assembled, a request for evidence storing transaction is sent to the block chain service system, and after the block chain service system receives the request, the transaction is serialized so as to be convenient for network transmission; then obtaining the value of the serial number increased by 1; then obtaining a transactioniBlob after serialization certificate-storing transaction;
then signature transaction is carried out: the transaction initiator needs to perform identity authentication on transaction data, namely, the data is signed by using a private key, namely, the transaction blob is signed by using the private key; the signature result comprises signature data and a public key; the signature is a process of encrypting and confirming transaction data through an algorithm and a private key and obtaining signature data; the user judges the integrity and correctness of the transaction data through the signature data;
after the transaction data is signed, the transaction metadata and the signature need to be submitted to a block chain network; i.e. sending the modified content to the blockchain;
and returning the transaction hash value after the blockchain transaction is successful.
The contract management module comprises a contract adding module, a contract editing module and a contract deleting module;
a contract adding module: when a contract is added, firstly, judging whether the time of the house sources to be rented is overlapped, namely whether the house sources to be rented are rented; if the house source is already rented, the house source cannot be rented again; if the house source is not rented, modifying the state of the house source into rented state, and storing a rental bill and a hydropower bill until the contract is successfully added; finally, linking the information of the rented contract;
a contract editing module: when a contract is edited, firstly, whether the renting time of house sources is overlapped is judged, for example, the house sources to be rented are rented in a certain future time, the house sources cannot be rented in the future time, and the contract renting time cannot be edited; if the house source leasing time is not overlapped, the contract can be edited; the process of editing the contract is to delete the previous rental bill and the hydropower bill and recalculate the bill, so that the contract is successfully edited; finally, chaining the information of the successfully edited contract;
and a contract deletion module: when deleting the contract, firstly judging whether the house source is already returned, if not, then the contract can not be deleted; if the house source is withdrawn, the contract can be deleted, so far, the contract deletion is successful; and finally, linking the deleted contract information.
The contract management module links the chain according to the following steps:
(1) acquiring a serial number of a user account; each account maintains its own serial number, which increases from 1 in turn, one serial number marking a transaction for that account; this step is to obtain the current serial number of the user account from the federation chain.
(2) Assembling storage certificate information; defining a key and a value by using a user account address for carrying out evidence storage operation; the certificate storage Key is convenient for retrieving certificate storage information, and the value stores certificate storage contents, including contract numbers, lease units, lease starting time and lease ending time; the Value of Key is composed of contract name-database id, the Value of Value includes company _ id, house _ id, collection _ account _ id, code, unit, contacts, phone, start _ time, end _ time, collection _ unit, collection _ account, collection _ bank, collection _ phone, position, collection time, eetime, latency, mark, repeat _ start (, management _ core, part _ position _ core, term _ clear _ core, run _ clear _ core, analyzer _ use _ core, contact _ scanning, delay, type;
(3) serializing the transaction for network transmission; the content to be serialized in the step comprises deposit transaction, the value of the serial number acquired in the step (1) after being increased by 1, the unit price of the transaction fee, and the transaction fee; obtaining a transactioniBlob after serialization certificate-deposit transaction;
(4) signing the transaction; after the transaction is serialized, the transaction initiator needs to perform identity authentication on transaction data, signs the data by using a private key, namely signs the transactioniBlob in the step (3) by using the private key, and a signature result comprises signature data and a public key;
(5) submitting a transaction; after the transaction data is signed, the transaction metadata and the signature need to be submitted to the alliance chain network.
The rent management module comprises an deposit collecting module, a withdrawal module and a lease collecting module;
a deposit module: when the deposit is collected, judging whether the arrearage rent amount accounting is completed or not, and if the arrearage rent amount accounting is not completed, the deposit collection operation cannot be carried out; if the accounting is finished, the total bill and the invoice information are stored until the deposit operation is finished; finally, linking up relevant information of the deposit;
a lease quitting module: when the renting is quitted, the system judges whether the arrearage of the debt is completed or not, and if the arrearage is not completed, the renting operation can not be carried out; if the accounting is finished, the system stores the information of the total bill and the invoice, and then modifies the contract and the house source state until the successful lease returning is realized; finally, performing uplink on the lease quitting information;
a lease receiving module: when a user rents, the system judges whether accounting of hydropower is completed or not, and if the accounting is not completed, the user can not perform renting operation; if the accounting is completed, the renting is successful; and finally, performing uplink of the related information of the lease.
The rent management module links the chain according to the following steps:
A. acquiring a serial number of a user account; each account maintains its own serial number, which increases from 1 in turn, one serial number marking a transaction for that account; the current serial number of the user account is obtained from the alliance chain;
B. assembling storage certificate information; the step defines a key and a value simultaneously by using the user account address to carry out the storage operation; the certificate storage Key is convenient for retrieving certificate storage information, and the value stores certificate storage contents, including contract numbers, lease units, lease starting time and lease ending time; the value of Key is composed of rent management-database id, and the value of value comprises id, content _ id, start _ time, end _ time, repnt, id, company _ id, content _ id, time, transferfe, tar, money, type, period, term, account, bank, mark, id, company _ id, content _ id, notpay _ id, repnt, manage _ cost, park _ anode _ cost, dorm _ client _ cost, rubber _ client _ cost, elevator _ user _ cost, start _ time, end _ time, sum, notpay, and status; value is a data item of contract and is also a data item needing uplink;
C. serializing the transaction for network transmission; the content to be serialized in the step A comprises deposit certificate transaction, the value of the serial number acquired in the step A after being increased by 1, the unit price of the transaction fee, and the transaction fee; obtaining a transactioniBlob after serialization certificate-deposit transaction;
D. signing the transaction; after the transaction is serialized, the transaction initiator needs to perform identity authentication on transaction data, signs the data by using a private key, namely signs the transactioniBlob in the step C by using the private key, and a signature result comprises signature data and a public key;
E. submitting a transaction; after the transaction data is signed, the transaction metadata and the signature need to be submitted to the alliance chain network.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the method utilizes the characteristic that the block chain cannot be tampered, and once important data such as transaction records, settlement records and the like of the franchised park are generated, the data cannot be tampered. The trust between the franchised parks is strengthened, and the reliability of the system is enhanced.
Drawings
Fig. 1 is a schematic structural diagram of a block chain-based shared office joining park management system according to the present invention.
FIG. 2 is a flow chart of the work of adding a contract module.
FIG. 3 is a flowchart of the work of the edit contract module.
FIG. 4 is a flow diagram of the operation of the delete contract module.
FIG. 5 is a flow chart of the operation of the deposit module.
Fig. 6 is a workflow diagram of the tenancy refund module.
Fig. 7 is a workflow diagram of a rental module.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.
Referring to fig. 1, a block chain-based shared office joining park management system is specifically divided into the following parts:
1. building block chain alliance chain
The blockchain can be essentially understood as a distributed book or a shared database, and the data or information stored in the blockchain has the characteristics of being unforgeable, having trace in the whole process, being traceable, being publicly transparent, being maintained collectively and the like. Based on the characteristics, the block chain technology lays a solid 'trust' foundation, creates a reliable 'cooperation' mechanism and has wide application prospect. The alliance chain is one of block chains, only aiming at members of a certain specific group and limited third parties, a plurality of preselected nodes are internally designated as bookkeepers, the generation of each block is jointly determined by all the preselected nodes, and the alliance chain is suitable for trade and supervision of industry associations, high-level organization organizations and large-scale chain enterprises on branch management organizations. Generally, it is often used in B2B scenarios such as trading, settlement, or clearing among institutions.
One of the keys of this patent is to build a federation chain. Firstly, a founding node is built by our parties according to a block chain node installation package developed by us, and the node is an extremely important node of a alliance chain. The role of this node is to create a created account number and private key. With the account number and private key, the asset can be issued. The role of the asset is to maintain the proper functioning of the federation chain. Transactions on the blockchain require expending computer resources such as storing information, transferring assets, equipment maintenance, etc. By issuing the asset, a user may pay for the transaction fee of the blockchain with the asset by purchasing the asset in RMB.
hp is a native token built in the cambodia, and is used for paying network transaction cost and operating and maintaining a block chain network. When the hp chain starts, 10 hundred million hp is generated internally when the created account is created. In addition to initializing the built-in part, each time a new tile is generated, an amount of hp is generated to reward the consensus nodes participating in the tile packing. The hp of the reward generated by each block and all the fees paid for the transaction in the block are uniformly distributed to all the consensus nodes packaged by the participating blocks, and the modulo balance is randomly awarded to a certain node participating in the consensus. The total amount of block prizes is 5 hundred million. Initially, 8 hp are awarded per tile, and thereafter, the number of hp awarded per tile per five years decays 1/4, with 5 hundred million hp being awarded all after 360 years.
In order to ensure that each federation park has at least one federation node, one party may provide an installation package of nodes for the federation park, and the federation park becomes a node in the federation chain through the installation node. When the joining park has the joining node, the account and the private key of the joining park can be created. At this time, the account is an inactivated account, and the party can transfer a certain amount of hp to the account of the franchised park to activate the account of the franchised park. The private key of the federation campus cannot be revealed, and the private key is not only a proof of the account number, but also a tool used to unwrap the data encrypted by the public key. Once the private key is compromised, the assets of the account may be lost.
The nodes in the federation chain may supervise each other. The principle is as follows: each node of the federation chain stores a copy of the data of the chunks recorded by the other nodes.
a. When a node of a certain franchise park wants to tamper with data, the tampered data is synchronized to a federation chain.
b. Other nodes in the federation chain may verify whether the data copy of the storage block is consistent with the data copy of the block for the node to be verified.
c. And if the verification results of all the nodes in the alliance chain are inconsistent, determining that the data of the node to be verified is tampered, and deleting the tampered data.
2. Development area blockchain browser
Because of the transparent nature of the disclosed blockchain, it requires a medium to allow the user to see what is in the chain, such as a transaction, a block, the current block height, etc. A blockchain is the medium. The search tool is a search tool and a website, is established on a common centralized network and is a tool specially used for providing information on browsing and inquiring block chains for users. The basic difference from the common browser is that the information and transaction conditions related to the block chain can be queried, and the specialty is stronger. All information on the blockchain can be seen on the browser, and detailed information of a certain block, a certain transaction and a certain blockchain account can also be seen. The information about the blockchain generally includes basic information such as chainlnfo, blocklnfo, TransactionInfo, contectlnfo (tokenlnfo, scriptlnfo), addresslnfo, and the like, which basically constitutes the product architecture of the blockchain browser product. The chalnfo is a general overview of the modified blockchain, and functions to enable a user to know the general operation of the blockchain. The BlockInfo is block dimension information of a block chain, and generally includes transaction number of the block, block generation time, block hash, last block hash, and the like. The TransactionInfo is transaction information, and comprises a latest transaction list page, a certain block transaction list page, a transaction detail page and the like, the conteractnfo belongs to another transaction, and the conteractnfo mainly represents various information displays of the intelligent contract. The AddressInfo is mainly used for displaying the block chain account information, mainly comprises basic information of the AddressInfo in the transaction information, and is relatively clear. The basic information is a data set that is unique to the blockchain.
The blockchain browser can find a core index for measuring the blockchain according to the problem to be solved by the blockchain designed by the user. The product architecture of the blockchain is as follows: the chain-block-Tx-address can obtain original data on the chain according to the product architecture. The block chain browser can find other data which can be derived from the original data while displaying the original data, and hierarchically displays the data to a user according to the information data index built by the block chain browser. In summary, the essence of a basic blockchain browser is to reasonably display data to various users according to a chain core index, and help us establish a website or mobile application in connection with the data in the blockchain. The basic function of the block chain browser is to inquire the information on the chain according to conditions, the first page displays the newly generated block information and the newly generated transaction information, the two information can be continuously updated on the first page, in addition, the block height can be input, and the basic information of a certain block height and all transactions contained in the block can be inquired; the detailed information of a certain transaction can be inquired according to the transaction hash, including the transaction state, transaction fee, signer and transaction type of the transaction, and the information displayed by different types of transactions can be different, such as: if the transaction is the account transaction, the blockchain browser can show information such as an account address and an account type, and if the transaction is the evidence storage transaction, the evidence storage key and the value can be shown; and the blockchain browser can also inquire according to the account address, and the blockchain browser inquires according to the account address and can display the account type, the nonce value, the asset list and the transaction list of the latest five transactions of the account. It is also a point that the blockchain browser can expand the original data on the view chain regardless of any data on the view chain. Original data are reserved, data display is optimized, and the data display is convenient for a user to check.
3. Business logic layer of park management system
The park management module is used for establishing a block chain account by taking a park as a unit, one park corresponds to an exclusive block chain account number, when the block chain account is established for the park, an account generation operation is initiated to a block chain service system, the block chain service system responds to a request, interacts with a alliance chain, establishes the block chain account and activates the account to distribute a certain native Token; the native Token at this time refers to a native Token issued by the alliance chain, is called a cambodia, is a native Token built in the cambodia, and is used for paying network transaction cost and operating and maintaining a blockchain network.
In the hosting state, the shared office joining park management system binds the generated blockchain account with the designated park, and the mode is the hosted blockchain account; when in hosting, the block chain service system uniformly manages the private key, thereby avoiding the condition that the account is unavailable due to forgetting and losing of the user.
Under the state of non-hosting, the blockchain service system generates the account and the public and private key of the blockchain, then sends a request of the account to be activated to the blockchain service system, the blockchain service system activates the account and distributes a certain HP, then the system carries out signature, returns the signed data and the public key, and then the system submits the signed data and the public key together, thereby completing the creation of the blockchain account. The blockchain account created in the unmanaged state is subjected to transaction signature by the user in all subsequent transactions, and the signed data is returned to the blockchain service system, so that the blockchain transaction is completed. A blockchain account includes a private key, a public key, and an address, where the private key is equivalent to the identification of your account, and the private key can decrypt the data encrypted by the public key, indicating that the payer is really you. The private key must be kept in place and, once lost, all data within the account, i.e., all property, is lost. The public key corresponds to the account number, and is paid by others. The public key is used for payment confirmation in a transaction, similar to a "payee" in a banking transaction. It is also often used to encrypt session keys, verify digital signatures, or encrypt data that can be decrypted with a corresponding private key.
The generation of the private key can be realized by using a plurality of algorithms such as a random algorithm, SHA256 and the like, and the generation of the private key comprises the following steps:
(1) a random number (i.e. a mathematical private key) of 256 bits is generated by using a random algorithm, and a byte array, namely a raw private key, is obtained as follows:
[17,236,24,183,207,250,207,180,108,87,224,39,189,99,246,85,138,120,236,78,228,233,41,192,124,109,156,104,235,66,194,24];
(2) adding a Prefix (Prefix) of 3 bytes in front of the raw private key, then adding a Version number (Version) of 1 byte, and adding a padding bit (Fill) of 1 byte in the back to obtain a new byte array, as shown below:
[218,55,159,1,17,236,24,183,207,250,207,180,108,87,224,39,189,99,246,85,138,120,236,78,228,233,41,192,124,109,156,104,235,66,194,24,0];
(3) performing SHA256 calculation twice on the byte array obtained in the step (2), and taking the first 4 bytes of the operation result to obtain a byte array of a check code (Checksum), as follows: [30,19,80,117 ];
(4) connecting the byte array in the step (2) and the check code byte array in the step (3) together according to the sequence to obtain a new byte array, as follows:
[218,55,159,1,17,236,24,183,207,250,207,180,108,87,224,39,189,99,246,85,138,120,236,78,228,233,41,192,124,109,156,104,235,66,194,24,0,30,19,80,117];
(5) performing Base58 encoding on the byte array generated in the step (5) to obtain a character string starting with priv, namely a private key (private key), as follows:
privbsGZFUoRv8aXZbSGd3bwzZWFn3L5QKq74RXAQYcmfXhhZ54CLr9z;
this completes the generation of the private key.
The public key is generated after the private key is generated, a series of processing needs to be performed on the private key by using an ED25519 algorithm, and the address can be understood as a pay account number, and is further generated by a plurality of algorithms such as base58 after the public key and the private key are generated. The generation of the public key comprises the following steps:
(1) processing the raw private key by an ED25519 algorithm to generate a 32-bit byte array, namely a raw public key; for example, private key privbsGZFUORv8aXZbSGd3bwzZWFn3L5QKq74RXAQ YcmfXhZ 54CLr9z, its raw public key is as follows:
[21,118,76,208,23,224,218,117,50,113,250,38,205,82,148,81,162,27,130,83,208,1,240,212,54,18,225,158,198,50,87,10];
(2) adding a Prefix (Prefix) of 1 byte to the front of the raw public key, and then adding a Version number (Version) of 1 byte to the front of the raw public key, a new byte array is obtained, as follows:
[176,1,21,118,76,208,23,224,218,117,50,113,250,38,205,82,148,81,162,27,130,83,208,1,240,212,54,18,225,158,198,50,87,10];
(3) performing SHA256 calculation twice on the byte array in the step (2), and taking the first 4 bytes of the operation result to obtain the byte array of the check code (Checksum), as follows: [116,171,22,107 ];
(4) connecting the byte array in the step (2) and the check code byte array in the step (3) together according to the sequence to obtain a new byte array, as follows:
[176,1,21,118,76,208,23,224,218,117,50,113,250,38,205,82,148,81,162,27,130,83,208,1,240,212,54,18,225,158,198,50,87,10,116,171,22,107];
(5) carrying out 16-system coding on the byte array in the step (4) to obtain a 16-system character string, namely a public key (public key), as follows: b00115764cd017e0da753271fa26cd529451a21b8253d001f0d43612e19ec632570a74ab166 b;
the generation of the public key is completed.
When adding a park, if the name of the newly added park is repeated with the name of the existing park, the addition is not successful; if the new park name is not repeated with the existing park name, the addition can be successful; in the adding process, a unique identification key is defined, wherein the key consists of a park database table name and a database id; then, assembling the value of the certificate; value is the assembly of the campus number, campus name, campus address, time of purchase, amount of purchase, tax and company ID, as detailed in table 1.
TABLE 1
Figure BDA0002777085990000121
Figure BDA0002777085990000131
Then, a request for storing the certificate is sent to the block chain service system, and the block chain service system responds to the request and interacts with the chain; returning a unique identifier of the blockchain transaction, namely a transaction hash; the hash value is obtained after the certification is stored on the block chain, and the hash value is obtained by calculating the original data by using a hash function; the hash function is a function that can map original data of any size into a fixed length value, and a result obtained by the hash function is called a "hash value"; alternatively, the raw data may be referred to as a "message" and the hash value as a "digest"; the data can be operated through the Hash algorithm, so that the data is prevented from being tampered, and the correctness of the data is ensured; therefore, the cochain certificate of the park information is also completed, and the purposes of data transparency, tampering prevention and traceability of the park information are achieved.
If the information of a certain park is modified, the modified park information is reassembled, the assembled data type is consistent with the data type of the park addition, meanwhile, a certificate storage request is initiated to the block chain service system again by using a key defined during park addition, and a transaction hash returned by the block chain service system covers the previous transaction hash, so that the park modification is completed; the same key is used to update the information on the block chain; when the key of the certificate of deposit is the same, the value of the block chain can be covered by the latest certificate of deposit transaction, thereby achieving the purposes of updating the data on the block chain and ensuring the consistency of the data on the chain and the local data.
If the park information is deleted, judging whether the park contains an effective house source, and if the park does not have an effective house source, deleting the park; if the park contains an effective house source, the park cannot be deleted.
When a house source is added, if the name of the added house source is repeated with the name of the existing house source, a new house source cannot be added, and if the name of the added house source is not repeated with the name of the existing house source, the addition is successful; after the successful addition, the operation of assembling and storing the certificate information is carried out; the step is that a key and a value are simultaneously defined by using the block chain account address of the park to carry out the evidence storage operation; the certificate storage key is convenient for retrieving certificate storage information, and the value stores certificate storage contents, wherein the certificate storage contents comprise house source numbers and house source types; the value of Key is composed of a house source database table name-database ID, and the value of value is composed of code (house source number), company Id (affiliated company ID), park Id (garden ID), type (house source type, 1: commercial, 2: residential, 3: factory, 4: warehouse), area (house source area), status (house source status, 1: to be leased, 2: in lease). As shown in table 2, value is the basic information of the source and is also the data item requiring uplink.
TABLE 2
Figure BDA0002777085990000141
After the assembly, sending a request for deposit transaction to the blockchain service system, and after receiving the request, the blockchain service system serializes the transaction so as to facilitate network transmission; then, acquiring a value (nonce value) of the sequence number increased by 1; the serial number is a number generated for a particular use; each blockchain account maintains a sequence number of the blockchain account, wherein the sequence number is increased from 1 in sequence and is not repeatable; a serial number identifying a transaction for the account, identifying an order of execution of the transactions when the transactions are submitted by a user; each transaction costs a certain transaction fee, and the more the value of the certificate is stored, the more the cost is needed; then obtaining a transactionBlob (transaction blob) after the serialized deposit transaction; when the blob is traded, a 16-system character string is obtained after a trading object is serialized; the transaction serialization refers to a process of converting the state information of a transaction object into a character string which can be stored through a specified data structure;
then signature transaction is carried out; after the transaction is serialized, the transaction initiator needs to perform identity authentication on transaction data, namely, the data is signed by using a private key, namely, the transaction blob is signed by using the private key; signatures, commonly referred to as data; the signature result comprises signature data and a public key; the signature is a process of encrypting and confirming transaction data through an algorithm and a private key and obtaining signature data; the user can judge the integrity and correctness of the transaction data through the signature data;
then, the transaction is submitted, and after the transaction data is signed, the transaction metadata (transactionBlob) and the signature (singatures) need to be submitted to the blockchain network; i.e. sending the modified content to the blockchain;
returning a transaction hash value after the block chain transaction is successful, wherein the hash value is obtained by computing original data by using a hash function; the hash function is a function that can map original data of any size into a fixed length value, and a result obtained by the hash function is called a "hash value"; alternatively, the raw data may be referred to as a "message" and the hash value as a "digest"; the data can be operated through the Hash algorithm, so that the data is prevented from being tampered, and the correctness of the data is ensured; therefore, the uplink chain storage of the house source information is completed, and the purposes of data transparency, tampering prevention and traceability of the house source information are achieved;
modifying the house source information, wherein if the modified house source name is repeated with the existing house source name, the modification fails, and if the modified house source name is not repeated with the existing house source name, the modification succeeds; after the modification is successful, the system can reassemble the house source information into the certificate storage information, the key is the key for storing the certificate before the modification, and the value is the modified house source information; then, a request for crediting transaction is sent to the block chain service system again to obtain a new transaction hash; the same key is used to update the information on the block chain; when the keys of the certificates are the same, the value of the block chain is covered by the latest certificate-storing transaction, so that the data on the block chain is updated, and the consistency of the uplink data and the local data is ensured;
deleting the house source information, and verifying the contract under the house source; if the house source contains the effective contract, the deletion fails; if the house source does not contain the effective contract, the deletion is successful;
the contract management module comprises a contract adding module, a contract editing module and a contract deleting module; the three modules all utilize a block chain technology, and the safety, the accuracy and the non-tamper property of data are ensured. Embodiments of the technical solution of these three sub-modules will be described in detail below. The following embodiments are merely used to more clearly illustrate the technical solutions of the present module, and therefore, the following embodiments are only used as examples, and the protection scope of the present invention is not limited thereby.
A contract adding module: when a contract is added, firstly, judging whether the time of the house sources to be rented is overlapped, namely whether the house sources to be rented are rented; if the house source is already rented, the house source cannot be rented again; if the house source is not rented, modifying the state of the house source into rented state, and storing a rental bill and a hydropower bill until the contract is successfully added; and finally, linking the information of the rented contract. The flow chart is shown in fig. 2.
A contract editing module: when a contract is edited, firstly, whether the renting time of house sources is overlapped is judged, for example, the house sources to be rented are rented in a certain future time, the house sources cannot be rented in the future time, and the contract renting time cannot be edited; if the house source leasing time is not overlapped, the contract can be edited; the process of editing the contract is to delete the previous rental bill and the hydropower bill and recalculate the bill, so that the contract is successfully edited; and finally, uplink is carried out on the information of the contract which is successfully edited. The flow chart is shown in fig. 3.
And a contract deletion module: when deleting the contract, firstly judging whether the house source is already returned, if not, then the contract can not be deleted; if the house source is withdrawn, the contract can be deleted, so far, the contract deletion is successful; and finally, linking the deleted contract information. The flow chart is shown in fig. 4.
The data uplink or the block chain is stored through the uplink, and the purpose of uploading data, files or pictures and the like to the block chain uplink is achieved, so that the purposes of data transparency and tampering avoidance are achieved;
after the block chain is subjected to evidence storage, a string of hash values can be obtained; the hash value is obtained by calculating the original data by using a hash function; the hash function is a function that can map original data of any size into a fixed length value, and a result obtained by the hash function is called a "hash value"; alternatively, the raw data may be referred to as a "message" and the hash value as a "digest"; the data can be operated through the Hash algorithm, so that the data is prevented from being tampered, and the correctness of the data is ensured;
the winding steps are as follows:
(1) acquiring a serial number of a user account; each account maintains its own serial number, which increases from 1 in turn, one serial number marking a transaction for that account; this step is to obtain the current serial number of the user account from the federation chain.
(2) Assembling storage certificate information; defining a key and a value by using a user account address for carrying out evidence storage operation; the certificate storage Key is convenient for retrieving certificate storage information, and the value stores certificate storage contents, such as contract numbers, lease units, lease starting time, lease ending time and the like; as shown in table 3, the value of Key is composed of contract name-database id, the value of value is composed of company id, house id, collection account id, code (contract number), unit name, contacts (contact of rental unit), phone (contact of rental unit), start time, end time, collection unit name, collection account, collection bank account line, collection phone, deposit fund, collection date, free time, deposit fund, return record, and management date, dorm _ clean _ cost (dorm _ clean _ cost), rubbishh _ clean _ cost (garbage cleaning cost), elevator _ use _ cost (elevator cost), contract _ scanning (contract scanning piece), delete (record deletion mark), type (contract status). Value is a data item of contract and also a data item requiring uplink.
TABLE 3
Figure BDA0002777085990000171
Figure BDA0002777085990000181
(3) Serializing the transaction for network transmission; the content to be serialized in the step comprises deposit transaction, the value of the serial number acquired in the step (1) after being increased by 1, the unit price of the transaction fee, and the transaction fee; it should be noted that: the more the transaction fee of the transaction is, the more the content of the certificate is stored, the more the cost is spent; obtaining a transactioniBlob after serialization certificate-deposit transaction;
(4) signing the transaction; after the transaction is serialized, the transaction initiator needs to perform identity authentication on transaction data, signs the data by using a private key, namely signs the transactioniBlob in the step (3) by using the private key, which is generally called as data signature; the signature result comprises signature data and a public key;
(5) submitting a transaction; after the transaction data is signed, the transaction metadata (transactionBlob) and the signature (signatures) need to be submitted (transaction broadcast) to the alliance-link network.
The rent management module comprises an deposit collecting module, a withdrawal module and a lease collecting module; the three modules all utilize a block chain technology, and the safety, the accuracy and the non-tamper property of data are ensured. Embodiments of the technical solution of these three sub-modules will be described in detail below. The following embodiments are merely used to more clearly illustrate the technical solutions of the present module, and therefore, the following embodiments are only used as examples, and the protection scope of the present invention is not limited thereby.
A deposit module: when the deposit is collected, judging whether the arrearage rent amount accounting is completed or not, and if the arrearage rent amount accounting is not completed, the deposit collection operation cannot be carried out; if the accounting is finished, the total bill and the invoice information are stored until the deposit operation is finished; finally, linking up relevant information of the deposit; FIG. 5 is a flow chart of the operation of the deposit module.
A lease quitting module: when the renting is quitted, the system judges whether the arrearage of the debt is completed or not, and if the arrearage is not completed, the renting operation can not be carried out; if the accounting is finished, the system stores the information of the total bill and the invoice, and then modifies the contract and the house source state until the successful lease returning is realized; finally, performing uplink on the lease quitting information; fig. 6 is a workflow diagram of the tenancy refund module.
A lease receiving module: when a user rents, the system judges whether accounting of hydropower is completed or not, and if the accounting is not completed, the user can not perform renting operation; if the accounting is completed, the renting is successful; finally, performing uplink of related information of the lease; the workflow diagram of the rental module is shown in fig. 7.
The cochain is to store a certificate of the cochain or the block chain, and aims to upload data, files or pictures and the like to the block chain cochain, so that the data is transparent and the tampering is avoided.
After the verification is performed on the blockchain, a string of hash values is obtained. The hash value is obtained by operating the raw data by a hash function. The hash function is a function that can map original data of an arbitrary size into a fixed-length value, and the result obtained by the hash function is called a "hash value". Alternatively, the raw data may be referred to as a "message" and the hash value may be referred to as a "digest". The advantage that the data can be operated through the hash algorithm is that the data is prevented from being tampered, and the correctness of the data is guaranteed.
The winding steps are as follows:
A. acquiring a serial number of a user account; each account maintains its own serial number, which increases from 1 in turn, one serial number marking a transaction for that account; the current serial number of the user account is obtained from the alliance chain;
B. assembling storage certificate information; the step defines a key and a value simultaneously by using the user account address to carry out the storage operation; the certificate storage Key is convenient for retrieving certificate storage information, and the value stores certificate storage contents, including contract numbers, lease units, lease starting time and lease ending time; as shown in table 4, the value of Key is composed of a rent management-database ID, the value of value is composed of ID (rent ID), contract _ ID, start _ time (start time), end _ time (end time), rent, ID (stand ID), company _ ID (affiliated company ID), contract _ ID, time (collection date), transfer fee), tar (tax stamp tax), money (collection amount), type (1 deposit, 2 rent, 3 withdrawal)), period (existence of fee, type 2), term (existence of fee, type 2), account (payment account), bank (opening line of payment account), remark (reserve), ID (payment amount ID), any _ associated company (contract ID), lease _ ID, transfer fee table ID, contract _ time (contract ID), park _ accounted _ cost (park fair cost), dorm _ clean _ cost (dorm clean cost), rubbishh _ clean _ cost (garbage disposal cost), elevator _ use _ cost (elevator use cost), start _ time (rent period (start time)), end _ time (rent period (end time)), sum (total), notpay (owing rent), status (1 to be accounted, 2 to be accounted, 3 to be paid part, but not to be cleared [ abandoned ] and 4 to be cleared)). Value is a data item of contract and also a data item requiring uplink.
TABLE 4
Figure BDA0002777085990000201
Figure BDA0002777085990000211
C. Serializing the transaction for network transmission; the content to be serialized in the step A comprises deposit certificate transaction, the value of the serial number acquired in the step A after being increased by 1, the unit price of the transaction fee, and the transaction fee; it should be noted that: the more the transaction fee of the transaction is, the more the content of the certificate is stored, the more the cost is spent; obtaining a transactioniBlob after serialization certificate-deposit transaction;
D. signing the transaction; after the transaction is serialized, the transaction initiator needs to perform identity authentication on transaction data, and signs the data by using a private key, namely, the private key signs the transactioniblob in the step C, which is generally called as the signature of the data; the signature result comprises signature data and a public key;
E. submitting a transaction; after the transaction data is signed, the transaction metadata (transactionBlob) and the signature (signatures) need to be submitted (transaction broadcast) to the alliance-link network.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (10)

1. A block chain-based shared office joining park management system is characterized in that: the system comprises a business logic module, an API gateway, a relational database and a alliance chain, wherein the API gateway, the relational database and the alliance chain are respectively connected with the business logic module; the business logic module comprises a park management module, a house source management module, a contract management module and a rent management module;
the park management module is used for establishing a block chain account by taking a park as a unit, one park corresponds to an exclusive block chain account number, when the block chain account is established for the park, an account generation operation is initiated to a block chain service system, the block chain service system responds to a request, interacts with a alliance chain, establishes the block chain account and activates the account to distribute a certain native Token;
when a house source is added, if the name of the added house source is repeated with the name of the existing house source, a new house source cannot be added, and if the name of the added house source is not repeated with the name of the existing house source, the addition is successful; after the successful addition, the operation of assembling and storing the certificate information is carried out;
modifying the house source information, wherein if the modified house source name is repeated with the existing house source name, the modification fails, and if the modified house source name is not repeated with the existing house source name, the modification succeeds; after the modification is successful, the system can reassemble the house source information into the certificate storage information, the key is the key for storing the certificate before the modification, and the value is the modified house source information; then, a request for crediting transaction is sent to the block chain service system again to obtain a new transaction hash; when the key of the certificate of deposit is the same, the value of the block chain is covered by the latest certificate of deposit transaction;
deleting the house source information, and verifying the contract under the house source; if the house source contains the effective contract, the deletion fails; if the house source does not contain the effective contract, the deletion is successful;
the contract management module is used for managing the house source leasing contract and linking up related information;
the rent management module manages house source rent information and links up related information.
2. The blockchain-based shared office affiliate campus management system of claim 1 wherein: the park management module is used for binding the generated block chain account with a designated park by the shared office franchise park management system in a hosting state, wherein the mode is a hosted block chain account; when in hosting, the block chain service system uniformly manages the private key, so that the condition that an account is unavailable due to forgetting and losing of a user is avoided;
under the state of non-hosting, the block chain service system generates an account and a public and private key of a block chain, then sends a request of an account to be activated to the block chain service system, the block chain service system activates the account and distributes a certain original Token, then the system carries out signature, returns signed data and a public key, and then the signed data and the public key are submitted by the block chain service system together, thereby completing the creation of the block chain account; in all subsequent transactions, the user signs the transactions, and returns the signed data to the blockchain service system, and the blockchain transactions are completed by the blockchain account; one blockchain account comprises a private key, a public key and an address, wherein the private key is equivalent to the identification of your account number, and the private key can unlock the data encrypted by the public key to show that the payer is really you; the private key must be properly stored, and once lost, all data in the account, i.e., all properties, are lost; the public key is equivalent to the account number, and the other people pay the public key when paying money; the public key is used for payment confirmation in a transaction, similar to a "payee" in a banking transaction.
3. The blockchain-based shared office affiliate campus management system of claim 2 wherein: the generation of the private key comprises the following steps:
(1) generating a 256-bit random number by using a random algorithm to obtain a byte array, namely raw private key;
(2) adding a prefix of 3 bytes in front of the raw private key, then adding a version number of 1 byte, and adding a filling bit of 1 byte in the back to obtain a new byte array;
(3) performing SHA256 calculation twice on the byte array obtained in the step (2), and taking the first 4 bytes of the operation result to obtain the byte array of the check code;
(4) connecting the byte array in the step (2) and the check code byte array in the step (3) together according to the sequence to obtain a new byte array;
(5) carrying out Base58 encoding on the byte array generated in the step (5) to obtain a character string starting from priv, namely a private key;
this completes the generation of the private key.
4. The blockchain-based shared office affiliate campus management system of claim 2 wherein: the generation of the public key comprises the following steps:
(1) processing the raw private key by an ED25519 algorithm to generate a 32-bit byte array, namely a raw public key;
(2) adding a prefix of 1 byte in front of the raw public key, and then adding a version number of 1 byte to obtain a new byte array;
(3) performing SHA256 calculation twice on the byte array in the step (2), and taking the first 4 bytes of the operation result to obtain the byte array of the check code;
(4) connecting the byte array in the step (2) and the check code byte array in the step (3) together according to the sequence to obtain a new byte array;
(5) carrying out 16-system coding on the byte array in the step (4) to obtain a 16-system character string, namely a public key;
the generation of the public key is completed.
5. The blockchain-based shared office affiliate campus management system of claim 1 wherein: when the park management module adds a park, if the name of the newly added park is repeated with the name of the existing park, the park cannot be added successfully; if the new park name is not repeated with the existing park name, the addition can be successful; in the adding process, a unique identification key is defined, wherein the key consists of a park database table name and a database id; then, assembling the value of the certificate; value is to assemble the park number, park name, park address, purchase time, purchase amount, tax and company ID;
then, a request for storing the certificate is sent to the block chain service system, and the block chain service system responds to the request and interacts with the chain; returning a unique identifier of the blockchain transaction, namely a transaction hash; the hash value is obtained after the certification is stored on the block chain, and the hash value is obtained by calculating the original data by using a hash function; the hash function is a function that can map original data of any size into a fixed length value, and a result obtained by the hash function is called a "hash value"; alternatively, the raw data may be referred to as a "message" and the hash value as a "digest"; the data can be operated through the Hash algorithm, so that the data is prevented from being tampered, and the correctness of the data is ensured; therefore, the cochain certificate of the park information is stored, and the purposes of data transparency, tampering prevention and traceability of the park information are achieved;
if the information of a certain park is modified, the modified park information is reassembled, the assembled data type is consistent with the data type of the park addition, meanwhile, a certificate storage request is initiated to the block chain service system again by using a key defined during park addition, and a transaction hash returned by the block chain service system covers the previous transaction hash, so that the park modification is completed; the same key is used to update the information on the block chain; when the keys of the certificates are the same, the value of the block chain is covered by the latest certificate-storing transaction, so that the data on the block chain is updated, and the consistency of the data on the chain and the local data is ensured;
if the park information is deleted, judging whether the park contains an effective house source, and if the park does not have an effective house source, deleting the park; if the park contains an effective house source, the park cannot be deleted.
6. The blockchain-based shared office affiliate campus management system of claim 1 wherein: the house source management module simultaneously defines a key and a value by using the block chain account address of the park to perform evidence storage operation; the value of Key is composed of a house source database table name-database id; value is the basic information of the house source and is also the data item needing to be linked up;
after the evidence storing information is assembled, a request for evidence storing transaction is sent to the block chain service system, and after the block chain service system receives the request, the transaction is serialized so as to be convenient for network transmission; then obtaining the value of the serial number increased by 1; then obtaining a transactioniBlob after serialization certificate-storing transaction;
then signature transaction is carried out: the transaction initiator needs to perform identity authentication on transaction data, namely, the data is signed by using a private key, namely, the transaction blob is signed by using the private key; the signature result comprises signature data and a public key; the signature is a process of encrypting and confirming transaction data through an algorithm and a private key and obtaining signature data; the user judges the integrity and correctness of the transaction data through the signature data;
after the transaction data is signed, the transaction metadata and the signature need to be submitted to a block chain network; i.e. sending the modified content to the blockchain;
and returning the transaction hash value after the blockchain transaction is successful.
7. The blockchain-based shared office affiliate campus management system of claim 1 wherein: the contract management module comprises a contract adding module, a contract editing module and a contract deleting module;
a contract adding module: when a contract is added, firstly, judging whether the time of the house sources to be rented is overlapped, namely whether the house sources to be rented are rented; if the house source is already rented, the house source cannot be rented again; if the house source is not rented, modifying the state of the house source into rented state, and storing a rental bill and a hydropower bill until the contract is successfully added; finally, linking the information of the rented contract;
a contract editing module: when a contract is edited, firstly, whether the renting time of house sources is overlapped is judged, for example, the house sources to be rented are rented in a certain future time, the house sources cannot be rented in the future time, and the contract renting time cannot be edited; if the house source leasing time is not overlapped, the contract can be edited; the process of editing the contract is to delete the previous rental bill and the hydropower bill and recalculate the bill, so that the contract is successfully edited; finally, chaining the information of the successfully edited contract;
and a contract deletion module: when deleting the contract, firstly judging whether the house source is already returned, if not, then the contract can not be deleted; if the house source is withdrawn, the contract can be deleted, so far, the contract deletion is successful; and finally, linking the deleted contract information.
8. The blockchain-based shared office affiliate campus management system of claim 1 wherein: the contract management module links the chain according to the following steps:
(1) acquiring a serial number of a user account; each account maintains its own serial number, which increases from 1 in turn, one serial number marking a transaction for that account; the current serial number of the user account is obtained from the alliance chain;
(2) assembling storage certificate information; defining a key and a value by using a user account address for carrying out evidence storage operation; the certificate storage Key is convenient for retrieving certificate storage information, and the value stores certificate storage contents, including contract numbers, lease units, lease starting time and lease ending time; the Value of Key is composed of contract name-database id, the Value of Value includes company _ id, house _ id, collection _ account _ id, code, unit, contacts, phone, start _ time, end _ time, collection _ unit, collection _ account, collection _ bank, collection _ phone, position, collection time, eetime, latency, mark, repeat _ start (, management _ core, part _ position _ core, term _ clear _ core, run _ clear _ core, analyzer _ use _ core, contact _ scanning, delay, type;
(3) serializing the transaction for network transmission; the content to be serialized in the step comprises deposit transaction, the value of the serial number acquired in the step (1) after being increased by 1, the unit price of the transaction fee, and the transaction fee; obtaining a transactioniBlob after serialization certificate-deposit transaction;
(4) signing the transaction; after the transaction is serialized, the transaction initiator needs to perform identity authentication on transaction data, signs the data by using a private key, namely signs the transactioniBlob in the step (3) by using the private key, and a signature result comprises signature data and a public key;
(5) submitting a transaction; after the transaction data is signed, the transaction metadata and the signature need to be submitted to the alliance chain network.
9. The blockchain-based shared office affiliate campus management system of claim 1 wherein: the rent management module comprises an deposit collecting module, a withdrawal module and a lease collecting module;
a deposit module: when the deposit is collected, judging whether the arrearage rent amount accounting is completed or not, and if the arrearage rent amount accounting is not completed, the deposit collection operation cannot be carried out; if the accounting is finished, the total bill and the invoice information are stored until the deposit operation is finished; finally, linking up relevant information of the deposit;
a lease quitting module: when the renting is quitted, the system judges whether the arrearage of the debt is completed or not, and if the arrearage is not completed, the renting operation can not be carried out; if the accounting is finished, the system stores the information of the total bill and the invoice, and then modifies the contract and the house source state until the successful lease returning is realized; finally, performing uplink on the lease quitting information;
a lease receiving module: when a user rents, the system judges whether accounting of hydropower is completed or not, and if the accounting is not completed, the user can not perform renting operation; if the accounting is completed, the renting is successful; and finally, performing uplink of the related information of the lease.
10. The blockchain-based shared office affiliate campus management system of claim 1 wherein: the rent management module links the chain according to the following steps:
A. acquiring a serial number of a user account; each account maintains its own serial number, which increases from 1 in turn, one serial number marking a transaction for that account; the current serial number of the user account is obtained from the alliance chain;
B. assembling storage certificate information; the step defines a key and a value simultaneously by using the user account address to carry out the storage operation; the certificate storage Key is convenient for retrieving certificate storage information, and the value stores certificate storage contents, including contract numbers, lease units, lease starting time and lease ending time; the value of Key is composed of rent management-database id, and the value of value comprises id, content _ id, start _ time, end _ time, repnt, id, company _ id, content _ id, time, transferfe, tar, money, type, period, term, account, bank, mark, id, company _ id, content _ id, notpay _ id, repnt, manage _ cost, park _ anode _ cost, dorm _ client _ cost, rubber _ client _ cost, elevator _ user _ cost, start _ time, end _ time, sum, notpay, and status; value is a data item of contract and is also a data item needing uplink;
C. serializing the transaction for network transmission; the content to be serialized in the step A comprises deposit certificate transaction, the value of the serial number acquired in the step A after being increased by 1, the unit price of the transaction fee, and the transaction fee; obtaining a transactioniBlob after serialization certificate-deposit transaction;
D. signing the transaction; after the transaction is serialized, the transaction initiator needs to perform identity authentication on transaction data, signs the data by using a private key, namely signs the transactioniBlob in the step C by using the private key, and a signature result comprises signature data and a public key;
E. submitting a transaction; after the transaction data is signed, the transaction metadata and the signature need to be submitted to the alliance chain network.
CN202011268982.4A 2020-11-13 2020-11-13 Block chain-based shared office joining park management system Withdrawn CN112347190A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011268982.4A CN112347190A (en) 2020-11-13 2020-11-13 Block chain-based shared office joining park management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011268982.4A CN112347190A (en) 2020-11-13 2020-11-13 Block chain-based shared office joining park management system

Publications (1)

Publication Number Publication Date
CN112347190A true CN112347190A (en) 2021-02-09

Family

ID=74363634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011268982.4A Withdrawn CN112347190A (en) 2020-11-13 2020-11-13 Block chain-based shared office joining park management system

Country Status (1)

Country Link
CN (1) CN112347190A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113128950A (en) * 2021-03-24 2021-07-16 广州智投链码科技有限公司 Enterprise chain code service platform
CN113961621A (en) * 2021-10-20 2022-01-21 山东大学 Elevator data monitoring system and method based on block chain

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113128950A (en) * 2021-03-24 2021-07-16 广州智投链码科技有限公司 Enterprise chain code service platform
CN113961621A (en) * 2021-10-20 2022-01-21 山东大学 Elevator data monitoring system and method based on block chain
CN113961621B (en) * 2021-10-20 2024-05-17 山东大学 Elevator data monitoring system and method based on block chain

Similar Documents

Publication Publication Date Title
CN108924092B (en) Public arbitration distributed cloud storage method and system based on block chain
Sunyaev et al. Distributed ledger technology
CN108833081B (en) Block chain-based equipment networking authentication method
CN109102269B (en) Transfer method and device based on block chain, block chain node and storage medium
CN110599213B (en) Article management method and device based on blockchain network and electronic equipment
EP3928276A1 (en) Trusted tokenized transactions in a blockchain system
CN112328689A (en) Universal asset business ecosystem based on block chain
Komalavalli et al. Overview of blockchain technology concepts
US11188907B1 (en) ACH authorization validation using public blockchains
KR20180115768A (en) Encryption method and system for secure extraction of data from a block chain
CN109636610B (en) Decentralized data transaction system and method
CN110728494A (en) Real estate service handling method, real estate property information system and real estate property information device
CN110930152B (en) Data processing method based on block chain and related equipment
CN113128950B (en) Enterprise chain code service platform
CN108717659A (en) A kind of measures of tax collection and framework based on block chain
CN110955699B (en) Decentralized electronic academic certificate checking method and system
CN110599079A (en) Logistics physical object handover method, platform and storage medium based on block chain
CN112347190A (en) Block chain-based shared office joining park management system
CN113128951A (en) Electronic contract management method and system based on enterprise chain codes
CN114529297A (en) Offline transaction method and device based on block chain and storage medium
CN111461881A (en) Data management method and device, computer equipment and storage medium
Kim et al. Blockchain-based automatic tracking and extracting construction document for claim and dispute support
CN115619396A (en) Data certificate processing method and device, block link node and storage medium
CN116961876A (en) Virtual resource management method, device, equipment and storage medium for blockchain
KR102185613B1 (en) Standard linkage system for private real estate transaction information network and integrated real estate trade support sysyem of ministry of land, infrastructure and transport and the operation method thereof

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210209

WW01 Invention patent application withdrawn after publication