Data processing method, device and equipment and computer storage medium

By managing node predictions in the business support system and randomly selecting block nodes for block packaging processing, the problems of high resource occupation and poor economic efficiency in the existing technology are solved, and resource saving and cost reduction are achieved.

CN118802931APending Publication Date: 2024-10-18CHINA MOBILE COMM GRP SHAANXI CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311245536.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, the blockchain of the business support system determines the block-producing node through the workload proof mechanism or the stake proof mechanism, resulting in poor economics of generating new blocks and occupying more resources.

Method used

The management node predicts the amount of available computing resources at the target time node based on the historical available computing resource data of the business node, and randomly selects the block nodes for packaging processing. This avoids the cost of mortgaging virtual resources or high computing power resources and saves resource occupation.

Benefits of technology

It effectively reduces the cost of generating new blocks, improves the resource utilization of the business support system, and reduces the demand for computing resources and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802931A_ABST
    Figure CN118802931A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, equipment and a computer storage medium. The method comprises the following steps: acquiring historical available computing resource data of each service node in a plurality of service nodes; based on the historical available computing resource data, predicting a predicted available computing resource quantity of the service node at the target time node; and selecting out-block nodes from the plurality of service nodes according to the size of each predicted available calculation resource quantity, so that the out-block nodes package the to-be-packaged data to obtain block data stored in the block chain. According to the embodiment of the invention, resources of a service support system are saved, and the cost of generating a new block is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of blockchain technology, and in particular, relates to a data processing method, device, equipment and computer storage medium. Background Art

[0002] Usually, telephone companies or telecommunication operators perform corresponding business operations on users through a business support system (BSS). BSS is usually a distributed data system that uses different servers as distributed nodes of the BSS.

[0003] In the prior art, the blockchain of the business support system usually determines the block node for generating new blocks through the Proof of Work (POW) mechanism or the Proof of Stake (POS) mechanism. POW is to use the node that can calculate the hash value that meets the requirements among multiple participating nodes as the block node, which requires each participating node to consume a lot of computing resources and time costs; POS is to use the node with the most mortgaged virtual resources among multiple participating nodes as the block node. Therefore, determining the block node through POW or POS requires a certain amount of resources to be determined, resulting in poor economic efficiency of generating new blocks. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, device and computer storage medium, which can save resources of a business support system and reduce the cost of generating new blocks.

[0005] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0006] Obtain historical available computing resource data for each of the multiple business nodes;

[0007] Based on historical available computing resource data, predict the amount of available computing resources of the business node at the target time node;

[0008] According to the size of each predicted available computing resource, a block-generating node is selected from multiple business nodes, so that the block-generating node packages the data to be packaged and obtains block data for storage in the blockchain.

[0009] In some embodiments, according to the size of each predicted available computing resource amount, determining a block generating node from a plurality of service nodes includes:

[0010] According to the size of each predicted available computing resource, k business nodes with the largest predicted available computing resources are determined from multiple business nodes, where k is an integer greater than 0;

[0011] A business node is randomly selected from k business nodes to obtain a block-generating node.

[0012] In some embodiments, randomly selecting a service node from k service nodes to obtain a block generating node includes:

[0013] According to the number of nodes k corresponding to the k business nodes, the number of digital extraction n is determined;

[0014] Randomly generate a random number containing m digits, each digit contains a number, and m is an integer greater than n;

[0015] Randomly draw n numbers from the random number;

[0016] Get the preset sequence number corresponding to n digits;

[0017] Determine the business node corresponding to the preset serial number and obtain the block node.

[0018] In some embodiments, n is the base 2 logarithm of k;

[0019] Get the preset sequence number corresponding to n digits, including:

[0020] Perform binary conversion on each of the n numbers to obtain the conversion result;

[0021] Obtain a preset serial number corresponding to each conversion result, and obtain the preset serial number corresponding to the n digits.

[0022] In some embodiments, randomly selecting a service node from k service nodes to obtain a block generating node includes:

[0023] For each of the k business nodes, the predicted available computing resources of the business node are normalized to obtain a probability value corresponding to each business node;

[0024] According to the probability value corresponding to each of the k business nodes, a business node is randomly selected from the k business nodes to obtain a block-generating node.

[0025] In some embodiments, after the data to be packaged is packaged to obtain block data, the method further includes:

[0026] Get the completed packaging time of the data to be packaged;

[0027] receiving a call request for block data sent by a first service node, where the first service node is any service node among the multiple service nodes that has not backed up the block data;

[0028] Determine a first number of backed-up business nodes, where the backed-up business nodes are business nodes that have backed up block data;

[0029] When the completed packaging time is less than the preset time and the first number is less than the first preset number, the block data is backed up to the first service node.

[0030] In some embodiments, after determining the first number of backed-up service nodes, the method further includes:

[0031] When the first number is greater than or equal to the first preset number, determining a second service node from the backed up service nodes;

[0032] Transferring a first preset amount of virtual resources of the first service node to the second service node;

[0033] When a first preset number of virtual resources of the first service node is transferred to the second service node, address information of the second service node is sent to the first service node, so that the first service node calls block data from the second service node according to the address information.

[0034] In some embodiments, after determining the completed packaging duration according to the packaging completion time, the method further includes:

[0035] When the completed packaging time is greater than or equal to the preset time and the first number is less than the first preset number, determine the difference between the first preset number and the first number to obtain the second number of business nodes of the block data to be backed up;

[0036] Selecting a second number of third business nodes from the business nodes that have not backed up the block data;

[0037] The block data is backed up to a second number of third business nodes.

[0038] In some embodiments, after backing up the block data to the second number of third service nodes, the method further includes:

[0039] A second preset number of virtual resources is allocated to each third service node.

[0040] In a second aspect, an embodiment of the present application provides a data processing device, including:

[0041] A first acquisition module is used to acquire historical available computing resource data of each service node among multiple service nodes;

[0042] A prediction module, used to predict the predicted available computing resources of a business node at a target time node based on historical available computing resource data;

[0043] The first selection module is used to select a block node from multiple business nodes according to the size of each predicted available computing resource, so that the block node can package the data to be packaged and obtain block data for storage in the blockchain.

[0044] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0045] When the processor executes the computer program instructions, the data processing method as described in any one of the first aspects is implemented.

[0046] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, a data processing method as described in any one of the first aspects is implemented.

[0047] The data processing method, apparatus, device and computer storage medium of the embodiments of the present application can predict the predicted available computing resources of the business node at the target time node based on the historical available computing resource data of each business node in the business support system through the management node, and determine the block generation node based on the size of the predicted available computing resources, so that the block generation node packages the to-be-packaged data corresponding to the preset time node to obtain block data, thereby realizing the determination of the block generation node for generating block data based on the computing power of the business node, that is, in the process of determining the business node for generating block data, the business node is not required to obtain the authority to generate block data by mortgaging virtual resources as a cost, or by investing more computing power resources as a cost, which effectively saves the resources of the business support system and reduces the cost of generating new blocks. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0049] Figure 1 It is a flowchart of a data processing method provided by an embodiment of the present application;

[0050] Figure 2 is a flowchart of a data processing method provided by another embodiment of the present application;

[0051] Figure 3 is a structural schematic diagram of a data processing device provided by an embodiment of the present application;

[0052] Figure 4It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0053] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0054] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0055] Before introducing the specific implementation of the present application, the technical terms used in describing the implementation of the present application are first introduced.

[0056] Distributed nodes: Different servers act as distributed nodes of the entire system, jointly assuming functions such as data storage, processing, and calling. This distributed node design can provide high availability and fault tolerance, because the system can continue to operate even if some of the nodes fail. Distributed nodes can be ordinary physical servers or virtual machines or containers provided by cloud computing platforms. The use of cloud computing resources can provide greater flexibility and scalability because they can be dynamically allocated and released as needed.

[0057] Block generation: Blockchain transaction accounting is completed by multiple nodes distributed in different places. Each node records the complete ledger and transactions, so they can all participate in supervising the legality of transactions and can also jointly testify for them. The storage of each node in the blockchain is independent and equal, relying on the consensus mechanism to ensure the consistency of storage. However, before the blockchain actually implements accounting, it will use the consensus algorithm to select which node to generate a new block to initiate accounting, that is, to obtain the right to record. This process of generating a new block is called block generation.

[0058] Packaging: After a node on the blockchain generates a transaction, it will broadcast the transaction. Each node on the chain will collect transaction information on the network and put it into the local memory pool for some basic verification. If the verification is successful, it will be put into the "unconfirmed transaction pool" to wait for packaging; after the node obtains the accounting right according to the consensus algorithm, it will extract a certain number of "unconfirmed transactions" from the "unconfirmed transaction pool" for packaging, pack these transactions into a block, and write the unconfirmed transactions packed by its own node into the new block. Due to the limited block capacity, it is possible that not all unconfirmed transactions will be packaged by the current block. At this time, the packaged transaction data will be selected according to a certain priority method.

[0059] Usually, telephone companies or telecom operators perform corresponding business operations on users through business support systems (BSS). BSS is usually a distributed data system, using different servers as distributed nodes of BSS. Distributed nodes participate in the realization of a series of functions such as data storage, processing and calling. Task allocation and collaboration between different servers can be achieved in a self-organizing manner or can be uniformly allocated and managed by a global server. Each server can be an ordinary server or a computing resource in the cloud.

[0060] In the prior art, the blockchain of the business support system usually determines the block node for generating new blocks through the Proof of Work (POW) mechanism or the Proof of Stake (POS) mechanism. POW is to use the node that can calculate the hash value that meets the requirements among multiple participating nodes as the block node, which requires each participating node to consume a lot of computing resources and time costs; POS is to use the node with the most mortgaged virtual resources among multiple participating nodes as the block node. Therefore, determining the block node through POW or POS requires a certain amount of resources to be determined, resulting in poor economic efficiency of generating new blocks.

[0061] It should be noted that for the blockchain between systems, there may be financial transactions between different systems, so the blockchain is more likely to be illegally attacked. Therefore, if a node hopes to obtain more virtual resources by obtaining the right to produce blocks, it needs to pay enough costs, such as the large amount of computing resources and time costs mentioned above, or mortgage enough virtual resources. Since it needs to pay a price, the node cannot easily perform illegal operations. For the business support system, it is a blockchain formed by multiple business nodes within the system. There is no financial transaction between different business nodes. Therefore, malicious nodes have less motivation to attack the blockchain, that is, the security requirements are lower, and there is no need to consume a lot of resources to increase the cost of becoming a block node to ensure the security of the blockchain.

[0062] Based on the above problems, the present application proposes a data processing method, apparatus, device and computer storage medium, which can predict the predicted available computing resources of the business node at the target time node according to the historical available computing resource data of each business node in the business support system through the management node, and determine the block node according to the size of the predicted available computing resources, so that the block node can package the data to be packaged corresponding to the preset time node to obtain block data, thereby realizing the determination of the block node used to generate block data according to the computing power of the business node. That is, in the process of determining the business node used to generate block data, the business node does not need to mortgage virtual resources as a cost, or obtain the right to generate block data by investing more computing power resources as a cost, which effectively saves the resources of the business support system and reduces the cost of generating new blocks.

[0063] The following first introduces the data processing method provided in the embodiment of the present application.

[0064] Figure 1 FIG. 1 is a flow chart of a data processing method provided by an embodiment of the present application. Figure 1 As shown, the data processing method provided in the embodiment of the present application includes the following steps: S101-S103.

[0065] S101: Obtain historical available computing resource data of each service node among multiple service nodes.

[0066] It should be noted that the blockchain system set up on the business support system may include a management node and multiple business nodes. The management node may be an independent node or may belong to the same server as a business node. The block data structure may use the block data structure of the existing blockchain, and the block time period may also use the block time period in the prior art, or may be related to the real-time requirements of the business data to be saved (a smaller block time period may be used for a high time limit requirement, and a larger block time period may be used for a low time limit requirement).

[0067] It is understood that each service node periodically reports the remaining available computing resources of the service node to the management node, and the period may be the same as or different from the block time period. Reporting the remaining available computing resources enables the management node to monitor and manage the computing resources of the service node in real time.

[0068] The available computing resource data reported by the business node may include processing power, storage space, network bandwidth, etc. The above data can be used by the management node to evaluate the load of the business node and perform resource scheduling and task allocation.

[0069] It should be noted that the periodic reporting and block time period in this step are determined based on design requirements and real-time requirements. According to the characteristics and needs of the business, the period can be flexibly adjusted to meet the real-time monitoring and resource management requirements of the system.

[0070] It can be understood that the historical available computing resource data may include the available computing resource amounts corresponding to multiple historical periods, and may also include computing resource usage and change trends within multiple historical periods.

[0071] S102: Based on the historical available computing resource data, predict the amount of available computing resources of the service node at the target time node.

[0072] In one embodiment, based on historical data, the management node can use a prediction algorithm or model to establish a prediction model, and can also generate a historical available computing resource trend chart based on the historical available computing resource data, and predict the predicted available computing resource amount at the target time node based on the trend shown in the trend chart.

[0073] In another embodiment, the above prediction method may take into account various factors, such as seasonal changes and periodic trends. The management node may generate the predicted available computing resources for the next period by applying the prediction model.

[0074] As an example, the predicted available computing resources may also be provided to system administrators or other relevant parties for reference, so as to help the system administrators make more accurate resource planning and decisions, so as to improve the performance and efficiency of the system.

[0075] S103: According to the size of each predicted available computing resource amount, a block generating node is selected from multiple business nodes, so that the block generating node packages the data to be packaged and obtains block data for storage in the blockchain.

[0076] In one embodiment, the management node selects a block-generating node from multiple business nodes based on the size of each predicted available computing resource amount. The block-generating node obtains the data to be packaged, packages the data to be packaged, and obtains block data for storage in the blockchain.

[0077] The above-mentioned packaging process can be organized and encrypted according to the data structure of the blockchain, generating a block header and a transaction list, etc.

[0078] In one embodiment, the data to be packaged may be the data to be packaged generated within the period corresponding to the target time node.

[0079] In some embodiments of the present application, a block producing node obtains data to be packaged, packages the data to be packaged, and obtains block data for storage in a blockchain. Then, a preset amount of virtual resources can be allocated to the block producing node.

[0080] In some embodiments of the present application, S103 may specifically include the following steps:

[0081] According to the size of each predicted available computing resource, k business nodes with the largest predicted available computing resources are determined from multiple business nodes, where k is an integer greater than 0;

[0082] A business node is randomly selected from k business nodes to obtain a block-generating node.

[0083] It should be noted that if only the node with the largest predicted available computing resources is used as the block-producing node, it is possible that the computing resources of a certain business node are always much higher than those of other business nodes, resulting in the business node being the block-producing node every time, which has poor randomness and is easily attacked by malicious nodes.

[0084] In one embodiment, after the management node predicts the amount of available computing resources predicted for each service node, k service nodes with the largest amount of predicted available computing resources are determined from multiple service nodes according to the size of each predicted amount of available computing resources. A service node is randomly selected from the k service nodes to obtain a block node. Thus, each time a block node is determined, it is randomly selected from several service nodes with large predicted available computing resources, which ensures that the block node has sufficient available computing resources and improves the randomness of the block node.

[0085] In other embodiments of the present application, the criteria for selecting candidate block service nodes (i.e., the k service nodes) can be defined according to specific needs. Predicting available computing resources can be the only criterion at most, or it can be combined with other factors, such as the geographical location of the node, network latency, etc. for comprehensive consideration.

[0086] In some embodiments of the present application, randomly selecting a service node from k service nodes to obtain a block generating node may specifically include the following steps:

[0087] According to the number of nodes k corresponding to the k business nodes, the number of digital extraction n is determined;

[0088] Randomly generate a random number containing m digits, each digit contains a number, and m is an integer greater than n;

[0089] Randomly draw n numbers from the random number;

[0090] Get the preset sequence number corresponding to n digits;

[0091] Determine the business node corresponding to the preset serial number and obtain the block node.

[0092] In one embodiment, the number n of digital extractions can be preset according to actual needs.

[0093] The management node randomly generates a random number containing m digits for each service node, each digit contains one number, and randomly extracts n numbers from the m digits in the random number.

[0094] As an example, preset serial numbers corresponding to n numbers in different combinations may be preset, and after n numbers are drawn, the preset serial numbers corresponding to the n numbers may be found.

[0095] After obtaining the serial number corresponding to each business node, the business node with the highest preset serial number is selected from the k business nodes as the block generating node.

[0096] In some embodiments of the present application, n is the logarithm of k with base 2, and obtaining a preset sequence number corresponding to n digits may specifically include the following steps:

[0097] Perform binary conversion on each of the n numbers to obtain the conversion result;

[0098] Obtain a preset serial number corresponding to each conversion result, and obtain the preset serial number corresponding to the n digits.

[0099] For example, if k=4, then k=2 n, n=2, that is, n is the logarithm of k with 2 as the base, and each of the k business nodes corresponds to a preset serial number, which can be an integer between 0 and 3. The management node can randomly generate a random number containing 5 digits, such as 57892, and randomly extract 2 numbers 7 and 2 from the above random number, and perform binary conversion on 7 and 2 to obtain 1 and 0 respectively. The preset sequence number corresponding to 10 is 3, and the business node corresponding to 3 is the block node.

[0100] In some other embodiments of the present application, randomly selecting a service node from k service nodes to obtain a block generating node may specifically include the following steps:

[0101] For each of the k business nodes, the predicted available computing resources of the business node are normalized to obtain a probability value corresponding to each business node;

[0102] According to the probability value corresponding to each of the k business nodes, a business node is randomly selected from the k business nodes to obtain a block-generating node.

[0103] In an embodiment of the present application, the management node normalizes the predicted available computing resources of each business node to obtain a probability value corresponding to each business node, and randomly selects a business node from the k business nodes based on the probability value corresponding to each business node among the k business nodes to obtain a block-generating node, thereby making the business node with a large predicted available computing resources have a greater probability of being selected as a block-generating node.

[0104] The above-mentioned data processing method provided in the embodiment of the present application predicts the predicted available computing resources of the business node at the target time node according to the historical available computing resource data of each business node in the business support system through the management node, and determines the block generation node according to the size of the predicted available computing resources, so that the block generation node packages the to-be-packaged data corresponding to the preset time node to obtain block data, thereby realizing the determination of the block generation node for generating block data according to the computing power of the business node, that is, in the process of determining the business node for generating block data, the business node is not required to obtain the authority to generate block data by mortgaging virtual resources as a cost, or by investing more computing power resources as a cost, which effectively saves the resources of the business support system and reduces the cost of generating new blocks.

[0105] In some embodiments of the present application, another data processing method is proposed, see Figure 2 , is a flow chart of a data processing method provided by another embodiment of the present application. Figure 2 As shown, after S103, the data processing method may further include: S201-S204.

[0106] S201: Obtain the completed packaging time of the data to be packaged.

[0107] In some embodiments of the present application, after S201, the following steps may also be included:

[0108] When the completed packaging time is greater than or equal to the preset time and the first number is less than the first preset number, determine the difference between the first preset number and the first number to obtain the second number of business nodes of the block data to be backed up;

[0109] Selecting a second number of third business nodes from the business nodes that have not backed up the block data;

[0110] The block data is backed up to a second number of third business nodes.

[0111] In some embodiments of the present application, after backing up the block data to the second number of third service nodes, the following may also be included:

[0112] A second preset number of virtual resources is allocated to each third service node.

[0113] It should be noted that after the data to be packaged is packaged and the block data is obtained, in order to increase the redundancy and security of the block, the block data needs to be backed up to multiple other business nodes to ensure that even if some business nodes fail or are attacked, the block data can still be restored from the backup node. An acceptable preset time for backup and a first preset number of business nodes for backup can be pre-set.

[0114] In one embodiment, if the completed packaging time is greater than or equal to the preset time, and the first number is less than the first preset number, it means that the backup time has exceeded the acceptable time, and the number of business nodes that have backed up the block data has not reached the first preset number. At this time, in order to complete the backup as soon as possible, it is no longer necessary to wait for the active call request of the business node, and directly select the second number of third business nodes from the business nodes that have not backed up the block data, and back up the block data to the second number of third business nodes to complete the backup of the block data and improve the backup efficiency.

[0115] In other embodiments of the present application, after backing up the block data to the second number of third business nodes, the management node allocates a second preset number of virtual resources to each third business node as a reward for storing the block data.

[0116] S202: Receive a call request for block data sent by the first service node.

[0117] In the embodiment of the present application, the first service node is any service node among the multiple service nodes that has not backed up block data.

[0118] It should be noted that when the completed packaging time has not reached the preset time, there is still a certain amount of time to complete the block backup. Therefore, it is prioritized to wait for the call of the business node and complete the backup during the call process. When a business node needs to call block data, the business node is the beneficiary, so it needs to pay a price. If the number of business nodes that have backed up the block data is insufficient, the business node participates in backing up the block data, which is equivalent to paying a price for the entire system. If the number of business nodes that have backed up the block data is sufficient, the block data can only be obtained by using virtual resources as a price.

[0119] S203: Determine a first number of backed-up service nodes.

[0120] In some embodiments of the present application, the backed-up business node is a business node that has backed up block data.

[0121] In some embodiments of the present application, after S203, the method may further include the following steps:

[0122] When the first number is greater than or equal to the first preset number, determining a second service node from the backed up service nodes;

[0123] Transferring a first preset amount of virtual resources of the first service node to the second service node;

[0124] When a first preset number of virtual resources of the first service node is transferred to the second service node, address information of the second service node is sent to the first service node, so that the first service node calls block data from the second service node according to the address information.

[0125] When the first number is greater than or equal to the first preset number, it means that the number of business nodes that have backed up the block data has met the requirement. If other business nodes request to call the block data thereafter, the second business node can be determined from the backed up business nodes. When the first preset number of virtual resources of the first business node is transferred to the second business node, the address information of the second business node is sent to the first business node, so that the first business node calls the block data from the second business node according to the address information.

[0126] In one embodiment, a second service node may be randomly selected from the backed-up service nodes, or a second service node may be selected according to a preset condition.

[0127] S204: When the completed packaging time is less than the preset time and the first number is less than the first preset number, back up the block data to the first service node.

[0128] It can be understood that when the completed packaging time is less than the preset time, and the first number is less than the first preset number, it means that the completed packaging time has not reached the preset time, and the number of business nodes that have backed up the block data has not reached the preset number. The block data can be backed up to the first business node, and because the first business node has the need to call the block data, the business node is a beneficiary and therefore needs to pay a price. If the backup data is insufficient, the business node participates in backing up the block data, which is equivalent to paying a price for the entire system and does not need to provide virtual resources.

[0129] In some embodiments of the present application, the amount of virtual resources transferred by the calling process is small relative to the amount of virtual resources allocated to the block producing node when blocking. For example, the amount of virtual resources allocated to the block producing node when blocking may be 10 units, and the amount of virtual resources transferred by the calling process may be 1 unit.

[0130] The data processing method proposed in the embodiment of the present application obtains the completed packaging time of the data to be packaged; receives a call request for block data sent by the first business node, the first business node is any business node among multiple business nodes that has not backed up the block data; determines the first number of backed-up business nodes, the backed-up business node is the business node that has backed up the block data; when the completed packaging time is less than the preset time, and the first number is less than the first preset number, the block data is backed up to the first business node. In this way, the first business node with the need to call the block data is backed up first, and virtual resources are allocated to the first business node. When the completed packaging time exceeds the preset time, the third business node that has not backed up the block data is backed up, and virtual resources are allocated to the third business node, thereby further saving system resources and improving economic efficiency. In addition, the three operations of block formation, backup, and call are respectively set with different virtual resource acquisition and consumption quantities, so that the three behaviors are balanced and coordinated through virtual resources, the ecology of the blockchain in the business support field is established, and the self-organization of data generation, backup, and call is improved.

[0131] Based on the data processing method provided in the above embodiment, combined with the attached Figure 3 The specific implementation of the data processing device provided in the embodiment of the present application is introduced.

[0132] See also Figure 3 , is a schematic diagram of the structure of a data processing device provided by an embodiment of the present application, the data processing device 300 includes:

[0133] A first acquisition module 301 is used to acquire historical available computing resource data of each service node among multiple service nodes;

[0134] A prediction module 302, configured to predict the amount of available computing resources of a service node at a target time node based on historical available computing resource data;

[0135] The first selection module 303 is used to select a block-generating node from multiple business nodes according to the size of each predicted available computing resource, so that the block-generating node can package the data to be packaged and obtain block data for storage in the blockchain.

[0136] The training device of the above-mentioned bearing fault diagnosis model provided in the embodiment of the present application predicts the predicted available computing resources of the business node at the target time node according to the historical available computing resource data of each business node in the business support system through the management node, and determines the block node according to the size of the predicted available computing resources, so that the block node packages the data to be packaged corresponding to the preset time node to obtain block data, thereby realizing the determination of the block node for generating block data according to the computing power of the business node. That is, in the process of determining the business node for generating block data, the business node does not need to mortgage virtual resources as a cost, or obtain the authority to generate block data by investing more computing power resources as a cost, which effectively saves the resources of the business support system and reduces the cost of generating new blocks.

[0137] As an implementation of the present application, the selection module 303 may include:

[0138] A determination submodule, used to determine, according to the size of each predicted available computing resource amount, k business nodes with the largest predicted available computing resources from multiple business nodes, where k is an integer greater than 0;

[0139] The selection submodule is used to randomly select a business node from k business nodes to obtain a block-generating node.

[0140] As an implementation method of the present application, the above-mentioned selection submodule can be used to: determine the number of digital extraction n according to the number of nodes k corresponding to k business nodes; randomly generate a random number containing m digits, one digit contains one number, and m is an integer greater than n; randomly extract n digits from the random number; obtain a preset serial number corresponding to the n digits; determine the business node corresponding to the preset serial number, and obtain the block node.

[0141] As an implementation method of the present application, n is the logarithm of k with base 2, and the above-mentioned selection submodule can also be used to: perform binary conversion on each of the n numbers to obtain a conversion result; obtain a preset serial number corresponding to each conversion result to obtain a preset serial number corresponding to the n numbers.

[0142] As an implementation of the present application, the above device may further include:

[0143] The second acquisition module is used to obtain the completed packaging time of the data to be packaged;

[0144] A receiving module, configured to receive a call request for block data sent by a first service node, where the first service node is any service node among the multiple service nodes that has not backed up the block data;

[0145] A first determination module, used to determine a first number of backed-up business nodes, where the backed-up business nodes are business nodes that have backed up block data;

[0146] The first backup module is used to back up the block data to the first business node when the completed packaging time is less than the preset time and the first number is less than the first preset number.

[0147] As an implementation of the present application, the above device may further include:

[0148] A second determining module, configured to determine a second service node from the backed up service nodes when the first number is greater than or equal to the first preset number;

[0149] A transfer module, configured to transfer a first preset number of virtual resources of a first service node to a second service node;

[0150] The sending module is used to send the address information of the second business node to the first business node when transferring the first preset number of virtual resources of the first business node to the second business node, so that the first business node calls the block data from the second business node according to the address information.

[0151] As an implementation of the present application, the above device may further include:

[0152] A third determination module is used to determine the difference between the first preset number and the first number when the completed packaging time is greater than or equal to the preset time and the first number is less than the first preset number, so as to obtain the second number of business nodes of the block data to be backed up;

[0153] A second selection module is used to select a second number of third business nodes from the business nodes of the unbacked up block data;

[0154] The second backup module is used to back up the block data to a second number of third business nodes.

[0155] As an implementation of the present application, the above device may further include:

[0156] The allocation module is used to allocate a second preset number of virtual resources to each third service node.

[0157] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application.

[0158] The electronic device 400 may include a processor 401 and a memory 402 storing computer program instructions.

[0159] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0160] The memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 402 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 402 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 402 is a non-volatile solid-state memory. The memory 402 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Therefore, typically, the memory 402 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it may perform the operations described in any one of the data processing methods in the above-mentioned embodiments.

[0161] The processor 401 implements any one of the data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .

[0162] In one example, the electronic device 400 may further include a communication interface 403 and a bus 410. Figure 4As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.

[0163] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0164] Bus 410 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0165] In addition, in combination with the data processing method in the above embodiments, the present application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the data processing methods in the above embodiments is implemented.

[0166] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0167] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0168] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0169] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0170] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A data processing method, It is characterized in that include: Obtain historical available computing resource data for each of the multiple business nodes; Based on the historical available computing resource data, predict the amount of available computing resources of the service node at the target time node; According to the size of each predicted available computing resource amount, a block producing node is selected from the multiple business nodes, so that the block producing node packages the data to be packaged to obtain block data for storage in the blockchain.

2. The data processing method according to claim 1, It is characterized in that The determining a block generating node from the plurality of service nodes according to the size of each predicted available computing resource amount includes: According to the size of each predicted available computing resource amount, determine k business nodes with the largest predicted available computing resources from the multiple business nodes, where k is an integer greater than 0; A service node is randomly selected from the k service nodes to obtain the block generating node.

3. The data processing method according to claim 2, It is characterized in that The randomly selecting a service node from the k service nodes to obtain the block generating node includes: Determine the number of digital extraction n according to the number of nodes k corresponding to the k business nodes; Randomly generate a random number containing m digits, each digit contains a number, and m is an integer greater than n; Randomly draw n numbers from the random number; Obtaining a preset serial number corresponding to the n digits; Determine the business node corresponding to the preset serial number and obtain the block generating node.

4. The data processing method according to claim 3, It is characterized in that n is the logarithm of k to the base 2; The obtaining of a preset serial number corresponding to the n digits includes: Performing binary conversion on each of the n numbers to obtain a conversion result; Obtain a preset serial number corresponding to each conversion result, and obtain a preset serial number corresponding to the n digits.

5. The data processing method according to claim 2, It is characterized in that The randomly selecting a service node from the k service nodes to obtain the block generating node includes: For each of the k service nodes, normalize the predicted available computing resources of the service node to obtain a probability value corresponding to each service node; According to the probability value corresponding to each of the k business nodes, a business node is randomly selected from the k business nodes to obtain the block generating node.

6. The data processing method according to claim 1, It is characterized in that After the data to be packaged is packaged to obtain block data, the method further includes: Obtaining the completed packaging time of the data to be packaged; receiving a call request for the block data sent by a first service node, where the first service node is any service node among the multiple service nodes that has not backed up the block data; Determine a first number of backed-up business nodes, where the backed-up business nodes are business nodes that have backed up the block data; When the completed packaging time is less than the preset time and the first number is less than the first preset number, the block data is backed up to the first service node.

7. The data processing method according to claim 6, It is characterized in that After determining the first number of backed-up service nodes, the method further includes: When the first number is greater than or equal to the first preset number, determining a second service node from the backed up service nodes; Transferring a first preset number of virtual resources of the first service node to the second service node; When a first preset number of virtual resources of the first service node is transferred to the second service node, address information of the second service node is sent to the first service node, so that the first service node calls the block data from the second service node according to the address information.

8. The data processing method according to claim 6, It is characterized in that After determining the completed packaging duration according to the packaging completion time, the method further includes: When the completed packaging time is greater than or equal to the preset time, and the first number is less than the first preset number, determining a difference between the first preset number and the first number to obtain a second number of service nodes for backing up the block data; Selecting the second number of third service nodes from the service nodes that have not backed up the block data; The block data is backed up to the second number of third service nodes.

9. The data processing method according to claim 8, It is characterized in that After backing up the block data to the second number of third service nodes, the method further includes: A second preset number of virtual resources is allocated to each third service node.

10. A data processing device, It is characterized in that include: A first acquisition module is used to acquire historical available computing resource data of each service node among multiple service nodes; A prediction module, used to predict the predicted available computing resources of the service node at a target time node based on the historical available computing resources data; The first selection module is used to select a block-generating node from the multiple business nodes according to the size of each predicted available computing resource, so that the block-generating node packages the data to be packaged to obtain block data for storage in the blockchain.

11. An electronic device, It is characterized in that The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the data processing method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the data processing method according to any one of claims 1 to 9 is implemented.