Information storage method and system for cloud platform

By selecting the most matching physical storage interval in the cloud platform for blockchain data storage, the problem of excessive scheduling of storage information in the existing technology is solved, and more efficient data scheduling and smart contract scheduling are achieved.

CN118151843BActive Publication Date: 2025-03-28XIAN QIJIAPING NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410103170.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2025-03-28
Estimated Expiration
2044-01-24

AI Technical Summary

Technical Problem

When the existing cloud platform information storage method is stored in blockchain data, it may lead to the scheduling time of stored information, affecting the timeliness of data scheduling.

Method used

The terminal device receives the blockchain storage request, determines the free information of multiple physical storage intervals in the cloud platform, selects the physical storage interval with the available storage space greater than the required bytes, and calculates the matching degree based on the response time and the stored smart contract, and selects the most matching physical storage interval for storage.

Benefits of technology

This solution can reduce the scheduling time of stored information, improve the timeliness of data scheduling, and improve the scheduling efficiency of smart contracts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118151843B_ABST
    Figure CN118151843B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides an information storage method and system for a cloud platform, wherein a terminal device receives a storage request of a blockchain, wherein the storage request includes: the bytecode of a first smart contract and the required bytes; the idle information of multiple physical storage intervals of a storage cluster in the cloud platform is determined, wherein the idle information includes: available storage space, response time, and stored smart contract information; the terminal device selects n physical storage intervals whose available storage space is greater than the required bytes from the multiple physical storage intervals based on the idle information, calculates the matching degree with the first smart contract based on the response time of each physical storage interval in the n physical storage intervals and the stored smart contract, and obtains n matching degrees; the terminal device selects one physical storage interval from the n physical storage intervals based on the n matching degrees as the physical storage interval for storing the first smart contract, and adds the address of the first smart contract to the contract status data table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of communications and cloud platforms, and specifically relates to an information storage method and system for a cloud platform. Background Art

[0002] Cloud is the virtualization of servers to form a virtual resource pool, which saves more resource costs and is easier to manage than the previous physical machines. Cloud is the concept of computing, storage, and network resource pooling. The search engines, emails, and network disks we use every day are very standard clouds, and most of them are free. Cloud is an upgrade to the Internet, which means that the Internet does not just store data, but provides you with some kind of service. Cloud computing, cloud storage, cloud services, cloud platforms, etc. are different forms of using clouds to combine a bunch of machines through the network, which are sub-concepts under the cloud. In general, cloud service = cloud platform.

[0003] With the development of blockchain, more and more blockchain data is stored through cloud platforms, which requires the information storage of cloud platforms to cooperate with blockchain. The existing cloud platform information storage method is random allocation storage, which may cause the scheduling time of storage information to be too long, affecting the timeliness of data scheduling. Summary of the invention

[0004] The present application provides a cloud platform information storage method and system, which can reduce the scheduling time of stored information and improve the timeliness of data scheduling.

[0005] In a first aspect, the present application provides a method for storing information on a cloud platform, the method comprising the following steps:

[0006] The terminal device receives a storage request of the blockchain, wherein the storage request includes: the bytecode of the first smart contract and the required bytes; determines the idle information of multiple physical storage intervals of the storage cluster in the cloud platform, wherein the idle information includes: available storage space, response time, and stored smart contract information;

[0007] The terminal device selects n physical storage intervals whose available storage space is greater than the required bytes from the multiple physical storage intervals according to the idle information, and calculates the matching degree with the first smart contract according to the response time of each physical storage interval in the n physical storage intervals and the stored smart contract to obtain n matching degrees;

[0008] The terminal device selects one physical storage interval from the n physical storage intervals as the physical storage interval for storing the first smart contract based on the n matching degrees, and adds the address of the first smart contract to the contract status data table.

[0009] In a second aspect, an information storage system for a cloud platform is provided, the system comprising:

[0010] A receiving unit, configured to receive a storage request of a blockchain, wherein the storage request includes: a bytecode of a first smart contract and required bytes;

[0011] A processing unit is used to determine idle information of multiple physical storage intervals of a storage cluster in the cloud platform, wherein the idle information includes: available storage space, response time, and stored smart contract information; select n physical storage intervals whose available storage space is greater than the required bytes from the multiple physical storage intervals according to the idle information, and calculate the matching degree with the first smart contract according to the response time of each physical storage interval in the n physical storage intervals and the stored smart contract to obtain n matching degrees;

[0012] The selection unit is used to select one physical storage interval from the n physical storage intervals as the physical storage interval storage of the first smart contract according to the n matching degrees, and add the address of the first smart contract to the contract status data table.

[0013] In a third aspect, the present application provides a computer storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute some or all of the steps described in the first aspect of the present application.

[0014] The embodiments of the present application have the following beneficial effects:

[0015] The technical solution provided by the present application is that a terminal device receives a storage request of a blockchain, and the above storage request includes: the bytecode of a first smart contract and the required bytes; the idle information of multiple physical storage intervals of a storage cluster in a cloud platform is determined, and the above idle information includes: available storage space, response time, and stored smart contracts; the terminal device selects n physical storage intervals whose available storage space is greater than the required bytes from multiple physical storage intervals based on the above idle information, and calculates the matching degree with the first smart contract based on the response time of each physical storage interval in the n physical storage intervals and the stored smart contracts to obtain n matching degrees; the terminal device selects 1 physical storage interval from the n physical storage intervals as the physical storage interval for storing the first smart contract based on the n matching degrees, and adds the address of the first smart contract to the contract status data table. The above scheme takes into account the matching degree of smart contracts in a single physical storage interval. In the scheduling of smart contracts in blockchain, multiple smart contracts will be called in many cases, and multiple smart contracts may have a certain correlation. If they are in a single physical storage interval, then in the subsequent scheduling of smart contracts, it is possible to schedule multiple smart contracts in one physical storage interval at a time, which can improve the scheduling efficiency of smart contracts, reduce the calling time of storage information, and improve the timeliness of data scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is a schematic diagram of the architecture of a cloud platform and blockchain provided in an embodiment of the present application;

[0018] Figure 2 It is a flowchart of an information storage method of a cloud platform provided in an embodiment of the present application;

[0019] Figure 3 It is a flowchart of the smart contract call provided by the embodiment of the present application;

[0020] Figure 4 It is a structural block diagram of an information storage system of a cloud platform provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, systems, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] The following is an introduction to the relevant terms involved in this application.

[0025] Smart Contracts

[0026] Smart contracts refer to contracts that are defined in digital form and can automatically execute clauses. Digital form means that the contract must be implemented in computer code, because as long as the parties reach an agreement, the rights and obligations established by the smart contract will be automatically executed, and the results cannot be denied. In blockchain applications, when the transaction that deploys a smart contract reaches a consensus in most nodes, it can be considered that the smart contract has been embedded in the blockchain system. Users can manage a piece of state data through the interface method of the smart contract, and the changes in this piece of state data are on the chain, so that users can modify the on-chain data through smart contracts.

[0027] ACL (Access Control List)

[0028] Using an access control list based on an access control matrix, each object (in the file system) corresponds to a serial subject. The access control list consists of access control entries (ACEs). The access control list describes the access control permissions of a user or system process to each object. The main disadvantage of the access control list is that it is not possible to enumerate the access permissions of an object efficiently and quickly. Therefore, to determine all the access permissions of an object, it is necessary to search the entire access control list to find the corresponding access permissions.

[0029] The following describes the architecture of the cloud platform and blockchain involved in the embodiments of the present application.

[0030] The present application also provides a schematic diagram of the architecture of a cloud platform and a blockchain, wherein the cloud platform includes: a plurality of terminal devices 10, such as Figure 1 As shown, multiple terminal devices are interconnected through a wireless network or a wired network to form a cloud platform. The terminal device 10 includes at least one processor 11 and a memory 12, and may also include a communication interface 14, a display screen 16 and a bus 13. Among them, the processor 11, the memory 12, the display screen 16 and the communication interface 14 can communicate with each other through the bus 13. The communication interface 14 can transmit information, and the communication interface 14 can have a wireless communication function, and the wireless communication function can be a short-range wireless communication or a long-range communication function (such as LTE or NR mode). The processor 11 can call the logic instructions in the memory 12 to execute or support the method in the embodiment of the present application.

[0031] Any of the above multiple terminal devices can be connected to the blockchain and become a node of the blockchain. The form and specific implementation of the above blockchain are not limited in this application.

[0032] In addition, the logic instructions in the memory 12 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0033] The memory 12, as a computer-readable storage medium, can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the method in the embodiment of the present disclosure. The processor 11 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 12, that is, implementing or supporting the method in the embodiment of the present application.

[0034] The terminal device 10 may specifically be a computer device, a mobile terminal device, a server, or other terminal device with strong data processing capabilities.

[0035] The specific methods are introduced in detail below.

[0036] See also Figure 2 , the present application also provides an information storage method for a cloud platform, Figure 2 A schematic diagram of a method for storing information on a cloud platform provided in this application. The method can be used in Figure 1 Executed under the cloud platform architecture shown in Figure 2 As shown, the above method may include the following steps:

[0037] Step S201: The terminal device receives a storage request of the blockchain, wherein the storage request includes: the bytecode of the first smart contract and the required bytes; and determines the idle information of multiple physical storage intervals of the storage cluster in the cloud platform, wherein the idle information includes: available storage space, response time, and stored smart contract information.

[0038] For example, the above-mentioned multiple physical storage intervals may specifically include: multiple storage devices (such as hard disks) mounted on a single terminal device, and of course, multiple storage devices mounted on multiple terminal devices. The specific implementation method of the present application is not limited to the specific form of the above-mentioned physical storage intervals.

[0039] The above-mentioned storage request can be an access request sent by the blockchain. The specific format of the above-mentioned access request is not limited in this application. Of course, in an optional application scenario, the above-mentioned storage request can also be a request in other forms of blockchain. The specific format of the storage request is not limited in this application.

[0040] The idle information may also include other information, including but not limited to: the number of available threads, load rate, memory usage rate, etc. of the terminal device.

[0041] The above-mentioned available storage space may specifically include: available storage space of a single terminal device, and of course, available storage space of a single physical storage interval.

[0042] Step S202: The terminal device selects n physical storage intervals whose available storage space is greater than the required bytes from the multiple physical storage intervals according to the free information, and calculates the matching degree with the first smart contract according to the response time of each physical storage interval in the n physical storage intervals and the stored smart contract to obtain n matching degrees;

[0043] Step S203: The terminal device selects one physical storage interval from the n physical storage intervals as the physical storage interval for storing the first smart contract based on the n matching degrees, and adds the address of the first smart contract to the contract status data table.

[0044] Let's take a practical example to illustrate. Assume that deploying the welcome contract (i.e. the first smart contract) will generate a new contract address 0x333. After the bytecode of the contract is put into the virtual machine and runs successfully, a table name 333 will be created, and the data after execution will be stored in table 333. The data in this table is the status data of the contract execution; then the contract permission table 333_ac l corresponding to the contract is created and initialized.

[0045] The technical solution provided by the present application is that a terminal device receives a storage request of a blockchain, and the above storage request includes: the bytecode of a first smart contract and the required bytes; the idle information of multiple physical storage intervals of a storage cluster in a cloud platform is determined, and the above idle information includes: available storage space, response time, and stored smart contracts; the terminal device selects n physical storage intervals whose available storage space is greater than the required bytes from multiple physical storage intervals based on the above idle information, and calculates the matching degree with the first smart contract based on the response time of each physical storage interval in the n physical storage intervals and the stored smart contracts to obtain n matching degrees; the terminal device selects 1 physical storage interval from the n physical storage intervals as the physical storage interval for storing the first smart contract based on the n matching degrees, and adds the address of the first smart contract to the contract status data table. The above scheme takes into account the matching degree of smart contracts in a single physical storage interval. In the scheduling of smart contracts in blockchain, multiple smart contracts will be called in many cases, and multiple smart contracts may have a certain correlation. If they are in a single physical storage interval, then in the subsequent scheduling of smart contracts, it is possible to schedule multiple smart contracts in one physical storage interval at a time, which can improve the scheduling efficiency of smart contracts, reduce the calling time of storage information, and improve the timeliness of data scheduling.

[0046] In an optional technical scenario, the above-mentioned calculation of the matching degree with the first smart contract based on the response time of each physical storage interval in the n physical storage intervals and the stored smart contract information to obtain the n matching degrees may specifically include:

[0047] Extract the response time and stored smart contract information of one physical storage interval from the n physical storage intervals, calculate a matching degree of one physical storage interval based on the response time and the stored smart contract information, traverse the n physical storage intervals to calculate n matching degrees, and calculate a matching degree of one physical storage interval based on the response time and the stored smart contract information specifically includes:

[0048] Perform classification identification on the first smart contract to determine the first type corresponding to the first smart contract, extract repeated extraction information of the first type from the stored smart contract information, and calculate a matching degree according to the following formula (1);

[0049] Matching degree 1 = (T / Δt1)*z1; Formula (1)

[0050] Wherein, Δt1 is the response time of a physical storage interval, the above T is the average value of the response time of n physical storage intervals, and the above z1 is the repeated extraction information value.

[0051] By way of example, the repeated extraction information may specifically include: the number of repeated extractions of the first type of stored smart contract information within a physical storage interval or the ratio of repeated extractions of the first type of stored smart contract information within a physical storage interval, the above ratio = x1 / X*100%, where x1 is the number of repeated extractions of the first type of stored smart contract information within a physical storage interval, and X is the total number of the first type of stored smart contracts within a physical storage interval.

[0052] The following is an actual example to illustrate the calculation method of the above matching degree. Assuming Δt1=10 milliseconds, T is 15 milliseconds, the total number of smart contracts of the first type is 50, and the number of repeated extractions is 25 times, then the calculated matching degree 1=(15 / 10)*25=37.5.

[0053] The number of repeated extractions mentioned above may specifically include: the number of times multiple smart contracts (of the same type) are extracted at one time.

[0054] For example, the terminal device selects one physical storage interval from n physical storage intervals as the physical storage interval storage of the first smart contract according to n matching degrees, which may specifically include:

[0055] The terminal device selects a physical storage interval corresponding to a highest matching degree from the n matching degrees as the physical storage interval for storing the first smart contract.

[0056] Of course, in practical applications, the above matching degree may also be calculated in other ways. When the calculation methods are different, different selection strategies may be selected.

[0057] For example, the above method may further include:

[0058] The terminal device receives a permission setting request for the first smart contract sent by the contract administrator of the blockchain, where the permission setting request includes a whitelist of users calling the first smart contract, and adds the whitelist of users calling the first smart contract to the contract status data table.

[0059] For example, the above method may further include:

[0060] The caller of the terminal device receives the call request sent by the blockchain. The call request includes the address of the smart contract to be called and the user ID. The caller queries the physical storage interval corresponding to the address of the smart contract to be called through the contract status data table. If there are multiple addresses and the same physical storage interval, the caller extracts multiple whitelists corresponding to the address of the smart contract to be called, and checks whether the multiple whitelists all have the above user ID. If the multiple whitelists all have the above user ID, the caller calls multiple smart contracts based on the address of the smart contract to be called from the physical storage interval.

[0061] For example, the above method may further include:

[0062] If only part of the whitelists among multiple whitelists have the above-mentioned user ID, the caller extracts the partial address corresponding to the partial whitelist, and calls the partial smart contract corresponding to the partial address from the physical storage interval based on the partial address.

[0063] The following is a practical example to illustrate the calling method. Figure 3 As shown, the following steps are included:

[0064] Step S301: The caller of the terminal device receives a call request sent by the blockchain. The call request includes two addresses and a user ID. The two addresses are 0x333 and 0x888, and the user ID is TOM.

[0065] Step S302: The caller searches the contract permission table and finds that the physical storage interval corresponding to 333_ac l and 888_ac l is memory 3. The caller extracts two whitelists corresponding to 333_ac l and 888_ac l; it is assumed here that both whitelists of 333_ac l and 888_ac l have TOM.

[0066] Step S303, the caller obtains the smart contract 333 and smart contract 888 corresponding to 0x333 and 0x888 from the memory 3 through the M3 interface (a physical IO interface) of the memory 3.

[0067] The above technical solution can jointly call two contracts, thereby improving the efficiency of the call.

[0068] See also Figure 4 , Figure 4 A schematic diagram of the structure of an information storage system of a cloud platform is provided, the system comprising:

[0069] The receiving unit 401 is used to receive a storage request of the blockchain, wherein the storage request includes: the bytecode of the first smart contract and the required bytes;

[0070] The processing unit 402 is used to determine the idle information of multiple physical storage intervals of the storage cluster in the cloud platform, wherein the idle information includes: available storage space, response time, and stored smart contract information; select n physical storage intervals whose available storage space is greater than the required bytes from the multiple physical storage intervals according to the idle information, and calculate the matching degree with the first smart contract according to the response time of each physical storage interval in the n physical storage intervals and the stored smart contract to obtain n matching degrees;

[0071] The selection unit 403 is used to select one physical storage interval from the n physical storage intervals as the physical storage interval for storing the first smart contract according to the n matching degrees, and add the address of the first smart contract to the contract status data table.

[0072] For example,

[0073] The processing unit 402 is specifically used to extract the response time and stored smart contract information of one physical storage interval among n physical storage intervals, calculate a matching degree of one physical storage interval based on the response time and the stored smart contract information, and traverse the n physical storage intervals to calculate and obtain n matching degrees.

[0074] For example,

[0075] The processing unit 402 is specifically configured to perform classification identification on the first smart contract to determine a first type corresponding to the first smart contract, extract repeated extraction information of the first type from the stored smart contract information, and calculate a matching degree according to the following formula (1);

[0076] Matching degree 1 = (T / Δt1)*z1; Formula (1)

[0077] Wherein, Δt1 is the response time of a physical storage interval, the above T is the average value of the response time of n physical storage intervals, and the above z1 is the repeated extraction information value.

[0078] For example,

[0079] The repeated extraction information specifically includes: the number of repeated extractions x1 of the first type of stored smart contract information in a physical storage interval or the ratio of repeated extractions of the first type of stored smart contract information in a physical storage interval;

[0080] Ratio = x1 / X*100%,

[0081] Where x1 is the number of repeated extractions of the first type of stored smart contract information in a physical storage interval, and X is the total number of the first type of stored smart contracts in a physical storage interval.

[0082] For example,

[0083] The selection unit 403 is specifically used to select a physical storage interval corresponding to a highest matching degree from the n matching degrees as the physical storage interval for storing the first smart contract.

[0084] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0085] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0086] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0087] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0088] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0089] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0091] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0092] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a volatile memory or a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM) and direct RAM bus RAM (DR RAM). Various media that can store program code are available.

[0093] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions without departing from the spirit and scope of the present invention, and can make various changes and modifications, including the combination of the above-mentioned different functions and implementation steps, including software and hardware implementation methods, all of which are within the scope of protection of the present invention.

Claims

1. A cloud platform information storage method, characterized in that: The method comprises the following steps: The terminal device receives a storage request of the blockchain, wherein the storage request includes: the bytecode of the first smart contract and the required bytes; determines the idle information of multiple physical storage intervals of the storage cluster in the cloud platform, wherein the idle information includes: available storage space, response time, and stored smart contract information; The terminal device selects n physical storage intervals whose available storage space is greater than the required bytes from the multiple physical storage intervals according to the idle information, and calculates the matching degree with the first smart contract according to the response time of each physical storage interval in the n physical storage intervals and the stored smart contract to obtain n matching degrees; The terminal device selects one physical storage interval from the n physical storage intervals as the physical storage interval for storing the first smart contract according to the n matching degrees, and adds the address of the first smart contract to the contract status data table; the calculation of the matching degree with the first smart contract according to the response time of each physical storage interval in the n physical storage intervals and the stored smart contract information to obtain the n matching degrees specifically includes: Extracting the response time and the stored smart contract information of one physical storage interval from the n physical storage intervals, calculating a matching degree of the one physical storage interval according to the response time and the stored smart contract information, and traversing the n physical storage intervals to calculate and obtain n matching degrees; the calculating a matching degree of the one physical storage interval according to the response time and the stored smart contract information specifically includes: Perform classification identification on the first smart contract to determine the first type corresponding to the first smart contract, extract repeated extraction information of the first type from the stored smart contract information, and calculate a matching degree according to the following formula (1); Matching degree 1 = (T / Δt1)*z1; Formula (1) Wherein, Δt1 is the response time of a physical storage interval, the above T is the average response time of n physical storage intervals, and the above z1 is the repeated extraction information value; The repeated extraction information specifically includes: the number of repeated extractions x1 of the first type of stored smart contract information in a physical storage interval or the ratio of repeated extractions of the first type of stored smart contract information in a physical storage interval; Ratio = x1 / X*100%, Where x1 is the number of repeated extractions of the first type of stored smart contract information in a physical storage interval, and X is the total number of the first type of stored smart contracts in a physical storage interval.

2. The information storage method of the cloud platform according to claim 1, characterized in that: The terminal device selects one physical storage interval from the n physical storage intervals according to the n matching degrees as the physical storage interval storage of the first smart contract specifically includes: The terminal device selects a physical storage interval corresponding to a highest matching degree from the n matching degrees as the physical storage interval for storing the first smart contract.

3. An information storage system for a cloud platform, characterized in that: The system comprises: A receiving unit, configured to receive a storage request of a blockchain, wherein the storage request includes: a bytecode of a first smart contract and required bytes; A processing unit is used to determine idle information of multiple physical storage intervals of a storage cluster in the cloud platform, wherein the idle information includes: available storage space, response time, and stored smart contract information; select n physical storage intervals whose available storage space is greater than the required bytes from the multiple physical storage intervals according to the idle information, and calculate the matching degree with the first smart contract according to the response time of each physical storage interval in the n physical storage intervals and the stored smart contract to obtain n matching degrees; A selection unit, configured to select one physical storage interval from the n physical storage intervals as the physical storage interval for storing the first smart contract according to the n matching degrees, and add the address of the first smart contract to the contract status data table; The processing unit is specifically used to extract the response time and the stored smart contract information of one physical storage interval of the n physical storage intervals, calculate a matching degree of the one physical storage interval according to the response time and the stored smart contract information, and traverse the n physical storage intervals to calculate and obtain n matching degrees; The processing unit is specifically configured to perform classification identification on the first smart contract to determine a first type corresponding to the first smart contract, extract repeated extraction information of the first type from the stored smart contract information, and calculate a matching degree according to the following formula (1); Matching degree 1 = (T / Δt1)*z1; Formula (1) Wherein, Δt1 is the response time of a physical storage interval, the above T is the average response time of n physical storage intervals, and the above z1 is the repeated extraction information value; The repeated extraction information specifically includes: the number of repeated extractions x1 of the first type of stored smart contract information in a physical storage interval or the ratio of repeated extractions of the first type of stored smart contract information in a physical storage interval; Ratio = x1 / X*100%, Where x1 is the number of repeated extractions of the first type of stored smart contract information in a physical storage interval, and X is the total number of the first type of stored smart contracts in a physical storage interval.

4. The information storage system of the cloud platform according to claim 3, characterized in that: The selection unit is specifically used to select a physical storage interval corresponding to a highest matching degree from n matching degrees as the physical storage interval for storing the first smart contract.

Citation Information

Patent Citations

  • Cloud note system information processing method and device based on block chain and medium

    CN110825815A

  • Cloud chain data exchange system and method based on smart contract, and related equipment

    CN115065695A