Dynamic calculation power estimation method for VDF problem and related device
By dynamically adjusting the computing power estimate value in the computing power dynamic estimation system, the problem of low computing power estimation efficiency of VDF problems is solved, and the computing efficiency and stability are improved.
Patent Information
- Application Number
- CN202411767356.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art is difficult to quickly and efficiently estimate the computing power of verified delay function (VDF) problems, resulting in insufficient computing efficiency and stability.
By creating multiple VDF problems in the computing power dynamic estimation system, the calculation time and measurement time are determined by the calculation object and the measurement object, the calculation time difference is calculated, and the calculation power estimate value is dynamically adjusted according to the time difference to adapt to the computing power distribution of different computing objects.
It realizes fast and effective estimation of the computing power of VDF problems, and improves the overall computing efficiency and stability.
Smart Images

Figure CN119690667A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computing power estimation, and in particular to a VDF computing power dynamic estimation method and related devices for VDF problems. Background Art
[0002] Verifiable Delay Function (VDF) is a new type of mathematical function designed to provide a stable time delay in distributed computing while ensuring that the calculation results can be quickly verified. VDF is widely used in distributed voting, statistics, and data aggregation, where the initiator requires the calculator to provide a stable proof of the passage of time. Generally speaking, in order to ensure that each calculator can complete the Eval formula with similar time overhead, the difficulty of the VDF problem (i.e., specify T) needs to be determined by the actual calculation time reported by each party to prevent the calculation difficulty from expanding infinitely and causing a large waste of computing power.
[0003] At present, the computing power of a VDF calculator may change at any time due to technical or non-technical reasons, and is not necessarily stable. Secondly, the increase or decrease in the computing power of VDF calculations is generally nonlinear in terms of the speed and effect on actual computing problems, and existing solutions are difficult to use a single or combined probability distribution method to fit the actual variable computing power of a calculator.
[0004] Therefore, how to quickly and effectively estimate the computing power of VDF problems needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a method and related device for dynamically estimating computing power for VDF problems, which can adjust the computing power estimate in real time according to the time difference to adapt to the computing power distribution of different computing objects, and quickly and effectively estimate the computing power of the VDF problem, thereby improving the overall computing efficiency and stability.
[0006] In a first aspect, an embodiment of the present application provides a method for dynamic estimation of computing power for a VDF problem, which is applied to a measurement object of a dynamic estimation system for computing power, wherein the dynamic estimation system for computing power includes the measurement object, an initiating object, and a computing object. The method includes:
[0007] Creating multiple VDF problems through the initiating object, and then determining a first calculation duration and a first measurement duration corresponding to a first VDF problem through the calculation object and the measurement object, respectively; the first VDF problem is any one of the multiple VDF problems;
[0008] Obtaining an initial duration difference statistics table, calculating a first duration difference between the first calculated duration and the first measured duration, and updating the initial duration difference statistics table according to the first duration difference to obtain a first duration difference statistics table; the initial duration difference statistics table is the duration difference statistics table obtained by the last update;
[0009] Determine a computing power effective group according to the first time difference statistical table; the computing power effective group is a computing power estimation group used to calculate the control amount;
[0010] A first control amount is determined according to the computing power effectiveness group, and a computing power estimate value corresponding to the computing power effectiveness group is adjusted according to the first control amount to obtain a target computing power estimate value; the target computing power estimate value is used to calculate VDF problems among the multiple VDF problems except the first VDF problem.
[0011] In a second aspect, an embodiment of the present application provides a computing power dynamic estimation device for a VDF problem, which is applied to a measurement object of a computing power dynamic estimation system, wherein the computing power dynamic estimation system includes the measurement object, an initiating object, and a computing object, and the device includes a determination module, a calculation module, and an adjustment module, wherein:
[0012] The determination module is used to create multiple VDF problems through the initiating object, and then determine a first calculation duration and a first measurement duration corresponding to a first VDF problem through the calculation object and the measurement object respectively; the first VDF problem is any one of the multiple VDF problems;
[0013] The calculation module is used to obtain an initial duration difference statistical table, calculate a first duration difference between the first calculated duration and the first measured duration, and update the initial duration difference statistical table according to the first duration difference to obtain a first duration difference statistical table; the initial duration difference statistical table is the duration difference statistical table obtained by the last update;
[0014] The determination module is further used to determine a computing power effective group according to the first time difference statistical table; the computing power effective group is a computing power estimation group used to calculate the control amount;
[0015] The adjustment module is used to determine a first control amount according to the computing power effectiveness group, and adjust the computing power estimate value corresponding to the computing power effectiveness group according to the first control amount to obtain a target computing power estimate value; the target computing power estimate value is used to calculate VDF problems among the multiple VDF problems except the first VDF problem.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package.
[0019] By implementing the embodiments of the present application, the computing power estimate can be adjusted in real time according to the time difference to adapt to the computing power distribution of different computing objects, and the computing power of the VDF problem can be quickly and effectively estimated, thereby improving the overall computing efficiency and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are 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.
[0021] Figure 1 It is a system architecture diagram of a computing power dynamic estimation system provided in an embodiment of the present application;
[0022] Figure 2 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0023] Figure 3 It is a flowchart of a method for dynamically estimating computing power for a VDF problem provided in an embodiment of the present application;
[0024] Figure 4 It is a block diagram of the functional modules of a computing power dynamic estimation device for VDF problems provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0027] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article indicates that the associated objects before and after are in an "or" relationship. The "plurality" appearing in the embodiments of the present application refers to two or more.
[0028] In the embodiments of the present application, "at least one item" or similar expressions refer to any combination of these items, including any combination of single items or plural items, and refer to one or more, and multiple refers to two or more. For example, at least one item of a, b, or c can represent the following seven situations: a, b, c, a and b, a and c, b and c, a, b, and c. Among them, each of a, b, and c can be an element or a set containing one or more elements.
[0029] The "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not impose any limitations on this.
[0030] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0031] Verifiable Delay Function (VDF) is a new type of mathematical function designed to provide a stable time delay in distributed computing while ensuring that the calculation results can be quickly verified. VDF is widely used in distributed voting, statistics, and data aggregation, where the initiator requires the calculator to provide a stable proof of the passage of time. Generally speaking, in order to ensure that each calculator can complete the Eval formula with similar time overhead, the difficulty of the VDF problem (i.e., specify T) needs to be determined by the actual calculation time reported by each party to prevent the calculation difficulty from expanding infinitely and causing a large waste of computing power.
[0032] At present, the computing power of VDF calculators may change at any time due to technical or non-technical reasons, and is not necessarily stable. Secondly, the increase or decrease of the computing power of VDF calculations is generally nonlinear in terms of the speed and effect on the actual computing problem, and it is difficult for existing solutions to use a single or combined probability distribution method to fit the actual variable computing power of a calculator. Therefore, how to quickly and effectively estimate the computing power of VDF problems needs to be solved urgently.
[0033] To solve the above problems, an embodiment of the present application provides a method and a related device for dynamic estimation of computing power for VDF problems, which are applied to a measurement object of a computing power dynamic estimation system, wherein the computing power dynamic estimation system includes the measurement object, an initiating object, and a calculating object, wherein multiple VDF problems are created through the initiating object, and then the first calculation duration and the first measurement duration corresponding to the first VDF problem are respectively determined through the calculating object and the measuring object; the first VDF problem is any one of the multiple VDF problems; an initial duration difference statistical table is obtained, and the difference between the first calculation duration and the first measurement duration is calculated. The first duration difference of the initial duration difference statistics table is obtained by updating the initial duration difference statistics table according to the first duration difference, and obtaining the first duration difference statistics table; the initial duration difference statistics table is the duration difference statistics table obtained by the last update; the computing power effective group is determined according to the first duration difference statistics table; the computing power effective group is the computing power estimation group used to calculate the control amount; the first control amount is determined according to the computing power effective group, and the computing power estimation value corresponding to the computing power effective group is adjusted according to the first control amount to obtain the target computing power estimation value; the target computing power estimation value is used to calculate the VDF problems other than the first VDF problem in the multiple VDF problems. The computing power estimation value can be adjusted in real time according to the duration difference to adapt to the computing power distribution of different computing objects, and the computing power of the VDF problem can be quickly and effectively estimated, thereby improving the overall computing efficiency and stability.
[0034] For easier understanding, see Figure 1 , Figure 1It is a system architecture diagram of a computing power dynamic estimation system provided in an embodiment of the present application. The computing power dynamic estimation system includes a measurement object, an initiating object, and a calculation object.
[0035] Among them, the measurement object includes a computing unit operator group, a computing power estimation group, a time difference statistics table, and a computing power estimation parameter table. The computing unit operator group includes multiple operators. The computing power estimation group includes a proportional control parameter Kp, an integral control parameter Ki, and a computing power estimation value Pg. The time difference statistics table includes the current time difference, the cumulative time difference, the change time difference, the historical maximum computing power estimation value, and the historical minimum computing power estimation value. The computing power estimation parameter table includes multiple computing power estimation groups. The measurement object is mainly responsible for maintaining multiple computing power estimation groups and adjusting the computing power estimation value according to the time difference between the calculation results and the measurement results. The measurement object has a control and regulation function in the computing power dynamic estimation system. It selects the best computing power estimation group by analyzing the time difference and dynamically adjusts the control parameters to optimize the computing power estimation process.
[0036] The initiator is responsible for generating and creating VDF problems and sending them to the computation and measurement objects. The core task of the initiator is to generate VDF problems and ensure that they can be effectively delivered to the computation and measurement objects.
[0037] Among them, the computing object is mainly responsible for executing VDF problem calculations and providing calculation results. The computing power of the computing object is the target of monitoring and adjustment by the measured person, and the fluctuation of the computing power of the computing object will affect the estimated computing power of the measured object.
[0038] It should be noted that the processing flow of the VDF problem includes the initialization phase Setup, the calculation phase Eval and the verification phase Verify. In the initialization phase, the modulus parameter λ and the time parameter (actual time) τ are input, and then the calculation parameter ek and the verification parameter vk are output; in the calculation phase, the calculation parameter ek and the input data x are input, and after the preset calculation time, the calculation result y and the proof π are output, that is, (y, π) = Eval (ek, x); in the verification phase, the verification parameter vk, the input data x, the calculation result y, the proof π are input, and then the quick verification result is output, which is the verification pass accept or the verification fail reject, that is, accept / reject = Verify (vk, x, y, π). The calculation formula for the VDF problem is as follows:
[0039]
[0040] Among them, y is the calculation result, x is the input data, T is the time parameter τ, and N is the preset modulus parameter λ.
[0041] In one possible embodiment, the initiating object generates a VDF problem and hands it over to the computing object and the measuring object. The measuring object and the computing object respectively calculate the VDF problem at the same time, wherein the computing object directly calculates the VDF problem to obtain the calculation result, and the measuring object assembles the operator combination of different computing powers according to the computing power estimate value to calculate and obtain the measurement result. The measuring object records the calculation time t1 of the computing object and the measurement time t2 of the measuring object, and calculates the difference between the two, and obtains the time difference as t1-t2. The measuring object selects the most suitable computing power estimation group according to the time difference, and generates a new computing power estimation value according to the proportional control parameter Kp and the integral control parameter Ki of the computing power estimation group, and then makes a differential judgment based on the time difference to decide whether to generate a new computing power estimation group. When a new computing power estimation value is generated, the measuring object will adjust the operator combination according to the new computing power estimation value, and apply the new computing power estimation value to the calculation of the next VDF problem. In a new round of calculations, the new time difference is recalculated, and the new computing power estimate is determined again based on the new time difference, so as to gradually approach the optimal computing power configuration, and each time difference provides data support for the adjustment of the next computing power estimate.
[0042] In one possible embodiment, during the initialization phase, the initiating object obtains a preset modulus parameter λ, where the modulus parameter can be a prime number, which is not specifically limited here. Then, the number of consecutive squares T in the VDF formula can be determined solely by the initiating object, or by the initiating object and the computing object. Among them, since network fluctuations may affect the stability of the calculation, T should not be set too small, and T=100000 can be set, which is not specifically limited here. The initiating object publicizes the parameters λ and T, and the measuring object can obtain the parameters λ and T. The measuring object generates a group of computing power operators O with binary load distribution. i(i=1..N) , where for any binary operator O i , O i+1 , need to ensure O i+1 The actual computing power within the preset time period is O i It should be noted that the computing power value corresponding to O1 should be as small as possible so that it can be used as the minimum unit computing power of the binary computing power operator. N The maximum computing power value. The measurement objects can be pieced together to form O1-O N Any computing power within the range of , and the minimum computing power is O1.
[0043] It can be seen that while ensuring the computing delay, flexible allocation of computing power is achieved, and the credibility and adaptability of the computing process are improved through transparent parameter settings and open calculation methods.
[0044] In one possible embodiment, the measurement object obtains a computing unit with sufficient computing power, which is stronger than most computing objects in most scenarios, such as a virtual machine with sufficiently strong single-core performance on a cloud service. Then, the measurement object selects a computing unit duration s, where s is significantly less than the preset computing duration and s is an exponential power of 2, for example, s = 128ms, and the measurement object uses s as a computing cycle for executing VDF calculations. According to the selected computing cycle s, the measurement object needs to configure each operator O i working time. For example, O1 will only use 1 / 128 of the time (i.e. 1ms) for calculation in a period of s=128ms, O2 will use 2 / 128 of the time (i.e. 2ms) for calculation, and so on. The working time corresponding to each operator can be regarded as a time slot. Only in a specific time slot will the computing unit perform the VDF calculation task. Finally, the measurement object can obtain arbitrary computing power by combining different operators. For example, if 7O1 computing power is required, you can choose the combination of O1+O2+O4, so as to perform 7ms of calculation in 128ms, and no calculation is performed at other times.
[0045] It can be seen that the measurement object can flexibly select appropriate computing power within the computing power range to perform VDF calculations, and at the same time ensure that the delay and complexity of the calculation process achieve the expected results by setting a suitable combination of calculation cycles and computing power units.
[0046] Combine the following Figure 2 The electronic device in the embodiment of the present application is described. Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 2 As shown, the electronic device includes one or more processors, a memory, a communication interface and one or more programs, and the processor is communicatively connected with the memory and the communication interface via an internal communication bus.
[0047] Among them, the processor is mainly used for:
[0048] Create multiple VDF problems by initiating an object, and then determine a first calculation duration and a first measurement duration corresponding to a first VDF problem by calculating an object and measuring an object, respectively; the first VDF problem is any one of the multiple VDF problems;
[0049] Obtaining an initial duration difference statistics table, calculating a first duration difference between a first calculated duration and a first measured duration, and updating the initial duration difference statistics table according to the first duration difference to obtain a first duration difference statistics table; the initial duration difference statistics table is the duration difference statistics table obtained by the last update;
[0050] Determine a computing power effective group according to the first time difference statistical table; the computing power effective group is a computing power estimation group used to calculate the control amount;
[0051] A first control amount is determined according to the computing power effective group, and the computing power estimate value corresponding to the computing power effective group is adjusted according to the first control amount to obtain a target computing power estimate value; the target computing power estimate value is used to calculate VDF problems other than the first VDF problem among multiple VDF problems.
[0052] The one or more programs are stored in the above-mentioned memory and are configured to be executed by the above-mentioned processor, and the one or more programs include instructions for executing any step in the above-mentioned method embodiment.
[0053] Among them, the processor can be, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, units and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit can be a communication interface, a transceiver, a transceiver circuit, etc., and the storage unit can be a memory.
[0054] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0055] It is understandable that the electronic device may include more or fewer structural elements than those in the above structural block diagram, for example, including a power module, physical buttons, Wi-Fi module, speaker, Bluetooth module, sensor, display module, etc., which are not limited here. It is understandable that the electronic device may be equipped with Figure 1 The system architecture described.
[0056] After understanding the software and hardware architecture of this application, Figure 3 A method for dynamically estimating computing power for a VDF problem in an embodiment of the present application is described. Figure 3 : is a flowchart of a method for dynamically estimating computing power for a VDF problem provided in an embodiment of the present application, which specifically includes the following steps:
[0057] Step S301, creating multiple VDF problems through the initiating object, and then determining a first calculation duration and a first measurement duration corresponding to a first VDF problem through the calculation object and the measurement object respectively.
[0058] The first VDF problem is any one of the multiple VDF problems, and the first calculation duration and the first measurement duration corresponding to the first VDF problem are determined by the calculation object and the measurement object, respectively, and the specific steps include:
[0059] The first VDF problem is calculated by the calculation object to obtain the first calculation duration; a preset computing power estimation parameter table is obtained; the computing power estimation parameter table includes multiple computing power estimation groups, and each computing power estimation group corresponds to a computing power estimation value; a first computing power estimation group among the multiple computing power estimation groups is determined; the first computing power estimation group is used to actually calculate the first VDF problem; a first computing power estimation value corresponding to the first computing power estimation group is obtained; the first VDF problem is calculated according to the first computing power estimation value to obtain the first measurement duration.
[0060] Specifically, the computing object performs a computing task according to the first VDF problem. After the computing task is completed, a first computing duration is obtained, and the first computing duration is the time spent on actually executing the VDF calculation. Then, a preset computing power estimation parameter table is obtained, and the computing power estimation parameter table includes multiple computing power estimation groups, and each computing power estimation group corresponds to a computing power estimation value. Among them, the computing power estimation value reflects the expected computing power required to complete the corresponding VDF computing task under different computing power configurations. Then determine the computing power estimation group used to actually calculate the first VDF problem among the multiple computing power estimation groups, and obtain the first computing power estimation group. Finally, obtain the first computing power estimation value corresponding to the first computing power estimation group, and calculate the first VDF problem according to the first computing power estimation value to obtain the first measurement duration.
[0061] In a possible embodiment, the computing power estimation parameter table includes three computing power estimation groups, such as group 1, group 2, and group 3. Each computing power estimation group g corresponds to a proportional parameter Kp, an integral parameter Ki, and a computing power estimation value Pg. The computing power effective group currently used for VDF calculation is group 2. The computing power estimation parameter table is shown in Table 1:
[0062] Table 1
[0063] Computing power estimation group g Kp Ki Estimated computing power Pg Group 1 <![CDATA[0.1Δt0]]> <![CDATA[0.01∑ i=0..M Δt i ]]> 5O1 Group 2 (effective) <![CDATA[0.05Δt0]]> <![CDATA[0.1∑ i=0..M Δt i ]]> 11O1 Group 3 <![CDATA[0.15Δt0]]> <![CDATA[0.001∑ i=0..M Δt i ]]> 60O1
[0064] It can be seen that by combining the estimation of computing power and the measurement of actual computing time, the predictability of computing tasks can be improved, making it easier to quickly configure the appropriate computing power when calculating the next VDF problem.
[0065] Step S302: obtaining an initial duration difference statistics table, calculating a first duration difference between the first calculated duration and the first measured duration, and updating the initial duration difference statistics table according to the first duration difference to obtain a first duration difference statistics table.
[0066] The initial duration difference statistics table is the duration difference statistics table obtained by the last update. After obtaining the initial duration difference statistics table, the difference between the first calculated duration and the first measured duration is calculated to obtain the first duration difference. Then, the initial duration difference is updated according to the first duration difference to obtain the latest first duration difference statistics table.
[0067] The first duration difference statistics table is shown in Table 2:
[0068] Table 2
[0069]
[0070] It should be noted that the first time difference is used to adjust the proportional parameter Kp, the first cumulative time difference is used to adjust the integral parameter Ki, and the first changing time difference is used to determine whether to obtain new proportional parameter Kp and integral parameter Ki, and the value of the time difference can be positive or negative, which is not specifically limited here.
[0071] The updating of the initial duration difference statistical table according to the first duration difference to obtain the first duration difference statistical table specifically comprises the following steps:
[0072] Obtain the initial duration difference, initial cumulative duration difference, initial maximum computing power estimated value and initial minimum computing power estimated value in the initial duration statistical table; calculate the difference between the first duration difference and the initial duration difference to obtain the first variable duration difference; calculate the sum of the initial cumulative duration difference and the first duration difference to obtain the first cumulative duration difference; if the first computing power estimated value is greater than the initial maximum computing power estimated value, determine the first maximum computing power estimated value as the first computing power estimated value; otherwise, determine the first maximum computing power estimated value as the initial maximum computing power estimated value; if the first computing power estimated value is less than the initial minimum computing power estimated value, determine the first minimum computing power estimated value as the first computing power estimated value; otherwise, determine the first minimum computing power estimated value as the initial minimum computing power estimated value; determine the first duration difference statistical table according to the first duration difference, the first cumulative duration difference, the first variable duration difference, the first maximum computing power estimated value and the first minimum computing power estimated value.
[0073] Specifically, the initial duration difference, the initial cumulative duration difference, the initial maximum computing power estimated value, and the initial minimum computing power estimated value can be obtained from the initial duration difference statistics table, and then the first change duration difference is determined according to the difference between the first duration difference and the initial duration difference. The initial cumulative duration difference is added to the first duration difference to obtain the first cumulative duration difference, where the initial cumulative duration difference is the sum of the duration differences of all computing tasks before the current calculation. If the first computing power estimated value is greater than the initial maximum computing power estimated value, the first maximum computing power estimated value is determined to be the first computing power estimated value; if the first computing power estimated value is less than or equal to the initial maximum computing power estimated value, the first maximum computing power estimated value is determined to be the initial maximum computing power estimated value. If the first computing power estimated value is less than the initial minimum computing power estimated value, the first minimum computing power estimated value is determined to be the first computing power estimated value; if the first computing power estimated value is greater than or equal to the initial minimum computing power estimated value, the first minimum computing power estimated value is determined to be the initial minimum computing power estimated value. Finally, a first duration difference statistical table is determined according to the first duration difference, the first cumulative duration difference, the first change duration difference, the first maximum computing power estimated value, and the first minimum computing power estimated value.
[0074] It can be seen that by continuously monitoring and updating the duration difference and the cumulative duration difference, the computing power used to calculate the VDF problem can be predicted more accurately, thereby improving the overall computing efficiency and stability.
[0075] Step S303: determining a computing power effective group according to the first time difference statistical table.
[0076] The computing power effective group is a computing power estimation group used to calculate the control amount, and the computing power effective group is determined according to the first time difference statistical table, and the specific steps include:
[0077] Obtain the first duration difference, the first cumulative duration difference, and the first changed duration difference in the first duration difference statistics table; determine a first proportional parameter according to the first duration difference and a preset first proportional coefficient; determine a first integral parameter according to the first cumulative duration difference and a preset second proportional coefficient; determine a deviation value group according to the first changed duration difference; the deviation value group includes multiple deviation values; if the absolute value of the first changed duration difference is greater than k times the initial duration difference, it is determined that the computing power of the computing object has been changed; otherwise, it is determined that the computing power of the computing object has not been changed; if it is determined that the computing power of the computing object has been changed, the computing power effectiveness group is determined according to the deviation value group, the first proportional parameter, and the first integral parameter; if it is determined that the computing power of the computing object has not been changed, the computing power estimation group corresponding to the minimum deviation value in the deviation value group is determined as the computing power effectiveness group.
[0078] Specifically, obtain the first time difference, the first cumulative time difference, and the first changing time difference in the first time difference statistical table, and then determine the first proportional parameter based on the first time difference and the preset first proportional coefficient. For example, when the preset first proportional coefficient is 0.1, Kp=0.1Δt0. The preset first proportional coefficient can also be set to other values according to actual needs, which are not specifically limited here. The larger the first time difference, the larger Kp is, and the smaller the first time difference, the smaller Kp is. Then, determine the first integral parameter based on the first cumulative time difference and the preset second proportional coefficient. For example, when the second proportional coefficient is 0.01, it can be determined that Ki=0.01∑ i=0..M Δt i . Among them, Ki will be adjusted only after M calculations have been performed. The preset second proportional coefficient can also be set to other values according to actual needs, which is not specifically limited here. The deviation value group is determined according to the first change time difference, and the deviation value group includes multiple deviation values. Among them, if the first change time difference and the initial time difference have changed significantly, such as a significant increase or a significant decrease, it means that the computing object may have changed the computing power.
[0079] Among them, whether the computing object changes the computing power can be judged according to the preset discriminant, which is as follows:
[0080] |Δt0-Δt1|>kΔt1
[0081] If the absolute value of the first change duration difference is greater than k times the initial duration difference, it is determined that the computing object has changed its computing power; otherwise, it is determined that the computing object has not changed its computing power. If it is determined that the computing object has changed its computing power, it means that it is necessary to determine whether to create a new computing power estimation group, and then determine the computing power effective group according to the deviation value group, the first proportional parameter and the first integral parameter; if it is determined that the computing object has not changed its computing power, the computing power estimation group corresponding to the minimum deviation value in the deviation value group is determined as the computing power effective group.
[0082] The specific steps of determining the deviation value group according to the first change time difference include:
[0083] If the first change time difference is a positive value, the reference computing power estimated value is determined to be the first maximum computing power estimated value; if the first change time difference is a negative value, the reference computing power estimated value is determined to be the first minimum computing power estimated value; the computing power deviation between the reference computing power estimated value and the computing power estimated value corresponding to each computing power estimation group in the multiple computing power estimation groups is calculated to obtain multiple deviations; the absolute value of each deviation in the multiple deviations is obtained to obtain the multiple deviation values; the deviation value group is determined according to the multiple deviation values.
[0084] Specifically, if the first change time difference is a positive value, it means that the computing power of the computing object has increased significantly, then the computing power estimate value needs to be significantly increased, and the reference computing power estimate value is determined as the first maximum computing power estimate value; if the first change time difference is a negative value, it means that the computing power of the computing object has decreased significantly, then the computing power estimate value needs to be significantly reduced, and the reference computing power estimate value is determined as the first minimum computing power estimate value. According to the preset deviation calculation formula, the computing power deviation between the reference computing power estimate value and the computing power estimate value corresponding to each computing power estimate group in the multiple computing power estimate groups is calculated to obtain multiple deviations. Finally, the absolute value of each deviation in the multiple deviations is obtained to obtain multiple deviation values, and then the deviation value group is determined based on the multiple deviation values. Among them, the deviation calculation formula is as follows:
[0085] V g =|(P x -P g ) / P g |
[0086] Among them, V g Indicates deviation, P g Indicates the estimated computing power value corresponding to each computing power estimation group, P x Represents the estimated value of the reference computing power. x It can be the first maximum computing power estimate P max , or the first minimum computing power estimate P min , can be selected according to the positive or negative situation of the first change time difference, and is not specifically limited here.
[0087] The specific steps of determining the computing power effective group according to the deviation value group, the first proportional parameter and the first integral parameter include:
[0088] If each deviation value in the deviation value group is greater than the preset critical threshold, it is determined to execute the step of creating a new computing power estimation group; otherwise, it is determined not to execute the step of creating a new computing power estimation group; if it is determined to execute the step of creating a new computing power estimation group, a new computing power estimation group is determined according to the reference computing power estimation value, the first proportional parameter and the first integral parameter, and the new computing power estimation group is determined to be the computing power effective group; if it is determined not to execute the step of creating a new computing power estimation group, the computing power estimation group corresponding to the minimum deviation value in the deviation value group is determined to be the computing power effective group.
[0089] Specifically, the measurement object can first obtain a preset critical threshold, and then compare each deviation value in the deviation value group with the preset critical threshold to determine whether each deviation value in the deviation value group is greater than the preset critical threshold. If each deviation value in the deviation value group is greater than the preset critical threshold, it is determined to execute the step of creating a new computing power estimation group, and then determine the new computing power estimation group according to the reference computing power estimation value, the first proportional parameter and the first integral parameter, and determine the new computing power estimation group as the computing power effective group. If there is at least one deviation value in the deviation value group that is less than or equal to the preset critical threshold, it is determined not to execute the step of creating a new computing power estimation group, and determine the computing power estimation group corresponding to the minimum deviation value in the deviation value group as the computing power effective group. Among them, the computing power effective group is used for the control amount of the subsequent calculation of the computing power estimation value.
[0090] It can be seen that by comparing the deviation value of the computing power estimation group with the preset critical threshold, it is determined whether to create a new computing power estimation group, thereby improving the accuracy and reliability of the computing power estimation.
[0091] Step S304: determine a first control amount according to the computing power effective group, and adjust the computing power estimated value corresponding to the computing power effective group according to the first control amount to obtain a target computing power estimated value.
[0092] The target computing power estimate is used to calculate VDF problems other than the first VDF problem among the multiple VDF problems, and the first control amount is determined according to the computing power effective group, and the specific steps include:
[0093] Obtain the first proportional parameter and the first integral parameter in the computing power effectiveness group; calculate the product between the first proportional parameter and the first time difference to obtain a first calculation amount; calculate the product between the first integral parameter and the first cumulative time difference to obtain a second calculation amount; calculate the sum of the first calculation amount and the second calculation amount to obtain a third calculation amount; round the third calculation amount to obtain the first control amount.
[0094] Specifically, the measurement object obtains the first proportional parameter and the first integral parameter in the computing power effectiveness group, and then calculates the first proportional parameter, the first time difference, the first integral parameter, and the first cumulative time difference according to the preset control amount calculation formula to obtain the third calculation amount. Finally, the third calculation amount is rounded to obtain the first control amount. For example, when the third calculation amount is 11, the first control amount can be 11O1. Among them, the first control amount may be a positive value or a negative value, which is not specifically limited here. Among them, the control amount calculation formula is as follows:
[0095] dP=Kp·Δt0+Ki·(∑ i=0..M Δt i )
[0096] Wherein, dP represents the third calculation amount; Kp·Δt0 represents the first calculation amount, that is, the product of the first proportional parameter and the first time difference; Ki·(∑ i=0..M Δt i ) represents the second calculation quantity, namely the product of the first integral parameter and the first accumulated time difference.
[0097] Next, the estimated computing power value corresponding to the computing power effective group can be adjusted according to the first control amount to obtain the target computing power estimated value. Then, the measurement object can calculate the next VDF problem based on the target computing power estimated value and the calculation object, and readjust the target computing power estimated value of the measurement object according to the time difference corresponding to the next VDF problem, and so on, until the last VDF problem is calculated. Among them, the target computing power estimated value must be at the maximum value of the computing power held by the measurement object. N and the minimum value O1.
[0098] In a possible embodiment, the reference computing power estimate value in the new computing power estimate group is updated according to the target computing power estimate value to obtain a target computing power estimate group; the target computing power estimate group corresponds to the target computing power estimate value; the computing power estimate parameter table is updated according to the target computing power estimate group to obtain a target computing power estimate parameter table; the target computing power estimate parameter table includes the multiple computing power estimate groups and the target computing power estimate group.
[0099] It can be seen that by dynamically adjusting the computing power estimation values in the computing power estimation group and updating the computing power estimation parameter table, we can better cope with the fluctuation and uncertainty of computing power and improve the stability and accuracy of computing power estimation.
[0100] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0101] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0102] In the case of dividing each functional module into corresponding functional modules, Figure 4 4 is a functional module composition block diagram of a computing power dynamic estimation device for VDF problem provided in an embodiment of the present application, which is applied to a measurement object of a computing power dynamic estimation system. The computing power dynamic estimation system includes the measurement object, the initiation object, and the calculation object. The computing power dynamic estimation device 400 for VDF problem includes a determination module 410, a calculation module 420, and an adjustment module 430, wherein:
[0103] The determination module 410 is used to create multiple VDF problems through the initiating object, and then determine the first calculation duration and the first measurement duration corresponding to the first VDF problem through the calculation object and the measurement object respectively; the first VDF problem is any one of the multiple VDF problems;
[0104] The calculation module 420 is used to obtain an initial duration difference statistical table, calculate a first duration difference between the first calculated duration and the first measured duration, and update the initial duration difference statistical table according to the first duration difference to obtain a first duration difference statistical table; the initial duration difference statistical table is the duration difference statistical table obtained by the last update;
[0105] The determination module 410 is further configured to determine a computing power effective group according to the first time difference statistical table; the computing power effective group is a computing power estimation group used to calculate the control amount;
[0106] The adjustment module 430 is used to determine a first control amount according to the computing power effectiveness group, and adjust the computing power estimate value corresponding to the computing power effectiveness group according to the first control amount to obtain a target computing power estimate value; the target computing power estimate value is used to calculate the VDF problems among the multiple VDF problems except the first VDF problem.
[0107] Optionally, in the aspect of respectively determining a first calculation duration and a first measurement duration corresponding to a first VDF problem by using the calculation object and the measurement object, the determination module 410 is specifically configured to:
[0108] Calculating the first VDF problem by using the calculation object to obtain the first calculation duration;
[0109] Obtain a preset computing power estimation parameter table; the computing power estimation parameter table includes multiple computing power estimation groups, each computing power estimation group corresponds to a computing power estimation value;
[0110] Determine a first computing power estimation group among the multiple computing power estimation groups; the first computing power estimation group is used to actually calculate the first VDF problem;
[0111] Obtaining a first computing power estimation value corresponding to the first computing power estimation group;
[0112] The first VDF problem is calculated according to the first computing power estimate to obtain the first measurement duration.
[0113] Optionally, in the aspect of updating the initial duration difference statistical table according to the first duration difference to obtain the first duration difference statistical table, the calculation module 420 is specifically used to:
[0114] Obtaining the initial duration difference, the initial cumulative duration difference, the initial maximum computing power estimate, and the initial minimum computing power estimate in the initial duration statistics table;
[0115] Calculating the difference between the first time difference and the initial time difference to obtain a first changed time difference;
[0116] Calculating the sum of the initial cumulative time difference and the first time difference to obtain a first cumulative time difference;
[0117] If the first computing power estimated value is greater than the initial maximum computing power estimated value, the first maximum computing power estimated value is determined to be the first computing power estimated value; otherwise, the first maximum computing power estimated value is determined to be the initial maximum computing power estimated value;
[0118] If the first computing power estimated value is less than the initial minimum computing power estimated value, the first minimum computing power estimated value is determined to be the first computing power estimated value; otherwise, the first minimum computing power estimated value is determined to be the initial minimum computing power estimated value;
[0119] The first time difference statistics table is determined according to the first time difference, the first cumulative time difference, the first change time difference, the first maximum computing power estimated value, and the first minimum computing power estimated value.
[0120] Optionally, in determining the computing power effective group according to the first time difference statistical table, the determining module 410 is further specifically configured to:
[0121] Obtain the first duration difference, the first cumulative duration difference, and the first changed duration difference in the first duration difference statistical table;
[0122] Determine a first proportional parameter according to the first time difference and a preset first proportional coefficient;
[0123] Determine a first integral parameter according to the first accumulated time difference and a preset second proportional coefficient;
[0124] Determine a deviation value group according to the first change time difference; the deviation value group includes a plurality of deviation values;
[0125] If the absolute value of the first change time difference is greater than k times the initial time difference, it is determined that the computing power of the computing object has been changed; otherwise, it is determined that the computing power of the computing object has not been changed;
[0126] If it is determined that the computing object changes the computing power, determining the computing power effective group according to the deviation value group, the first proportional parameter and the first integral parameter;
[0127] If it is determined that the computing object has not changed the computing power, the computing power estimation group corresponding to the minimum deviation value in the deviation value group is determined as the computing power effective group.
[0128] Optionally, in determining the deviation value group according to the first change time difference, the determination module 410 is further specifically configured to:
[0129] If the first change time difference is a positive value, determining the reference computing power estimate as the first maximum computing power estimate;
[0130] If the first change time difference is a negative value, determining the reference computing power estimate as the first minimum computing power estimate;
[0131] Calculating a computing power deviation between the reference computing power estimate value and a computing power estimate value corresponding to each computing power estimate group in the plurality of computing power estimate groups to obtain a plurality of deviations;
[0132] Obtaining the absolute value of each of the multiple deviations to obtain the multiple deviation values;
[0133] The deviation value group is determined according to the plurality of deviation values.
[0134] Optionally, in determining the computing power effective group according to the deviation value group, the first proportional parameter and the first integral parameter, the determining module 410 is further specifically configured to:
[0135] If each deviation value in the deviation value group is greater than the preset critical threshold, it is determined to execute the step of creating a new computing power estimation group; otherwise, it is determined not to execute the step of creating a new computing power estimation group;
[0136] If it is determined to execute the step of creating a new computing power estimation group, a new computing power estimation group is determined according to the reference computing power estimation value, the first proportion parameter, and the first integral parameter, and the new computing power estimation group is determined as the computing power effective group;
[0137] If it is determined that the step of creating a new computing power estimation group is not to be performed, the computing power estimation group corresponding to the minimum deviation value in the deviation value group is determined as the computing power effective group.
[0138] Optionally, the adjustment module 430 is specifically used to:
[0139] The reference computing power estimated value in the new computing power estimated group is updated according to the target computing power estimated value to obtain a target computing power estimated group; the target computing power estimated group corresponds to the target computing power estimated value;
[0140] The computing power estimation parameter table is updated according to the target computing power estimation group to obtain a target computing power estimation parameter table; the target computing power estimation parameter table includes the multiple computing power estimation groups and the target computing power estimation group.
[0141] Optionally, in determining the first control amount according to the computing power effective group, the adjustment module 430 is further specifically configured to:
[0142] Obtaining the first proportional parameter and the first integral parameter in the computing power effective group;
[0143] Calculate the product of the first ratio parameter and the first time difference to obtain a first calculation amount;
[0144] Calculate the product of the first integral parameter and the first cumulative time difference to obtain a second calculation amount;
[0145] Calculate the sum of the first calculation amount and the second calculation amount to obtain a third calculation amount;
[0146] The third calculated amount is rounded to obtain the first controlled amount.
[0147] It can be seen that the computing power estimate is adjusted in real time according to the time difference to adapt to the computing power distribution of different computing objects, and the computing power of the VDF problem is estimated quickly and effectively, thereby improving the overall computing efficiency and stability.
[0148] It should be noted that the specific implementation of each operation can adopt the corresponding description of the method embodiment shown above. The computing power dynamic estimation device 400 for the VDF problem can be used to execute the above method embodiment of the present application, which will not be repeated here.
[0149] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiments, and the above computer includes an electronic device.
[0150] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.
[0151] It should be noted that, for the above-mentioned various embodiments, for the sake of simple description, they are all expressed as a series of action combinations. Those skilled in the art should be aware that the present application is not limited by the described order of actions, because some steps in the embodiments of the present application can be performed in other orders or simultaneously. In addition, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions, steps, modules or units involved are not necessarily required by the embodiments of the present application.
[0152] In the above embodiments, the embodiments of the present application have different focuses on the description of each embodiment. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0153] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0154] The steps of the method or algorithm described in the embodiments of the present application can be implemented in hardware or by executing software instructions by a processor. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal device or a management device. Of course, the processor and the storage medium can also be present in a terminal device or a management device as discrete components.
[0155] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server, or data center to another website site, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0156] The modules / units included in the devices and products described in the above embodiments may be software modules / units or hardware modules / units, or may be partially software modules / units and partially hardware modules / units. For example, for the devices and products applied to or integrated in the chip, the modules / units included therein may all be implemented in the form of hardware such as circuits, or at least some of the modules / units may be implemented in the form of software programs, which run on the processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits; for the devices and products applied to or integrated in the chip module, the modules / units included therein may all be implemented in the form of hardware such as circuits, and different modules / units may be located in the same component (such as a chip, circuit module, etc.) or in different components of the chip module, or at least some of the modules / units may be implemented in the form of software programs. The software programs run on the processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits. It is implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in hardware such as circuits; for various devices and products applied to or integrated in the terminal equipment, the various modules / units contained therein can be implemented in hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal equipment, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal equipment, and the remaining (if any) modules / units can be implemented in hardware such as circuits.
[0157] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the embodiments of the present application. It should be understood that the above description is only the specific implementation method of the embodiments of the present application and is not intended to limit the protection scope of the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.
Claims
1. A method for dynamic estimation of computing power for VDF problems, characterized in that: A measurement object applied to a computing power dynamic estimation system, wherein the computing power dynamic estimation system includes the measurement object, an initiating object, and a computing object, and the method includes: Creating multiple VDF problems through the initiating object, and then determining a first calculation duration and a first measurement duration corresponding to a first VDF problem through the calculation object and the measurement object, respectively; the first VDF problem is any one of the multiple VDF problems; Obtaining an initial duration difference statistics table, calculating a first duration difference between the first calculated duration and the first measured duration, and updating the initial duration difference statistics table according to the first duration difference to obtain a first duration difference statistics table; the initial duration difference statistics table is the duration difference statistics table obtained by the last update; Determine a computing power effective group according to the first time difference statistical table; the computing power effective group is a computing power estimation group used to calculate the control amount; A first control amount is determined according to the computing power effectiveness group, and a computing power estimate value corresponding to the computing power effectiveness group is adjusted according to the first control amount to obtain a target computing power estimate value; the target computing power estimate value is used to calculate VDF problems among the multiple VDF problems except the first VDF problem.
2. The method according to claim 1, characterized in that The determining, by using the calculation object and the measurement object, respectively a first calculation duration and a first measurement duration corresponding to the first VDF problem includes: Calculating the first VDF problem by using the calculation object to obtain the first calculation duration; Obtain a preset computing power estimation parameter table; the computing power estimation parameter table includes multiple computing power estimation groups, each computing power estimation group corresponds to a computing power estimation value; Determine a first computing power estimation group among the multiple computing power estimation groups; the first computing power estimation group is used to actually calculate the first VDF problem; Obtaining a first computing power estimation value corresponding to the first computing power estimation group; The first VDF problem is calculated according to the first computing power estimate to obtain the first measurement duration.
3. The method according to claim 2, characterized in that The updating of the initial duration difference statistical table according to the first duration difference to obtain the first duration difference statistical table includes: Obtaining the initial duration difference, the initial cumulative duration difference, the initial maximum computing power estimate, and the initial minimum computing power estimate in the initial duration statistics table; Calculating the difference between the first time difference and the initial time difference to obtain a first changed time difference; Calculating the sum of the initial cumulative time difference and the first time difference to obtain a first cumulative time difference; If the first computing power estimated value is greater than the initial maximum computing power estimated value, the first maximum computing power estimated value is determined to be the first computing power estimated value; otherwise, the first maximum computing power estimated value is determined to be the initial maximum computing power estimated value; If the first computing power estimated value is less than the initial minimum computing power estimated value, the first minimum computing power estimated value is determined to be the first computing power estimated value; otherwise, the first minimum computing power estimated value is determined to be the initial minimum computing power estimated value; The first time difference statistics table is determined according to the first time difference, the first cumulative time difference, the first change time difference, the first maximum computing power estimated value, and the first minimum computing power estimated value.
4. The method according to claim 3, characterized in that The determining the computing power effective group according to the first time difference statistical table includes: Obtain the first duration difference, the first cumulative duration difference, and the first changed duration difference in the first duration difference statistical table; Determine a first proportional parameter according to the first time difference and a preset first proportional coefficient; Determine a first integral parameter according to the first accumulated time difference and a preset second proportional coefficient; Determine a deviation value group according to the first change time difference; the deviation value group includes a plurality of deviation values; If the absolute value of the first change time difference is greater than k times the initial time difference, it is determined that the computing power of the computing object has been changed; otherwise, it is determined that the computing power of the computing object has not been changed; If it is determined that the computing object changes the computing power, determining the computing power effective group according to the deviation value group, the first proportional parameter and the first integral parameter; If it is determined that the computing object has not changed the computing power, the computing power estimation group corresponding to the minimum deviation value in the deviation value group is determined as the computing power effective group.
5. The method according to claim 4, characterized in that The step of determining a deviation value group according to the first change time difference comprises: If the first change time difference is a positive value, determining the reference computing power estimate as the first maximum computing power estimate; If the first change time difference is a negative value, determining the reference computing power estimate as the first minimum computing power estimate; Calculating a computing power deviation between the reference computing power estimate value and a computing power estimate value corresponding to each computing power estimate group in the plurality of computing power estimate groups to obtain a plurality of deviations; Obtaining the absolute value of each of the multiple deviations to obtain the multiple deviation values; The deviation value group is determined according to the plurality of deviation values.
6. The method according to claim 5, characterized in that The determining the computing power effective group according to the deviation value group, the first proportional parameter and the first integral parameter includes: If each deviation value in the deviation value group is greater than the preset critical threshold, it is determined to execute the step of creating a new computing power estimation group; otherwise, it is determined not to execute the step of creating a new computing power estimation group; If it is determined to execute the step of creating a new computing power estimation group, a new computing power estimation group is determined according to the reference computing power estimation value, the first proportion parameter, and the first integral parameter, and the new computing power estimation group is determined as the computing power effective group; If it is determined that the step of creating a new computing power estimation group is not to be performed, the computing power estimation group corresponding to the minimum deviation value in the deviation value group is determined as the computing power effective group.
7. The method according to claim 6, characterized in that The method further comprises: The reference computing power estimated value in the new computing power estimated group is updated according to the target computing power estimated value to obtain a target computing power estimated group; the target computing power estimated group corresponds to the target computing power estimated value; The computing power estimation parameter table is updated according to the target computing power estimation group to obtain a target computing power estimation parameter table; the target computing power estimation parameter table includes the multiple computing power estimation groups and the target computing power estimation group.
8. The method according to any one of claims 1 to 7, characterized in that: The determining the first control amount according to the computing power effective group includes: Obtaining the first proportional parameter and the first integral parameter in the computing power effective group; Calculate the product of the first ratio parameter and the first time difference to obtain a first calculation amount; Calculate the product of the first integral parameter and the first cumulative time difference to obtain a second calculation amount; Calculate the sum of the first calculation amount and the second calculation amount to obtain a third calculation amount; The third calculated amount is rounded to obtain the first controlled amount.
9. A computing power dynamic estimation device for VDF problem, characterized in that: A measurement object applied to a computing power dynamic estimation system, wherein the computing power dynamic estimation system includes the measurement object, an initiating object, and a computing object, and the device includes a determination module, a computing module, and an adjustment module, wherein: The determination module is used to create multiple VDF problems through the initiating object, and then determine a first calculation duration and a first measurement duration corresponding to a first VDF problem through the calculation object and the measurement object respectively; the first VDF problem is any one of the multiple VDF problems; The calculation module is used to obtain an initial duration difference statistical table, calculate a first duration difference between the first calculated duration and the first measured duration, and update the initial duration difference statistical table according to the first duration difference to obtain a first duration difference statistical table; the initial duration difference statistical table is the duration difference statistical table obtained by the last update; The determination module is further used to determine a computing power effective group according to the first time difference statistical table; the computing power effective group is a computing power estimation group used to calculate the control amount; The adjustment module is used to determine a first control amount according to the computing power effectiveness group, and adjust the computing power estimate value corresponding to the computing power effectiveness group according to the first control amount to obtain a target computing power estimate value; the target computing power estimate value is used to calculate VDF problems among the multiple VDF problems except the first VDF problem.
10. An electronic device, characterized in that: include: A processor, a memory, a communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for executing the steps in the method according to any one of claims 1 to 8.