Lease data management method, system, device and storage medium based on cloud platform

By dividing master nodes, slave nodes and neutral nodes on the cloud platform, using public key pair encryption and hash value verification, the problem of difficult security of master node data in the SaaS environment is solved, and the secure storage of rental data is realized.

CN118449701BActive Publication Date: 2024-12-13SHENZHEN HONGJING POWER INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410524699.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-12-13
Estimated Expiration
2044-04-29

AI Technical Summary

Technical Problem

In the SaaS environment, existing blockchain data storage technology requires the master node to broadcast the original data to the consensus node for verification, which makes it difficult to ensure the data security of the master node.

Method used

Establish a blockchain on the cloud platform, divide the master node, slave node and neutral node, the master node generates a public key pair and encrypts the data and sends it to the slave node for verification. The slave node verifies the hash value without complete decryption. Ensure data security.

Benefits of technology

Through encryption and hash verification, the data security of the master node is protected, the risk of consensus nodes obtaining original data is avoided, and the storage security and integrity of the leased data is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118449701B_ABST
    Figure CN118449701B_ABST
Patent Text Reader

Abstract

The present invention discloses a leasing data management method, system, device and storage medium based on a cloud platform, belonging to the field of blockchain technology, the method comprising: after detecting that a user has uploaded leasing data, establishing multiple computing nodes, dividing the computing nodes into master nodes, slave nodes and neutral nodes, the neutral node generating a first neutral value and a second neutral value, the master node generating a public key pair based on a computing rule, the first neutral value and a private key, converting the leasing data into first data and second data based on the public key pair, mapping the first data into a hash value based on a hash function, sending the second data and the hash value to the slave node, and the slave node verifying the hash value; if the verification is successful, the slave node returns a signature to the master node, and after the master node collects a predetermined number of signatures, the leasing data received this time is converted into an information block and uploaded to the blockchain. The present invention can verify the data of the master node and avoid obtaining the original data from the slave node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of blockchain storage technology, and specifically relates to a rental data management method, system, device and storage medium based on a cloud platform. Background Art

[0002] Currently, SaaS (software operation service) allows users to use cloud-based applications through Internet connection, which reduces the development and maintenance costs of enterprises. In addition, this method allows enterprise data to be uploaded to the software supplier's cloud for storage. For software providers of financial leasing management platforms, leasing data represents the vital interests of the enterprise, so the security of leasing data must be guaranteed when storing leasing data.

[0003] As a distributed ledger technology, blockchain has the characteristics of decentralization, immutability, transparency and security. Each data block is linked to the previous block to form a continuous chain, and any modification to the data will cause the chain to break. This enables blockchain to record historical data and ensure that the data cannot be tampered with. Therefore, there are currently a large number of technical solutions for applying blockchain to data storage, such as Chinese patent document CN115632800B, which discloses a source-end data storage method and device for the Internet of Things based on blockchain consensus. In this method, when it is detected that there is data to be uploaded to the chain collected by the source end and needs to be connected to the blockchain network, the target node corresponding to the data to be uploaded is determined, the target master node is determined from all consensus nodes included in the blockchain network, and based on the target master node, the data included in all consensus nodes in the blockchain network are synchronized to the target node; then the data to be uploaded is analyzed to obtain the data analysis results, and it is determined whether the data analysis results are used to indicate that the data to be uploaded meets the preset data upload conditions; if it is satisfied, the target block corresponding to the data to be uploaded is determined, and the data to be uploaded is stored in the target block. In this way, the security, integrity and authenticity of data storage are guaranteed.

[0004] For another example, Chinese patent document CN109495249B discloses a data storage method, node and blockchain system of a blockchain system. The method obtains the shared keys between any first node in the blockchain system and other second nodes in the blockchain system, and obtains the transaction information of the transaction initiated by the first node; processes the transaction information by means of each shared key and a preset hash algorithm with a key to obtain a hash tag; broadcasts the transaction information and the hash tag to each second node; determines an honest node from the nodes included in the blockchain system according to the verification message broadcast by each second node, and if the honest node determines that the transaction is a real transaction, the honest node stores the transaction information in a newly generated block for the main chain, wherein the verification message includes the result of the second node verifying the authenticity of the transaction.

[0005] However, the verification methods of the above consensus nodes are all based on the original data calculation to obtain the hash value, so as to verify the authenticity of the master node. This requires the master node to broadcast the original data to each consensus node. In the SaaS scenario, the public recognition node should be prevented from obtaining the original data of the master node to protect the data security of the master node. Therefore, a technical solution is needed that can both verify the data of the master node and prevent the consensus node from obtaining the original data. Summary of the invention

[0006] To achieve the above objectives, the present invention provides a cloud platform-based rental data management method, system, device and storage medium to solve the problems existing in the prior art.

[0007] In order to achieve the above-mentioned purpose of the invention, the present invention proposes a rental data management method based on a cloud platform, comprising:

[0008] Establishing a blockchain in the cloud platform, the blockchain includes a plurality of information blocks, each of which records the rental data uploaded by the user each time;

[0009] When it is detected that the user has uploaded the rental data, multiple computing nodes are established, each of which stores a private key belonging only to itself;

[0010] The computing nodes are divided into master nodes, slave nodes and neutral nodes, the master node generates a computing rule, and distributes the computing rule and the private key held by the master node to each of the slave nodes;

[0011] The neutral node generates a first neutral value and a second neutral value, and the master node generates a public key pair based on the calculation rule, the first neutral value and the private key;

[0012] The master node converts the lease data into first data and second data based on the public key pair, and maps the first data into a hash value based on a hash function;

[0013] The master node sends the second data and the hash value to the slave node, and the slave node converts the second data into the first data based on the calculation rule and the private key pair, and verifies the hash value based on the first data;

[0014] If the verification is successful, the slave node returns the signature to the master node. After the master node collects a predetermined number of signatures, the lease data received this time is converted into the information block and uploaded to the blockchain.

[0015] Furthermore, generating the public key pair comprises the following steps:

[0016] The calculation rule includes a conversion function, the private key of the master node includes an identifier and a digital string, the digital string includes numbers equal to the number of the computing nodes, and the master node generates N basic values ​​α based on the conversion function. n , N is the number of slave nodes, and the conversion function is: α n =A n x n , where A n is the value of the nth digit in the private key held by the master node, and x is the identifier held by the master node;

[0017] The public key pair includes a first sub-public key, a second sub-public key and a third sub-public key, the first neutral numerical value includes a first numerical value, a second numerical value and a third numerical value, the master node combines the results of multiplying the basic numerical value by the first numerical value into the first sub-public key, combines the results of multiplying the basic numerical value by the second numerical value into the second sub-public key, and combines the results of multiplying the basic numerical value by the third numerical value into the third sub-public key.

[0018] Furthermore, verifying the hash value includes the following steps:

[0019] The master node obtains the first data after encrypting the lease data using the first sub-public key and the second sub-public key, converts the first data using a hash function to obtain a first hash value, the master node obtains the second data after encrypting the lease data using the first sub-public key and the third sub-public key, and sends the second data and the first hash value to the slave node;

[0020] After receiving the second data from the node, the second data is decrypted using the third sub-public key, and then the first data is encrypted using the second sub-public key. The first data is converted using a hash function to obtain a second hash value. If the first hash value is the same as the second hash value, the verification is successful.

[0021] Furthermore, uploading the information block to the blockchain includes the following steps:

[0022] Each slave node has a unique number. After each successful verification of the hash value, the slave node stores and numbers the hash value as the historical value of the corresponding blockchain. After the slave node passes the verification of the hash value this time, the mth slave node calculates the extraction number β based on the first formula. m , the first formula is: β m =B im ·P, where B imis the value of the i-th digit in the private key held by the m-th slave node, P is the second value, and the slave node obtains the historical value corresponding to the extraction number as the signature;

[0023] After the master node receives the signatures of all the slave nodes, it sends the signatures to the blockchain and simultaneously sends an upload request. The blockchain verifies the signatures according to the hash values ​​of the existing information blocks. If a predetermined number of signatures pass the verification, the upload request is approved and the historical values ​​included in the signatures are stored in the newly uploaded information block.

[0024] Furthermore, establishing the computing node comprises the following steps:

[0025] Obtain the user's current hardware configuration, allocate multiple front-end nodes to the user based on the hardware configuration, sort the front-end nodes from small to large based on the current computing load, obtain the rental data uploaded by the user, and determine whether the rental data is greater than a first threshold. If so, extract the front-end nodes that are ranked first and a first number as the computing nodes; if not, extract the front-end nodes that are ranked first and a second number as the computing nodes.

[0026] Furthermore, allocating the hardware configuration to the user comprises the following steps:

[0027] Obtaining total resources of the cloud platform, dividing the total resources into multiple configuration pools, and assigning the user to one of the configuration pools;

[0028] Obtain the service configuration purchased by the user, allocate an initial configuration for the user in the configuration pool, the initial configuration is smaller than the service configuration, obtain the user's current service demand, if the service demand is smaller than the initial configuration, set the initial configuration as the hardware configuration, otherwise improve the initial configuration based on the service demand and use it as the hardware configuration.

[0029] Further, dividing the master node and the slave node comprises the following steps:

[0030] Calculate the penalty value γ of the kth computing node based on the second formula k , the second formula is: γ k =C k ω1+D k ω2, where C k is the historical number of times the kth computing node is selected as the master node by the current user, D kThe current computing loads ω1 and ω2 of the kth computing node are respectively the first weight and the second weight, the computing node with the lowest penalty value is used as the master node, and the remaining computing nodes are used as the slave nodes.

[0031] The present invention also provides a cloud platform-based rental data management system, which is used to implement the above-mentioned method, and the system includes:

[0032] A storage module, wherein a blockchain is established in the storage module, wherein the blockchain includes a plurality of information blocks, each of which records the rental data uploaded by the user each time;

[0033] A consensus module, when detecting that a user has uploaded the rental data, the consensus module establishes multiple computing nodes, each of which stores a private key belonging only to itself, and divides the computing nodes into master nodes, slave nodes, and neutral nodes. The master node generates a computing rule, distributes the computing rule and the private key held by itself to each of the slave nodes, and the neutral node generates a first neutral value and a second neutral value. The master node generates a public key pair based on the computing rule, the first neutral value, and the private key. The master node converts the rental data into first data and second data based on the public key pair, maps the first data to a hash value based on a hash function, and sends the second data and the hash value to the slave node. The slave node converts the second data into the first data based on the computing rule and the private key pair, and verifies the hash value based on the second data.

[0034] The chain module, if the verification is passed, the slave node returns the signature to the master node. After the master node collects a predetermined number of signatures, the chain module converts the rental data received this time into the information block and uploads it to the blockchain.

[0035] The present invention also discloses a cloud platform-based rental data management device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.

[0036] The present invention also discloses a computer storage medium, wherein the computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned method.

[0037] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0038] The present invention converts the lease data into a blockchain for storage, so that the stored data cannot be tampered with, thereby ensuring the security of user data; in the process of converting the lease data into the blockchain, a master node and a slave node are first generated, and then the data of the master node is distributed to the slave node, so that on the one hand, the slave node can verify the chain-up process of the master node, and on the other hand, the slave node can store the lease data received by the master node; in particular, during the verification process, the master node encrypts the lease data and sends it to the slave node, and the slave node can verify it without completely decrypting it, thereby protecting the security of enterprise data. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flowchart of a rental data management method based on a cloud platform according to the present invention;

[0040] Figure 2 This is a structural schematic diagram of a cloud platform-based rental data management system of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.

[0043] like Figure 1 As shown, a rental data management method based on a cloud platform includes:

[0044] Step S1: A blockchain is established in the cloud platform. The blockchain includes multiple information blocks, and each information block records the rental data uploaded by the user each time.

[0045] Specifically, the cloud platform is a cloud platform provided by software suppliers, which is composed of a server cluster; the blockchain is composed of multiple information blocks linked in chronological order of generation. Each blockchain corresponds to an enterprise user, that is, every time an enterprise user uploads leasing data, an information block is generated based on the leasing data and added to the end of the blockchain. The leasing data includes various electronic contract information of the enterprise as the lessor or lessee.

[0046] Step S2: When it is detected that the user has uploaded the rental data, multiple computing nodes are established, and each computing node stores a private key that belongs only to itself.

[0047] This embodiment establishes different numbers of computing nodes after uploading the rental data each time. When the rental data uploaded this time is large, a smaller number of computing nodes are selected for verification, thereby improving the verification efficiency. In addition, each computing node stores a private key that belongs only to itself, and the private key will be specifically introduced later.

[0048] Step S3: The computing nodes are divided into master nodes, slave nodes and neutral nodes. The master node generates a computing rule and distributes the computing rule and its own private key to each slave node.

[0049] Assuming that computing nodes 1-6 are currently established, computing node 1 can be used as the master node, computing nodes 2-5 as slave nodes, and computing node 6 as the neutral node; then, the master node generates computing rules and distributes them to the slave nodes. The form of the computing rules will be introduced later.

[0050] Step S4: The neutral node generates a first neutral value and a second neutral value, and the master node generates a public key pair based on the calculation rules, the first neutral value and the private key.

[0051] Step S5: The master node converts the lease data into first data and second data based on the public key pair, and maps the first data into a hash value based on the hash function.

[0052] In this embodiment, the first neutral value includes a first value, a second value and a third value, and the second neutral value includes a second value and a third value. After the master node takes out the second neutral value from the neutral node, it uses the second neutral value to convert the private key into a second private key, and then sends it to each slave node. In particular, the slave node can also access the neutral node and obtain the second neutral value, but the first neutral value can only be obtained by the master node, and the slave node cannot obtain the first neutral value from the neutral node.

[0053] The master node first generates multiple basic numerical values ​​based on the calculation rules and the private key, and then generates a public key pair by converting the first neutral numerical value and the basic numerical value. The public key pair includes multiple sub-public keys. The first data is obtained by encrypting the leased data with a part of the sub-public key, and the second data is obtained by encrypting the leased data with a part of the sub-public key. The hash function maps the first data to a hash value. Finally, the master node distributes the second data and the hash value to each slave node.

[0054] Step S6: The master node sends the second data and the hash value to the slave node. The slave node converts the second data into the first data based on the calculation rule and the private key pair, and verifies the hash value based on the first data.

[0055] Since each slave node understands the calculation rules, the private key, and the second neutral value, the slave node can obtain a partial sub-public key in the public key pair by combining the three. In this way, after receiving the second data, the slave node can use the partial sub-public key pair to convert the second data into the first data, and then use the hash function to convert the first data into a hash value, thereby verifying the hash value sent by the master node. If the hash value calculated by itself is consistent with the received hash value, the verification is successful.

[0056] Step S7: If the verification is successful, the slave node returns the signature to the master node. After the master node collects a predetermined number of signatures, it converts the rental data received this time into an information block and uploads it to the blockchain.

[0057] Here, the predetermined number is set to 3. When the number of signatures returned by the master node from the slave node exceeds 3, the lease data received this time is converted into an information block and added to the end of the blockchain.

[0058] The present invention converts the lease data into a blockchain for storage, so that the stored data cannot be tampered with, thereby ensuring the security of user data; in the process of converting the lease data into the blockchain, a master node and a slave node are first generated, and then the data of the master node is distributed to the slave node, so that on the one hand, the slave node can verify the chain-up process of the master node, and on the other hand, the slave node can store the lease data received by the master node; in particular, during the verification process, the master node encrypts the lease data and sends it to the slave node, and the slave node can verify it without completely decrypting it, thereby protecting the security of enterprise data.

[0059] It is particularly noteworthy that the present invention can verify the data of the master node and avoid obtaining the original data from the slave node.

[0060] In this embodiment, generating a public key pair includes the following steps:

[0061] The calculation rule includes a conversion function. The private key of the master node includes an identifier and a digital string. The digital string includes numbers equal to the number of computing nodes. The master node generates N basic values ​​α based on the conversion function. n , N is the number of slave nodes, and the conversion function is: α n =A n x n , where A n The value of the nth digit in the private key held by the master node, and x is the identifier held by the master node.

[0062] In this embodiment, the identifier of the master node private key is 5. Since there are 4 slave nodes, the private key is the digital string 3784. Then, in the corresponding conversion function, the value of N is 4, the values ​​corresponding to A1-A4 are 3, 7, 8, 4, and the value of x is 5. Then, after calculation, it can be obtained that the basic values ​​α1-α4 are 3*5=15, 7*25=175, 8*125=1000, and 4*625=2500, respectively. For the convenience of description, the four basic values ​​are defined as basic value 1, basic value 2, basic value 3, and basic value 4, respectively.

[0063] The public key pair includes a first sub-public key, a second sub-public key and a third sub-public key, the first neutral value includes a first value, a second value and a third value, and the master node combines the results of multiplying the base value by the first value into the first sub-public key, combines the results of multiplying the base value by the second value into the second sub-public key, and combines the results of multiplying the base value by the third value into the third sub-public key.

[0064] The first neutral value of this embodiment includes a first value 12, a second value 15, and a third value 18. The basic values ​​1-4 are multiplied by the first value 12 respectively to obtain 180, 2100, 12000, and 30000. After combining them, the first sub-public key 18021001200030000 is obtained. Similarly, the second sub-public key and the third sub-public key can be obtained, which will not be repeated here.

[0065] In this embodiment, verifying the hash value includes the following steps:

[0066] The master node encrypts the leased data using the first sub-public key and the second sub-public key to obtain the first data, converts the first data using the hash function to obtain the first hash value, the master node encrypts the leased data using the first sub-public key and the third sub-public key to obtain the second data, and sends the second data and the first hash value to the slave node.

[0067] After receiving the second data from the node, the third sub-public key is used to decrypt the second data, and then the second sub-public key is used to encrypt the first data. The first data is converted using a hash function to obtain the second hash value. If the first hash value is the same as the second hash value, the verification is successful.

[0068] Here, the first sub-public key, the second sub-public key and the third sub-public key are referred to as PK1, PK2 and PK3, and the leased data is referred to as Data. First, the leased data is encrypted with the first sub-public key to obtain PK1(Data), and then the leased data is encrypted with the second sub-public key to obtain PK2(PK1(Data)), that is, the first data is obtained at this time, and then the first data is mapped to the first hash value using a hash function; after that, PK1(Data) is encrypted with the third sub-public key to obtain PK3(PK1(Data)), that is, the second data. Finally, the master node sends the second data PK3(PK1(Data)) and the first hash value to each slave node. In particular, if the number of character bits of the public key and the leased data does not match during the encryption process, they can be matched by filling in 0.

[0069] The second neutral value of this embodiment includes a second value 15 and a third value 18. Since the identifier of the private key is 5 and the digital string is 3784, and since the slave node stores the calculation rules, after knowing the private key, the slave node can use the calculation rules to convert and obtain the basic values ​​1-4. Since the slave node can also know the second and third values, it can convert and obtain the second sub-public key and the third sub-public key based on the basic values ​​1-4. After receiving the second data PK3 (PK1 (Data)), the slave node can use the third sub-public key PK3 to decrypt the second data PK3 (PK1 (Data)) to obtain PK1 (Data), and then use the second sub-public key to encrypt PK1 (Data) to obtain the first data PK2 (PK1 (Data)). In this way, the slave node can also use the hash function to calculate the first data to obtain the second hash value, and since the first sub-public key cannot be known, the complete lease data cannot be obtained; finally, if the second hash value is the same as the first hash value, it means that the master node and the slave node have the same lease data, so the verification is passed.

[0070] In this embodiment, uploading the information block to the blockchain includes the following steps:

[0071] Each slave node has a unique number. After each successful verification of the hash value, the slave node stores the hash value as the historical value of the corresponding blockchain and numbers it. After the slave node passes the verification of the hash value this time, the mth slave node calculates the extraction number β based on the first formula m , the first formula is: β m =B im ·P, where B im is the value of the i-th digit in the private key held by the m-th slave node, P is the second value, and the slave node obtains the historical value corresponding to the extraction number as the signature.

[0072] For example, after the hash value is verified by slave node 1, the hash value is numbered as 100 and stored. After receiving the hash value and verifying it, the hash value is numbered as 101 and stored. In this way, each slave node stores a large number of historical values. Based on the previous, each slave node has its own unique private key. Here, the value of i is preset to 2. For slave node 1, the private key is 2658, the second number is 6, and the second value is 15. After calculating by the first formula, 6*15=90 is obtained. Then slave node 1 extracts the historical value numbered 90 as the signature and returns it to the master node.

[0073] After the master node receives the signatures of all slave nodes, it sends the signatures to the blockchain and simultaneously sends an upload request. The blockchain verifies the signatures based on the hash value of the existing information block. If a predetermined number of signatures pass the verification, the upload request is approved and the historical values ​​included in the signature are stored in the newly uploaded information block.

[0074] In this embodiment, after the master node receives 4 signatures, it sends the signature to the blockchain for verification. Since the hash value included in the signature has been uploaded to the blockchain, the blockchain must have the historical value included in the signature. Therefore, this step can verify the signature returned from the node. If the verification passes, the information block generated by the current rental data can be uploaded to the blockchain, and the information block also includes historical values. The historical data is the hash value of the information block that already exists in the blockchain. This allows the information blocks in the blockchain to verify each other and see if they have been modified after being uploaded to the chain.

[0075] This embodiment of establishing a computing node includes the following steps:

[0076] Obtain the user's current hardware configuration, allocate multiple front nodes to the user based on the hardware configuration, sort the front nodes from small to large based on the current computing load, obtain the rental data uploaded by the user, and determine whether the rental data is greater than a first threshold. If so, extract the front nodes with a first number and a front position as computing nodes; if not, extract the front nodes with a second number and a front position as computing nodes.

[0077] In this embodiment, the first number is smaller than the second number. When the size of the leased data is greater than the first threshold, a reduced number of computing nodes is selected for verification. This is because the larger the data, the longer the time required for transmission, encryption, decryption, and the like. Setting a smaller number of computing nodes can reduce the time required for data storage and reduce the overall load on the computing nodes.

[0078] The hardware configuration is specifically the server configuration allocated by the cloud platform to the user, such as 2 cores and 4G. After that, other servers with the same 2 cores and 4G configuration are selected as front-end nodes. The number of front-end nodes is greater than the first number and the second number. Then, these servers are sorted according to their current operating loads, and multiple front-end nodes with smaller loads are selected as computing nodes to participate in the consensus storage of the leased data. By selecting servers with the same configuration and load as nodes to verify the leased data in this step, it can be ensured that the verification time of each slave node is the same as much as possible.

[0079] In this embodiment, allocating hardware configuration to a user includes the following steps:

[0080] Obtain the total resources of the cloud platform, divide the total resources into multiple configuration pools, and assign the user to one of the configuration pools;

[0081] Get the service configuration purchased by the user, allocate an initial configuration to the user in the configuration pool. If the initial configuration is smaller than the service configuration, get the user's current service demand. If the service demand is smaller than the initial configuration, set the initial configuration as the hardware configuration. Otherwise, increase the initial configuration based on the service demand and use it as the hardware configuration.

[0082] Specifically, the total resources are the servers included in the cloud platform. Virtualization technology can be used to integrate the resources of multiple servers, and then multiple configuration pools can be divided based on the integrated resources. Virtual hosts can then be allocated to users from the configuration pools, which can efficiently utilize the server resources.

[0083] For example, the service configuration purchased by the user is 4 cores and 8G. The configuration pool first allocates an initial configuration of 2 cores and 4G to the user. When the configuration meets the user's needs, it will not be changed. When the initial configuration does not meet the user's service needs, the initial configuration is regenerated from the configuration pool, such as regenerating a hardware configuration of 4 cores and 8G. Through this step, the user's hardware configuration can be continuously adjusted. When the user's service demand is low, less hardware configuration can be allocated without affecting the user's use, thereby achieving rational utilization of the total resources of the cloud platform.

[0084] In this embodiment, the division of the master node and the slave node includes the following steps:

[0085] Calculate the penalty value γ of the kth computing node based on the second formula k , the second formula is: γ k =C k ω1+D k ω2, where C k is the historical number of times the kth computing node is selected as the master node by the current user, D kis the current computing load of the kth computing node, ω1 and ω2 are the first weight and the second weight respectively. The computing node with the lowest penalty value is used as the master node, and the remaining computing nodes are used as slave nodes.

[0086] For the same user, the more times the current computing node participates in the user's rental data consensus, the larger the value of A is, the more consensus tasks the current computing node processes, the greater the computing load is, and the larger the value of B is. Therefore, through this formula, the selection of the master node can be continuously changed, and the node with a smaller computing load can be selected as the master node as much as possible.

[0087] like Figure 2 As shown, the present invention also provides a rental data management system based on a cloud platform, which is used to implement the above method, and the system includes:

[0088] A storage module, in which a blockchain is established. The blockchain includes multiple information blocks, and each information block records the rental data uploaded by the user each time;

[0089] The consensus module, when detecting that the user has uploaded the rental data, establishes multiple computing nodes, each computing node stores a private key belonging only to itself, and divides the computing nodes into master nodes, slave nodes, and neutral nodes. The master node generates a computing rule, distributes the computing rule and the private key held by itself to each slave node, and the neutral node generates a first neutral value and a second neutral value. The master node generates a public key pair based on the computing rule, the first neutral value, and the private key. The master node converts the rental data into the first data and the second data based on the public key pair, maps the first data to the hash value based on the hash function, and sends the second data and the hash value to the slave node. The slave node converts the second data into the first data based on the computing rule and the private key pair, and verifies the hash value based on the second data.

[0090] The on-chain module, if the verification is passed, returns the signature from the node to the master node. After the master node collects a predetermined number of signatures, the on-chain module converts the rental data received this time into an information block and uploads it to the blockchain.

[0091] The present invention also discloses a cloud platform-based rental data management device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.

[0092] The present invention also discloses a computer storage medium, wherein the computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above method.

[0093] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0094] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0095] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0096] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A rental data management method based on a cloud platform, characterized in that: include: Establishing a blockchain in the cloud platform, the blockchain includes a plurality of information blocks, each of which records the rental data uploaded by the user each time; When it is detected that the user has uploaded the rental data, multiple computing nodes are established, each of which stores a private key belonging only to itself; The computing nodes are divided into master nodes, slave nodes and neutral nodes, the master node generates a computing rule, and distributes the computing rule and the private key held by the master node to each of the slave nodes; The neutral node generates a first neutral value and a second neutral value, and the master node generates a public key pair based on the calculation rule, the first neutral value and the private key; The master node converts the lease data into first data and second data based on the public key pair, and maps the first data into a hash value based on a hash function; The master node sends the second data and the hash value to the slave node, and the slave node converts the second data into the first data based on the calculation rule and the private key pair, and verifies the hash value based on the first data; If the verification is successful, the slave node returns the signature to the master node. After the master node collects a predetermined number of signatures, the lease data received this time is converted into the information block and uploaded to the blockchain; Generating the public key pair comprises the following steps: The calculation rule includes a conversion function, the private key of the master node includes an identifier and a digital string, the digital string includes numbers equal to the number of the computing nodes, and the master node generates N basic values ​​α based on the conversion function. n , N is the number of slave nodes, and the conversion function is: α n =A n x n , where A n is the value of the nth digit in the private key held by the master node, and x is the identifier held by the master node; The public key pair includes a first sub-public key, a second sub-public key and a third sub-public key, the first neutral value includes a first value, a second value and a third value, the master node combines the results of multiplying the base value by the first value into the first sub-public key, combines the results of multiplying the base value by the second value into the second sub-public key, and combines the results of multiplying the base value by the third value into the third sub-public key; Verifying the hash value includes the following steps: The master node obtains the first data after encrypting the lease data using the first sub-public key and the second sub-public key, converts the first data using a hash function to obtain a first hash value, the master node obtains the second data after encrypting the lease data using the first sub-public key and the third sub-public key, and sends the second data and the first hash value to the slave node; After receiving the second data from the node, the second data is decrypted using the third sub-public key, and then the first data is encrypted using the second sub-public key. The first data is converted using a hash function to obtain a second hash value. If the first hash value is the same as the second hash value, the verification is successful.

2. The method according to claim 1, characterized in that Uploading the information block to the blockchain includes the following steps: Each of the slave nodes has a unique number. After the slave node successfully verifies the hash value once, the hash value is stored and numbered as the historical value of the corresponding blockchain. After the slave node verifies the hash value this time, the mth slave node calculates the extraction number β based on the first formula. m , the first formula is: β m =B im ·P, where B im is the value of the i-th digit in the private key held by the m-th slave node, P is the second value, and the slave node obtains the historical value corresponding to the extraction number as the signature; After the master node receives the signatures of all the slave nodes, it sends the signatures to the blockchain and simultaneously sends an upload request. The blockchain verifies the signatures according to the hash values ​​of the existing information blocks. If a predetermined number of signatures pass the verification, the upload request is approved and the historical values ​​included in the signatures are stored in the newly uploaded information block.

3. The method according to claim 1, characterized in that: Establishing the computing node comprises the following steps: Obtain the user's current hardware configuration, allocate multiple front-end nodes to the user based on the hardware configuration, sort the front-end nodes from small to large based on the current computing load, obtain the rental data uploaded by the user, and determine whether the rental data is greater than a first threshold. If so, extract the front-end nodes that are ranked first and a first number as the computing nodes; if not, extract the front-end nodes that are ranked first and a second number as the computing nodes.

4. The method according to claim 3, characterized in that Allocating the hardware configuration to the user comprises the following steps: Obtaining total resources of the cloud platform, dividing the total resources into multiple configuration pools, and assigning the user to one of the configuration pools; Obtain the service configuration purchased by the user, allocate an initial configuration for the user in the configuration pool, the initial configuration is smaller than the service configuration, obtain the user's current service demand, if the service demand is smaller than the initial configuration, set the initial configuration as the hardware configuration, otherwise improve the initial configuration based on the service demand and use it as the hardware configuration.

5. The method according to claim 2, characterized in that: Dividing the master node and the slave node comprises the following steps: Calculate the penalty value γ of the kth computing node based on the second formula k , the second formula is: γ k =C k ω1+D k ω2, where C k is the historical number of times the kth computing node is selected as the master node by the current user, D k is the current computing load of the kth computing node, ω1 and ω2 are respectively the first weight and the second weight, the computing node with the lowest penalty value is used as the master node, and the remaining computing nodes are used as the slave nodes.

6. A cloud-based rental data management system, used to implement the method according to any one of claims 1 to 5, characterized in that: A storage module, wherein a blockchain is established in the storage module, wherein the blockchain includes a plurality of information blocks, each of which records the rental data uploaded by the user each time; A consensus module, when detecting that a user has uploaded the rental data, the consensus module establishes multiple computing nodes, each of which stores a private key belonging only to itself, and divides the computing nodes into master nodes, slave nodes, and neutral nodes. The master node generates a computing rule, distributes the computing rule and the private key held by itself to each of the slave nodes, and the neutral node generates a first neutral value and a second neutral value. The master node generates a public key pair based on the computing rule, the first neutral value, and the private key, wherein the computing rule includes a conversion function, the private key of the master node includes an identifier and a digital string, the digital string includes a number equal to the number of computing nodes, and the master node generates N basic values ​​α based on the conversion function. n , N is the number of slave nodes, and the conversion function is: α n =A n x n , where A n is the value of the nth digit in the private key held by the master node, x is the identifier held by the master node, the public key pair includes a first sub-public key, a second sub-public key and a third sub-public key, the first neutral value includes a first value, a second value and a third value, the master node combines the results of multiplying the base value by the first value into the first sub-public key, combines the results of multiplying the base value by the second value into the second sub-public key, and combines the results of multiplying the base value by the third value into the third sub-public key, the master node converts the leased data into first data and second data based on the public key pair, maps the first data into a hash value based on a hash function, the master node sends the second data and the hash value to the slave node, and the slave node converts the leased data into first data and second data based on the public key pair, maps the first data into a hash value based on a hash function, and sends the second data and the hash value to the slave node. The calculation rule and the private key pair convert the second data into the first data, and verify the hash value based on the second data, wherein the master node uses the first sub-public key and the second sub-public key to encrypt the leased data to obtain the first data, and uses the hash function to convert the first data to obtain the first hash value, and the master node uses the first sub-public key and the third sub-public key to encrypt the leased data to obtain the second data, and sends the second data and the first hash value to the slave node. After receiving the second data, the slave node uses the third sub-public key to decrypt the second data, and then uses the second sub-public key to encrypt the first data, and uses the hash function to convert the first data to obtain the second hash value. If the first hash value is the same as the second hash value, the verification is passed; The chain module, if the verification is passed, the slave node returns the signature to the master node. After the master node collects a predetermined number of signatures, the chain module converts the rental data received this time into the information block and uploads it to the blockchain.

7. A cloud platform-based rental data management device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.

8. A computer storage medium, characterized in that The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method according to any one of claims 1 to 5.