Blockchain-based computing power network traffic billing method and device and storage medium
By building a blockchain network within the computing power network for traffic service identification and billing, the security and transparency issues of traffic billing in the computing power network are solved, achieving efficient and reliable traffic billing and information transmission, and protecting the interests of operators and users.
Patent Information
- Application Number
- CN202310078983.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-17
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-01-17
AI Technical Summary
In computing power networks, existing technologies have failed to effectively solve the security issues of traffic billing, leading to the leakage of privacy information, damage to the interests of operators and users, vulnerability to attacks from malicious network nodes, lack of billing transparency, and impact on network operation quality and efficiency.
A blockchain-based traffic processing and statistics blockchain network is adopted, and a traffic processing blockchain micro-network and a traffic statistics blockchain network are constructed respectively. Traffic services are identified and billed through these networks. The random forest algorithm is used to identify the traffic service type, and the micro-network is deleted after the task is completed to reduce storage pressure.
It improves the security and transparency of traffic billing, reduces the risk of malicious node attacks, ensures the reliability of information transmission, enhances billing accuracy and overall system security, and protects the interests of operators and users.
Smart Images

Figure CN116915523B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain technology, and specifically to a blockchain-based method, apparatus, and storage medium for billing network traffic. Background Technology
[0002] The frequency and volume of data usage in traffic services are showing a large-scale growth trend. The increasing location of MEC edge services in computing networks, along with the continuous integration of distributed computing power and storage resources, has created a greater demand for secure, transparent, and scientific traffic billing for intensive, large-scale, and decentralized traffic services. Traffic services are provided by network operators, establishing connections between users and computing resources within the network and providing channels for stable data transmission. The security and speed of traffic services directly affect the operational quality of the computing network, while transparent and standardized traffic billing affects the efficiency and quality of traffic services.
[0003] Network traffic service identification is a prerequisite for network supervision and a foundation for improving network service quality and achieving network security management. In computing power networks, because computing resources are distributed across different regions and accessed through different network nodes, they are vulnerable to malicious attacks during the service traffic billing phase and service identification phase of computing task completion. This can lead to problems such as inconsistent traffic charges, incorrect service type identification, losses for operators, and excessive data transmission latency. Therefore, a complete traffic billing mechanism and service identification method are necessary and practically valuable.
[0004] Current technologies do not consider the security issues of traffic-based billing, and there is limited research on this topic in computing power network scenarios. This makes it difficult to ensure that privacy information is not leaked and that the interests of both operators and users are not harmed when using large amounts of traffic to complete computing power tasks. Moreover, due to the fragmented and independent nature of computing power networks, the large number of participants, the increased communication frequency, and the more intensive traffic usage make the overall processing more vulnerable to attacks and interference from malicious network nodes, making it difficult to maintain the security and trustworthiness of the computing power network environment. Summary of the Invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a blockchain-based computing power network traffic billing method, apparatus and storage medium that overcomes or at least partially solves the above problems.
[0006] According to one aspect of the present invention, a blockchain-based computing power network traffic billing method is provided, comprising:
[0007] In the computing power network orchestration and management layer, a traffic processing blockchain network and a traffic statistics blockchain network are built respectively. Each computing power task that has completed resource allocation corresponds to a traffic processing blockchain micro-network.
[0008] Start the computing power task that has successfully matched resources in the computing power network, and obtain the traffic service type and traffic usage for the current time period through the traffic processing blockchain micro-network corresponding to the computing power task;
[0009] The data usage fees accumulated up to the current time period are calculated based on the data service type and data usage within each unit period.
[0010] Once the computing power task is completed, traffic usage information is collected and packaged and broadcast to the traffic statistics blockchain network; wherein, the traffic usage information includes at least one of the following: traffic service type, traffic usage amount, and traffic usage fee;
[0011] In the traffic processing blockchain network, the traffic usage information is stored in a block, and the block is broadcast to the entire blockchain network to be appended to the local blockchain;
[0012] The traffic usage information is stored in a new block in the traffic statistics blockchain network and appended to the local blockchain.
[0013] Delete and / or destroy the traffic processing blockchain micronetwork corresponding to the computing power task.
[0014] According to another aspect of the present invention, a blockchain-based computing power network traffic billing device is provided, comprising:
[0015] The network construction module is used to build a traffic processing blockchain network and a traffic statistics blockchain network at the computing power network orchestration management layer, respectively. Each computing power task that has completed resource allocation corresponds to a traffic processing blockchain micro-network.
[0016] The task initiation module is used to initiate computing power tasks that have successfully matched resources in the computing power network, and to obtain the traffic service type and traffic usage for the current time period through the traffic processing blockchain micro-network corresponding to the computing power task.
[0017] The cost statistics module is used to calculate the accumulated cost of traffic usage for the current period based on the type of traffic service and the amount of traffic used within each unit period.
[0018] The traffic information broadcasting module is used to collect traffic usage information after the computing power task is completed, and to package and broadcast the traffic usage information to the traffic statistics blockchain network; wherein, the traffic usage information includes at least one of the traffic service type, the traffic usage amount, and the traffic usage fee;
[0019] A traffic information storage module is used to store the traffic usage information into a block in the traffic processing blockchain network and broadcast the block to the entire blockchain network for appending to the local blockchain; and to store the traffic usage information into a new block in the traffic statistics blockchain network for appending to the local blockchain.
[0020] The network deletion and / or destruction module is used to delete and / or destroy the traffic processing blockchain micronetwork corresponding to the computing power task.
[0021] According to another aspect of the present invention, a computing device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;
[0022] The memory is used to store at least one executable instruction, which causes the processor to perform the operation of the above-described blockchain-based computing power network traffic billing method.
[0023] According to another aspect of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction that causes a processor to perform operations such as the blockchain-based computing power network traffic billing method described above.
[0024] According to the solution provided in the above embodiments of the present invention, by designing two blockchain networks—one for traffic processing and the other for traffic statistics—the functions of traffic service identification and billing and the other for traffic information reporting are separated, ensuring the reliability of information transmission and reducing the number of nodes and resources involved in low-probability failures. Furthermore, a personalized traffic processing blockchain micro-network is generated for each computing task, which can be deleted and destroyed at the end of the task, reducing the storage pressure on each node.
[0025] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more obvious and understandable, specific implementation methods of the embodiments of the present invention are described below. Attached Figure Description
[0026] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0027] Figure 1A flowchart of a blockchain-based computing power network traffic billing method provided in Embodiment 1 of the present invention is shown;
[0028] Figure 2 A flowchart of a blockchain-based computing power network traffic billing method provided in Embodiment 2 of the present invention is shown;
[0029] Figure 3 This illustration shows an application scenario of the blockchain-based computing power network traffic billing method provided in Embodiment 2 of the present invention.
[0030] Figure 4 A schematic diagram of the structure of the blockchain-based computing power network traffic billing device provided in Embodiment 3 of the present invention is shown.
[0031] Figure 5 A schematic diagram of the structure of the computing device provided in Embodiment 5 of the present invention is shown. Detailed Implementation
[0032] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0033] Example 1
[0034] Figure 1 A flowchart of a blockchain-based computing power network traffic billing method provided in Embodiment 1 of the present invention is shown. Figure 1 As shown, the method includes the following steps:
[0035] Step S11: Construct a traffic processing blockchain network and a traffic statistics blockchain network in the computing power network orchestration management layer, respectively. Each computing power task that has completed resource allocation corresponds to a traffic processing blockchain micro-network.
[0036] The traffic processing blockchain network adopts a consortium blockchain format, and each computing power task that has completed resource matching corresponds to a traffic processing blockchain micro-network. After the computing power task is completed, the traffic processing blockchain micro-network generates traffic usage information, which is recorded and uploaded by the traffic statistics blockchain.
[0037] Step S12: Start the computing power task that has successfully matched resources in the computing power network, and obtain the traffic service type and traffic usage for the current time period through the traffic processing blockchain micro-network corresponding to the computing power task.
[0038] The current time period can be a fixed period. After a computing task that has successfully matched resources in the computing power network starts computing, the blockchain micro-network for traffic processing corresponding to the computing power task performs business identification within a fixed period to obtain the traffic business type for the current time period.
[0039] Simultaneously, monitor traffic usage under the current computing power task and collect traffic usage data for the current time period.
[0040] Step S13: Calculate the accumulated traffic usage fees up to the current time period by calculating the traffic service type and traffic usage within each unit period.
[0041] Each unit period can be defined as half the time of the aforementioned fixed period. Furthermore, once the traffic usage fee statistics are completed within each unit period, the traffic billing details are broadcast within the traffic statistics blockchain network.
[0042] Step S14: After the computing power task is completed, collect traffic usage information and package and broadcast the traffic usage information to the traffic statistics blockchain network; wherein, the traffic usage information includes at least one of the following: traffic service type, traffic usage amount, and traffic usage fee.
[0043] Step S15: Store traffic usage information in a block in the traffic processing blockchain network, and broadcast the block to the entire blockchain network to be appended to the local blockchain.
[0044] Step S16: Store traffic usage information in a new block in the traffic statistics blockchain network and append it to the local blockchain.
[0045] Step S17: Delete and / or destroy the traffic processing blockchain micronetwork corresponding to the computing power task.
[0046] This embodiment separates the functions of traffic service identification and billing from traffic information reporting by designing two blockchain networks: traffic processing and traffic statistics. This ensures the reliability of information transmission and reduces the number of nodes and resources involved in rare failures. Furthermore, a personalized traffic processing blockchain micro-network is generated for each computing task, which can be deleted and destroyed at the end of the task, reducing the storage pressure on each node.
[0047] In an optional embodiment, the method further includes:
[0048] Step S18: Broadcast the traffic usage fee in the traffic statistics blockchain network and compare it with the user's expected fee.
[0049] Step S19: When the traffic usage cost does not exceed the user's expected cost, continue to execute the computing power task, report the resource usage status to the relevant nodes of the network control layer in the computing power network, and request new resource quotas until the computing power task ends.
[0050] Step S110: When the traffic usage cost exceeds the user's expected cost, immediately suspend the computing resources in use, pause the processing of computing tasks, and request further operations from the computing network.
[0051] In an optional embodiment, step S15 specifically includes:
[0052] All nodes in the traffic processing blockchain network initiate a consensus process, store the traffic usage information that has passed the consensus into a block, and broadcast the block to the entire blockchain network. Each node in the traffic processing blockchain network receives and verifies the block, and when the verification is successful, the block is added to its local blockchain.
[0053] Specifically, a traffic processing blockchain network may contain multiple nodes. A consensus process is initiated by all nodes to reach an agreement. Traffic usage information that passes consensus is stored in a block, and finally, the block is broadcast to the entire blockchain network. Each node in the traffic processing blockchain network receives and verifies the block. If verification is successful, the block is added to the end of its own blockchain. Otherwise, the block is discarded.
[0054] When a participating node is currently offline and cannot receive synchronization blocks, it can apply to the computing power network after it is restored to online status. Based on the traffic statistics of blocks under the same computing power task within the blockchain network, and in conjunction with the corresponding timestamps, information can be synchronized again.
[0055] In an optional embodiment, step S16 specifically includes:
[0056] The traffic statistics blockchain network broadcasts new blocks for the current time period, which store traffic usage information. A consensus process is initiated in the traffic statistics blockchain network, and the traffic usage information that has passed the consensus is stored in the new block. The new block is then broadcast to the entire blockchain network. The gateway node in the traffic statistics blockchain network receives and verifies the new block. Once the verification is successful, the new block is added to the local blockchain.
[0057] Specifically, the traffic statistics blockchain network can broadcast newly added blocks for the current time period at fixed intervals, i.e., newly added traffic usage information within that time period. The traffic statistics blockchain network initiates a consensus mechanism and stores the traffic usage information that has passed consensus into a new block, which is then broadcast to the entire blockchain network. Gateway nodes in the traffic statistics blockchain network receive and verify the block, and finally add it to their own blockchain, completing the upward reporting of the corresponding traffic usage information and achieving full-process monitoring.
[0058] In one optional embodiment, identifying the traffic service type includes:
[0059] The traffic service at the current moment is identified by a pre-trained random forest, and the identification results of all decision trees in the random forest are obtained. The random forest consists of a preset number of pre-trained decision trees for traffic service types. The traffic service type is obtained based on the identification results of all decision trees.
[0060] Specifically, based on traffic usage information, a pre-trained random forest is used to determine the traffic services in the current time period. The output results of all decision trees in the random forest are obtained, and a voting method is used to make the final decision on the output results of each decision tree.
[0061] This embodiment uses the random forest algorithm to identify the type of traffic service and bill traffic usage according to the type of traffic service. At the same time, it broadcasts traffic usage information so that users can understand and verify where the billing went in a timely manner, avoid billing errors, improve billing accuracy, and protect the interests of both operators and users.
[0062] In one optional embodiment, the training process of a random forest includes:
[0063] Step S111: Extract features of traffic services of known traffic service types from the original dataset; wherein, the original dataset consists of traffic services of known traffic service types.
[0064] Specifically, before the initial identification, a certain number of decision trees for traffic service types need to be built and trained to form a random forest. An original dataset is constructed using N data packets within a fixed period of known traffic service types. A sampling strategy with replacement is adopted to generate a subset of the original dataset with the same data size, but with duplicate elements.
[0065] The traffic services are divided into S types, and each data item in the dataset contains a set of preset features for each traffic service. For example, features include: mean, variance, and maximum / minimum values of the dataset size; mean and variance of the dataset arrival time interval; ratio of uplink to downlink bytes; mean and variance of packet arrival time interval; number of IPs in the downlink; number of downlink sub-stream segments; overall packet rate; and downlink byte rate. Each decision tree randomly extracts features from the total features.
[0066] Step S112: Select features as branch nodes of the decision tree based on the information gain of the features.
[0067] Specifically, each decision tree calculates its entropy value based on the subset of data it extracts, determines its information gain based on the entropy value, and continuously selects features as branch nodes of the decision tree based on the information gain. When the attribute selected by the next node is the attribute used by its parent node when splitting, then the node has reached the leaf node and does not need to be split further, that is, the decision tree has completed the classification.
[0068] Step S113: Perform post-pruning on the decision trees that have not been pruned to construct multiple decision trees and form a random forest.
[0069] Specifically, the overall loss after removing a node is calculated. For each node in the decision tree, the loss is calculated for both pruning (removal) and not pruning (retention). If the loss after pruning is less than the loss without pruning, then pruning is performed; otherwise, the branch node is retained.
[0070] The above embodiments achieve full-process monitoring of traffic usage and its identification during the completion of computing tasks, improving system security and reliability within the usage period and minimizing data damage and loss caused by malicious node attacks. Simultaneously, leveraging the inherent characteristics of blockchain, traffic usage information can be synchronized with all participants in a timely manner, reducing the probability of billing errors and improving billing accuracy and transparency. For traffic usage identification, a random forest algorithm is adopted to calculate traffic usage fees based on the identified traffic usage type, improving overall efficiency and accuracy.
[0071] Example 2
[0072] Figure 2 A flowchart of a blockchain-based computing power network traffic billing method provided in Embodiment 2 of the present invention is shown. This embodiment is based on... Figure 3 The application scenarios shown illustrate the embodiments of the present invention in detail.
[0073] like Figure 2 As shown, the method includes the following steps:
[0074] Step S21: Construct a traffic processing blockchain network in the computing power network orchestration management layer.
[0075] The traffic processing blockchain network adopts a consortium blockchain format, with each completed computing task corresponding to a traffic processing blockchain micro-network. After the computing task is completed, the traffic processing blockchain micro-network generates a traffic billing details block, which is recorded and uploaded by the traffic statistics blockchain. The blockchain micro-network corresponding to the successfully received computing task at the gateway node can then be deleted and destroyed.
[0076] like Figure 3As shown, there are four types of nodes in the traffic processing blockchain network: traffic monitoring nodes, billing nodes, business identification nodes, and participant nodes.
[0077] Traffic monitoring nodes are managed by the MEC (Multi-access Edge Computing) edge service platform through operations such as addition, deletion, and updating. Their main function is to monitor, organize, and generate blocks based on traffic usage using the MEC edge service platform and basic equipment.
[0078] The billing nodes are also managed by the MEC edge service platform, which calculates the corresponding costs based on different types of billing events or billing strategies.
[0079] The service identification node is deployed by the orchestration and management layer in the computing power network and is mainly responsible for identifying the types of traffic services.
[0080] The participating nodes include nodes from both the traffic demander and the traffic provider, which are primarily responsible for monitoring and backing up the overall traffic processing.
[0081] Step S22: Construct a traffic statistics blockchain network in the computing power network orchestration management layer.
[0082] The traffic statistics blockchain network comprises two types of nodes: traffic monitoring nodes and gateway nodes. Traffic monitoring nodes are identical to the nodes with the same name in the traffic processing blockchain network; they are a collection of such nodes across all traffic processing blockchain networks and are managed by the MEC edge service platform. They initially broadcast information on traffic usage and billing details for each computing power task, ensuring a secure and reliable process. Gateway nodes are managed by the network transit layer in the computing power network and are responsible for adding the corresponding edge gateway infrastructure nodes to achieve secure recording and transmission of traffic billing results.
[0083] Step S23: After the computing power task that has successfully matched resources in the computing power network starts computing at a fixed period, the business identification node in the traffic processing blockchain network calls the traffic business identification smart contract to identify the business type within the fixed period and obtain the traffic business type for the current time period.
[0084] Step S24: On the MEC edge service platform, the traffic monitoring node monitors the traffic usage under the current computing power task and collects the traffic usage for the current time period.
[0085] Step S25: Within each unit period, the billing node calculates the accumulated traffic usage fee up to the current time period based on the traffic service type and traffic usage.
[0086] Specifically, the following formula can be used for calculation:
[0087]
[0088] Among them, f e (H k ) is the traffic service type cost mapping function, T s The operator may adjust this according to different circumstances. k For traffic-related service types, U T For traffic usage, C k This represents the traffic usage cost for the current time period k.
[0089] After completing the traffic usage fee statistics each cycle, the billing node broadcasts the detailed billing information within the traffic statistics blockchain network and compares it with the user's expected fee. If the difference is not exceeded, the computing power task continues to execute, and the node reports the resource usage status to the relevant nodes in the network control layer of the computing power network, requesting a new resource quota until the task ends. If the difference is exceeded, the currently used computing power resources are immediately suspended, the task processing is paused, and further operations are requested from the computing power network.
[0090] Additionally, if the computing task is processed offline, the billing node can process the data in the last unit period T after the computing task is completed. s Internally, the fees are calculated based on the information broadcast by the traffic monitoring nodes.
[0091] Step S26: After the overall computing power task is completed, the traffic monitoring node collects traffic usage information, including parameters such as traffic service type, traffic usage duration, traffic usage amount, traffic usage cost, and task time. The traffic monitoring node then packages and broadcasts this traffic usage information to the traffic statistics blockchain network.
[0092] Step S27: The participating node receives the traffic usage information and performs corresponding verification and backup. The verified traffic usage information is stored in the participating node's own record pool.
[0093] Step S28: All nodes in the traffic processing blockchain network initiate the consensus process, using the Practical Byzantine Fault Tolerance (PBFT) algorithm for consensus, storing traffic usage information during the completion of the computing power task into a block, and finally broadcasting the block to the entire blockchain network.
[0094] In step S29, each node in the traffic processing blockchain network receives and verifies the block. If the verification is successful, the block is added to the end of its own blockchain. Otherwise, the block is discarded.
[0095] Additionally, if a participating node is offline during this period and cannot receive synchronized blocks, it can apply to the computing power network after it returns to online status. Based on the traffic statistics of blocks under the same computing power task within the blockchain network, and in conjunction with the corresponding timestamps, information can be synchronized again.
[0096] Step S210: At fixed intervals, the traffic monitoring node broadcasts the newly added blocks within that time period on the traffic statistics blockchain network, i.e., the newly added traffic usage information within that time period.
[0097] Among them, the fixed period T g <3T s .
[0098] Step S211: The traffic statistics blockchain network initiates a consensus mechanism and stores the traffic usage information that has passed the consensus into a new block, and then broadcasts the new block to the entire blockchain network.
[0099] In step S212, the gateway node in the traffic statistics blockchain network receives and verifies the block, and finally adds it to its own blockchain, completing the upward reporting of the corresponding traffic usage information and realizing full-process monitoring.
[0100] Step S213: Delete and destroy the computing power task corresponding to the successfully received traffic use block and its traffic processing blockchain network.
[0101] This embodiment employs a consortium blockchain to manage the large-scale, decentralized traffic usage in the computing power network. It introduces multi-party node joint supervision to enhance system fault tolerance. Leveraging the inherent properties of blockchain's distributed ledger, it achieves transparent monitoring of the entire traffic usage process and backup of relevant party information notifications, enhancing the overall system's security and transparency while avoiding resource waste from synchronized information and improving work efficiency. Furthermore, it designs two blockchain networks: one for traffic processing and the other for traffic statistics, separating the functions of traffic service identification and billing from traffic information reporting. This ensures reliable information transmission and reduces the number of nodes and resources involved in rare failures. A personalized traffic processing blockchain micro-network is generated for each computing power task, which can be deleted and destroyed at the end of the task, reducing the storage pressure on each node.
[0102] In an optional embodiment, the specific steps for the service identification node in step S23 above to perform service identification using the random forest algorithm are as follows:
[0103] Step S231: Before the initial identification, a certain number of traffic service type decision trees need to be established and trained to form a random forest.
[0104] First, through the MEC edge service platform, a fixed period T is provided for known traffic service types. rThe original dataset is constructed from N data packets. A sampling method with replacement is used to generate a subset of the original dataset with the same data size, but with duplicate elements. Each subset contains n elements. p (n p <N)。
[0105] Traffic services are divided into S types, which are Each data item in the dataset contains m1 features for each traffic service. These features may include: mean, variance, and maximum / minimum values of the dataset size; mean and variance of the dataset arrival time interval; ratio of uplink to downlink bytes; mean and variance of the dataset arrival time interval; number of IPs in the downlink; number of downlink substream segments; overall packet rate; and downlink byte rate.
[0106] Each decision tree randomly selects m2 features from the total features. One characteristic.
[0107] Step S232: Each decision tree calculates its entropy value h based on the subset of data it has extracted. p :
[0108]
[0109] Where, p j This represents the probability of the decision outcome for each element in the corresponding subset of data, i.e., the probability value of each traffic service type after the decision.
[0110] Each decision tree then uses its m² extracted features as the node features of its first branch, and sequentially calculates the entropy h of the dataset after making a decision using the i-th feature. i :
[0111]
[0112] in, Let q be the probability of the decision outcome for the j-th element in the feature under the l-th attribute. i Let α be the number of attributes of the i-th feature. i The weights assigned to each decision outcome.
[0113] Step S233: Calculate the information gain c of each feature. i .
[0114] Among them, c i =h p -h i i = 1, 2, ..., m2
[0115] Take c i The maximum value in the middle is max{c iThe feature corresponding to} is used as the node of this branch of the decision tree.
[0116] Step S234: Repeat steps S232 and S233, continuously selecting features as branch nodes of the decision tree. If the attribute selected by the next node is the attribute used when its parent node splits, then the node has reached the leaf node and there is no need to continue splitting. That is, the decision tree has been classified.
[0117] Step S235: Perform post-pruning on the decision tree that has not been pruned.
[0118] Calculate the overall loss C after removing a certain node. α (T):
[0119] C α (T)=C(T)+β·|T leaf |
[0120] Where C(T) is the entropy value of the node, and β is the balance coefficient, which controls the degree of overfitting and depends on the specific situation. leaf This represents the number of leaf nodes contained in the node.
[0121] For each node in the decision tree, the loss is calculated for both pruning (removal) and non-pruning (retention), and the results are as follows: C α1 C α2 If C α1 ≤C α2 If the condition is met, then prune the branch; otherwise, retain the branch node.
[0122] Step S236: Based on steps S232-S234, continuously create decision trees to complete the construction of the random forest.
[0123] Among them, the number of decision trees in the random forest is m k It should be much larger than m1.
[0124] Step S237: The service identification node uses the T data collected by the MEC edge service platform. r The traffic usage data within the time period is used to determine the traffic service type for that time period through a pre-trained random forest. The output results of the decision trees in the random forest are the judgment results of the traffic service type for that time period. The final decision is made using a voting method.
[0125] The decision formula is as follows:
[0126]
[0127] If H k If H = 0, then the recognition failed and step S237 needs to be executed again for recognition.k If ≠0, then the final result for identifying the traffic service type is H. k .
[0128] This embodiment uses the random forest algorithm to identify the type of traffic service and then bills the traffic usage based on the service type. At the same time, the billing node broadcasts the fee details at regular intervals, so that users can understand and verify where the fees are going in a timely manner, avoid billing errors, improve billing accuracy, and protect the interests of both operators and users.
[0129] Example 3
[0130] Figure 4 A schematic diagram of the structure of a blockchain-based computing power network traffic billing device provided in Embodiment 3 of the present invention is shown. Figure 4 As shown, the device includes: a network construction module 41, a task initiation module 42, a cost statistics module 43, a traffic information broadcasting module 44, a traffic information storage module 45, and a network deletion and / or destruction module 46; wherein,
[0131] The network construction module 41 is used to build a traffic processing blockchain network and a traffic statistics blockchain network in the computing power network orchestration management layer, respectively. Each computing power task that has completed resource allocation corresponds to a traffic processing blockchain micro-network.
[0132] The task initiation module 42 is used to initiate computing power tasks that have successfully matched resources in the computing power network, and obtain the traffic service type and traffic usage of the current time period through the traffic processing blockchain micro-network corresponding to the computing power task.
[0133] The cost statistics module 43 is used to calculate the accumulated cost of traffic usage for the current period based on the traffic service type and traffic usage within each unit period.
[0134] The traffic information broadcasting module 44 is used to collect traffic usage information after the computing power task is completed, and to package and broadcast the traffic usage information to the traffic statistics blockchain network; wherein, the traffic usage information includes at least one of the traffic service type, the traffic usage amount, and the traffic usage fee;
[0135] The traffic information storage module 45 is used to store the traffic usage information into a block in the traffic processing blockchain network and broadcast the block to the entire blockchain network to be appended to the local blockchain; and to store the traffic usage information into a new block in the traffic statistics blockchain network and append it to the local blockchain.
[0136] The network deletion and / or destruction module 46 is used to delete and / or destroy the traffic processing blockchain micronetwork corresponding to the computing power task.
[0137] Furthermore, the device also includes: a cost comparison module 47; wherein,
[0138] The cost comparison module 47 is used to broadcast the traffic usage fee in the traffic statistics blockchain network and compare it with the user's expected fee; when the traffic usage fee does not exceed the user's expected fee, the computing power task continues to be executed, and the resource usage status is reported to the relevant nodes of the network control layer in the computing power network, requesting a new resource quota until the computing power task ends; when the traffic usage fee exceeds the user's expected fee, the computing power resources currently in use are immediately suspended, the processing of the computing power task is paused, and further operations are requested from the computing power network.
[0139] Furthermore, the traffic information storage module 45 is specifically used for: initiating a consensus process in all nodes of the traffic processing blockchain network, storing the traffic usage information that has passed the consensus into a block, and broadcasting the block to the entire blockchain network; each node in the traffic processing blockchain network receives and verifies the block, and adds the block to its local blockchain after verification.
[0140] Furthermore, the traffic information storage module 45 is specifically used for: broadcasting a new block for the current time period in the traffic statistics blockchain network, wherein the new block stores the traffic usage information; initiating a consensus process in the traffic statistics blockchain network, storing the traffic usage information that has passed the consensus into a new block, and broadcasting the new block to the entire blockchain network; and receiving and verifying the new block in the traffic statistics blockchain network, and adding the new block to the local blockchain after successful verification.
[0141] Furthermore, the cost statistics module 43 is specifically used to: identify the traffic service at the current moment through a pre-trained random forest, and obtain the identification results of all decision trees in the random forest; wherein, the random forest consists of a pre-trained preset number of traffic service type decision trees; and obtain the traffic service type based on the identification results of all decision trees.
[0142] Furthermore, the device also includes: a random forest training module 48; wherein,
[0143] The random forest training module 48 is used to extract features of traffic services of known traffic service types from the original dataset; wherein, the original dataset consists of traffic services of known traffic service types; features are selected as branch nodes of decision trees according to the information gain of the features; post-pruning is performed on the decision trees that have not been pruned to construct multiple decision trees and form a random forest.
[0144] Furthermore, the traffic processing blockchain network adopts a consortium blockchain format.
[0145] The blockchain-based computing network traffic billing device described in this embodiment of the invention is used to execute the blockchain-based computing network traffic billing method described in the above embodiment. Its working principle and technical effect are similar, and will not be repeated here.
[0146] Example 4
[0147] Embodiment 4 of the present invention provides a non-volatile computer storage medium storing at least one executable instruction that can execute the blockchain-based computing network traffic billing method in any of the above method embodiments.
[0148] Example 5
[0149] Figure 5 The diagram shows a structural schematic of a computing device provided in Embodiment 5 of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computing device.
[0150] like Figure 5 As shown, the computing device may include a processor, a communications interface, memory, and a communications bus.
[0151] The processor, communication interface, and memory communicate with each other via a communication bus. The communication interface is used to communicate with other network elements, such as clients or other servers. The processor executes programs, specifically the steps described in the embodiments of the blockchain-based computing power network traffic billing method and cell azimuth prediction method for computing devices.
[0152] Specifically, the program may include program code, which includes computer operation instructions.
[0153] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computing device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0154] Memory is used to store programs. Memory may include high-speed RAM, and may also include non-volatile memory, such as at least one disk drive.
[0155] Specifically, the program can be used to cause the processor to execute the blockchain-based computing power network traffic billing method in any of the above method embodiments. The specific implementation of each step in the program can be found in the descriptions of the corresponding steps and units in the above-described blockchain-based computing power network traffic billing method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0156] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the embodiments of the present invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the embodiments of the present invention.
[0157] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0158] Similarly, it should be understood that, in order to streamline the embodiments of the invention and aid in understanding one or more of the various inventive aspects, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.
[0159] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0160] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0161] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The embodiments of the present invention can also be implemented as device or apparatus programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such programs implementing the embodiments of the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0162] It should be noted that the above embodiments are illustrative of the present invention and not restrictive of the invention, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the present invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A blockchain-based method for billing network traffic, characterized in that, include: In the computing power network orchestration and management layer, a traffic processing blockchain network and a traffic statistics blockchain network are built respectively. Each computing power task that has completed resource allocation corresponds to a traffic processing blockchain micro-network. Start the computing power task that has successfully matched resources in the computing power network, and obtain the traffic service type and traffic usage for the current time period through the traffic processing blockchain micro-network corresponding to the computing power task; The data usage fees accumulated up to the current time period are calculated based on the data service type and data usage within each unit period. Once the computing power task is completed, traffic usage information is collected and packaged and broadcast to the traffic statistics blockchain network; wherein, the traffic usage information includes at least one of the following: traffic service type, traffic usage amount, and traffic usage fee; In the traffic processing blockchain network, the traffic usage information is stored in a block, and the block is broadcast to the entire blockchain network to be appended to the local blockchain; The traffic usage information is stored in a new block in the traffic statistics blockchain network and appended to the local blockchain. Delete and / or destroy the traffic processing blockchain micronetwork corresponding to the computing power task.
2. The method according to claim 1, characterized in that, The method further includes: broadcasting the traffic usage fee in the traffic statistics blockchain network and comparing it with the user's expected fee; When the traffic usage cost does not exceed the user's expected cost, the computing power task continues to be executed, and the resource usage is reported to the relevant nodes of the network control layer in the computing power network, requesting new resource quotas, until the computing power task ends. When the cost of the traffic usage exceeds the user's expected cost, the currently used computing resources are immediately suspended, the processing of the computing task is paused, and a request for further operation is made to the computing network.
3. The method according to claim 1, characterized in that, The process of storing the traffic usage information in a block within the traffic processing blockchain network, broadcasting the block to the entire blockchain network, and appending it to the local blockchain includes: All nodes in the traffic processing blockchain network initiate a consensus process, store the traffic usage information that has passed consensus into a block, and broadcast the block to the entire blockchain network. Each node in the traffic processing blockchain network receives and verifies the block, and adds the block to its local blockchain once the verification is successful.
4. The method according to claim 1, characterized in that, The step of storing the traffic usage information in a new block in the traffic statistics blockchain network and appending it to the local blockchain includes: The traffic statistics blockchain network broadcasts new blocks for the current time period, and the new blocks store the traffic usage information. A consensus process is initiated in the traffic statistics blockchain network, and the traffic usage information that has passed the consensus is stored in a new block, which is then broadcast to the entire blockchain network. The gateway node in the traffic statistics blockchain network receives and verifies the new block, and adds the new block to the local blockchain after successful verification.
5. The method according to claim 1, characterized in that, Identifying the traffic service type includes: The traffic services at the current moment are identified by a pre-trained random forest, and the identification results of all decision trees in the random forest are obtained; wherein, the random forest consists of a preset number of pre-trained decision trees for traffic service types; The traffic service type is obtained based on the identification results of all decision trees.
6. The method according to claim 5, characterized in that, The training process of the random forest includes: Extract features of traffic services of known traffic service types from the original dataset; wherein, the original dataset consists of traffic services of known traffic service types; Features are selected as branch nodes of the decision tree based on their information gain. Post-pruning is performed on the unpruned decision trees to construct multiple decision trees, forming a random forest.
7. The method according to any one of claims 1-6, characterized in that, The traffic processing blockchain network adopts a consortium blockchain format.
8. A blockchain-based computing power network traffic billing device, characterized in that, include: The network construction module is used to build a traffic processing blockchain network and a traffic statistics blockchain network at the computing power network orchestration management layer, respectively. Each computing power task that has completed resource allocation corresponds to a traffic processing blockchain micro-network. The task initiation module is used to initiate computing power tasks that have successfully matched resources in the computing power network, and to obtain the traffic service type and traffic usage for the current time period through the traffic processing blockchain micro-network corresponding to the computing power task. The cost statistics module is used to calculate the accumulated cost of traffic usage for the current period based on the type of traffic service and the amount of traffic used within each unit period. The traffic information broadcasting module is used to collect traffic usage information after the computing power task is completed, and to package and broadcast the traffic usage information to the traffic statistics blockchain network; wherein, the traffic usage information includes at least one of the traffic service type, the traffic usage amount, and the traffic usage fee; A traffic information storage module is used to store the traffic usage information into a block in the traffic processing blockchain network and broadcast the block to the entire blockchain network for appending to the local blockchain; and to store the traffic usage information into a new block in the traffic statistics blockchain network for appending to the local blockchain. The network deletion and / or destruction module is used to delete and / or destroy the traffic processing blockchain micronetwork corresponding to the computing power task.
9. A computing device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the blockchain-based computing power network traffic billing method as described in any one of claims 1-7.
10. A computer storage medium storing at least one executable instruction that causes a processor to perform the operation of the blockchain-based computing network traffic billing method as described in any one of claims 1-7.
Citation Information
Patent Citations
Block chain-based computing power network flow processing method and device, and medium
CN116405334A