Network resource allocation method and device, terminal equipment and computer program product

By obtaining the user's pledge information and calculating the weight in the blockchain network, determining the network resource allocation of the target user, the problem of unfair network resource allocation in the blockchain network is solved and the efficiency of network resource usage is improved.

CN119814547AActive Publication Date: 2025-04-11HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411887153.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

There is a problem of unfair allocation of network resources in the blockchain network, which leads to the bandwidth of ordinary users being squeezed out by robot transactions or spam transactions, and the transactions cannot be completed in time, thereby reducing the efficiency of network resources use.

Method used

By obtaining the pledge information of the target user in the blockchain network, inputting a preset weight calculation model, calculating the proportional relationship between the pledge amount and the first weight and the logarithmic relationship between the pledge time and the second weight, determining the target final weight of the target user, and configuring the network resources of the target user based on the weight.

Benefits of technology

This method focuses more on users' long-term contributions to the blockchain network. Through the logarithmic relationship between pledge time and weight, it prevents network resources from being monopolized by certain users and improves the efficiency of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814547A_ABST
    Figure CN119814547A_ABST
Patent Text Reader

Abstract

The present application relates to a network resource allocation method and apparatus, a terminal device and a computer program product, the method comprising: obtaining pledge information of a target user in a block chain network, the pledge information comprising a pledge amount and pledge time; the pledge information is input into a preset weight calculation model, a first weight and a second weight output by the weight calculation model are obtained, the pledge amount is in direct proportion to the first weight, and the pledge time is in logarithmic relation to the second weight; determining a target final weight of the target user based on the first weight and the second weight; and configuring a target network resource for the target user based on the target final weight and the current network resource of the block chain network. Through application of the method and the device, the problem of relatively low network resource use efficiency in a block chain network in related technologies is solved, and the technical effect of improving the network resource use efficiency in the block chain network is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of blockchain technology, and in particular, relates to a network resource allocation method, apparatus, terminal device and computer program product. Background Art

[0002] In blockchain networks, especially some high-performance public chains (e.g., Solana), there is an unfair allocation of network resources. For example, when the network load is high, ordinary users' transactions may be squeezed by a large number of robot transactions or spam transactions, which will cause them to be unable to complete transactions in time.

[0003] At present, the allocation of network resources in blockchain networks often relies on a fixed transaction fee mechanism, that is, a unified transaction fee standard is adopted and the transaction fee is dynamically adjusted according to the network load. However, this method will cause users with higher instant payment capabilities to monopolize network resources, resulting in ordinary users' transactions not being processed for a long time, causing transaction congestion, and then reducing the efficiency of network resource utilization.

[0004] Currently, no effective solution has been proposed for the problem of low efficiency in the use of network resources in blockchain networks in related technologies. Summary of the invention

[0005] The embodiments of the present application provide a network resource allocation method, apparatus, terminal device, and computer program product to at least solve the problem of low network resource utilization efficiency in blockchain networks in related technologies.

[0006] In a first aspect, an embodiment of the present application provides a network resource allocation method, including: obtaining the pledge information of a target user in a blockchain network, wherein the pledge information includes the pledge amount and the pledge time; inputting the pledge information into a preset weight calculation model to obtain a first weight and a second weight output by the weight calculation model, wherein the pledge amount is directly proportional to the first weight, and the pledge time is logarithmically related to the second weight; determining the target final weight of the target user based on the first weight and the second weight; and configuring target network resources for the target user based on the target final weight and the current network resources of the blockchain network.

[0007] In some embodiments, the pledge information also includes a lock-up period; based on the first weight and the second weight, determining the target final weight of the target user includes: multiplying the first weight by the first correction factor to obtain a third weight, wherein the first correction factor is calculated by the weight calculation model based on the lock-up period, and the lock-up period is in a piecewise constant relationship with the first correction factor; based on the second weight and the third weight, determining the target final weight of the target user.

[0008] In some embodiments, based on the second weight and the third weight, determining the target final weight of the target user includes: multiplying the second weight and the third weight by the second correction factor to obtain a fourth weight corresponding to the second weight, and a fifth weight corresponding to the third weight, wherein the second correction factor is calculated by the weight calculation model based on the pledge time, and the pledge time is in a piecewise constant relationship with the second correction factor; based on the fourth weight and the fifth weight, determining the target final weight of the target user.

[0009] In some embodiments, multiplying both the second weight and the third weight by the second correction factor to obtain a fourth weight corresponding to the second weight and a fifth weight corresponding to the third weight includes: determining whether the second correction factor is less than a preset threshold; when the second correction factor is greater than or equal to the preset threshold, multiplying both the second weight and the third weight by the second correction factor to obtain the fourth weight and the fifth weight; when the second correction factor is less than the preset threshold, using the preset threshold as the second correction factor, and multiplying both the second weight and the third weight by the second correction factor to obtain the fourth weight and the fifth weight.

[0010] In some embodiments, configuring the target network resources for the target user based on the target final weight and the current network resources of the blockchain network includes: configuring the target network resources for the target user based on the ratio of the target final weight to the total weight of the blockchain network, and the current network resources, wherein the total weight is the sum of the final weights of all users in the blockchain network.

[0011] In some embodiments, based on the ratio of the target final weight to the total weight of the blockchain network, and the current network resources, configuring the target network resources for the target user includes: obtaining the current time; when the current time is within a preset first time period, reserving a preset proportion of buffer network resources from the total network resources of the blockchain network; using the remaining network resources of the blockchain network as the current network resources, and configuring the target network resources for the target user based on the ratio of the target final weight to the total weight, and the current network resources.

[0012] In some embodiments, after obtaining the current time, the method further includes: when the current time is within a preset second time period, determining a third correction factor corresponding to the target final weight based on the position of the target final weight in the final weights of all users in the blockchain network; determining an initial network resource corresponding to the target user based on the ratio of the target final weight to the total weight and the current network resources; configuring a target network resource for the target user based on the initial network resources and the third correction factor, wherein the target network resource is the product of the initial network resource and the third correction factor.

[0013] In a second aspect, an embodiment of the present application provides a network resource allocation device, including: an acquisition module, used to obtain the pledge information of a target user in a blockchain network, wherein the pledge information includes the pledge amount and the pledge time; a calculation module, used to input the pledge information into a preset weight calculation model to obtain a first weight and a second weight output by the weight calculation model, wherein the pledge amount is directly proportional to the first weight, and the pledge time is logarithmically related to the second weight; a determination module, used to determine the target final weight of the target user based on the first weight and the second weight; a configuration module, used to configure target network resources for the target user based on the target final weight and the current network resources of the blockchain network.

[0014] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the network resource allocation method of any one of the above-mentioned first aspects is implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is run, the network resource allocation method described in any one of the above-mentioned first aspects is executed.

[0016] Compared with the related art, the network resource allocation method, device, terminal device and computer program product provided in the embodiment of the present application obtain the pledge information of the target user in the blockchain network, which can be used as the basis for evaluating the long-term contribution of the target user to the blockchain network. The pledge information is input into the weight calculation model, and the first weight corresponding to the pledge amount in the pledge information and the second weight corresponding to the pledge time in the pledge information can be obtained. Based on the first weight and the second weight, the target final weight of the target user is determined, and then the target user can be allocated network resources according to the target final weight of the target user. In this way, network resources can be allocated to the target user, and more attention can be paid to the long-term contribution of users to the blockchain network; at the same time, since the pledge time is in a logarithmic relationship with the second weight, a certain network resource tilt can be made to users with greater long-term contributions, rather than concentrating network resources on such users, thereby preventing network resources from being monopolized by some users and reducing the efficiency of network resource use. Through this application, the problem of low efficiency of network resource use in blockchain networks in related technologies is solved, and the technical effect of improving the efficiency of network resource use in blockchain networks is achieved.

[0017] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 is a flow chart of a network resource allocation method according to an embodiment of the present application;

[0020] Figure 2 is a curve diagram of the pledge time and the second weight according to an embodiment of the present application;

[0021] Figure 3 is a curve diagram of pledge time and second correction factor according to an embodiment of the present application;

[0022] Figure 4 is a structural diagram of a network resource allocation device according to an embodiment of the present application;

[0023] Figure 5 It is a structural diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0025] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0026] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0027] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0028] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0029] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0030] In blockchain networks, especially some high-performance public chains (e.g., Solana), there is an unfair allocation of network resources. For example, when the network load is high, ordinary users' transactions may be squeezed by a large number of robot transactions or spam transactions, which will cause them to be unable to complete transactions in time.

[0031] At present, the allocation of network resources in blockchain networks often relies on a fixed transaction fee mechanism, that is, a unified transaction fee standard is adopted and the transaction fee is dynamically adjusted according to the network load. However, this method will cause users with higher instant payment capabilities to monopolize network resources, resulting in ordinary users' transactions not being processed for a long time, causing transaction congestion, and then reducing the efficiency of network resource utilization.

[0032] In addition, some network resource allocation methods will choose to prioritize transactions based on transaction fees, or allocate network resources based on the principle of first-paid-first-processed. However, such methods cannot reflect the long-term contribution of users to the blockchain network, and may also cause ordinary users' transactions to remain unprocessed for a long time, causing transaction congestion.

[0033] In addition, some network resource allocation methods also perform traffic control, such as limiting the transaction frequency of a single address, setting a global transaction processing cap, etc. However, such methods are less flexible and cannot adapt to the actual needs of different users. They also lack incentive mechanisms for long-term supporters of the blockchain network and cannot effectively prevent spam transactions, which will lead to unfair allocation of network resources and reduce the efficiency of network resource use.

[0034] Currently, no effective solution has been proposed for the problem of low efficiency in the use of network resources in blockchain networks in related technologies.

[0035] In view of this, the embodiment of the present application provides a network resource allocation method, by obtaining the pledge information of the target user in the blockchain network, the pledge information can be used as the basis for evaluating the long-term contribution of the target user to the blockchain network, and the pledge information is input into the weight calculation model, and the first weight corresponding to the pledge amount in the pledge information and the second weight corresponding to the pledge time in the pledge information can be obtained, and the target final weight of the target user is determined based on the first weight and the second weight, and then the target user can be allocated network resources according to the target final weight of the target user. In this way, network resources can be allocated to the target user, and more attention can be paid to the long-term contribution of users to the blockchain network; at the same time, since the pledge time is in a logarithmic relationship with the second weight, a certain network resource tilt can be made to users with greater long-term contributions, rather than concentrating network resources on such users, thereby preventing network resources from being monopolized by some users and reducing the efficiency of network resource use. Through this application, the problem of low efficiency of network resource use in blockchain networks in related technologies is solved, and the technical effect of improving the efficiency of network resource use in blockchain networks is achieved.

[0036] The network resource allocation method provided in an embodiment of the present application can be applied to a communication system, which may include: a server, a terminal device, and a blockchain node. The server can establish a connection with the terminal device and the blockchain node through a wired network or a wireless network. The terminal device can establish a connection with the blockchain node through a wired network or a wireless network.

[0037] The server may be used to receive a request from a terminal device and allocate network resources (including uplink resources and downlink resources) to the terminal device based on a network resource allocation method provided in an embodiment of the present application. In some embodiments, the server may be a base station.

[0038] The server can also be used to send resource allocation information to the blockchain node. The resource allocation information includes the network resources allocated by the server to each terminal device within the target time period.

[0039] In some embodiments, the server may be a single server, or a server cluster consisting of multiple servers (or micro servers). The server cluster may also be a distributed cluster. The present application does not limit the specific implementation of the server.

[0040] Terminal devices can be used to send requests to the server and receive network resources returned by the server.

[0041] In some embodiments, the terminal device may be a mobile phone, tablet computer, desktop, laptop, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), augmented reality (AR)\virtual reality (VR) device, etc., which can install and use content community applications. The present application does not limit the specific implementation of the terminal device. It can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device.

[0042] Optionally, the server may be connected to at least one terminal device and at least one blockchain node. This application does not limit the number and type of terminal devices and blockchain nodes.

[0043] In specific implementation, both the server and the terminal device can use Figure 5 The composition results shown or include Figure 5 Parts shown. Figure 5 It is a structural diagram of a terminal device according to an embodiment of the present application. When the terminal device 5 has the function of the server described in the embodiment of the present application, the terminal device 5 can be a server or a chip or system on chip in the server.

[0044] The following will be combined Figure 1 For an explanation of the network resource allocation method provided by an embodiment of the present application, see Figure 1 , Figure 1 is a flow chart of a network resource allocation method according to an embodiment of the present application. Figure 1 As shown, the method includes:

[0045] Step S101, obtaining the target user's pledge information in the blockchain network, wherein the pledge information includes the pledge amount and the pledge time.

[0046] In this embodiment, the pledge amount can be the number of tokens pledged by the target user in the blockchain network, the pledge time can be the time period from the first time the target user pledged tokens in the blockchain network to the current time, and the blockchain network can be a high-performance public chain such as Solana.

[0047] The target user's pledge amount and pledge time can be used as indicators to measure their "credit" or "contribution" in the blockchain network, thereby determining the target user's priority in the blockchain network, network resource allocation, and service quality.

[0048] Allocating network resources to target users based on their pledge information not only focuses on users’ instant payment capabilities (e.g., traditional on-demand payment methods), but also emphasizes users’ long-term contributions to the blockchain network. Thus, when allocating network resources, users who have long participated in, maintained, and supported the blockchain network are given higher priority and more network resources, thus avoiding transaction congestion caused by a large number of robot transactions or junk transactions occupying bandwidth, thereby improving the efficiency of network resource utilization of the blockchain network.

[0049] Step S102, input the pledge information into a preset weight calculation model to obtain a first weight and a second weight output by the weight calculation model, wherein the pledge amount is directly proportional to the first weight, and the pledge time is logarithmically related to the second weight.

[0050] In this embodiment, the weight calculation model may include a plurality of weight calculation sub-models to respectively output the first weight and the second weight.

[0051] Specifically, the weight calculation model may include a first weight calculation sub-model and a second weight calculation sub-model. The first weight calculation sub-model is used to calculate the first weight based on the pledge amount, and the second weight calculation sub-model is used to calculate the second weight based on the pledge time.

[0052] Among them, the first weight can be in direct proportional linear relationship with the pledge amount of the target user, that is, the higher the pledge amount of the target user, the higher the corresponding first weight, thereby ensuring that users with a higher degree of participation in the blockchain network can obtain higher priority and more network resources.

[0053] The second weight calculation submodel can calculate the second weight according to a preset logarithmic relationship. Figure 2 , Figure 2 is a curve diagram of the pledge time and the second weight according to an embodiment of the present application, such as Figure 2As shown, in one embodiment, a logarithmic decay model can be used to prevent early users of the blockchain network from gaining excessive advantages: when the pledge time is in the range of 0 to 30 days, the second weight grows faster. The design of this stage can encourage users to participate as early as possible and quickly invest in the blockchain network; when the pledge time is in the range of 31 to 180 days, the growth rate of the second weight slows down. The design of this stage can balance the participation of early and late users and avoid relying solely on the advantages of early users; when the pledge time is greater than 180 days, the second weight tends to be flat. The design of this stage can prevent long-term participating users from obtaining too large a second weight through time accumulation and avoid their monopoly of the network resources of the blockchain network.

[0054] Specifically, the second weight calculation sub-model can be expressed as:

[0055] W 2 (t) = log(t+1) × k;

[0056] Among them, W 2 is the second weight, t is the pledge time, and k is the preset adjustment factor used to adjust the initial weight increase.

[0057] In addition, an upper limit for the second weight can be set to avoid the Matthew effect (i.e., early users of the blockchain network gain disproportionate benefits due to the accumulation of time and the growth of weight).

[0058] It should be noted that the second weight calculation sub-model can be set according to the application scenario and actual needs of the network resource allocation method provided in the embodiment of the present application. The present application does not limit the specific implementation form of the second weight calculation sub-model.

[0059] Step S103: determining a target final weight of the target user based on the first weight and the second weight.

[0060] In one embodiment, the pledge information further includes a lock-up period; and based on the first weight and the second weight, determining the target final weight of the target user includes the following steps:

[0061] Step 1: multiply the first weight by the first correction factor to obtain a third weight, wherein the first correction factor is calculated by the weight calculation model based on the lock-in period, and the lock-in period is in a piecewise constant relationship with the first correction factor.

[0062] Step 2: Determine the target final weight of the target user based on the second weight and the third weight.

[0063] In this embodiment, the lock-up period of the user's pledged tokens can also be included in the evaluation of the user's contribution to the blockchain network. Specifically, users with longer lock-up periods are usually given higher weights to encourage them to participate in the blockchain network for a long time.

[0064] Therefore, a first correction factor may be set, and the first correction factor is related to the lock-in period. The longer the lock-in period, the higher the first correction factor. The weight calculation model may also include a first correction factor calculation model, and the first correction factor calculation model adopts a step-by-step growth model, which may be expressed as:

[0065] a. The lock period is between 0 and 30 days: the first correction factor is 1.0;

[0066] b. The lock-in period is between 31 and 90 days: the first correction factor is 1.2;

[0067] c. The lock-up period is between 91 and 180 days: the first correction factor is 1.5;

[0068] d. Lock-in period is between 181 and 365 days: the first correction factor is 2.0;

[0069] e. Lock-in period is greater than 365 days: the first correction factor is 2.5.

[0070] In the first correction factor calculation model, users can obtain additional weights according to different lock-up periods. This first correction factor calculation model encourages users to lock up the staked tokens for a long time, thereby increasing the incentive effect for long-term participation.

[0071] It should be noted that the first correction factor calculation model can be set according to the application scenario and actual needs of the network resource allocation method provided in the embodiment of the present application, and the present application does not limit the specific implementation form of the first correction factor calculation model.

[0072] In one embodiment, based on the second weight and the third weight, determining the target final weight of the target user includes: multiplying the second weight and the third weight by the second correction factor to obtain a fourth weight corresponding to the second weight, and a fifth weight corresponding to the third weight, wherein the second correction factor is calculated by the weight calculation model based on the pledge time, and the pledge time is in a piecewise constant relationship with the second correction factor; based on the fourth weight and the fifth weight, determining the target final weight of the target user.

[0073] In this embodiment, in order to avoid the concentration of network resources on users who have participated in the blockchain network for a long time, a second correction factor can be introduced. The longer the user's pledge time, the lower the second correction factor. The fair distribution of network resources of the blockchain network is balanced based on the time decay mechanism to prevent excessive concentration of network resources.

[0074] Specifically, the weight calculation model may further include a second correction factor calculation model, which adopts a step-down model. Figure 3 , Figure 3 is a curve diagram of the pledge time and the second correction factor according to an embodiment of the present application, such as Figure 3 As shown, in one embodiment, the pledge time and the second correction factor are in a piecewise constant relationship, and the piecewise constant relationship can be expressed as:

[0075] a. The pledge period is between 0 and 30 days: the second correction factor is 1.00;

[0076] b. The pledge period is between 31 and 60 days: the second correction factor is 0.98;

[0077] c. The pledge period is between 61 and 90 days: the second correction factor is 0.96;

[0078] d. The pledge period is between 91 and 120 days: the second correction factor is 0.94;

[0079] e. The pledge period is between 121 and 150 days: the second correction factor is 0.92;

[0080] …

[0081] That is, every 30 days after the user's pledge, the second correction factor decreases by 0.02. In this way, it can further prevent users who have participated for a long time from obtaining too large a second weight and a third weight through time accumulation, avoid their monopoly of the network resources of the blockchain network, and avoid the Matthew effect (that is, early users of the blockchain network obtain disproportionate benefits due to the accumulation of time and the growth of weight).

[0082] In this embodiment, the sum of the fourth weight and the fifth weight can be used as the target final weight of the target user, or the fourth weight can be multiplied by a preset first adjustment parameter, and the fifth weight can be multiplied by a preset second adjustment parameter, and their sum can be used as the target final weight of the target user, so as to adapt to different application scenarios and user needs.

[0083] It should be noted that the second correction factor calculation model can be set according to the application scenario and actual needs of the network resource allocation method provided in the embodiment of the present application, and the present application does not limit the specific implementation form of the second correction factor calculation model.

[0084] In addition, a lower limit of the second correction factor can also be set to ensure the basic rights and interests of users who participate in the blockchain network for a long time. Specifically, multiplying the second weight and the third weight by the second correction factor to obtain the fourth weight corresponding to the second weight and the fifth weight corresponding to the third weight includes the following steps:

[0085] Step 1: determine whether the second correction factor is less than a preset threshold.

[0086] Step 2: When the second correction factor is greater than or equal to a preset threshold, multiply the second weight and the third weight by the second correction factor to obtain a fourth weight and a fifth weight.

[0087] Step 3: When the second correction factor is less than a preset threshold, the preset threshold is used as the second correction factor, and the second weight and the third weight are multiplied by the second correction factor to obtain the fourth weight and the fifth weight.

[0088] In this embodiment, the preset threshold may be 0.40, 0.50, or 0.60. It should be noted that the preset threshold may be set according to the application scenario and actual requirements of the network resource allocation method provided in the embodiment of the present application, and the present application does not limit the specific size of the preset threshold.

[0089] In this embodiment, by introducing the time decay mechanism and setting the minimum guarantee threshold (i.e., the preset threshold), it is possible to prevent the excessive concentration of network resources and guarantee the basic rights and interests of users who participate in the blockchain network for a long time. In addition, a periodic reset mechanism can be provided for users, asking users whether to choose to reset the time weight every year, providing users with a flexible rights management plan and encouraging users to stay active in a shorter time period, thereby increasing the user stickiness of the blockchain network.

[0090] Step S104, based on the target final weight and the current network resources of the blockchain network, configure the target network resources for the target user.

[0091] In this embodiment, the basic network resource package can be allocated to the target user based on the ratio of the target final weight to the total weight of the blockchain network. Secondly, the overall load condition of the blockchain network can be considered, and the various parameters in the above weight calculation model can be dynamically adjusted in real time.

[0092] Specifically, configuring the target network resources for the target user based on the target final weight and the current network resources of the blockchain network includes: configuring the target network resources for the target user based on the ratio of the target final weight to the total weight of the blockchain network, and the current network resources, wherein the total weight is the sum of the final weights of all users in the blockchain network.

[0093] In this embodiment, based on the ratio of the target final weight to the total weight of the blockchain network and the current network resources, configuring the target network resources for the target user includes the following steps:

[0094] Step 1: Get the current time.

[0095] Step 2, when the current time is within the preset first time stage, reserve a preset proportion of buffer network resources from the total network resources of the blockchain network; use the remaining network resources of the blockchain network as current network resources, and configure target network resources for the target user based on the ratio of the target final weight to the total weight and the current network resources; when the current time is within the preset second time stage, determine the third correction factor corresponding to the target final weight based on the position of the target final weight in the final weights of all users in the blockchain network; determine the initial network resources corresponding to the target user based on the ratio of the target final weight to the total weight and the current network resources; configure the target network resources for the target user based on the initial network resources and the third correction factor, wherein the target network resources are the product of the initial network resources and the third correction factor.

[0096] In this embodiment, the first time period may be a period of low network load of the blockchain network determined based on historical data of the blockchain network. Therefore, in the first time period, network resources may be allocated according to the weight ratio of the target users. In addition, a preset ratio (for example, 10%) of network resources may be reserved as a buffer to cope with short-term burst traffic.

[0097] The second time period can be a high network load and traffic peak period of the blockchain network determined based on the historical data of the blockchain network. Therefore, in the second time period, the priority queue and the step-by-step current limiting mechanism can be started. The priority of users with higher final weights (that is, the position of the target final weight in the final weights of all users in the blockchain network is relatively forward) can be set higher, and they can obtain a higher third correction factor (generally not greater than 1), while the priority of users with lower final weights (that is, the position of the target final weight in the final weights of all users in the blockchain network is relatively backward) can be set lower, and the third correction factor obtained is also lower, thereby ensuring that the basic needs of high-weight users are guaranteed, while low-weight users may face a certain degree of resource restrictions. In this way, it can be ensured that high-weight users get priority services when the network is congested. In addition, the lower limit of the third correction factor can also be set to ensure the minimum needs of low-weight users.

[0098] In this way, differentiated network resource allocation strategies can be implemented during normal and peak periods of the blockchain network, further improving the utilization efficiency of network resources and the ability of the blockchain network to respond to emergencies.

[0099] It should be noted that the above-mentioned first time period, second time period and third correction factor can be set according to the application scenario and actual needs of the network resource allocation method provided in the embodiment of the present application. The present application does not limit the specific implementation form of the first time period, the second time period and the third correction factor.

[0100] In one embodiment, the network resource allocation method provided in the embodiment of the present application can also be used for transaction security monitoring. For example, based on the target network resources configured for the target user, the transaction level of the target user is monitored, and abnormal transaction patterns are monitored in real time; or malicious operations can be intelligently identified and protection mechanisms can be automatically triggered; and account level management (such as a credit scoring system) can also be performed.

[0101] In addition, the network resource allocation method provided in the embodiment of the present application can also be used for emergency response mechanism. For example, when the network load of the blockchain network exceeds the set value, the automatic fuse mechanism can be triggered; or different measures can be taken according to the degree of abnormality of the network resources of the blockchain network; and an effective recovery mechanism can also be established. By building a complete security protection network, a hierarchical processing strategy based on the degree of abnormality is implemented to ensure that appropriate responses can be made when facing different levels of threats.

[0102] Through the above steps S101 to S104, by obtaining the target user's pledge information in the blockchain network, the pledge information can be used as a basis for evaluating the target user's long-term contribution to the blockchain network, and the pledge information is input into the weight calculation model, and the first weight corresponding to the pledge amount in the pledge information and the second weight corresponding to the pledge time in the pledge information can be obtained. Based on the first weight and the second weight, the target final weight of the target user is determined, and then network resources can be allocated to the target user according to the target final weight of the target user. In this way, network resources can be allocated to users with greater long-term contributions. At the same time, since the pledge time is in a logarithmic relationship with the second weight, a certain amount of network resources can be tilted to users with greater long-term contributions, rather than concentrating network resources on such users, thereby preventing network resources from being monopolized by some users and reducing the efficiency of network resource use. Through this application, the problem of low efficiency of network resource use in blockchain networks in related technologies is solved, and the technical effect of improving the efficiency of network resource use in blockchain networks is achieved.

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

[0104] Corresponding to the network resource allocation method described in the above embodiment, Figure 4 A schematic diagram of the structure of a network resource allocation device according to an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0105] See also Figure 4 The network resource allocation device 4 includes: an acquisition module 40, which is used to obtain the pledge information of the target user in the blockchain network, wherein the pledge information includes the pledge amount and the pledge time; a calculation module 41, which is used to input the pledge information into a preset weight calculation model to obtain a first weight and a second weight output by the weight calculation model, wherein the pledge amount is proportional to the first weight, and the pledge time is logarithmically related to the second weight; a determination module 42, which is used to determine the target final weight of the target user based on the first weight and the second weight; a configuration module 43, which is used to configure the target network resources for the target user based on the target final weight and the current network resources of the blockchain network.

[0106] In one embodiment, the pledge information also includes a lock-up period; the determination module 42 is also used to multiply the first weight by the first correction factor to obtain a third weight, wherein the first correction factor is calculated by the weight calculation model based on the lock-up period, and the lock-up period and the first correction factor are in a piecewise constant relationship; based on the second weight and the third weight, the target final weight of the target user is determined.

[0107] In one embodiment, the determination module 42 is further used to multiply the second weight and the third weight by a second correction factor to obtain a fourth weight corresponding to the second weight and a fifth weight corresponding to the third weight, wherein the second correction factor is calculated by the weight calculation model based on the pledge time, and the pledge time is in a piecewise constant relationship with the second correction factor; based on the fourth weight and the fifth weight, the target final weight of the target user is determined.

[0108] In one embodiment, the determination module 42 is also used to determine whether the second correction factor is less than a preset threshold; when the second correction factor is greater than or equal to the preset threshold, the second weight and the third weight are multiplied by the second correction factor to obtain the fourth weight and the fifth weight; when the second correction factor is less than the preset threshold, the preset threshold is used as the second correction factor, and the second weight and the third weight are multiplied by the second correction factor to obtain the fourth weight and the fifth weight.

[0109] In one embodiment, the configuration module 43 is also used to configure target network resources for the target user based on the ratio of the target final weight to the total weight of the blockchain network and the current network resources, wherein the total weight is the sum of the final weights of all users in the blockchain network.

[0110] In one embodiment, the configuration module 43 is also used to obtain the current time; when the current time is within the preset first time period, a preset proportion of buffer network resources is reserved from the total network resources of the blockchain network; the remaining network resources of the blockchain network are used as the current network resources, and based on the ratio of the target final weight to the total weight, and the current network resources, the target network resources are configured for the target user.

[0111] In one embodiment, the configuration module 43 is also used to determine, when the current time is within a preset second time period, a third correction factor corresponding to the target final weight based on the position of the target final weight in the final weights of all users in the blockchain network; determine the initial network resources corresponding to the target user based on the ratio of the target final weight to the total weight and the current network resources; and configure the target network resources for the target user based on the initial network resources and the third correction factor, wherein the target network resources are the product of the initial network resources and the third correction factor.

[0112] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0113] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0114] Figure 5 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application. Figure 5 As shown, the terminal device 5 includes: at least one processor 50 ( Figure 5 Only one is shown in the figure) a processor, a memory 51, and a computer program 52 stored in the memory 51 and executable on at least one processor 50. When the processor 50 executes the computer program 52, the steps in any of the above-mentioned embodiments of the network resource allocation method are implemented.

[0115] The terminal device 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 5 may include but is not limited to a processor 50 and a memory 51. It is understood by those skilled in the art that Figure 5 It is only an example of the terminal device 5 and does not constitute a limitation on the terminal device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0116] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0117] In some embodiments, the memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or memory of the terminal device 5. In other embodiments, the memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 5. In other embodiments, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program 52. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0118] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned embodiments of the network resource allocation method can be implemented.

[0119] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned embodiments of the network resource allocation method when executing the computer program product.

[0120] The present application implements all or part of the processes in the above-mentioned embodiment method, and can instruct the relevant hardware to complete through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to the terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.

[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0122] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software 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 be beyond the scope of this application.

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

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

[0125] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A network resource allocation method, characterized in that: include: Obtaining the target user's pledge information in the blockchain network, wherein the pledge information includes the pledge amount and pledge time; Input the pledge information into a preset weight calculation model to obtain a first weight and a second weight output by the weight calculation model, wherein the pledge amount is proportional to the first weight, and the pledge time is logarithmically related to the second weight; Determining a target final weight of the target user based on the first weight and the second weight; Based on the target final weight and the current network resources of the blockchain network, target network resources are configured for the target user.

2. The method according to claim 1, characterized in that The pledge information also includes a lock-up period; based on the first weight and the second weight, determining the target final weight of the target user includes: The first weight is multiplied by a first correction factor to obtain the third weight, wherein the first correction factor is calculated by the weight calculation model based on the lock-in period, and the lock-in period is in a piecewise constant relationship with the first correction factor; The target final weight of the target user is determined based on the second weight and the third weight.

3. The method according to claim 2, characterized in that Determining the target final weight of the target user based on the second weight and the third weight includes: Multiplying the second weight and the third weight by a second correction factor to obtain a fourth weight corresponding to the second weight and a fifth weight corresponding to the third weight, wherein the second correction factor is calculated by the weight calculation model based on the pledge time, and the pledge time and the second correction factor are in a piecewise constant relationship; The target final weight of the target user is determined based on the fourth weight and the fifth weight.

4. The method according to claim 3, characterized in that Multiplying both the second weight and the third weight by a second correction factor to obtain a fourth weight corresponding to the second weight and a fifth weight corresponding to the third weight comprises: Determining whether the second correction factor is less than a preset threshold; When the second correction factor is greater than or equal to the preset threshold, multiplying the second weight and the third weight by the second correction factor to obtain the fourth weight and the fifth weight; When the second correction factor is less than the preset threshold, the preset threshold is used as the second correction factor, and the second weight and the third weight are multiplied by the second correction factor to obtain the fourth weight and the fifth weight.

5. The method according to any one of claims 1 to 4, characterized in that Based on the target final weight and the current network resources of the blockchain network, configuring target network resources for the target user includes: Based on the ratio of the target final weight to the total weight of the blockchain network and the current network resources, the target network resources are configured for the target user, wherein the total weight is the sum of the final weights of all users in the blockchain network.

6. The method according to claim 5, characterized in that Based on the ratio of the target final weight to the total weight of the blockchain network and the current network resources, configuring the target network resources for the target user includes: Get the current time; When the current time is within a preset first time period, a preset proportion of buffer network resources is reserved from the total network resources of the blockchain network; the remaining network resources of the blockchain network are used as the current network resources, and based on the ratio of the target final weight to the total weight, and the current network resources, the target network resources are configured for the target user.

7. The method according to claim 6, characterized in that After obtaining the current time, the method further includes: In a case where the current time is within a preset second time period, a third correction factor corresponding to the target final weight is determined based on the position of the target final weight in the final weights of all users in the blockchain network; an initial network resource corresponding to the target user is determined based on a ratio of the target final weight to the total weight and the current network resources; and the target network resource is configured for the target user based on the initial network resource and the third correction factor, wherein the target network resource is the product of the initial network resource and the third correction factor.

8. A network resource allocation device, characterized in that: include: An acquisition module, used to acquire the target user's pledge information in the blockchain network, wherein the pledge information includes the pledge amount and the pledge time; A calculation module, used for inputting the pledge information into a preset weight calculation model to obtain a first weight and a second weight output by the weight calculation model, wherein the pledge amount is proportional to the first weight, and the pledge time is logarithmically related to the second weight; A determination module, configured to determine a target final weight of the target user based on the first weight and the second weight; A configuration module is used to configure target network resources for the target user based on the target final weight and the current network resources of the blockchain network.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the network resource allocation method according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that The method comprises a computer program, which enables the network resource allocation method according to any one of claims 1 to 7 to be executed when the computer program is executed.

Citation Information

Patent Citations

  • Resource allocation method and device based on blockchain network slice agent

    CN112615730A

  • Block-chain-based token distribution method and device, equipment, and readable storage medium

    CN114004616A

  • Virtual reward resource allocation method and device, storage medium and electronic equipment

    CN118503250A

  • Resource optimization method and device of cloud game system, terminal equipment and medium

    CN118708332A

  • Privacy preserving asset transfer between networks

    US20230267457A1