CN111343046A - Method and device for generating pressure flow, electronic equipment and computer readable storage medium - Google Patents

Method and device for generating pressure flow, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111343046A
CN111343046A CN202010107463.3A CN202010107463A CN111343046A CN 111343046 A CN111343046 A CN 111343046A CN 202010107463 A CN202010107463 A CN 202010107463A CN 111343046 A CN111343046 A CN 111343046A
Authority
CN
China
Prior art keywords
pressure
parameter
load
generating
load parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010107463.3A
Other languages
Chinese (zh)
Other versions
CN111343046B (en
Inventor
宋增宽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010107463.3A priority Critical patent/CN111343046B/en
Publication of CN111343046A publication Critical patent/CN111343046A/en
Application granted granted Critical
Publication of CN111343046B publication Critical patent/CN111343046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Abstract

The embodiment of the disclosure discloses a method and a device for generating pressure flow, electronic equipment and a computer readable storage medium. Wherein the method of generating a pressure flow comprises: acquiring a load parameter at the current moment and a pressure parameter at the current moment; responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition; generating a pressure flow based on the pressure parameter. By the method, the technical problem that the pressure flow cannot be adjusted in the prior art is solved.

Description

Method and device for generating pressure flow, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of pressure testing, and in particular, to a method and an apparatus for generating pressure flow, an electronic device, and a computer-readable storage medium.
Background
The pressure test has an important role in the internet back-end technology, is a standard method for evaluating the system load capacity, has an important significance in accurately evaluating the system load capacity in a large-flow high-concurrency large-scale distributed system, and is an important method for reasonably planning resources and guaranteeing user experience. An excellent hair pressure system plays an irreplaceable role throughout the pressure test.
In the existing open-source pressure-emitting assembly, pressure-emitting tools represented by Apache JMeter, AB and the like are widely used, and when pressure testing is completed, the tools often need a user to observe the pressure-applying effect through naked eyes, manual adjustment is needed to find the maximum load capacity of the system, and the pressure cannot be adjusted in a self-adaptive manner. The above problems become a technical problem to be solved in the field of stress testing.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, an embodiment of the present disclosure provides a method for generating a pressure flow, including:
acquiring a load parameter at the current moment and a pressure parameter at the current moment;
responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition;
generating a pressure flow based on the pressure parameter.
In a second aspect, an embodiment of the present disclosure provides a pressure testing method, including:
acquiring a starting parameter;
generating a pressure flow according to the starting parameter;
acquiring a partial pressure weight;
and distributing the pressure flow to more than two interfaces or equipment to be tested according to the partial pressure weight.
In a third aspect, an embodiment of the present disclosure provides a pressure testing system, which includes at least one pressure generating device, a pressure controller, and a pressure controller, configured to perform a pressure test on a plurality of devices to be tested, where:
the at least one pressure generating device sends an activation parameter to the pressure controller;
the pressure controller controls the at least one pressure generating device to generate pressure flow according to the starting parameters;
the at least one pressure generating device acquires partial pressure weights of the plurality of devices to be tested;
and the at least one pressure generating device distributes the pressure flow to each device to be tested according to the partial pressure weight.
In a fourth aspect, an embodiment of the present disclosure provides an apparatus for generating a pressure flow, including:
the parameter acquisition module is used for acquiring the load parameter at the current moment and the pressure parameter at the current moment;
the pressure parameter adjusting module is used for responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition;
and the first pressure flow generation module is used for generating pressure flow according to the pressure parameter.
In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the preceding first or second aspects.
In a sixth aspect, the disclosed embodiments provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform any one of the methods of the first or second aspects.
The embodiment of the disclosure discloses a method and a device for generating pressure flow, electronic equipment and a computer readable storage medium. Wherein the method of generating a pressure flow comprises: acquiring a load parameter at the current moment and a pressure parameter at the current moment; responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition; generating a pressure flow based on the pressure parameter. By the method, the technical problem that the pressure flow cannot be adjusted in the prior art is solved.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic view of an application scenario of an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of generating a pressure flow provided by an embodiment of the present disclosure;
FIG. 3 is a further flowchart of step S202 of a method of generating a pressure flow provided by an embodiment of the present disclosure;
FIG. 4 is a flow chart of a method of generating a pressure flow provided by another embodiment of the present disclosure;
fig. 5 is a flowchart of an embodiment of a method for distributing pressure and flow provided by an embodiment of the present disclosure;
fig. 6 is a further flowchart of step S503 of an embodiment of a method for distributing pressure and flow provided by the embodiment of the present disclosure;
FIG. 7 is a block diagram of a pressure testing system provided by an embodiment of the present disclosure;
FIG. 8 is a schematic structural diagram of an embodiment of a device for generating a pressure flow according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an embodiment of a distribution device of pressure and flow provided by the embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a schematic view of an application scenario of the embodiment of the present disclosure. As shown in fig. 1, a voltage generating apparatus 101 is connected to a terminal device 102 to be tested through a network, wherein the voltage generating apparatus 101 and the terminal device 102 to be tested include any type of computing device, for example, the voltage generating apparatus 101 may be a computer such as a desktop computer or a workstation, and the terminal device 102 to be tested may be a computing device type computer or an intelligent terminal; the network on which the voltage generating apparatus 101 communicates with the terminal device 102 to be tested may be a wireless network, such as a 5G network and a wifi network, or may be a wired network, such as an optical fiber network.
It should be noted that, as an alternative implementation form, the sending apparatus 101 may be implemented as software, as hardware, or as a combination of software and hardware, and as an example, the sending apparatus 101 may be a chip, and thus may be disposed in any form of computer device described above.
Fig. 2 is a flowchart of an embodiment of a method for generating a pressure flow according to an embodiment of the present disclosure, where the method for generating a pressure flow according to this embodiment may be performed by a device for generating a pressure flow, where the device for generating a pressure flow may be implemented as software, or implemented as a combination of software and hardware, and the device for generating a pressure flow may be integrated in a certain device in a system for generating a pressure flow, such as a server for generating a pressure flow or a terminal device for generating a pressure flow. As shown in fig. 2, in order to solve the above technical problem of unable to adjust the pressure, the method comprises the following steps:
step S201, acquiring a load parameter at the current moment and a pressure parameter at the current moment;
optionally, the load parameter is a CPU utilization C or a memory utilization M of the device to be tested. In the present disclosure, a collection agent is preset in a device to be tested, and the collection agent is used for collecting a load condition of the device to be tested, that is, the CPU utilization rate and/or the memory utilization rate. Typically, the collection agent obtains the load parameters C and M through system function call, and specifically, may calculate the parameter C by calculating a sum of CPU utilization rates of all processes in the device to be tested, and calculate the memory utilization rate calculation parameter M of all processes in the device to be tested. The above-mentionedThe collection time interval of the collection agent can be pre-specified by a configuration file, and the collection agent collects the parameter C and/or the parameter M according to the collection time interval. Typically, when there are n devices to be tested, each device to be tested is numbered, and the numbers are respectively: 1,2,3 … … n, the collection agent collects the load parameter by Ci,MiAnd expressing the CPU utilization rate and the memory utilization rate of the ith device to be tested. CurRiRPS value, lastR, indicating the current time of the ith machineiAnd indicating the RPS value of the ith machine at the last moment, wherein the current moment refers to the current acquisition time, and the last moment refers to the last acquisition time.
Optionally, the pressure parameter at the current time refers to the number of times per second (RPS) requested by the pressure generating device at the current time, and the RPS may be controlled to generate a corresponding pressure flow to the device to be tested.
It should be understood that the specific examples of the load parameter and the pressure parameter are only examples, and do not limit the disclosure, and practically any parameter capable of representing the load degree and the pressure flow may be applied to the disclosure, and will not be described herein again.
Step S202, responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to the adjustment strategy corresponding to the preset condition;
optionally, the step S202 includes: step S301, in response to the fact that the load parameter at the current moment is smaller than a supercharging threshold value, increasing the pressure parameter according to an adjustment strategy corresponding to the load parameter; step S302, in response to the fact that the load parameter at the current moment is greater than or equal to a pressurization threshold and smaller than a voltage stabilization threshold, judging whether the load parameter is the maximum load according to a judgment strategy corresponding to the load parameter; step S303, in response to the load parameter at the current moment being greater than or equal to the pressure stabilizing threshold, reducing the pressure parameter according to the adjustment strategy corresponding to the load parameter.
Optionally, the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being smaller than the boost threshold includes: and in response to the load parameter at the current moment being smaller than the first threshold value, adjusting the pressure parameter to be P times of the pressure parameter at the current moment, wherein P is a positive real number. Illustratively, P is a positive real number and P ≧ 2. For example, taking the pressure parameter as the CPU utilization C, the first threshold is 0.5, P is 2, and the current time is the K-th time to acquire the load parameter, when C (K) <0.5, RPS (K +1) ═ 2 RPS (K) is adjusted, that is, if the current CPU utilization is lower than 50%, the pressure parameter is adjusted to be 2 times the pressure parameter at the current time. And then, at the next moment, continuously repeating the steps until the load parameter is not less than the first threshold value.
Optionally, the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being smaller than the boost threshold includes: and in response to the load parameter at the current moment being greater than or equal to the first threshold and smaller than the second threshold, adjusting the pressure parameter to be the ratio of the pressure parameter at the current moment to the load parameter. Optionally, taking the pressure parameter as the CPU utilization C, the first threshold is 0.5, the second threshold is 0.75, and the current time is the kth time to obtain the load parameter, when 0.5 ≦ C (K) <0.75, RPS (K +1) ═ RPS (K)/C (K)) is adjusted, that is, if the current CPU utilization is less than 70% and greater than or equal to 50%, the adjustment coefficient changes between (1.25, 2], the larger the value of C (K), the smaller the adjustment coefficient 1/C (K), that is, the larger the current load, the less RPS is increased.
Optionally, the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being smaller than the boost threshold includes: in response to the load parameter at the current time being greater than or equal to the second threshold and less than the increase threshold, adjusting the pressure parameter to be Q times the pressure parameter at the current time, wherein Q is a positive real number and Q < P. Illustratively, Q is a positive real number and 1 < Q ≦ a, where a is the reciprocal of the second threshold. For example, taking the pressure parameter as the CPU utilization C, the value of the second threshold is 0.75, and the value of the third threshold is 0.88, then 1 < Q ≦ 1.25, in this example, Q is 1.1, and the current time is the kth time to obtain the load parameter, and when C (K) is 0.5 ≦ C (K) <0.75, RPS (K +1) ═ 1.1 × RPS (K) is adjusted. And then, at the next moment, the steps are continuously repeated until the load parameter is not between the second threshold value and the third threshold value.
Optionally, the determining, according to a determination policy corresponding to the load parameter, whether the load parameter is the maximum load in response to that the load parameter at the current time is greater than or equal to an increase threshold and less than a voltage stabilization threshold includes: responding to the situation that the load parameter at the current moment is larger than or equal to the supercharging threshold and smaller than the voltage stabilization threshold, and judging whether the load parameter meets the preset condition for the first time; if the preset condition is met for the first time, starting a first timer; and if the number of times that the load parameter meets the preset condition before the first timer is overtime meets a second condition, determining the load parameter meeting the preset condition for the last time before the first counter is overtime as the maximum load. Illustratively, taking the pressure parameter as the CPU utilization C, the boost threshold value is 0.75, the regulated threshold value is 0.88, the current time is the kth time to obtain the load parameter, when 0.75 ≤ C (K) <0.88 and the threshold interval is entered for the first time, the current time ST is recorded, and a first timer is started, in this exemplary embodiment, the timeout time of the first timer is 3 minutes, when the timer reaches 3 minutes, the number cnt of the load parameter in the range of [0.75,0.88) and the total number ct of the load parameter obtained when the timer reaches three minutes are recorded, if cnt/ct >0.99, that is, in the counter timing period, more than 99% of the obtained load parameters are in the range of [0.75,0.88), before the timer is timed out, the last load parameter satisfying [0.75,0.88) is taken as the maximum load of the device to be tested, the pressure corresponding to the corresponding pressure parameter is the maximum pressure which can be borne by the device to be tested.
Optionally, the reducing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being greater than or equal to the regulated threshold includes: and in response to the load parameter at the current moment being greater than or equal to the pressure stabilizing threshold value, adjusting the pressure parameter to be 1/n times of the sum of the pressure parameter at the current moment and the pressure parameter at the previous moment, wherein n is a positive real number, and n > 1. For example, taking the pressure parameter as the CPU utilization C, the steady-state threshold value is 0.88, the load parameter is obtained at the current time K, and n is 2, when C (K) ≧ 0.92, RPS (K +1) ═ RPS (K) + RPS (K-1))/2 is adjusted. And then, at the next moment, continuously repeating the steps until the load parameter is smaller than the voltage stabilization threshold value.
It can be understood that the above-mentioned multiple optional embodiments may be combined together, that is, the multiple thresholds constitute a preset condition, and the adjustment policy corresponding to which threshold interval is executed when determining which threshold interval of the preset condition is satisfied by the load parameter at the current time. The threshold may also be adjusted according to specific needs, and will not be described herein.
And step S203, generating pressure flow according to the pressure parameter.
In this step, the pressure flow is generated according to the RPS (k +1) acquired in step S202, and if in the above-described alternative embodiment, the maximum load of the device to be tested has been obtained, RPS (k +1) ═ RPS (k) may be maintained until the end of the test process. When pressure flow is generated, the pressure can be constant through the token bucket, namely, the pressure generating device generates a request according to the maximum speed of the pressure generating device, the token is put into the token bucket according to the set RPS, the request can be sent only when the pressure generating device takes the token, the speed of sending the request is the speed of putting the token, and the speed of putting the token is equal to the RPS, so that the required pressure flow can be generated through the token bucket.
Optionally, as shown in fig. 4, before the step S201, acquiring the load parameter at the current time and the pressure parameter at the current time, the method further includes:
step S401, acquiring starting parameters;
step S402, generating pressure flow according to the starting parameter.
Optionally, the acquiring the start parameter includes: acquiring an initial value of the pressure flow and a starting mode, wherein the starting mode refers to a mode of the pressure flow reaching the initial value. The initial value of the pressure flow is an initial RPS value used when a pressure test is just started, wherein the starting mode comprises a slow starting mode and a direct starting mode. A slow start mode value can be set, wherein the slow start mode value is the time for the transmission device to reach the initial RPS value, and if the slow start mode value is 1 minute, the transmission device will reach the initial RPS value in one minute after starting; and in the direct starting mode, the initial RPS value is directly reached after the starting of the transmitting device. Likewise, the RPS value may be implemented by entering the token bucket in step S203.
Optionally, the acquiring the start parameter includes: acquiring the partial pressure weight of each interface to be tested;
the generating of the pressure flow according to the starting parameter comprises: and distributing the pressure flow to each interface to be tested according to the partial pressure weight.
In this alternative embodiment, there are multiple test ports, and the pressure flow generated needs to be distributed among the multiple test ports. The interface to be tested is a device to be tested. And after the pressure flow is generated, dividing the pressure flow into a plurality of parts according to the partial pressure weight, and respectively distributing the parts to each interface to be tested. This allocation will be described in detail below and will not be described in detail here.
Through the embodiment, the pressure flow can be automatically adjusted according to the parameters of the load until the maximum load is obtained, so that the maximum load capacity of the system can be automatically tested.
On the other hand, the existing tool cannot perform partial pressure test on the secondary inlet, for example, in the pressure test of a payment channel, a very typical scenario is that the unionpay is used as the primary inlet, each bank is used as the secondary inlet, and the flow of the total inlet of the unionpay is reached in the pressure test process, and the flow is respectively limited by the flow of the inlets of the secondary banks. Therefore, another embodiment of the present disclosure is provided, and fig. 5 is a flowchart of an embodiment of a pressure flow distribution method provided in the embodiment of the present disclosure, where the pressure flow distribution method provided in this embodiment may be executed by a pressure flow distribution device, and the pressure flow distribution device may be implemented as software, or implemented as a combination of software and hardware, and the pressure flow distribution device may be integrated in some device in a pressure flow distribution system, such as a pressure flow distribution server or a pressure flow distribution terminal device. As shown in fig. 5, in order to solve the above technical problem that the voltage division test of the secondary interface cannot be performed, the method includes the following steps:
step S501, acquiring the partial pressure weight of each interface to be tested;
optionally, the partial pressure weight is a value set before the pressure test, and specifically, the partial pressure weight of each interface to be tested may be obtained through a human-computer interface, or may be obtained through a specific configuration file. Typically, if there are n devices to be tested, the partial pressure weight of each device to be tested can be set to W1,W2,……Wn
Step S502, generating pressure flow according to the pressure parameters;
optionally, the generating the pressure flow according to the pressure parameter includes: acquiring pressure parameters, wherein the pressure parameters comprise the request quantity per second; generating the pressure flow rate according to the requested quantity per second. The pressure parameter here may be an initial value of the pressure flow in step S301, or may be a pressure parameter adjusted according to the adjustment policy in step S202, and the manner of generating the pressure flow refers to the manner in step S203, and is not described herein again.
And S503, distributing the pressure flow to each interface to be tested according to the partial pressure weight.
Optionally, the allocating the pressure flow to each interface to be tested according to the partial pressure weight includes:
step S601, calculating the sum of the partial pressure weight values;
step S602, calculating the ratio of the partial pressure weight of the interface to be tested to the sum value;
step S603, distributing the pressure flow to the interface to be tested according to the ratio.
Specifically, in step S501, the partial pressure weight W of each interface to be tested is obtained1,W2,……WnThen, the sum of all partial pressure calculations is calculated, sum (W) W1+W2+……Wn(ii) a In step S602, a ratio of the partial pressure weight of each interface to be tested to the sum, i.e. Wi[ SUM (W) ]wherein WiRepresenting the weight value of the ith interface to be tested; in step S603, if the pressure parameter at the current time is set to RPS (k), RPSi=RPS(K)*Wi(ii)/SUM (W), wherein RPSiAnd the pressure flow distributed by the ith interface to be tested is shown. By the scheme of the embodiment, the problem of partial pressure of a plurality of secondary interfaces is solved, and the total pressure flow and the pressure flow of the secondary interfaces can be ensured.
As shown in fig. 7, a block diagram of a pressure testing system is provided for an embodiment of the present disclosure. The pressure sending device reports the starting parameters to the pressure controller, and generates pressure flow to the equipment to be tested according to the starting parameters. Optionally, the device to be tested is disposed with an acquisition module for acquiring a load parameter of the device to be tested, such as a utilization rate of the CPU and/or a utilization rate of the memory, and then the acquisition module reports the load parameter to the controller, and the controller calculates a pressure parameter at the next time according to the embodiments described in steps S201 to S203, and sends the pressure parameter to the pressure sending device to adjust the pressure flow generated by the pressure sending device.
In an alternative example shown in fig. 7, the pressure testing system comprises at least one pressure generating device, a pressure controller for pressure testing a plurality of devices under test, wherein: the at least one pressure generating device sends an activation parameter to the pressure controller; the pressure controller controls the at least one pressure generating device to generate pressure flow according to the starting parameters; the at least one pressure generating device acquires partial pressure weights of the plurality of devices to be tested; and the at least one pressure generating device distributes the pressure flow to each device to be tested according to the partial pressure weight.
Further, in this optional example, each of the multiple devices to be tested is provided with an acquisition module, and the acquisition module acquires load parameters of the multiple devices to be tested; the acquisition module transmits the acquired load parameters to the pressure controller; the pressure controller adjusts the pressure parameter according to the load parameter and the pressure parameter at the current moment; the pressure controller controls the at least one pressure generating device to generate pressure flow according to the pressure parameter.
The embodiment of the present disclosure further provides a pressure testing method, which is used in the pressure testing system in fig. 7, where the pressure testing system includes at least one pressure generating device, a pressure controller, and a plurality of devices to be tested, and the pressure testing method includes: the at least one pressure generating device sends an activation parameter to the pressure controller; the pressure controller controls the at least one pressure generating device to generate pressure flow according to the starting parameters; the at least one pressure generating device acquires partial pressure weights of the plurality of devices to be tested; and the at least one pressure generating device distributes the pressure flow to each device to be tested according to the partial pressure weight.
Optionally, each of the multiple devices to be tested is provided with an acquisition module, and the pressure testing method further includes: the acquisition module acquires load parameters of the plurality of devices to be tested; the acquisition module transmits the acquired load parameters to the pressure controller; the pressure controller adjusts the pressure parameter according to the load parameter and the pressure parameter at the current moment; the pressure controller controls the at least one pressure generating device to generate pressure flow according to the pressure parameter.
In one embodiment, the present disclosure also provides a pressure testing method, comprising: acquiring a starting parameter;
generating a pressure flow according to the starting parameter; acquiring a partial pressure weight; and distributing the pressure flow to more than two interfaces or equipment to be tested according to the partial pressure weight.
The present disclosure discloses a method, an apparatus, an electronic device and a computer readable storage medium for generating a pressure flow. Wherein the method of generating a pressure flow comprises: acquiring a load parameter at the current moment and a pressure parameter at the current moment; responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition; generating a pressure flow based on the pressure parameter. By the method, the technical problem that the pressure flow cannot be adjusted in the prior art is solved.
In the above, although the steps in the above method embodiments are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily performed in the above sequence, and may also be performed in other sequences such as reverse, parallel, and cross, and further, on the basis of the above steps, other steps may also be added by those skilled in the art, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
Fig. 8 is a schematic structural diagram of an embodiment of a device for generating a pressure flow according to an embodiment of the present disclosure, and as shown in fig. 8, the device 800 includes: a parameter acquisition module 801, a pressure parameter adjustment module 802, and a first pressure flow generation module 803. Wherein the content of the first and second substances,
a parameter obtaining module 801, configured to obtain a load parameter at a current time and a pressure parameter at the current time;
a pressure parameter adjusting module 802, configured to respond that a load parameter at a current moment meets a preset condition, and adjust the pressure parameter according to an adjusting strategy corresponding to the preset condition;
a first pressure-flow generating module 803 for generating a pressure flow according to the pressure parameter.
Further, the pressure parameter adjusting module 802 further includes:
the first pressure parameter adjusting module is used for responding to the condition that the load parameter at the current moment is smaller than a supercharging threshold value, and increasing the pressure parameter according to an adjusting strategy corresponding to the load parameter;
the second pressure parameter adjusting module is used for responding to the situation that the load parameter at the current moment is larger than or equal to a pressurization threshold and smaller than a pressure stabilization threshold, and judging whether the load parameter is the maximum load or not according to a judgment strategy corresponding to the load parameter;
and the third pressure parameter adjusting module is used for responding to the condition that the load parameter at the current moment is greater than or equal to the pressure stabilizing threshold value, and reducing the pressure parameter according to the adjusting strategy corresponding to the load parameter.
Further, the first pressure parameter adjusting module is further configured to: in response to the load parameter at the current moment being smaller than the first threshold value, adjusting the pressure parameter to be P times of the pressure parameter at the current moment, wherein P is a positive real number
Further, the first pressure parameter adjusting module is further configured to: and in response to the load parameter at the current moment being greater than or equal to the first threshold and smaller than the second threshold, adjusting the pressure parameter to be the ratio of the pressure parameter at the current moment to the load parameter.
Further, the first pressure parameter adjusting module is further configured to: in response to the load parameter at the current time being greater than or equal to the second threshold and less than the increase threshold, adjusting the pressure parameter to be Q times the pressure parameter at the current time, wherein Q is a positive real number and Q < P.
Further, the second pressure parameter adjusting module is further configured to: responding to the situation that the load parameter at the current moment is larger than or equal to the supercharging threshold and smaller than the voltage stabilization threshold, and judging whether the load parameter meets the preset condition for the first time; if the preset condition is met for the first time, starting a first timer; and if the number of times that the load parameter meets the preset condition before the first timer is overtime meets a second condition, determining the load parameter meeting the preset condition for the last time before the first counter is overtime as the maximum load.
Further, the third pressure parameter adjusting module is further configured to: and in response to the load parameter at the current moment being greater than or equal to the pressure stabilizing threshold value, adjusting the pressure parameter to be 1/n times of the sum of the pressure parameter at the current moment and the pressure parameter at the previous moment, wherein n is a positive real number, and n > 1.
Further, the apparatus 800 further includes:
the starting parameter acquisition module is used for acquiring starting parameters;
and the second pressure flow generation module is used for generating pressure flow according to the starting parameter.
Further, the starting parameter obtaining module is configured to:
acquiring an initial value of the pressure flow and a starting mode, wherein the starting mode refers to a mode of the pressure flow reaching the initial value.
Further, the starting parameter obtaining module is configured to:
acquiring the partial pressure weight of each interface to be tested; and the third pressure flow generation module is used for distributing the pressure flow to each interface to be tested according to the partial pressure weight.
The apparatus shown in fig. 8 can perform the method of the embodiment shown in fig. 2-4, and the detailed description of this embodiment can refer to the related description of the embodiment shown in fig. 2-4. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 2 to fig. 4, and are not described herein again.
Fig. 9 is a schematic structural diagram of an embodiment of a distribution device for pressure and flow provided by an embodiment of the present disclosure, and as shown in fig. 9, the device 900 includes: a partial pressure weight obtaining module 901, a second pressure flow generating module 902 and a distributing module 903. Wherein the content of the first and second substances,
a partial pressure weight obtaining module 901, configured to obtain a partial pressure weight of each interface to be tested;
a second pressure-flow generating module 902 for generating a pressure flow according to the pressure parameter;
and the distributing module 903 is used for distributing the pressure flow to each interface to be tested according to the partial pressure weight.
Further, the second pressure-flow generating module 902 further includes:
the pressure parameter acquisition module is used for acquiring pressure parameters, and the pressure parameters comprise the number of requests per second;
and the second pressure flow generation submodule is used for generating the pressure flow according to the requested quantity per second.
Further, the allocating module 903 further includes:
the sum value calculating module is used for calculating the sum value of the partial pressure weight values;
the ratio calculation module is used for calculating the ratio of the partial pressure weight of the interface to be tested to the sum value;
and the distribution submodule is used for distributing the pressure flow to the interface to be tested according to the ratio.
The apparatus shown in fig. 9 can perform the method of the embodiment shown in fig. 5 and 6, and the detailed description of this embodiment can refer to the related description of the embodiment shown in fig. 5 and 6. The implementation process and technical effect of the technical solution are described in the embodiments shown in fig. 5 and fig. 6, and are not described herein again.
Referring now to FIG. 10, a block diagram of an electronic device 1000 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 10, the electronic device 1000 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 1001 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage means 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the electronic apparatus 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Generally, the following devices may be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 1007 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 1008 including, for example, magnetic tape, hard disk, and the like; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. While fig. 10 illustrates an electronic device 1000 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 1009, or installed from the storage means 1008, or installed from the ROM 1002. The computer program, when executed by the processing device 1001, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a load parameter at the current moment and a pressure parameter at the current moment; responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition; generating a pressure flow based on the pressure parameter.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In accordance with one or more embodiments of the present disclosure, there is provided a method of generating a pressure flow, including:
acquiring a load parameter at the current moment and a pressure parameter at the current moment;
responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition;
generating a pressure flow based on the pressure parameter.
Further, the adjusting the pressure parameter according to the adjustment strategy corresponding to the preset condition in response to the load parameter at the current moment meeting the preset condition includes:
responding to the situation that the load parameter at the current moment is smaller than a supercharging threshold value, and increasing the pressure parameter according to an adjusting strategy corresponding to the load parameter;
responding to the situation that the load parameter at the current moment is larger than or equal to a supercharging threshold and smaller than a voltage stabilization threshold, and judging whether the load parameter is the maximum load or not according to a judgment strategy corresponding to the load parameter;
and in response to the fact that the load parameter at the current moment is larger than or equal to the pressure stabilizing threshold value, reducing the pressure parameter according to the adjusting strategy corresponding to the load parameter.
Further, the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being smaller than the boost threshold value includes:
and in response to the load parameter at the current moment being smaller than the first threshold value, adjusting the pressure parameter to be P times of the pressure parameter at the current moment, wherein P is a positive real number.
Further, the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being smaller than the boost threshold value includes:
and in response to the load parameter at the current moment being greater than or equal to the first threshold and smaller than the second threshold, adjusting the pressure parameter to be the ratio of the pressure parameter at the current moment to the load parameter.
Further, the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being smaller than the boost threshold value includes:
in response to the load parameter at the current time being greater than or equal to the second threshold and less than the increase threshold, adjusting the pressure parameter to be Q times the pressure parameter at the current time, wherein Q is a positive real number and Q < P.
Further, the determining, according to a determination policy corresponding to the load parameter, whether the load parameter is the maximum load in response to the load parameter at the current time being greater than or equal to an increase threshold and smaller than a voltage stabilization threshold includes:
responding to the situation that the load parameter at the current moment is larger than or equal to the supercharging threshold and smaller than the voltage stabilization threshold, and judging whether the load parameter meets the preset condition for the first time;
if the preset condition is met for the first time, starting a first timer;
and if the number of times that the load parameter meets the preset condition before the first timer is overtime meets a second condition, determining the load parameter meeting the preset condition for the last time before the first counter is overtime as the maximum load.
Further, the reducing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current moment being greater than or equal to the regulated threshold value includes:
and in response to the load parameter at the current moment being greater than or equal to the pressure stabilizing threshold value, adjusting the pressure parameter to be 1/n times of the sum of the pressure parameter at the current moment and the pressure parameter at the previous moment, wherein n is a positive real number, and n > 1.
Further, before the obtaining of the load parameter at the current time and the pressure parameter at the current time, the method further includes:
acquiring a starting parameter;
generating a pressure flow based on the actuation parameter.
Further, the acquiring the start parameter includes:
acquiring an initial value of the pressure flow and a starting mode, wherein the starting mode refers to a mode of the pressure flow reaching the initial value.
Further, the acquiring the start parameter further includes:
acquiring the partial pressure weight of each interface to be tested;
the generating of the pressure flow according to the starting parameter comprises:
and distributing the pressure flow to each interface to be tested according to the partial pressure weight.
According to one or more embodiments of the present disclosure, there is provided a pressure testing method including:
acquiring a starting parameter;
generating a pressure flow according to the starting parameter;
acquiring a partial pressure weight;
and distributing the pressure flow to more than two interfaces or equipment to be tested according to the partial pressure weight.
According to one or more embodiments of the present disclosure, there is provided a pressure testing system including at least one pressure generating device, a pressure controller for pressure testing a plurality of devices under test, wherein:
the at least one pressure generating device sends an activation parameter to the pressure controller;
the pressure controller controls the at least one pressure generating device to generate pressure flow according to the starting parameters;
the at least one pressure generating device acquires partial pressure weights of the plurality of devices to be tested;
and the at least one pressure generating device distributes the pressure flow to each device to be tested according to the partial pressure weight.
Further, each of the plurality of devices to be tested is provided with an acquisition module,
the acquisition module acquires load parameters of the plurality of devices to be tested;
the acquisition module transmits the acquired load parameters to the pressure controller;
the pressure controller adjusts the pressure parameter according to the load parameter and the pressure parameter at the current moment;
the pressure controller controls the at least one pressure generating device to generate pressure flow according to the pressure parameter.
According to one or more embodiments of the present disclosure, there is provided an apparatus for generating a pressure flow, including:
the parameter acquisition module is used for acquiring the load parameter at the current moment and the pressure parameter at the current moment;
the pressure parameter adjusting module is used for responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition;
and the first pressure flow generation module is used for generating pressure flow according to the pressure parameter.
Further, the pressure parameter adjusting module further includes:
the first pressure parameter adjusting module is used for responding to the condition that the load parameter at the current moment is smaller than a supercharging threshold value, and increasing the pressure parameter according to an adjusting strategy corresponding to the load parameter;
the second pressure parameter adjusting module is used for responding to the situation that the load parameter at the current moment is larger than or equal to a pressurization threshold and smaller than a pressure stabilization threshold, and judging whether the load parameter is the maximum load or not according to a judgment strategy corresponding to the load parameter;
and the third pressure parameter adjusting module is used for responding to the condition that the load parameter at the current moment is greater than or equal to the pressure stabilizing threshold value, and reducing the pressure parameter according to the adjusting strategy corresponding to the load parameter.
Further, the first pressure parameter adjusting module is further configured to: in response to the load parameter at the current moment being smaller than the first threshold value, adjusting the pressure parameter to be P times of the pressure parameter at the current moment, wherein P is a positive real number
Further, the first pressure parameter adjusting module is further configured to: and in response to the load parameter at the current moment being greater than or equal to the first threshold and smaller than the second threshold, adjusting the pressure parameter to be the ratio of the pressure parameter at the current moment to the load parameter.
Further, the first pressure parameter adjusting module is further configured to: in response to the load parameter at the current time being greater than or equal to the second threshold and less than the increase threshold, adjusting the pressure parameter to be Q times the pressure parameter at the current time, wherein Q is a positive real number and Q < P.
Further, the second pressure parameter adjusting module is further configured to: responding to the situation that the load parameter at the current moment is larger than or equal to the supercharging threshold and smaller than the voltage stabilization threshold, and judging whether the load parameter meets the preset condition for the first time; if the preset condition is met for the first time, starting a first timer; and if the number of times that the load parameter meets the preset condition before the first timer is overtime meets a second condition, determining the load parameter meeting the preset condition for the last time before the first counter is overtime as the maximum load.
Further, the third pressure parameter adjusting module is further configured to: and in response to the load parameter at the current moment being greater than or equal to the pressure stabilizing threshold value, adjusting the pressure parameter to be 1/n times of the sum of the pressure parameter at the current moment and the pressure parameter at the previous moment, wherein n is a positive real number, and n > 1.
Further, the apparatus further comprises:
the starting parameter acquisition module is used for acquiring starting parameters;
and the second pressure flow generation module is used for generating pressure flow according to the starting parameter.
Further, the starting parameter obtaining module is configured to:
acquiring an initial value of the pressure flow and a starting mode, wherein the starting mode refers to a mode of the pressure flow reaching the initial value.
Further, the starting parameter obtaining module is configured to:
acquiring the partial pressure weight of each interface to be tested; and the third pressure flow generation module is used for distributing the pressure flow to each interface to be tested according to the partial pressure weight.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the methods previously described.
According to one or more embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform any one of the aforementioned methods.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (16)

1. A method of generating a pressure flow, comprising:
acquiring a load parameter at the current moment and a pressure parameter at the current moment;
responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition;
generating a pressure flow based on the pressure parameter.
2. The method for generating pressure flow according to claim 1, wherein the adjusting the pressure parameter according to the adjustment strategy corresponding to the preset condition in response to the load parameter at the current time meeting the preset condition comprises:
responding to the situation that the load parameter at the current moment is smaller than a supercharging threshold value, and increasing the pressure parameter according to an adjusting strategy corresponding to the load parameter;
responding to the situation that the load parameter at the current moment is larger than or equal to a supercharging threshold and smaller than a voltage stabilization threshold, and judging whether the load parameter is the maximum load or not according to a judgment strategy corresponding to the load parameter;
and in response to the fact that the load parameter at the current moment is larger than or equal to the pressure stabilizing threshold value, reducing the pressure parameter according to the adjusting strategy corresponding to the load parameter.
3. The method of generating a pressure flow of claim 2, wherein the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being less than the boost threshold comprises:
and in response to the load parameter at the current moment being smaller than the first threshold value, adjusting the pressure parameter to be P times of the pressure parameter at the current moment, wherein P is a positive real number.
4. The method of generating a pressure flow of claim 3, wherein the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being less than the boost threshold comprises:
and in response to the load parameter at the current moment being greater than or equal to the first threshold and smaller than the second threshold, adjusting the pressure parameter to be the ratio of the pressure parameter at the current moment to the load parameter.
5. The method of generating a pressure flow of claim 4, wherein the increasing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being less than the boost threshold comprises:
in response to the load parameter at the current time being greater than or equal to the second threshold and less than the increase threshold, adjusting the pressure parameter to be Q times the pressure parameter at the current time, wherein Q is a positive real number and Q < P.
6. The method for generating pressure flow according to claim 2, wherein the determining whether the load parameter is the maximum load according to the determination strategy corresponding to the load parameter in response to the load parameter at the current time being greater than or equal to the increase threshold and less than the steady voltage threshold comprises:
responding to the situation that the load parameter at the current moment is larger than or equal to the supercharging threshold and smaller than the voltage stabilization threshold, and judging whether the load parameter meets the preset condition for the first time;
if the preset condition is met for the first time, starting a first timer;
and if the number of times that the load parameter meets the preset condition before the first timer is overtime meets a second condition, determining the load parameter meeting the preset condition for the last time before the first counter is overtime as the maximum load.
7. The method for generating a pressure flow according to claim 2, wherein the reducing the pressure parameter according to the adjustment strategy corresponding to the load parameter in response to the load parameter at the current time being greater than or equal to the regulated threshold value comprises:
and in response to the load parameter at the current moment being greater than or equal to the pressure stabilizing threshold value, adjusting the pressure parameter to be 1/n times of the sum of the pressure parameter at the current moment and the pressure parameter at the previous moment, wherein n is a positive real number, and n > 1.
8. The method of generating a pressure flow of claim 1, further comprising, prior to said obtaining a load parameter at a current time and a pressure parameter at the current time:
acquiring a starting parameter;
generating a pressure flow based on the actuation parameter.
9. The method of generating a pressure flow of claim 8, wherein the obtaining an activation parameter comprises:
acquiring an initial value of the pressure flow and a starting mode, wherein the starting mode refers to a mode of the pressure flow reaching the initial value.
10. The method of generating a pressure flow of claim 8, wherein said obtaining an activation parameter further comprises:
acquiring the partial pressure weight of each interface to be tested;
the generating of the pressure flow according to the starting parameter comprises:
and distributing the pressure flow to each interface to be tested according to the partial pressure weight.
11. A pressure testing method, comprising:
acquiring a starting parameter;
generating a pressure flow according to the starting parameter;
acquiring a partial pressure weight;
and distributing the pressure flow to more than two interfaces or equipment to be tested according to the partial pressure weight.
12. A pressure testing system comprising at least one pressure generating device, a pressure controller for pressure testing a plurality of devices under test, wherein:
the at least one pressure generating device sends an activation parameter to the pressure controller;
the pressure controller controls the at least one pressure generating device to generate pressure flow according to the starting parameters;
the at least one pressure generating device acquires partial pressure weights of the plurality of devices to be tested;
and the at least one pressure generating device distributes the pressure flow to each device to be tested according to the partial pressure weight.
13. The pressure testing system of claim 12, wherein each of the plurality of devices under test is provided with an acquisition module,
the acquisition module acquires load parameters of the plurality of devices to be tested;
the acquisition module transmits the acquired load parameters to the pressure controller;
the pressure controller adjusts the pressure parameter according to the load parameter and the pressure parameter at the current moment;
the pressure controller controls the at least one pressure generating device to generate pressure flow according to the pressure parameter.
14. A device for generating a pressure flow, comprising:
the parameter acquisition module is used for acquiring the load parameter at the current moment and the pressure parameter at the current moment;
the pressure parameter adjusting module is used for responding to the condition that the load parameter at the current moment meets the preset condition, and adjusting the pressure parameter according to an adjusting strategy corresponding to the preset condition;
and the first pressure flow generation module is used for generating pressure flow according to the pressure parameter.
15. An electronic device, comprising:
a memory for storing computer readable instructions; and
a processor for executing the computer readable instructions such that the processor when executed implements the method of generating a pressure flow or the pressure testing method according to any one of claims 1-11.
16. A non-transitory computer readable storage medium storing computer readable instructions which, when executed by a computer, cause the computer to perform the method of generating a pressure flow or the pressure testing method of any one of claims 1-11.
CN202010107463.3A 2020-02-21 2020-02-21 Method and device for generating pressure flow, electronic equipment and computer readable storage medium Active CN111343046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010107463.3A CN111343046B (en) 2020-02-21 2020-02-21 Method and device for generating pressure flow, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010107463.3A CN111343046B (en) 2020-02-21 2020-02-21 Method and device for generating pressure flow, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111343046A true CN111343046A (en) 2020-06-26
CN111343046B CN111343046B (en) 2022-05-17

Family

ID=71187070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010107463.3A Active CN111343046B (en) 2020-02-21 2020-02-21 Method and device for generating pressure flow, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111343046B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112093690A (en) * 2020-09-11 2020-12-18 湖南三一中型起重机械有限公司 Starting current optimization method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075384A (en) * 2010-12-20 2011-05-25 创新科存储技术有限公司 Performance test system and method
CN105490876A (en) * 2015-11-26 2016-04-13 上海斐讯数据通信技术有限公司 Method for automatic testing of server performance through packet sending linkage and concurrent monitoring
CN107015892A (en) * 2017-03-30 2017-08-04 腾讯科技(深圳)有限公司 A kind of method for testing pressure, device and system
US20180097705A1 (en) * 2016-10-03 2018-04-05 Microsoft Technology Licensing, Llc Backend Resource Costs For Online Service Offerings
CN108376112A (en) * 2018-02-09 2018-08-07 腾讯科技(深圳)有限公司 Method for testing pressure, device and readable medium
US20190028347A1 (en) * 2017-07-21 2019-01-24 Cisco Technology, Inc. Service function chain optimization using live testing
CN110109810A (en) * 2019-04-09 2019-08-09 上海易点时空网络有限公司 Cluster pressure surveys the method and device that capacity determines

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075384A (en) * 2010-12-20 2011-05-25 创新科存储技术有限公司 Performance test system and method
CN105490876A (en) * 2015-11-26 2016-04-13 上海斐讯数据通信技术有限公司 Method for automatic testing of server performance through packet sending linkage and concurrent monitoring
US20180097705A1 (en) * 2016-10-03 2018-04-05 Microsoft Technology Licensing, Llc Backend Resource Costs For Online Service Offerings
CN107015892A (en) * 2017-03-30 2017-08-04 腾讯科技(深圳)有限公司 A kind of method for testing pressure, device and system
US20190028347A1 (en) * 2017-07-21 2019-01-24 Cisco Technology, Inc. Service function chain optimization using live testing
CN108376112A (en) * 2018-02-09 2018-08-07 腾讯科技(深圳)有限公司 Method for testing pressure, device and readable medium
CN110109810A (en) * 2019-04-09 2019-08-09 上海易点时空网络有限公司 Cluster pressure surveys the method and device that capacity determines

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112093690A (en) * 2020-09-11 2020-12-18 湖南三一中型起重机械有限公司 Starting current optimization method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111343046B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN111475298A (en) Task processing method, device, equipment and storage medium
CN114500339B (en) Node bandwidth monitoring method and device, electronic equipment and storage medium
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN110781150A (en) Data transmission method and device and electronic equipment
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN111580974B (en) GPU instance allocation method, device, electronic equipment and computer readable medium
CN114389975B (en) Network bandwidth estimation method, device and system, electronic equipment and storage medium
CN113034059B (en) Abnormal power information positioning method and device, electronic equipment and computer medium
CN110768861B (en) Method, device, medium and electronic equipment for obtaining overtime threshold
CN111343046B (en) Method and device for generating pressure flow, electronic equipment and computer readable storage medium
CN109861922B (en) Method and apparatus for controlling flow
CN115759444B (en) Power equipment distribution method, device, electronic equipment and computer readable medium
CN116594568A (en) Data storage method and device, electronic equipment and storage medium
WO2022242470A1 (en) Cdn scheduling method, apparatus and device, and storage medium
CN112994251B (en) Electric quantity early warning method and device, electronic equipment and computer readable medium
CN112019406B (en) Flow monitoring method and device, electronic equipment and computer readable medium
CN109976900B (en) Method and device for calling service
CN112543228A (en) Data transmission method and device, electronic equipment and computer readable medium
CN112307071A (en) Monitoring data acquisition method and device, electronic equipment and computer readable medium
CN114764627A (en) Data contribution capacity determination method and device based on transverse joint learning participants
CN111898061A (en) Method, device, electronic equipment and computer readable medium for searching network
CN113049968B (en) Method, device, electronic equipment and storage medium for determining average current of battery
CN110708262B (en) Method and apparatus for controlling bandwidth allocation
CN112073202B (en) Information generation method and device, electronic equipment and computer readable medium
CN114629821B (en) Internet of things consumption data generation method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant