Block chain service charging method and device and storage medium

By receiving the billing request information of the blockchain terminal device, using the billing prediction model and the decision tree model to determine the billing model, and adjusting the billing strategy in combination with the ARIMA model, the matching of diversified business billing patterns in the blockchain system is solved. The problem has achieved the effect of dynamically adjusting costs to optimize resource usage.

CN119299246APending Publication Date: 2025-01-10CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411472505.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing blockchain system is difficult to match the appropriate billing model for diversified blockchain services, and cannot effectively and uniformly manage the hierarchical and classified service capabilities of different urban entities.

Method used

By receiving the billing request information of the target terminal device, the target billing model is determined using the billing prediction model, combining the CART decision tree and the ARIMA autoregressive sliding average model, the billing strategy is dynamically adjusted, and the expenses are adjusted according to the resource utilization rate.

Benefits of technology

It realizes the appropriate billing pattern matching for diversified blockchain services, improves the matching efficiency and flexibility of billing strategies, and dynamically adjusts fees to optimize resource use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299246A_ABST
    Figure CN119299246A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain service charging method and device and a storage medium, relates to the technical field of communication, and is used for matching a proper block chain charging mode for a block chain service. The method comprises the following steps: receiving charging request information of target terminal equipment; the charging request information comprises attribute information of a to-be-used block chain service and service demand information of the to-be-used block chain service; and based on the charging request information of the target terminal device and a charging prediction model, determining a target charging mode of the target terminal device, the charging prediction model being obtained by training according to the training data. The method and the device are applied to a block chain service charging process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a blockchain service billing method, device and storage medium. Background Art

[0002] In related technologies, blockchain includes public blockchain, consortium blockchain and private blockchain. The blockchain system mainly serves a single application scenario, and its billing model depends on the operation mode and design principles of the blockchain system. The billing model of blockchain business is usually determined according to the category of blockchain.

[0003] In order to save investment, intensive construction, unified management, and coordinate the realization of hierarchical and classified service capabilities for different urban entities, cities choose to build a unified digital city blockchain infrastructure. However, this digital city blockchain infrastructure needs to provide personalized services for multiple areas of urban operation, such as government services, supply chain management, financial services, industrial and commercial supervision, and medical health. The needs and business performance of individuals, institutions, enterprises, and groups for blockchain vary greatly. In this way, it is impossible to match the appropriate billing model for the diverse blockchain services, and thus it is impossible to bill blockchain services in different scenarios. Therefore, how to match the appropriate billing model for the diverse blockchain services is a technical problem that still needs to be solved. Summary of the invention

[0004] The present application provides a blockchain service billing method, device and storage medium for matching appropriate billing models for diverse blockchain services.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In the first aspect, an embodiment of the present application provides a blockchain service billing method, wherein a blockchain service billing device receives billing request information of a target terminal device; the billing request information includes attribute information of the blockchain service to be used and service requirement information of the blockchain service to be used; the blockchain service billing device determines a target billing mode of the target terminal device based on the billing request information of the target terminal device and a billing prediction model; the billing prediction model is obtained by training based on training data; the training data includes: at least one billing mode and at least one blockchain service information corresponding to the billing mode, and the blockchain service information includes attribute information of the blockchain service and service requirement information of the blockchain service.

[0007] In one possible implementation, a pre-designed fee model data set is obtained; the pre-designed fee model data set includes at least one billing model and at least one blockchain business information corresponding to the billing model; a CART decision tree model is trained based on the data in the pre-designed fee model data set to obtain a billing prediction model.

[0008] In a possible implementation, attribute information of the blockchain service to be used and service requirement information of the blockchain service to be used are input into a target billing model to obtain a target billing model of a target terminal device.

[0009] In a possible implementation, based on the service demand information of the blockchain service to be used and the target billing mode, the first billing of the blockchain service to be used in the first period is determined; the first period is the usage period of the terminal device for the first time using the blockchain service to be used; the historical data of the target terminal device is obtained; the historical data includes the blockchain resources required for each use of the blockchain service to be used by the target terminal device; based on the historical data of the target terminal device, the ARIMA autoregressive moving average model is used to obtain the predicted value of the target terminal device's use of blockchain resources in the second period; the second period is the period after the first period; the initial value of the blockchain allowing the target terminal device to use blockchain resources in the first period is obtained; based on the predicted value and the initial value, the estimated resource usage rate of the target terminal device in the second period is determined.

[0010] In one possible implementation, if the estimated resource usage of the target terminal device in the second period is greater than a first preset threshold, the first billing is increased; if the estimated resource usage of the target terminal device in the second period is less than a second preset threshold, the first billing is reduced, and the second preset threshold is less than the first preset threshold.

[0011] In one possible implementation, the attribute information of the blockchain service to be used includes at least one of the following: description information of the blockchain service to be used and type information of the blockchain service to be used; the service requirement information includes at least one of the following: chain building requirement information, node requirement information, contract call requirement information, transaction speed requirement information and privacy computing requirement information.

[0012] In one possible implementation, the target billing mode includes at least one of the following: a term billing mode, a traffic billing mode, a transaction number billing mode, a resource deployment billing mode, a contract call billing mode, and a privacy computing billing mode.

[0013] In the second aspect, the present application provides a blockchain service billing device, comprising: a communication unit and a processing unit; the communication unit is used to receive billing request information of a target terminal device; the billing request information includes attribute information of the blockchain service to be used and service requirement information of the blockchain service to be used; the processing unit is used to determine the target billing mode of the target terminal device based on the billing request information of the target terminal device and a billing prediction model; the billing prediction model is trained according to training data; the training data includes: at least one billing mode and at least one blockchain service information corresponding to the billing mode, and the blockchain service information includes attribute information of the blockchain service and service requirement information of the blockchain service.

[0014] In one possible implementation, the processing unit is also used to obtain a pre-designed fee model data set; the pre-designed fee model data set includes at least one billing model and at least one blockchain business information corresponding to the billing model; the processing unit is also used to train the CART decision tree model based on the data in the pre-designed fee model data set to obtain a billing prediction model.

[0015] In one possible implementation, the processing unit is further used to input the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used into the target billing model to obtain the target billing mode of the target terminal device.

[0016] In a possible implementation, the processing unit is further used to determine the first billing of the blockchain service to be used in the first period based on the service demand information of the blockchain service to be used and the target billing mode; the first period is the usage period of the terminal device for the first time using the blockchain service to be used; the processing unit is further used to obtain the historical data of the target terminal device; the historical data includes the blockchain resources required for each use of the blockchain service to be used by the target terminal device; the processing unit is further used to obtain the predicted value of the use of blockchain resources by the target terminal device in the second period based on the historical data of the target terminal device and using the ARIMA autoregressive moving average model; the second period is the period after the first period; the processing unit is further used to obtain the initial value of the blockchain allowing the target terminal device to use blockchain resources in the first period; the processing unit is further used to determine the estimated resource usage rate of the target terminal device in the second period based on the predicted value and the initial value.

[0017] In one possible implementation, the processing unit is also used to: if the estimated resource usage rate of the target terminal device in the second period is greater than a first preset threshold, increase the first billing; if the estimated resource usage rate of the target terminal device in the second period is less than a second preset threshold, reduce the first billing, and the second preset threshold is less than the first preset threshold.

[0018] In one possible implementation, the attribute information of the blockchain service to be used includes at least one of the following: description information of the blockchain service to be used and type information of the blockchain service to be used; the service requirement information includes at least one of the following: chain building requirement information, node requirement information, contract call requirement information, transaction speed requirement information and privacy computing requirement information.

[0019] In one possible implementation, the target billing mode includes at least one of the following: a term billing mode, a traffic billing mode, a transaction number billing mode, a resource deployment billing mode, a contract call billing mode, and a privacy computing billing mode.

[0020] In a third aspect, the present application provides a blockchain business billing device, which includes: a processor and a memory; wherein the memory is used to store computer execution instructions, and when the blockchain business billing device is running, the processor executes the computer execution instructions stored in the memory to enable the blockchain business billing device to perform the blockchain business billing method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions in the computer-readable storage medium are executed by a processor of a blockchain service billing device, the blockchain service billing device can execute the blockchain service billing method described in the first aspect and any possible implementation method of the first aspect.

[0022] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the blockchain service billing method described in the above first aspect and any possible implementation method of the first aspect.

[0023] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the blockchain service billing method described in the above-mentioned first aspect and any possible implementation manner of the first aspect.

[0024] These and other aspects of the present application will become more apparent from the following description.

[0025] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, the blockchain service billing device receives the billing request information of the target terminal device. Since the billing request information includes the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used, the blockchain service billing device can determine the type and service requirements of the blockchain service to be used. The type and service requirements of the blockchain service to be used can characterize the user group of the blockchain service to be used and the service requirements when using the blockchain service (for example, network quality requirements, node requirements, transaction requirements, contract requirements), and the billing prediction model is obtained by training based on the training data; the training data includes: at least one billing mode and at least one blockchain service information corresponding to the billing mode, and the blockchain service information includes the attribute information of the blockchain service and the service requirement information of the blockchain service. In this way, the blockchain service billing device can match the blockchain service to be used to a suitable target billing mode through the billing prediction model based on the user group of the blockchain service to be used and the service requirements of the blockchain service. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments 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 creative work.

[0027] Figure 1 A schematic diagram of the structure of a blockchain service billing system provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of the structure of a blockchain service billing device provided in an embodiment of the present application;

[0029] Figure 3 A flowchart of a blockchain service billing method provided in an embodiment of the present application;

[0030] Figure 4 A flowchart of a blockchain service billing method provided in an embodiment of the present application;

[0031] Figure 5 A flowchart of a blockchain service billing method provided in an embodiment of the present application;

[0032] Figure 6 A flowchart of a blockchain service billing method provided in an embodiment of the present application;

[0033] Figure 7 A flowchart of a blockchain service billing method provided in an embodiment of the present application;

[0034] Figure 8 A flowchart of a blockchain service billing method provided in an embodiment of the present application;

[0035] Fig. 9 A flowchart of a blockchain service billing method provided in an embodiment of the present application;

[0036] Fig.10 A schematic diagram of the structure of a blockchain service billing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0038] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0039] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application 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 may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0040] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0041] In the description of the present application, unless otherwise specified, “plurality” means two or more.

[0042] Glossary

[0043] 1. Metropolitan blockchain

[0044] The blockchain system itself is to promote data sharing, business collaboration, and trust transmission. However, during the construction process, each system and project is often built separately, which is prone to a chaotic situation of "chimneys everywhere, decentralized construction, and each fighting for itself". In order to save investment, intensive construction, unified management, and coordinate the hierarchical and classified service capabilities for different urban entities, cities often choose to build a unified digital city blockchain infrastructure for public service trust scenarios, and the metropolitan blockchain came into being.

[0045] The metropolitan blockchain infrastructure needs to provide personalized services in multiple areas of urban operations, including important services, supply chain management, financial services, industrial and commercial supervision, and medical health. The chain demands and business performance of individuals, institutions, enterprises, and groups vary greatly. The business scenarios of blockchain for multiple entities in the city are varied and complex.

[0046] The above is the explanation of terms.

[0047] In related technologies, blockchain includes public blockchain, consortium blockchain and private blockchain. The blockchain system mainly serves a single application scenario, and its billing model depends on the operation mode and design principles of the blockchain system. The billing model of blockchain business is usually determined according to the category of blockchain.

[0048] However, the metropolitan blockchain infrastructure needs to provide personalized services for multiple areas of urban operations, such as government services, supply chain management, financial services, industrial and commercial supervision, and medical health. The needs and business performance of individuals, institutions, enterprises, and groups for blockchain vary greatly. Therefore, how to reasonably bill for blockchain services is a technical problem that still needs to be solved.

[0049] In order to solve the technical problems existing in the related art, in the embodiment of the present application, the blockchain service charging device receives the charging request information of the target terminal device. Since the charging request information includes the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used, the blockchain service charging device can determine the type and service requirements of the blockchain service to be used. The type and service requirements of the blockchain service to be used can characterize the user group of the blockchain service to be used and the service requirements when using the blockchain service (for example, network quality requirements, node requirements, transaction requirements, contract requirements), and the charging prediction model is obtained by training based on the training data; the training data includes: at least one charging mode and at least one blockchain service information corresponding to the charging mode, and the blockchain service information includes the attribute information of the blockchain service and the service requirement information of the blockchain service. In this way, the blockchain service charging device can match the blockchain service to be used to a suitable target charging mode through the charging prediction model based on the user group of the blockchain service to be used and the service requirements of the blockchain service.

[0050] Below, combined with the attached Figure 1 A blockchain service billing system 10 provided in an embodiment of the present application is described in detail. Figure 1 As shown, the blockchain service billing system 10 includes: a blockchain service billing device 11 and a target terminal device 12.

[0051] Among them, the blockchain service billing device 11 is configured to: receive billing request information of the target terminal device; the billing request information includes attribute information of the blockchain service to be used and service demand information of the blockchain service to be used; based on the billing request information of the target terminal device and the billing prediction model, determine the target billing mode of the target terminal device; the billing prediction model is trained according to training data; the training data includes: at least one billing mode and at least one blockchain service information corresponding to the billing mode, and the blockchain service information includes attribute information of the blockchain service and service demand information of the blockchain service.

[0052] The target terminal device 12 is configured to send billing request information to the blockchain service billing device 11.

[0053] It should be noted that the target terminal device 12 is a device with wireless communication function, which can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted. It can also be deployed on the water surface (such as ships, etc.). It can also be deployed in the air (for example, on airplanes, balloons and satellites, etc.). User terminal equipment is also called mobile station (MS), terminal equipment (MT) and terminal equipment, etc., which is a device that provides voice and / or data connectivity to users. For example, terminal equipment includes handheld devices with wireless connection function, vehicle-mounted devices, etc. At present, the terminal device can be: a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device (such as a smart watch, a smart bracelet, a pedometer, etc.), an in-vehicle device (such as a car, a bicycle, an electric car, an airplane, a ship, a train, a high-speed train, etc.), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal device in industrial control, a smart home device (such as a refrigerator, a television, an air conditioner, an electric meter, etc.), an intelligent robot, a workshop device, a wireless terminal device in self-driving, a wireless terminal device in remote medical surgery, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, a flying device (such as an intelligent robot, a hot air balloon, a drone, an airplane), etc. In a possible application scenario of the present application, the target terminal device 12 is a terminal device that often works on the ground, such as a vehicle-mounted device. In the present application, for the convenience of description, the chip deployed in the above-mentioned device, such as the system-on-a-chip (SOC), baseband chip, etc., or other chips with communication functions can also be referred to as user terminal devices.

[0054] Optionally, the target terminal device 12 may be an embedded communication device or a user's handheld communication device, including a mobile phone, a tablet computer, etc.

[0055] As an example, in an embodiment of the present application, the target terminal device 12 may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include devices that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0056] The present application embodiment provides a blockchain service billing device, which is used to execute the blockchain service billing system provided by the present application embodiment. Figure 2 A schematic diagram of the structure of a blockchain service billing device provided in an embodiment of the present application. Figure 2 As shown, the blockchain service charging device 200 includes at least one processor 201, a communication line 202, and at least one communication interface 204, and may also include a memory 203. The processor 201, the memory 203 and the communication interface 204 may be connected via the communication line 202.

[0057] The processor 201 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application, such as one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA).

[0058] The communication link 202 may include a pathway for transmitting information between the above-mentioned components.

[0059] The communication interface 204 is used to communicate with other devices or communication networks, and can use any transceiver-like device, such as Ethernet, radio access network (RAN), WLAN, etc.

[0060] The memory 203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to include or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0061] In one possible design, the memory 203 can exist independently of the processor 201, that is, the memory 203 can be a memory outside the processor 201. In this case, the memory 203 can be connected to the processor 201 through the communication line 202, and is used to store execution instructions or application code, and the execution is controlled by the processor 201 to implement the blockchain service billing method provided in the following embodiment of this application. In another possible design, the memory 203 can also be integrated with the processor 201, that is, the memory 203 can be the internal memory of the processor 201, for example, the memory 203 is a cache, which can be used to temporarily store some data and instruction information.

[0062] As an implementation method, the processor 201 may include one or more CPUs, for example Figure 2 As another possible implementation, the blockchain service charging device 200 may include multiple processors, such as Figure 2 As another possible implementation, the blockchain service charging apparatus 200 may further include an output device 205 and an input device 206.

[0063] Below, combined with the attached Figure 3 The blockchain service billing method provided in the embodiment of the present application is described in detail. Figure 3 As shown, the blockchain service billing method includes S301-S302.

[0064] S301. The blockchain service billing device receives billing request information from a target terminal device.

[0065] The billing request information includes the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used. The attribute information of the blockchain service to be used includes at least one of the following: description information of the blockchain service to be used and type information of the blockchain service to be used; the service requirement information includes at least one of the following: chain building requirement information, node requirement information, contract call requirement information, transaction speed requirement information and privacy computing requirement information. The target billing mode includes at least one of the following: term billing mode, traffic billing mode, transaction number billing mode, resource deployment billing mode, contract call billing mode and privacy computing billing mode.

[0066] Optionally, before the blockchain service billing device receives the billing request information from the target terminal device, the blockchain service billing device obtains a billing prediction model.

[0067] It needs to be explained that the blockchain business billing device can request a billing prediction model from the model server.

[0068] S302. The blockchain service billing device determines a target billing mode for the target terminal device based on the billing request information and the billing prediction model of the target terminal device.

[0069] Among them, the billing prediction model is obtained by training based on training data; the training data includes: at least one billing mode and at least one blockchain business information corresponding to the billing mode, and the blockchain business information includes attribute information of the blockchain business and service demand information of the blockchain business.

[0070] In one possible implementation, the blockchain service billing device inputs the billing request information of the target terminal device into the billing prediction model, and receives the target billing mode of the target terminal device output by the billing prediction model.

[0071] In another possible implementation, the blockchain service billing device determines the portrait information of the target terminal device based on the billing request information of the target terminal device; and determines the target billing mode of the target terminal device based on the portrait information of the target terminal device and a billing prediction model.

[0072] Optionally, the portrait information of the target terminal device includes attribute information of the blockchain service to be used and service requirement information of the blockchain service to be used.

[0073] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, the blockchain service billing device receives the billing request information of the target terminal device. Since the billing request information includes the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used, the blockchain service billing device can determine the type and service requirements of the blockchain service to be used. The type and service requirements of the blockchain service to be used can characterize the user group of the blockchain service to be used and the service requirements when using the blockchain service (for example, network quality requirements, node requirements, transaction requirements, contract requirements), and the billing prediction model is obtained by training based on the training data; the training data includes: at least one billing mode and at least one blockchain service information corresponding to the billing mode, and the blockchain service information includes the attribute information of the blockchain service and the service requirement information of the blockchain service. In this way, the blockchain service billing device can match the blockchain service to be used to a suitable target billing mode through the billing prediction model based on the user group of the blockchain service to be used and the service requirements of the blockchain service.

[0074] In one possible implementation, combining Figure 3 ,like Figure 4 As shown, in S301, before the blockchain service billing device receives the billing request information of the target terminal device, the blockchain service billing device obtains the billing model. The process of the blockchain service billing device obtaining the billing model can be specifically implemented through the following S401-S402.

[0075] S401. The blockchain service billing device obtains a pre-designed billing model data set.

[0076] Among them, the pre-designed billing model data set includes at least one billing model and blockchain business information corresponding to at least one billing model.

[0077] In one possible implementation, the blockchain service billing device obtains a pre-designed billing model data set from the blockchain system.

[0078] It needs to be explained that the blockchain system stores the historical billing mode of the terminal device and the blockchain business information corresponding to the historical billing mode.

[0079] In another possible implementation, the blockchain service billing device obtains a pre-designed billing model data set from a storage server.

[0080] It should be explained that those skilled in the art can design a billing model data set based on their professional knowledge and experience, and store the billing model data set in a storage server.

[0081] S402. The blockchain service billing device trains the CART decision tree model based on the data in the pre-designed billing model data set to obtain a billing prediction model.

[0082] In a possible implementation, the blockchain service billing device can obtain a billing prediction model through the following steps:

[0083] Step 11, the blockchain service billing device sets the leaf node end condition to match the input block service demand to the target billing mode.

[0084] Among them, the target billing model

[0085] Step 12: The blockchain service billing device constructs a feature sample data set from a pre-designed billing model data set.

[0086] Among them, the feature sample data set

[0087] For example, as shown in Table 1, the business type of the judicial evidence storage business is individual, there is no need to build a chain, the number of nodes required is 0, there is no contract call requirement, the transaction speed requirement is low, and there is no need for privacy computing. The corresponding billing model is the transaction number billing model.

[0088] Table 1. Data table of pre-design fee model

[0089]

[0090]

[0091] Step 13: Blockchain service billing device Combined into a training data set Data Concentration There are i classes in total, There are j classes in total, the Xth i Class belongs to Class Y j The probability is p k , using the Gini index right The classes in the set are tested by the Gini index. The smaller the Gini index, the higher the sample purity.

[0092] in,

[0093] Optionally, since the CART decision tree always performs binary splitting, the blockchain service billing device is A category X in i Match to Y j ,gather Can always be divided into Two types, you can use Represents X i Determine a certain eigenvalue X i =a (a is the sample point data).

[0094] Step 14: Blockchain service billing device selection The charging characteristic value X with the minimum Gini value i As the optimal eigenvalue, the bifurcation node X i =a "Yes or No" is used as the best splitting point to split the billing characteristic value node.

[0095] It needs to be explained that when the terminal device first applies for some personalized needs of the metropolitan blockchain infrastructure service, the blockchain service billing device may not be able to match the appropriate feature value. For example, if some customers do not put forward specific project requirements for the chain service and directly require a "one-price" purchase of the service, it is necessary to add new feature values ​​according to the situation and update them to the identification extraction result library after portrait recognition.

[0096] Step 15: The blockchain service billing device repeats steps 13 and 14 according to the result of the current node split, and continues to select the optimal feature value and split point for the next split until the standard billing mode of the leaf node is matched, and the iterative result is fed back to the blockchain system. For the personalized special demand indicators that do not match the standard billing mode, the blockchain service billing device will quantify and sort out the terminal equipment requirements and evaluate them separately, and add them to the blockchain system after special customization. to update.

[0097] For example, Figure 5 As shown, the blockchain service billing device identifies the user portrait and obtains the feature sample data set Building a training data set Based on the billing feature value node splitting, the blockchain service billing device determines whether a suitable feature value is matched. If a suitable feature value is not matched, the blockchain service billing device performs differential autocorrelation and partial autocorrelation time series stationarity processing and obtains the feature sample data set again. When a suitable feature value is matched, the blockchain service billing device performs a recursive loop of the best feature value to determine whether it matches the standard billing mode of the leaf node. When the standard billing mode of the leaf node is matched, the blockchain service billing device feeds back the recursive result to the billing center; when the standard billing mode of the leaf node is not matched, the blockchain service billing device adds the billing mode as needed and continues to build the training data set.

[0098] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, the blockchain service billing device trains the CART decision tree model based on the data in the pre-designed billing model data set, and can quickly and accurately obtain the billing prediction model, so as to use the billing prediction model to match the target terminal device with a suitable billing model.

[0099] In one possible implementation, combining Figure 3 ,like Figure 6 As shown, S302, the process in which the blockchain service billing device determines the target billing mode of the target terminal device based on the billing request information and the billing prediction model of the target terminal device can be specifically implemented through the following S601.

[0100] S601. The blockchain service billing device inputs the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used into the target billing model to obtain the target billing mode of the target terminal device.

[0101] In one possible implementation, the blockchain service billing device sends model calculation request information to the target billing model and receives model calculation response information sent by the target billing model.

[0102] Optionally, the model calculation request information includes attribute information of the blockchain service to be used and service requirement information of the blockchain service to be used, and the model calculation response information includes the target billing mode of the target terminal device.

[0103] The above scheme brings at least the following beneficial effects: in the embodiment of the present application, since the billing prediction model is obtained by training based on the training data, the blockchain service billing device can quickly match the target billing mode of the target terminal device through the billing prediction model and the attribute information of the blockchain service to be used and the service demand information of the blockchain service to be used, thereby improving the matching efficiency of the target billing mode.

[0104] In one possible implementation, combining Figure 3 ,like Figure 7 As shown, in S302, after the blockchain service billing device determines the target billing mode of the target terminal device based on the billing request information and the billing prediction model of the target terminal device, the blockchain service billing device determines the estimated resource usage rate of the target terminal device in the second cycle. The process of the blockchain service billing device determining the estimated resource usage rate of the target terminal device in the second cycle can be specifically implemented through the following S701-S705.

[0105] S701. The blockchain service billing device determines the first billing of the blockchain service to be used in the first period based on the service demand information of the blockchain service to be used and the target billing model.

[0106] Among them, the first cycle is the usage cycle of the terminal device for the first time using the blockchain service to be used.

[0107] For example, if the target billing model is 500 yuan per month and the first cycle is 6 months, the first billing is 3,000 yuan; if the target billing model is 50 yuan per time and the number of blockchain transactions in the first cycle is 100, the first billing is 5,000 yuan.

[0108] S702. The blockchain service billing device obtains historical data of the target terminal device.

[0109] Among them, the historical data includes the blockchain resources required by the target terminal device each time it uses the blockchain service to be used.

[0110] In one possible implementation, the blockchain service billing device obtains historical data of the target terminal device from a storage server.

[0111] It needs to be explained that the storage server stores the historical data of each terminal device. When the historical data of the terminal device is stored in a storage server outside the blockchain service billing device, the loss of storage resources of the blockchain service billing device can be reduced.

[0112] S703. The blockchain service billing device obtains the predicted value of the blockchain resource usage of the target terminal device in the second period based on the historical data of the target terminal device and using the ARIMA autoregressive moving average model.

[0113] The second cycle is a cycle after the first cycle.

[0114] In one possible implementation, the blockchain service billing device can obtain the predicted value of the target terminal device's use of blockchain resources in the second period based on the following steps.

[0115] It should be explained that the ARIMA model consists of an autoregressive term (AR), a difference order (I), and a moving average term (MA). The parameter corresponding to the autoregressive term (AR) is p, the parameter corresponding to the difference order (I) is d, and the parameter corresponding to the moving average term (MA) is q. In the ARIMA model, the autoregressive term is used to capture the linear relationship in the time series data, the difference is a commonly used time series stabilization method that can eliminate the trend and seasonal components in the time series, and the moving average term is used to capture the random noise in the time series data. p represents the number of lag terms used in the prediction equation, d represents the number of differences performed to make the time series data stable, and q represents the number of lags in the prediction error term used in the prediction equation.

[0116] Step 21: The blockchain service billing device obtains a set of statistical data for each service.

[0117] Optional, a collection of statistical data for each business Among them, D n Represents the billing model of each service calculated by classification.

[0118] It needs to be explained that the blockchain service billing device will n After analyzing and counting historical data according to the time dimension, we can get D n historical trends.

[0119] Step 22: The blockchain service billing device uses the unit root (Augmented Dickey-Fuller, ADF) test method to obtain D n Billing historical trends to check time series stability, D n Perform a discrete test on a monthly or quarterly basis. If the P value of the test result is less than 0.05, the input time series is stable; if the P value is greater than 0.05, the billing model discrete series is not stable. It is necessary to use the I-order difference processing, I = 1, 2, 3... (generally, the first-order difference can obtain a stable series).

[0120] Step 23: Blockchain service billing device uses autocorrelation coefficient Calculate the AR partial parameter P; use the partial autocorrelation coefficient Calculate some parameters q of MA; determine the minimum values ​​p and q by minimizing the Akaike Information Critreion (AIC) and Bayesian Information Criterion (BIC) criteria, and obtain all parameters of the ARIMA model (p, d, q).

[0121] Among them, P t Represents the current value of the time series, represents the sample mean within time n, P t-k Represents a value at a preset time in the past; Represents the best estimate of the value at the next time point t when the observed value at the previous t-1 time points is known. t , p represents the order of the autoregressive term, d represents the number of differences required to make the series stationary, and q represents the order of the sliding average term.

[0122] Step 24: The blockchain service billing device performs QQ residual verification on the ARIMA model inferred in step 23. If the result is good, D n Overall trend forecasting, get D n Distribution of forecasts at different time dimensions.

[0123] S704. The blockchain service billing device obtains the initial value of the blockchain that allows the target terminal device to use blockchain resources in the first period.

[0124] In a possible implementation, the blockchain service charging device sends a request message to the blockchain system, the request message is used to obtain the initial value of the blockchain allowing the target terminal device to use the blockchain resources in the first period. The blockchain service charging device receives a request response message from the blockchain system, the request response message includes the initial value of the blockchain allowing the target terminal device to use the blockchain resources in the first period.

[0125] S705. The blockchain service billing device determines the estimated resource usage rate of the target terminal device in the second period based on the predicted value and the initial value.

[0126] In one possible implementation, the blockchain service billing device determines the estimated resource usage rate of the target terminal device in the second period based on the ratio of the predicted value to the initial value.

[0127] Optionally, after the blockchain service billing device determines the estimated resource usage rate of the target terminal device in the second period, it determines the health status of the target terminal device according to the blockchain group service health status threshold set and the estimated resource usage rate in the second period. The health status of the target terminal device includes any of the following: healthy, good, normal, poor, and extremely poor.

[0128] Exemplarily, the corresponding health status of the memory usage rate [0-20%) in the blockchain group service health status threshold set is healthy; the corresponding health status of the memory usage rate [20%-60%) in the blockchain group service health status threshold set is fair; the corresponding health status of the memory usage rate 60%-90% in the blockchain group service health status threshold set is poor; the corresponding health status of the memory usage rate [90%-100%] in the blockchain group service health status threshold set is extremely poor.

[0129] It needs to be explained that when the health status of the estimated resource usage rate in the second cycle is poor or extremely poor, the blockchain business billing device increases the first billing.

[0130] For example, Figure 8As shown, the blockchain service billing device classifies the billing mode through the CART decision tree, obtains and pre-processes (eliminates outliers) the historical data of the terminal device, and uses the ADF test method to check the time sequence stability of the acquired key billing items. When the resource usage time series is not stable during the historical billing period, the blockchain service billing device performs differential autocorrelation and partial autocorrelation time series stability processing. When the resource usage time series is stable during the historical billing period, the blockchain service billing device performs an ARIMA autoregression model parameter fixed-order fitting test, outputs a predicted reference trend, and compares the output predicted trend with the blockchain health status threshold. When the predicted trend is within the health status threshold interval, the first billing is maintained and the process ends; when the predicted trend is not within the health status threshold interval, the first billing is adjusted.

[0131] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, the blockchain service billing device uses the ARIMA autoregressive moving average model based on the historical data of the target terminal device to obtain the predicted value of the blockchain resource usage of the target terminal device in the second period, so that the blockchain service billing device can predict the resource utilization rate of the target terminal device in the second period and adjust the resources configured to the target terminal device in advance.

[0132] In one possible implementation, combining Figure 3 ,like Fig. 9 As shown, in S705, after the blockchain service billing device determines the estimated resource usage rate of the target terminal device in the second period based on the predicted value and the initial value, the blockchain service billing device adjusts the first billing. The process of the blockchain service billing device adjusting the first billing can be specifically implemented through the following S901-S902.

[0133] S901. If the estimated resource usage rate of the target terminal device in the second period is greater than the first preset threshold, the blockchain service billing device increases the first billing.

[0134] In one possible implementation, if the estimated resource usage of the target terminal device in the second period is greater than a first preset threshold, the blockchain service billing device increases the first billing based on preset rules and increases the resources allocated to the target terminal device in the second period.

[0135] It should be explained that the preset rules are set based on actual conditions and we do not impose any restrictions on them.

[0136] S902. If the estimated resource usage rate of the target terminal device in the second period is less than the second preset threshold, the blockchain service billing device reduces the first billing.

[0137] The second preset threshold is smaller than the first preset threshold.

[0138] In one possible implementation, if the estimated resource usage of the target terminal device in the second period is greater than a first preset threshold, the blockchain service billing device reduces the first billing based on preset rules and reduces the resources configured for the target terminal device in the second period.

[0139] The above scheme brings at least the following beneficial effects: In the embodiment of the present application, if the estimated resource usage rate of the target terminal device in the second period is greater than the first preset threshold, the blockchain service billing device increases the first billing; if the estimated resource usage rate of the target terminal device in the second period is less than the second preset threshold, the blockchain service billing device reduces the first billing. In this way, the blockchain service billing device can dynamically bill the terminal device. When the blockchain resources are insufficient, the terminal device fee is increased, so that the terminal device saves the use of blockchain resources. When the blockchain resources are sufficient, the terminal device fee is reduced to improve the user experience.

[0140] It can be seen that the technical solution provided by the embodiment of the present application is introduced above mainly from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should be easily aware that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0141] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiment.

[0142] like Fig.10 The figure is a schematic diagram of the structure of a blockchain service billing device provided in an embodiment of the present application. The blockchain service billing device can be used to execute Figure 3 , Figure 4 , Figure 6 , Figure 7 , Fig. 9 The method of blockchain business billing shown. Fig.10 The blockchain service billing device 100 shown includes: a communication unit 1001 and a processing unit 1002.

[0143] The communication unit 1001 is used to receive the billing request information of the target terminal device; the billing request information includes the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used; the processing unit 1002 is used to determine the target billing mode of the target terminal device based on the billing request information of the target terminal device and the billing prediction model; the billing prediction model is obtained by training according to the training data; the training data includes: at least one billing mode and at least one blockchain service information corresponding to the billing mode, and the blockchain service information includes the attribute information of the blockchain service and the service requirement information of the blockchain service.

[0144] Optionally, processing unit 1002 is also used to obtain a pre-designed fee model data set; the pre-designed fee model data set includes at least one billing model and at least one blockchain business information corresponding to the billing model; processing unit 1002 is also used to train the CART decision tree model based on the data in the pre-designed fee model data set to obtain a billing prediction model.

[0145] Optionally, the processing unit 1002 is further used to input the attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used into the target billing model to obtain the target billing mode of the target terminal device.

[0146] Optionally, processing unit 1002 is further used to determine the first billing of the blockchain service to be used in the first period based on the service demand information of the blockchain service to be used and the target billing mode; the first period is the usage period of the terminal device for the first time using the blockchain service to be used; processing unit 1002 is further used to obtain historical data of the target terminal device; the historical data includes the blockchain resources required for each use of the blockchain service to be used by the target terminal device; processing unit 1002 is further used to obtain a predicted value of the use of blockchain resources by the target terminal device in the second period based on the historical data of the target terminal device and using the ARIMA autoregressive moving average model; the second period is the period after the first period; processing unit 1002 is further used to obtain the initial value of the blockchain allowing the target terminal device to use blockchain resources in the first period; processing unit 1002 is further used to determine the estimated resource usage rate of the target terminal device in the second period based on the predicted value and the initial value.

[0147] Optionally, processing unit 1002 is also used to: if the estimated resource usage rate of the target terminal device in the second period is greater than a first preset threshold, increase the first billing; if the estimated resource usage rate of the target terminal device in the second period is less than a second preset threshold, reduce the first billing, and the second preset threshold is less than the first preset threshold.

[0148] Optionally, the attribute information of the blockchain service to be used includes at least one of the following: description information of the blockchain service to be used and type information of the blockchain service to be used; the service requirement information includes at least one of the following: chain building requirement information, node requirement information, contract call requirement information, transaction speed requirement information and privacy computing requirement information.

[0149] Optionally, the target billing mode includes at least one of the following: term billing mode, traffic billing mode, transaction number billing mode, resource deployment billing mode, contract call billing mode and privacy computing billing mode.

[0150] An embodiment of the present application also provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instruction to implement the blockchain service billing method in the above method embodiment.

[0151] An embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the blockchain service billing method in the above method embodiment.

[0152] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, and a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any other form of computer-readable storage medium in a suitable combination of the above, or numerical values ​​in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). In embodiments of the present invention, computer-readable storage media may be any tangible media that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0153] Since the apparatus, device, computer-readable storage medium, and computer program product in the embodiments of the present invention can be applied to the above-mentioned method, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of the present application will not be repeated here.

[0154] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A blockchain service billing method, characterized in that: The method comprises: Receiving charging request information of a target terminal device; the charging request information includes attribute information of a blockchain service to be used and service requirement information of the blockchain service to be used; Based on the billing request information and the billing prediction model of the target terminal device, the target billing mode of the target terminal device is determined; the billing prediction model is trained according to training data; the training data includes: at least one billing mode and blockchain business information corresponding to the at least one billing mode, and the blockchain business information includes attribute information of the blockchain business and service demand information of the blockchain business.

2. The method according to claim 1, characterized in that: The method further comprises: Obtain a pre-designed fee model data set; the pre-designed fee model data set includes at least one billing model and blockchain business information corresponding to the at least one billing model; The CART decision tree model is trained based on the data in the pre-designed charging pattern data set to obtain the charging prediction model.

3. The method according to claim 1, characterized in that The determining a target charging mode of the target terminal device based on the charging request information of the target terminal device and the charging prediction model includes: The attribute information of the blockchain service to be used and the service requirement information of the blockchain service to be used are input into the target billing model to obtain the target billing mode of the target terminal device.

4. The method according to claim 1, characterized in that: After determining the target charging mode of the target terminal device based on the charging request information of the target terminal device and the charging prediction model, the method further includes: Based on the service demand information of the blockchain service to be used and the target charging mode, determining the first charging of the blockchain service to be used within a first period; the first period is the usage period of the blockchain service to be used for the first time by the terminal device; Acquire historical data of the target terminal device; the historical data includes blockchain resources required by the target terminal device for each use of the blockchain service to be used; Based on the historical data of the target terminal device, using the ARIMA autoregressive moving average model, obtaining a predicted value of blockchain resource usage by the target terminal device in a second period; the second period is a period after the first period; Obtaining an initial value of the blockchain that allows the target terminal device to use the blockchain resources during the first period; Based on the predicted value and the initial value, an estimated resource usage rate of the target terminal device in the second period is determined.

5. The method according to claim 4, characterized in that The method further comprises: If the estimated resource usage rate of the target terminal device in the second period is greater than a first preset threshold, increasing the first charge; If the estimated resource usage rate of the target terminal device in the second period is less than a second preset threshold, the first charge is reduced, and the second preset threshold is less than the first preset threshold.

6. The method according to any one of claims 1 to 5, characterized in that: The attribute information of the blockchain service to be used includes at least one of the following: description information of the blockchain service to be used and type information of the blockchain service to be used; the service requirement information includes at least one of the following: chain building requirement information, node requirement information, contract call requirement information, transaction speed requirement information and privacy computing requirement information.

7. The method according to any one of claims 1 to 5, characterized in that: The target billing mode includes at least one of the following: a term billing mode, a traffic billing mode, a transaction number billing mode, a resource deployment billing mode, a contract call billing mode and a privacy computing billing mode.

8. A blockchain service billing device, characterized in that: The device comprises: a communication unit and a processing unit; The communication unit is used to receive charging request information of a target terminal device; the charging request information includes attribute information of the blockchain service to be used and service requirement information of the blockchain service to be used; The processing unit is used to determine the target billing mode of the target terminal device based on the billing request information and the billing prediction model of the target terminal device; the billing prediction model is trained according to training data; the training data includes: at least one billing mode and blockchain business information corresponding to the at least one billing mode, and the blockchain business information includes attribute information of the blockchain business and service demand information of the blockchain business.

9. A blockchain service billing device, characterized in that: include: A processor and a memory; wherein the memory is used to store computer execution instructions, and when the blockchain business billing device is running, the processor executes the computer execution instructions stored in the memory, so that the blockchain business billing device executes the blockchain business billing method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, which, when executed by the blockchain service billing device, cause the computer to execute the blockchain service billing method as described in any one of claims 1-7.

11. A computer program product, comprising computer instructions, characterized in that: When the computer instruction is executed by the processor, the blockchain service billing method described in any one of claims 1-7 is implemented.