Load generation method and device, electronic equipment and storage medium
By calculating the operation data and freezing conditions of the target page within the target time period, a more accurate page load is generated, and a dynamic load adjustment strategy is adopted to solve the problem of inaccurate load judgment in the existing technology and improve the operation response speed and Resource utilization efficiency.
Patent Information
- Application Number
- CN202310378814.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-10
- Publication Date
- 2024-10-15
AI Technical Summary
In the existing technology, when the CPU load or thread number is used to determine the load, it is not accurate enough for page sessions, especially in low-occupancy but time-consuming operation scenarios. It cannot accurately reflect the user's front-end operation situation, and in memory-based applications Multiple pages share the logical CPU, causing load judgment to fail.
By determining the operation data of the target page within the target time period, the target process load is calculated, including the execution time of the operation to be responded to and the number of stalls, and then the page load is generated. The load strategy is adjusted using methods such as Fibonacci numbers to optimize response speed. .
It improves the accuracy of page load, can better reflect the actual operation of the page, and optimizes the operation response speed by dynamically adjusting the load strategy to avoid resource waste.
Smart Images

Figure CN118779090A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a load generation method, device, electronic device and storage medium. Background Art
[0002] In the prior art, CPU (Central Processing Unit) load or number of threads is usually used to judge the load, which is a method that uses hardware information.
[0003] However, the above load calculation method is usually not applicable to page sessions. For example, in a page session (such as an online document session), there may be low-occupancy but long-time operations. In such scenarios, the load calculated using the above method may be low, but the user foreground can no longer operate. In addition, for memory-based applications, the same page URL is usually shared by multiple pages with a logical CPU. When different processes preempt each other, the CPU load cannot well judge the actual page load.
[0004] It can be seen that how to more accurately judge the accuracy of page load is a technical issue worthy of attention. Summary of the invention
[0005] In view of this, in order to solve some or all of the above technical problems, the embodiments of the present application provide a load generation method, device, electronic device and storage medium.
[0006] In a first aspect, an embodiment of the present application provides a load generation method, the method comprising:
[0007] Determining operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction;
[0008] Based on the operation data, determining a target process load, wherein the target process load is a process load of the target page;
[0009] Based on the target process load, a page load of the target page is generated.
[0010] In a possible implementation manner, the target time period includes a first time period, a start time of the first time period is a creation time of the current session, and an end time of the first time period is the current time; and
[0011] The step of determining the target process load based on the operation data includes:
[0012] Based on the operation data, determining a target operation set to be performed on the target page, wherein the target operation set is a set of operations triggered within the first time period;
[0013] Determining the execution time of each target operation in the target operation set;
[0014] Based on the execution duration of each target operation, a target process load corresponding to the first time period is determined.
[0015] In a possible implementation, the target operation set includes target operations to be responded to; and
[0016] The execution time of the target operation to be responded is determined in the following manner:
[0017] Determine the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period;
[0018] Determine a first weight of each execution of the same type of operation based on a first time difference between the current moment and the execution moment of each execution of the same type of operation, wherein the first time difference is negatively correlated with the first weight;
[0019] Based on the first weight of each execution of the same type of operation, a weighted average of the execution time of each execution of the same type of operation is calculated to obtain the execution time of the target operation to be responded to.
[0020] In a possible implementation, determining the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period includes:
[0021] Determine the number of times the same type of operation as the target operation to be responded to is performed within the target historical time period;
[0022] When the number of executions is greater than or equal to a preset threshold, determining the execution duration and execution time of each execution of the same type of operation within the target historical time period; and
[0023] When the number of executions is less than the preset threshold, the execution duration of the target operation to be responded to is determined in one of the following ways:
[0024] Extending the duration of the target historical time period so that the number of executions of the same type of operation within the extended target historical time period is greater than or equal to the preset threshold; determining the execution duration of the target operation to be responded to based on the extended target historical time period;
[0025] Determine the total execution time of the preset threshold number of executions of the same type of operation whose execution time is closest to the current time; and determine the quotient of the total execution time and the preset threshold as the execution time of the target operation to be responded to.
[0026] In a possible implementation manner, the target time period includes a second time period sequence, the second time period sequence is a sequence including at least one second time period, and the duration of the second time period is a preset second duration; and
[0027] The step of determining the target process load based on the operation data includes:
[0028] Based on the operation data, determining the number of freezes of the target page in each of the second time periods, and obtaining a first freeze number sequence;
[0029] Based on the first freeze number sequence, determine the target process load corresponding to the second time period sequence.
[0030] In a possible implementation, determining the target process load corresponding to the second time period sequence based on the first freeze number sequence includes:
[0031] Determine the freeze time of each first freeze number in the first freeze number sequence;
[0032] Determine a second weight of each of the first freeze times based on a second time difference between the current moment and the determined freeze moment, wherein the second time difference is negatively correlated with the second weight;
[0033] Based on the second weight of each freeze, a target process load corresponding to the second time period sequence is determined.
[0034] In a possible implementation manner, the time difference between the current moment and the end moment of the last second time period in the second time period sequence is less than the preset second duration.
[0035] In a possible implementation manner, the target time period includes a third time period, a start time of the third time period is a creation time of the current session, and an end time of the third time period is the current time; and
[0036] The step of determining the target process load based on the operation data includes:
[0037] Based on the operation data, determine the number of freezes of the target page in the third time period to obtain a second freeze number;
[0038] Based on the second number of freezes, a target process load corresponding to the third time period is determined.
[0039] In a possible implementation, whether a freeze occurs is determined in the following manner:
[0040] Determine a trigger start time and a response start time for an operation on the target page;
[0041] Determining a fourth time difference between the response start time and the trigger start time;
[0042] When the fourth time difference is greater than the preset third time length, determining that a freeze occurs;
[0043] When the fourth time difference is less than or equal to the preset third duration, it is determined that no freeze occurs.
[0044] In a possible implementation, generating the page load of the target page based on the target process load includes:
[0045] When at least one of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period is obtained, the page load of the target page is determined based on at least one of the obtained target process loads.
[0046] In a possible implementation, determining the page load of the target page based on at least one of the obtained target process loads includes:
[0047] Performing interval mapping on the obtained target process load to obtain a target value;
[0048] Based on the target value, a page load of the target page is determined.
[0049] In a possible implementation, the determined target load includes at least two of the following: a target process load corresponding to the first time period, a target process load corresponding to the second time period sequence, and a target process load corresponding to the third time period; and
[0050] The generating the page load of the target page based on the target process load includes:
[0051] The page load of the target page is generated based on at least two of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period.
[0052] In a possible implementation, after generating the page load of the target page based on the target process load, the method further includes:
[0053] Based on the page load and the target load, determining whether to enable a preset strategy, wherein the preset strategy is used to adjust the operation response speed of the target page;
[0054] In the case where it is determined to enable the preset policy, the target page is controlled to perform an operation response through the preset policy.
[0055] In a possible implementation, the page load is determined in the following manner:
[0056] During the maintenance period of the session to which the page access operation belongs, determining the page load of the target page according to a preset frequency; and
[0057] The target load is updated in the following manner:
[0058] In the case where the page load is greater than or equal to the corresponding target load, the current target load is increased to obtain a new target load, wherein the initial value of the target load is a preset value, and the target load corresponding to the page load determined for the first time according to the preset frequency is the preset value;
[0059] When the page load is less than the corresponding target load, reducing the current target load to obtain a new target load;
[0060] The obtained new target load is determined as the target load corresponding to the page load to be determined next time.
[0061] In a possible implementation manner, increasing the current target load includes:
[0062] Increase the current target load according to the Fibonacci sequence; and
[0063] The reducing the current target load includes:
[0064] The difference between the current target load and the preset positive integer is determined as the new target load.
[0065] In a second aspect, an embodiment of the present application provides a load generation device, the device comprising:
[0066] A first determining unit, configured to determine operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction;
[0067] A second determining unit, configured to determine a target process load based on the operation data, wherein the target process load is a process load of the target page;
[0068] A generating unit is used to generate a page load of the target page based on the target process load.
[0069] In a possible implementation manner, the target time period includes a first time period, a start time of the first time period is a creation time of the current session, and an end time of the first time period is the current time; and
[0070] The step of determining the target process load based on the operation data includes:
[0071] Based on the operation data, determining a target operation set to be performed on the target page, wherein the target operation set is a set of operations triggered within the first time period;
[0072] Determining the execution time of each target operation in the target operation set;
[0073] Based on the execution duration of each target operation, a target process load corresponding to the first time period is determined.
[0074] In a possible implementation, the target operation set includes target operations to be responded to; and
[0075] The execution time of the target operation to be responded is determined in the following manner:
[0076] Determine the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period;
[0077] Determine a first weight of each execution of the same type of operation based on a first time difference between the current moment and the execution moment of each execution of the same type of operation, wherein the first time difference is negatively correlated with the first weight;
[0078] Based on the first weight of each execution of the same type of operation, a weighted average of the execution time of each execution of the same type of operation is calculated to obtain the execution time of the target operation to be responded to.
[0079] In a possible implementation, determining the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period includes:
[0080] Determine the number of times the same type of operation as the target operation to be responded to is performed within the target historical time period;
[0081] When the number of executions is greater than or equal to a preset threshold, determining the execution duration and execution time of each execution of the same type of operation within the target historical time period; and
[0082] When the number of executions is less than the preset threshold, the execution duration of the target operation to be responded to is determined in one of the following ways:
[0083] Extending the duration of the target historical time period so that the number of executions of the same type of operation within the extended target historical time period is greater than or equal to the preset threshold; determining the execution duration of the target operation to be responded to based on the extended target historical time period;
[0084] Determine the total execution time of the preset threshold number of executions of the same type of operation whose execution time is closest to the current time; and determine the quotient of the total execution time and the preset threshold as the execution time of the target operation to be responded to.
[0085] In a possible implementation manner, the target time period includes a second time period sequence, the second time period sequence is a sequence including at least one second time period, and the duration of the second time period is a preset second duration; and
[0086] The step of determining the target process load based on the operation data includes:
[0087] Based on the operation data, determining the number of freezes of the target page in each of the second time periods, and obtaining a first freeze number sequence;
[0088] Based on the first freeze number sequence, determine the target process load corresponding to the second time period sequence.
[0089] In a possible implementation, determining the target process load corresponding to the second time period sequence based on the first freeze number sequence includes:
[0090] Determine the freeze time of each first freeze number in the first freeze number sequence;
[0091] Determine a second weight of each of the first freeze times based on a second time difference between the current moment and the determined freeze moment, wherein the second time difference is negatively correlated with the second weight;
[0092] Based on the second weight of each freeze, a target process load corresponding to the second time period sequence is determined.
[0093] In a possible implementation manner, the time difference between the current moment and the end moment of the last second time period in the second time period sequence is less than the preset second duration.
[0094] In a possible implementation manner, the target time period includes a third time period, a start time of the third time period is a creation time of the current session, and an end time of the third time period is the current time; and
[0095] The step of determining the target process load based on the operation data includes:
[0096] Based on the operation data, determine the number of freezes of the target page in the third time period to obtain a second freeze number;
[0097] Based on the second number of freezes, a target process load corresponding to the third time period is determined.
[0098] In a possible implementation, whether a freeze occurs is determined in the following manner:
[0099] Determine a trigger start time and a response start time for an operation on the target page;
[0100] Determining a fourth time difference between the response start time and the trigger start time;
[0101] When the fourth time difference is greater than the preset third time length, determining that a freeze occurs;
[0102] When the fourth time difference is less than or equal to the preset third duration, it is determined that no freeze occurs.
[0103] In a possible implementation, generating the page load of the target page based on the target process load includes:
[0104] When at least one of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period is obtained, the page load of the target page is determined based on at least one of the obtained target process loads.
[0105] In a possible implementation, determining the page load of the target page based on at least one of the obtained target process loads includes:
[0106] Performing interval mapping on the obtained target process load to obtain a target value;
[0107] Based on the target value, a page load of the target page is determined.
[0108] In a possible implementation, the determined target load includes at least two of the following: a target process load corresponding to the first time period, a target process load corresponding to the second time period sequence, and a target process load corresponding to the third time period; and
[0109] The generating the page load of the target page based on the target process load includes:
[0110] The page load of the target page is generated based on at least two of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period.
[0111] In a possible implementation manner, after generating the page load of the target page based on the target process load, the device further includes:
[0112] A third determining unit, configured to determine whether to enable a preset strategy based on the page load and the target load, wherein the preset strategy is used to adjust the operation response speed of the target page;
[0113] The control unit is used to control the target page to perform an operation response according to the preset policy when it is determined that the preset policy is enabled.
[0114] In a possible implementation, the page load is determined in the following manner:
[0115] During the maintenance period of the session to which the page access operation belongs, determining the page load of the target page according to a preset frequency; and
[0116] The target load is updated in the following manner:
[0117] In the case where the page load is greater than or equal to the corresponding target load, the current target load is increased to obtain a new target load, wherein the initial value of the target load is a preset value, and the target load corresponding to the page load determined for the first time according to the preset frequency is the preset value;
[0118] When the page load is less than the corresponding target load, reducing the current target load to obtain a new target load;
[0119] The obtained new target load is determined as the target load corresponding to the page load to be determined next time.
[0120] In a possible implementation manner, increasing the current target load includes:
[0121] Increase the current target load according to the Fibonacci sequence; and
[0122] The reducing the current target load includes:
[0123] The difference between the current target load and the preset positive integer is determined as the new target load.
[0124] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0125] Memory for storing computer programs;
[0126] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the load generation method of the first aspect of the present application is implemented.
[0127] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method of any embodiment of the load generation method of the first aspect described above is implemented.
[0128] In a fifth aspect, an embodiment of the present application provides a computer program, which includes a computer-readable code. When the computer-readable code runs on a device, the processor in the device implements a method as in any embodiment of the load generation method of the first aspect above.
[0129] The load generation method provided by the embodiment of the present application can determine the operation data generated by the target page within the target time period, wherein the target page is the page accessed by the page access operation instruction, and then determine the target process load based on the operation data, wherein the target process load is the process load of the target page, and finally, generate the page load of the target page based on the target process load. Thus, the process load of the target page is determined by the operation data generated by the target page within the target time period, and then the page load of the target page is generated, which can improve the accuracy of the generated page load. BRIEF DESCRIPTION OF THE DRAWINGS
[0130] Figure 1 A flow chart of a load generation method provided in an embodiment of the present application;
[0131] Figure 2 A flow chart of another load generation method provided in an embodiment of the present application;
[0132] Figure 3A A schematic diagram of a flow chart of a page response method provided in an embodiment of the present application;
[0133] Figure 3B A schematic diagram of changes in page load and target load involved in a page response method provided in an embodiment of the present application;
[0134] Figure 4 A schematic diagram of the structure of a load generation device provided in an embodiment of the present application;
[0135] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0136] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application.
[0137] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0138] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0139] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0140] In addition, the term "and / or" in this application 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 application generally indicates that the associated objects before and after are in an "or" relationship.
[0141] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0142] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0143] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0144] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0145] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0146] Figure 1 A flow chart of a load generation method provided for an embodiment of the present application. This method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of this method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the above-mentioned execution subject is software, this method can be implemented as multiple software or software modules, or it can be implemented as a single software or software module. It is not specifically limited here.
[0147] like Figure 1 As shown, the method specifically includes:
[0148] Step 101 : determining operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction.
[0149] In this embodiment, the target time period may include one or more time periods. Each time period in the target time period may be a time period with at least one of a start time, an end time, and a duration being fixed.
[0150] As an example, the start time of the target time period may be the creation time of the current session, and the end time of the target time period may be the current time.
[0151] In a specific example, when the server receives a page access operation sent by the terminal for a target page, if a session for operating the target page already exists, the server obtains the session; otherwise, the server creates a session for operating the target page; based on the session, the server sends the target page to the terminal for display. Based on the session, the server receives the terminal's operation on the target page; based on the operation, the server processes the target page and returns the processed target page to the terminal. There is at least one terminal.
[0152] As another example, the target time period may include at least one continuous time interval. Here, the total duration of each time interval may be a preset duration, or the duration of a single time interval may be a preset duration.
[0153] As another example, the target time period may include a time interval sequence consisting of at least one continuous time interval of a preset duration (for example, arranged in chronological order); and the duration from the end moment of the last time interval in the time interval sequence to the current moment is less than the above preset duration.
[0154] Here, the total duration of each time interval may be a preset duration, or the duration of a single time interval may be a preset duration.
[0155] Here, as the current moment changes, the end moment of the last time interval in the time interval sequence may also change accordingly. Further, the time interval sequence will be updated as the current moment changes, thereby, the determined operation data can be dynamically updated through step 101.
[0156] As another example, the start time of the target time period may be the creation time of the current session, and the end time of the target time period may be the current time.
[0157] The above-mentioned operation data may be: data generated by performing an operation on a target page within a target time period. As an example, the operation data may include at least one of the following: operation type, triggering time of the operation, starting response time of the operation, response completion time of the operation, response duration of the operation, duration between the triggering time of the operation and the response start time, execution time of the operation, duration between the triggering time of the operation and the response completion time of the operation, historical average execution time of the operation, etc. Among them, the execution duration is the duration between the start time and the end time of the operation execution. The start time of the operation execution may be the triggering start time of the operation, and the end time of the operation execution may be the response completion time of the operation. That is, the execution duration of the operation may be the duration between the triggering start time of the operation and the response completion time (i.e., the time when the server-side execution is completed, or the time when the server-side returns the result, or the time when the terminal receives the result). Here, after the triggering operation, the response of the operation usually takes a certain amount of time.
[0158] Here, the above-mentioned operations may include operations that have been executed, operations that have not been executed (including operations that have not started to be executed or operations that have started to be executed but have not been completed), operations that have been responded to, and operations that have not been responded to (including operations that have not started to respond or operations that have started to respond but have not been completed).
[0159] In practice, the execution process of an operation may include the execution process of the operation by the terminal and the execution process of the operation by the server. Specifically, the user sends an operation request through the terminal to trigger the operation; then, the server responds to the request (operation) to add the operation (request) to the operation execution queue. When the queue arrives, the server executes the processing corresponding to the request; after the server executes, it returns the result to the user terminal; it is determined that the operation response is completed, that is, the operation execution is completed.
[0160] In addition, in some cases, the execution process of the operation may include two parts: the operation triggering process (i.e., the operation triggering starts to the operation triggering ends) and the operation response process (i.e., the operation response starts to the operation response ends). In this case, the end of the operation response may mean the end of the operation execution.
[0161] Therefore, the execution duration is the duration between the start time and the end time of the operation execution. Among them, the start time and the end time of the operation execution can be determined according to actual needs. The start time of the operation execution can be the trigger start time of the operation, or the response start time of the operation; the end time of the operation execution can be the response completion time of the operation. For example, the start time of the operation execution can be the trigger start time of the operation, and the end time of the operation execution can be the execution completion time of the operation (that is, the response completion time). For another example, the start time of the operation execution can be the response start time of the operation, and the end time of the operation execution can be the execution completion time of the operation (that is, the response completion time).
[0162] In one example, the target page is an online document, and the operation on the online document may be an editing operation, a collection operation, etc. In the case where the online document is a table document, the operation may also be a filtering operation, a sorting operation, etc.
[0163] The page access operation may be an operation for accessing a page.
[0164] Step 102: determine a target process load based on the operation data, wherein the target process load is a process load of the target page.
[0165] In this embodiment, the target process load can be used to measure the occupation of server resources by the target page. Among them, resources can include hardware resources and virtual resources. Hardware resources can include memory, CPU core, etc.; virtual resources can include virtual machines (containers), background services, etc.
[0166] As an example, the above step 102 may be performed in the following manner:
[0167] First, based on the operation data, an operation duration sequence and a third weight sequence of a target operation sequence are determined, wherein the target operation in the target operation sequence, the operation duration in the operation duration sequence, and the third weight in the third weight sequence correspond one to one.
[0168] Afterwards, the target process load is determined based on the operation duration sequence and the third weight sequence.
[0169] Wherein, when the target operations in the target operation sequence are arranged in the order of execution time, the third weight sequence is arranged in ascending order. When the target operations in the target operation sequence are arranged in the reverse order of execution time, the third weight sequence is arranged in descending order.
[0170] As an example, the above step 102 may also be performed in the following manner:
[0171] First, based on the operation data, a freeze frequency sequence and a fourth weight sequence are determined, wherein the freeze frequency in the freeze frequency sequence and the fourth weight in the fourth weight sequence correspond one to one.
[0172] Afterwards, the target process load is determined based on the freeze number sequence and the fourth weight sequence.
[0173] Among them, when the time periods in the time period sequence corresponding to the number of freeze times sequence are arranged in chronological order, the fourth weights in the fourth weight sequence are arranged in ascending order; when the time periods in the time period sequence corresponding to the number of freeze times sequence are arranged in reverse chronological order, the fourth weights in the fourth weight sequence are arranged in descending order.
[0174] Among them, the operation data may include the duration between the start and end of the operation. Therefore, whether a jam occurs can be determined by judging whether the duration between the start and end of the operation exceeds a threshold. Among them, the threshold can be determined based on the median execution time in the historical operation data, or it can be set according to the system default. In addition, other methods can be used to determine whether a jam occurs. Please refer to the subsequent description for details, which will not be repeated here.
[0175] In some optional implementations of this embodiment, the target time period includes a first time period, a start time of the first time period is a creation time of the current session, and an end time of the first time period is the current time.
[0176] On this basis, the following method can be used to determine the target process load based on the operation data:
[0177] Step 1: Determine a target operation set to be performed on the target page based on the operation data.
[0178] The target operation set is a set of operations triggered within the first time period.
[0179] Further, the target operation set may be a set of operations triggered by one or more users within the first time period. In addition, the target operation set may also be a set of all or part of the operations (i.e., target operations) triggered within the first time period. The target operation set may include at least one of the following: one or more operations that have been responded to and completed, and one or more operations that are waiting to be responded to and completed (for example, the response has not been started or the response has been started but the response has not been completed). Among them, the response has been completed is the same as the executed completion, and the pending response completion is the same as the pending execution completion.
[0180] For example, the target operation set may be a set of operations of the same type triggered by users who open a page indicated by the same URL within a first time period. The operations of the same type may be operations of the same type as the operations to be responded to in the current session.
[0181] Step 2: Determine the execution time of each target operation in the target operation set.
[0182] The execution duration is the duration between the trigger start time and the response completion time of the target operation, or the duration between the response start time and the response completion time of the target operation.
[0183] The target operation can be any element in the target operation set.
[0184] Step three: determine the target process load corresponding to the first time period based on the execution time of each target operation.
[0185] The target process load corresponding to the first time period may be a process load determined based on the execution duration of each target operation.
[0186] As an example, when the target operation set includes a target operation that has been responded to and completed, the execution duration of the target operation that has been responded to and completed may be the actual execution duration of the target operation that has been responded to and completed.
[0187] In addition, the target process load corresponding to the first time period may be the sum of the execution times of the various target operations.
[0188] It can be understood that in the above optional implementation method, the target process load corresponding to the session creation to the current time can be determined based on the execution time of each target operation in the target operation set. In this way, the immediate kernel load level can be calculated based on past instructions, thereby further improving the accuracy of page load calculation.
[0189] In some application scenarios of the above optional implementations, the target operation set includes target operations to be responded to (or to be executed).
[0190] On this basis, the execution time of each of the target operations to be responded to is determined in the following manner:
[0191] The first step is to determine the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period.
[0192] The target historical time period can be any time period whose end time is before the current time.
[0193] In the second step, based on a first time difference between the current time and the execution time of each execution of the same type of operation, a first weight of each execution of the same type of operation is determined.
[0194] The first time difference is negatively correlated with the first weight. The first time difference may represent the duration between the current time and the execution time (eg, execution start time, execution completion time) of the same type of operation.
[0195] The third step is to calculate the weighted average of the execution time of each execution of the same type of operation based on the first weight of each execution of the same type of operation, and obtain the execution time of the target operation to be responded to.
[0196] The execution time of the target operation to be responded to may be a result obtained by calculating a weighted average of the execution times of the operations of the same type each time based on the first weight of the operations of the same type each time.
[0197] For example, for online table documents, the same filter command can be completed quickly when the table is created and the data is small; but as the table data increases, the same filter command will take longer to execute to get the result (execution completed). Conversely, if there is a lot of data at the beginning, and then the data becomes less after deletion, it will take a shorter time to execute to get the result (execution completed).
[0198] It can be understood that, on the one hand, the closer the operation time is, the more similar the complexity of the data processed by the operation is; on the other hand, since the new operation (i.e., the same type of operation corresponding to the smaller first time difference) has a greater probability of being executed later, a higher weight can be set to obtain the average execution time of each instruction. Therefore, the technical solution of the above application scenario can further improve the accuracy of page load calculation.
[0199] In some cases of the above application scenarios, the following method may be used to determine the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period:
[0200] First, the number of executions of the same type of operations of the target operation to be responded to within the target historical time period is determined.
[0201] When the number of executions is greater than or equal to a preset threshold, the execution duration and execution time of each execution of the same type of operation within the target historical time period are directly determined.
[0202] When the number of executions is less than the preset threshold, the execution duration of the target operation to be responded to is determined in one of the following ways:
[0203] Method 1: First, the duration of the target historical time period is extended so that the number of executions of the same type of operation in the extended target historical time period is greater than or equal to the preset threshold. Then, based on the extended target historical time period, the execution duration of the target operation to be responded is determined.
[0204] Here, the following method may be used to determine the execution duration of the target operation to be responded to based on the extended target historical time period:
[0205] First, the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the extended target historical time period are determined.
[0206] Afterwards, based on a first time difference between the current time and the execution time of each execution of the same type of operation, a first weight of each execution of the same type of operation is determined.
[0207] The first time difference is negatively correlated with the first weight.
[0208] Then, based on the first weight of each execution of the same type of operation, a weighted average of the execution time of each execution of the same type of operation is calculated to obtain the execution time of the target operation to be responded to.
[0209] In addition, the method of determining the execution duration of the target operation to be responded to based on the extended target historical time period can refer to the relevant description of the above application scenario, which will not be repeated here.
[0210] Method 2: Determine the total execution time of the preset threshold number of executions of the same type of operation. The preset threshold number of times may be the preset threshold number of times when the execution time is closest to the current time. Then, the quotient of the total execution time and the preset threshold number is determined as the execution time of the target operation to be responded to.
[0211] For example, all target operations in the past 10 minutes (i.e., the target historical time period) are recorded, but some target operations take a long time to execute, or the page is in a state of only browsing without other operations (such as editing operations) for a long time, which may cause the number of operations recorded within 10 minutes to be too small, far below the minimum retention number (i.e., the above-mentioned preset threshold), resulting in insufficient recorded instruction samples, and it is impossible to count the average execution time of a more appropriate instruction. In this regard, the above processing method of method 1 or method 2 can be adopted. Among them, method 1 extends the duration of the target historical time period, such as from 10 minutes to 20 minutes, until the number of instructions meets the minimum retention number (i.e., the above-mentioned preset threshold). The above method 2 can directly record the preset number of target operations. Of course, in method 2, in addition to determining the quotient of the total execution time and the preset threshold as the execution time of the target operation to be responded to, it is also possible to calculate the execution time of the target operation to be responded to by calculating the weighted average as in method 1.
[0212] It can be understood that in the above case, when the sample is insufficient (ie, the number of executions is less than a preset threshold), the execution time of the target operation can be determined more accurately, which can further improve the calculation accuracy of the page load.
[0213] In some optional implementations of this embodiment, the target time period includes a second time period sequence, the second time period sequence is a sequence including at least one second time period, and the duration of the second time period is a preset second duration.
[0214] On this basis, the following method can be used to determine the target process load based on the operation data:
[0215] The first step is to determine the number of freezes of the target page in each of the second time periods based on the operation data, and obtain a first freeze number sequence.
[0216] The operation data may include the duration between the start and end of the operation, so whether a freeze occurs can be determined by judging whether the duration between the start and end of the operation exceeds a threshold. In addition, other methods may be used to determine whether a freeze occurs, which will be described in detail later.
[0217] The first sequence of the number of freezes may be a sequence of the number of freezes of the target page in each of the second time periods. The number of freezes in the first sequence of the number of freezes is arranged in the chronological order of the corresponding second time periods. For example, if the second time period sequence is "second time period A, second time period B, second time period C", and the number of freezes of the target page in the second time period A is freeze number A, the number of freezes of the target page in the second time period B is freeze number B, and the number of freezes of the target page in the second time period C is freeze number C. Then, the first sequence of the number of freezes may be "freeze number A, freeze number B, freeze number C".
[0218] In the second step, based on the first freeze number sequence, determine the target process load corresponding to the second time period sequence.
[0219] Among them, the target process load corresponding to the second time period sequence can be the process load determined based on the first freeze number sequence.
[0220] As an example, the target process load corresponding to the second time period sequence may be the sum of the number of freezes in the first freeze number sequence, or may be the result of the weighted sum or weighted mean of the number of freezes in the first freeze number sequence.
[0221] It can be understood that in the above optional implementation, the process load of the target page can be determined based on the jamming situation corresponding to the second time period sequence, thereby further improving the accuracy of the page load calculation.
[0222] In some application scenarios of the above optional implementations, the following method may be used to determine the target process load corresponding to the second time period sequence based on the first freeze number sequence:
[0223] The first step is to determine the freeze time of each first freeze number in the first freeze number sequence.
[0224] In the second step, based on a second time difference between the current moment and the determined freeze moment, a second weight of each first freeze number is determined.
[0225] The second time difference is negatively correlated with the second weight.
[0226] The second time difference may represent the duration between the current moment and the determined freeze moment.
[0227] The third step is to determine the target process load corresponding to the second time period sequence based on the second weight of each freeze.
[0228] As an example, the second weight of each freeze can be used to calculate the weighted sum or weighted mean of the freeze duration of each freeze, and the calculated weighted sum or weighted mean result is determined as the target process load corresponding to the second time period sequence.
[0229] As another example, the second weight of each freeze can be used to calculate the weighted sum or weighted mean of the freeze duration of each freeze, and then the calculated weighted sum or weighted mean is mapped to a preset numerical range to obtain the target process load corresponding to the second time period sequence.
[0230] It can be understood that since the current jamming situation is more relevant to the jamming situation that is closer to the current time (i.e., the jamming corresponding to the smaller second time difference), a higher weight can be set. Therefore, the technical solution of the above application scenario can further improve the accuracy of page load calculation.
[0231] In some application scenarios of the above optional implementation manner, the time difference between the current moment and the end moment of the last second time period in the second time period sequence is less than the preset second duration.
[0232] It can be understood that in the above application scenario, the second time period sequence can be updated in time, thereby further improving the accuracy of the page load calculation. That is, when the time difference between the current moment and the end moment of the last second time period in the second time period sequence is equal to or greater than the preset second duration, one more time period is added after the second time period sequence.
[0233] In some optional implementations of this embodiment, the target time period includes a third time period, the start time of the third time period is the creation time of the current session, and the end time of the third time period is the current time.
[0234] On this basis, the following method can be used to determine the target process load based on the operation data:
[0235] The first step is to determine the number of freezes of the target page within the third time period based on the operation data, and obtain a second freeze number.
[0236] The operation data may indicate the duration between the start and end of the operation, and thus, whether a freeze occurs can be determined by judging whether the duration between the start and end of the operation exceeds a threshold. In addition, other methods may be used to determine whether a freeze occurs, which will be described in detail in the subsequent sections and will not be described in detail here.
[0237] The second step is to determine the target process load corresponding to the third time period based on the second number of freezes.
[0238] Among them, the target process load corresponding to the third time period can be a process load determined based on the second number of freezes.
[0239] As an example, the target process load corresponding to the third time period may be the second number of freezes, or may be a value obtained by mapping the calculated second number of freezes to a preset value range.
[0240] It can be understood that in the above optional implementation, the process load of the target page can be determined based on the jamming situation corresponding to the third time period, thereby further improving the accuracy of the page load calculation.
[0241] In addition, you can also use the following methods to determine whether lag occurs:
[0242] The first step is to determine the trigger start time and response start time of the operation on the target page.
[0243] The operation data may include the trigger start time and the response start time of the operation.
[0244] The second step is to determine a fourth time difference between the response start time and the trigger start time.
[0245] The fourth time difference may represent the duration between the response start time and the trigger start time.
[0246] In the third step, if the fourth time difference is greater than the preset third time length, it is determined that a freeze occurs; if the fourth time difference is less than or equal to the preset third time length, it is determined that no freeze occurs. The third time length can be determined based on the median execution time in the historical operation data, or can be based on the system default setting.
[0247] It can be understood that the above scheme for determining whether a jam occurs determines whether a jam occurs by calculating the duration between the response start time and the trigger start time, which can more accurately determine whether a jam occurs.
[0248] Step 103: Generate a page load of the target page based on the target process load.
[0249] In this embodiment, the page load of the target page can be used to measure the jamming condition of the target page.
[0250] As an example, the target process load may be determined as the page load of the target page.
[0251] In some optional implementations of this embodiment, the determined target load includes at least two of the following: a target process load corresponding to a first time period (hereinafter referred to as the first part), a target process load corresponding to a second time period sequence (hereinafter referred to as the second part), and a target process load corresponding to a third time period (hereinafter referred to as the third part).
[0252] On this basis, the following method can be used to generate the page load of the target page based on the target process load:
[0253] The page load of the target page is generated based on at least two of the target process load corresponding to the first time period (hereinafter referred to as load A), the target process load corresponding to the second time period sequence (hereinafter referred to as load B), and the target process load corresponding to the third time period (hereinafter referred to as load C).
[0254] Specifically, if the determined target load includes load A and load B, then the page load of the target page can be generated based on load A and load B. If the determined target load includes load A and load C, then the page load of the target page can be generated based on load A and load C. If the determined target load includes load C and load B, then the page load of the target page can be generated based on load C and load B. If the determined target load includes load A, load B and load C, then the page load of the target page can be generated based on load A, load B and load C.
[0255] In the case where the determined target load includes load A and load B, the result of the weighted sum or weighted mean of load A and load B can be determined as the page load of the target page, or load A and load B can be mapped to preset value intervals respectively, and the sum of the two mapped values can be determined as the page load of the target page. For the case where the determined target load includes load B and load C, and the case where the determined target load includes load A and load C, the page load of the target page can be calculated by referring to the above method, which will not be repeated here.
[0256] When the determined target load includes load A, load B and load C, the result of the weighted sum or weighted mean of load A, load B and load C can be determined as the page load of the target page, or load A, load B and load C can be respectively mapped to preset numerical ranges and the sum of the three mapped numerical values can be determined as the page load of the target page.
[0257] Here, the first part of the algorithm does not rely on whether the page is stuck in order to obtain the instantaneous load level of the page. For pages with more operations and busyness, the value of the first part will be higher. There may be a page process that is almost not idle, or often has millisecond-level (long) waiting, which is on the edge of being stuck, but the actual number of stuck times is small or non-existent. At this time, the value of the first part is more valuable for reference and more accurate than the second and third parts. Among them, the above-mentioned pages with more operations and busyness can, for example, be pages operated by more than ten people, school-level and company-level shared documents or collection tables, e-commerce live broadcast room statistical tables, etc.
[0258] In addition, some pages have a large amount of data, a complex structure, a large proportion of simple queries, and few operation instructions, but are prone to lag as soon as the operation instructions are executed; or the time spent collecting and filling out information is very low, but the screening time is long, and a single operation will directly increase the number of subsequent lags. The second part can reflect these characteristics.
[0259] In addition, the more times the page freezes, the higher the load of this part. The logarithm of the total number of freezes can be calculated to obtain the target process load corresponding to the third time period mentioned above. When the number of freezes reaches a certain level, the growth rate will be slowed down to prevent the load of the page that freezes for a long time from rising to a level that has no reference significance. In addition, this part can have a reduction mechanism. If the page does not freeze for a long time or after executing many instructions, the total count will gradually decrease to reflect the page that was very stuck in the past, but has become unstuck after deleting data or optimizing the structure. The third part here is mainly used for pages that freeze for a long time. For pages with complex structures, such as many references and formulas, updating a cell requires the linkage calculation of a large amount of other data; or files with many conditional formats and scattered areas, and files that require more searches and changes to update data, any operation will freeze, but more time is spent on browsing files, the third part mentioned above can also be better handled.
[0260] It can be understood that in the above optional implementation method, the page load of the target page can be generated based on at least two of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period, which can further improve the accuracy of the generated page load.
[0261] The load generation method provided by the embodiment of the present application can determine the operation data generated by the target page within the target time period, wherein the target page is the page accessed by the page access operation instruction, and then determine the target process load based on the operation data, wherein the target process load is the process load of the target page, and finally, generate the page load of the target page based on the target process load. Thus, the process load of the target page is determined by the operation data generated by the target page within the target time period, and then the page load of the target page is generated, which can improve the accuracy of the generated page load.
[0262] Figure 2 A flow chart of another load generation method provided in an embodiment of the present application. Figure 2 As shown, the method specifically includes:
[0263] Step 201 : determining operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction.
[0264] In this embodiment, step 201 and Figure 1 Step 101 in the corresponding embodiment is basically the same and will not be described again here.
[0265] Step 202: determine a target process load based on the operation data, wherein the target process load is a process load of the target page.
[0266] In this embodiment, step 202 and Figure 1 Step 102 in the corresponding embodiment is basically the same and will not be described again here.
[0267] Step 203, when at least one of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period is obtained, determine the page load of the target page based on at least one of the obtained target process loads.
[0268] In this embodiment, when only the target process load corresponding to the first time period is obtained, the page load of the target page can be determined based on the target process load corresponding to the first time period. For example, the target process load corresponding to the first time period can be directly determined as the page load of the target page, or the target process load corresponding to the first time period can be mapped to a preset value interval and determined as the page load of the target page.
[0269] In the case where only the target process load corresponding to the second time period sequence is obtained, the page load of the target page can be determined based on the target process load corresponding to the second time period sequence. For example, the target process load corresponding to the second time period sequence can be directly determined as the page load of the target page, or the target process load corresponding to the second time period sequence can be mapped to a preset value interval and determined as the page load of the target page.
[0270] In the case where only the target process load corresponding to the third time period is obtained, the page load of the target page can be determined based on the target process load corresponding to the third time period. For example, the target process load corresponding to the third time period can be directly determined as the page load of the target page, or the target process load corresponding to the third time period can be mapped to a preset value interval and determined as the page load of the target page.
[0271] In the case of obtaining at least two of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period, a method for determining the page load of the target page based on at least two of the obtained target process loads can refer to the above description and will not be repeated here.
[0272] In addition, step 203 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0273] It should be noted that, in addition to the above contents, this embodiment may also include Figure 1 The corresponding technical features described in the corresponding embodiments are realized Figure 1 For more details, please refer to Figure 1 For the sake of brevity, the relevant description is not repeated here.
[0274] The load generation method provided in the embodiment of the present application determines the page load of the target page based on at least one of the obtained target process loads, which can further improve the accuracy of the generated page load.
[0275] Figure 3A A flow chart of a page response method provided in an embodiment of the present application.
[0276] Specifically, if Figure 3A As shown, the method specifically includes:
[0277] Step 301: Determine whether to enable a preset strategy based on the page load and the target load, wherein the preset strategy is used to adjust the operation response speed of the target page.
[0278] In this embodiment, the page load can be used to measure the jamming of a page (e.g., a target page), and is an estimated value of the load at present or in the future. The page load can be the load of the page determined by calculation. For example, the page load can be determined according to a preset frequency, or when a preset calculation condition is met, so as to obtain the page load.
[0279] As an example, the page load may be calculated using methods such as CPU and number of threads, or may be calculated using any of the above load generation methods.
[0280] The target load is the load that is expected to be obtained. In one embodiment, the target load is associated with the resource usage setting. When the value of the target load is determined, the resource configuration corresponding to the value is determined; and resources matching the resource configuration are set for the target page. For example, when the target load is 1, the number of threads configured for the target page is 1, and when the target load is 2, the number of threads configured for the target page is 2.
[0281] In addition, the target load may be at least one load value that is preset and fixed, or a load value that changes according to a preset rule based on the page load and the current actual load (i.e., the current target load, the target load before adjustment). In some cases, the target load is determined based on the duration of the page access operation and / or the page load.
[0282] The preset strategy is a strategy for adjusting the target load. By adjusting the target load, the resources actually configured for the target page can be adjusted, such as turning on or off multithreading, or expanding or reducing memory, etc. The preset strategy is used to adjust the change trend of the target load to the change of the page load, as well as the speed of the change, so as to adjust the operation response speed of the target page.
[0283] Exemplarily, when the difference between the page load and the target load exceeds a set threshold, it can be determined to enable the preset policy; when the difference between the page load and the target load is less than or equal to the set threshold, it can be determined not to enable the preset policy.
[0284] Step 302: When it is determined that the preset policy is enabled, the target page is controlled to perform an operation response according to the preset policy.
[0285] In this embodiment, once it is determined to enable the preset strategy, the target load can be adjusted through the preset strategy to adjust the resources configured for the target page, so as to control the operation response of the target page, so as to improve the operation response speed of the target page while using reasonable resources and avoid waste of resources.
[0286] In some optional implementations of this embodiment, the page load is determined in the following manner:
[0287] During the maintenance period of the session to which the page access operation belongs, the page load of the target page is determined according to a preset frequency.
[0288] The period from when a page (e.g., a target page sent to a terminal) is opened to when the page is closed can be referred to as a session retention period. If multiple user terminals open a page represented by the same URL, the session retention period can start from when the first user terminal opens the page until the last user terminal closes the page.
[0289] The session to which the page access operation belongs may be maintained from the time when the page accessed by the page access operation is opened by the first user terminal to the time when the page accessed by the page access operation is closed by the last user terminal.
[0290] On this basis, the target load is adjusted based on the preset strategy and can be updated in the following ways:
[0291] When the page load is greater than or equal to the corresponding target load, the current target load is increased to obtain a new target load.
[0292] The initial value of the target load is a preset value, and the target load corresponding to the page load determined for the first time according to the preset frequency is the preset value.
[0293] Here, the current target load can be increased in a variety of ways. For example, the current target load can be increased by a preset value, or the current target load can be multiplied by a preset multiple, wherein the multiple is greater than 1.
[0294] When the page load is less than the corresponding target load, the current target load is reduced to obtain a new target load.
[0295] Here, the current target load can be reduced in a variety of ways, for example, the current target load can be reduced by a preset value, or the current target load can be multiplied by a preset percentage, wherein the preset percentage is less than 100%.
[0296] In addition, the new target load may be a load value calculated after increasing or decreasing the current load (current target load).
[0297] The obtained new target load is determined as the target load corresponding to the page load to be determined next time.
[0298] It can be understood that in the above optional implementation, the page load of the target page can be determined according to the preset frequency, and the target load is updated so that the target load converges to the page load, thereby reducing the resource waste caused by frequently enabling the preset strategy to a certain extent.
[0299] In some application scenarios of the above optional implementations, the following method may be used to increase the current target load: increase the current target load according to the Fibonacci sequence.
[0300] The Fibonacci sequence can be expressed as: F(0) = 0, F(1) = 1, F(n) = F(n-1) + F(n-2) (n≥2, n∈N*). That is, the first term of the Fibonacci sequence is 0, the second term is 1, and from the third term onwards, each term is equal to the sum of the first two terms.
[0301] On this basis, the current target load may be reduced in the following manner: the difference between the current target load and a preset positive integer (eg, 1, 2) is determined as the new target load.
[0302] It can be understood that in the above application scenarios, smoothing can be achieved by increasing quickly and decreasing slowly. When the target load is lower than the page load, each load update will increase in the manner of the Fibonacci sequence. When it is continuously lower than the page load, the target load will increase by the amount it increases each time until it converges to the page load. When the target load is higher than the page load, if it is still higher after multiple continuous updates, the target load will be reduced by a small amount until it slowly converges to the page load.
[0303] It should be noted that the above-mentioned page response method may be related to the load generation method described above. For example, the various steps included (including but not limited to step 301 and step 302) may be performed after the above-mentioned step 103. In this case, the page load in step 301 may be obtained by using the generation method of the page load described in the above-mentioned load generation methods. In addition, the various steps included in the above-mentioned page response method may also be performed independently of the above-mentioned load generation methods. In other words, the above-mentioned page response method may be independent of the load generation method described above. In this case, the page load in step 301 may be calculated by using CPU, number of threads, etc.
[0304] The following is an illustrative description of the embodiments of the present application, but it should be noted that the embodiments of the present application may have the features described below, but the following description does not constitute a limitation on the scope of protection of the embodiments of the present application.
[0305] In this method, the target page is used to present a document as an example to illustrate the above solution.
[0306] Specifically, the page load that can be used by other mechanisms can be calculated once every period of time in the following manner, where the page load consists of three parts:
[0307] The first part estimates the current kernel load level (i.e., the target process load corresponding to the first time period mentioned above) based on past instructions.
[0308] The second part is the jamming situation in a shorter time dimension (that is, the target process load corresponding to the second time period sequence mentioned above);
[0309] The third part is the jamming situation in the long-term numerical dimension (that is, the target process load corresponding to the third time period mentioned above).
[0310] For the first part above, it can be obtained as follows:
[0311] First, the weighted average of the execution time of all types of instructions (instructing to execute the above target operation) that have been executed in the past period of time (that is, the above first period of time) is recorded. Among them, since new instructions have a greater probability of being executed in the future, a higher weight is set (that is, the first time difference is negatively correlated with the first weight). In this way, the average execution time of each instruction is obtained.
[0312] For example, all instructions in the past 10 minutes are recorded, but some instructions take a long time to execute, or the file is only browsed but not edited for a long time, which may result in too few instructions recorded in 10 minutes, far below the minimum retention number (that is, the preset threshold above), resulting in insufficient recorded instruction samples and inability to calculate a more appropriate average execution time of instructions. In this regard, there are two ways to deal with it:
[0313] Method 1: Extend the recording time, such as from 10 minutes to 20 minutes, until the number of instructions meets the minimum retention number position. That is: extend the duration of the target historical time period so that the number of executions of the same type of operation in the extended target historical time period is greater than or equal to the preset threshold; then, based on the extended target historical time period, determine the execution duration of the target operation to be responded to.
[0314] Method 2 is to directly record a preset number of instructions. That is, determine the total execution time of the preset threshold number of executions of the same type of operation that is closest to the current time (for example, the total execution time of the last 10 executions of the same type of operation); and determine the quotient of the total execution time and the preset threshold as the execution time of the target operation to be responded to.
[0315] Afterwards, based on the average instruction execution time obtained above, as well as the remaining unexecuted instructions of the current session (i.e., the target operations to be responded to) and the currently executed instructions (i.e., the target operations to be responded to), the total time required for the current session to execute all instructions (i.e., the execution time of each target operation in the target operation set) is estimated. The logarithm of the total time is taken to reduce the sensitivity to instantaneous excessive load. Here, the result obtained by taking the logarithm of the total time can be used as an estimate of the immediate kernel load based on past instructions, i.e., the target process load corresponding to the first time period.
[0316] It can be understood that the first part of the algorithm does not rely on whether the file is stuck in order to obtain the instantaneous load level of the file. For files with more file operations and busy files, the value of the first part will be higher. There may be file processes that are almost non-idle, or often have millisecond-level (longer) waits, which are on the verge of being stuck, but the actual number of freezes is small or non-existent. At this time, the value of the first part is more valuable for reference and more accurate than the second and third parts. Among them, the above-mentioned busy files with more operations can, for example, be files that are collaboratively operated by more than ten people, school-level or company-level shared documents or collection tables, e-commerce live broadcast room statistical tables, etc.
[0317] For the second part above, it can be obtained in the following way:
[0318] Record the number of freezes in each calculation interval (i.e., the second time period) over the past period of time (i.e., the second time period sequence).
[0319] Among them, the method of judging jams is as follows: in a collaborative scenario, users can more clearly perceive that their operations are affected or blocked by the operations of users accessing the same document. In the most serious case, users need to wait for other people's instructions to finish execution before they can edit. Therefore, instructions that take too long from the start of execution to the end of execution are not counted here, but the time from the user's instruction entering the queue (that is, the above-mentioned operation triggering moment, when the user performs the operation) to the server actually starting to execute the instruction (that is, the above-mentioned response start moment) is counted, which is the slow waiting time. In the current business scenario, if the slow waiting time exceeds one second (that is, the above-mentioned preset third time length), this instruction is recorded as a jam.
[0320] The more total freezes there are in the past period of time, the higher the load of this part, and the higher the weight of the more recent data. That is, the second time difference is negatively correlated with the second weight.
[0321] It is understandable that some files are too large and have complex structures. They have a large proportion of simple queries and few operation instructions, but are prone to lag as soon as the operation instructions are executed; or they take a short time to collect information and fill in, but a long time to screen. A single operation will directly increase the number of subsequent lags. The second part can reflect these characteristics.
[0322] The third part can be obtained as follows:
[0323] Starting from the establishment of the recording file process, the total number of jams is recorded and the total number of jams is used as a benchmark to provide the third part of the load.
[0324] It can be understood that the more times the jam occurs, the higher the load of this part. The logarithm of the total number of jams can be calculated to obtain the target process load corresponding to the third time period mentioned above. When the number of jams reaches a certain level, the growth rate will be slowed down to prevent the load of the long-term jammed files from rising to a level that has no reference significance. In addition, this part has a reduction mechanism. If the file does not jam for a long time or after executing many instructions, the total count will gradually decrease, so as to reflect the files that were very jammed in the past, but have become unjammed after deletion or structural optimization. The third part here is mainly used for files that have been jammed for a long time. For files with complex structures, such as many references and formulas, updating a cell requires the linkage calculation of a large amount of other data; or files with many conditional formats and scattered areas, and files that require more searches and changes to update data, any operation will jam, but more time is spent on browsing, and the above third part can also be better handled.
[0325] In addition, this solution can also have an averaging mechanism: because the data used in the above three parts are not of the same type and will be used as independent references respectively, the results can be compressed / expanded to the range of 0 to 15 (that is, the above preset numerical range), so that the results of the three parts can be simply added together to obtain a comprehensive result (that is, the above page load).
[0326] In addition, this solution can also have a smoothing mechanism: since the evaluation method can be used to implement a multi-process parallel architecture, frequent switching will consume resources, so a smoothing mechanism is implemented. The load obtained by the above method is called the page load; the load exposed to the outside and used is called the target load, which will be smoothed by a fast increase and slow decrease. When the target load is lower than the page load, the target load can be increased in the manner of the Fibonacci series, that is, when it is continuously lower than, the amount of each increase in the target load increases until it converges to the page load. When the target load is higher than the page load, if it is still higher after multiple updates, the target load is reduced by a small amount until it slowly converges to the page load. As an example, please refer to Figure 3B , Figure 3BA schematic diagram of changes in page load and target load involved in a page response method provided in an embodiment of the present application.
[0327] Furthermore, when it is found that the page load is greater than the target load, a multi-threaded terminal is opened for the document to prevent the document from being stuck.
[0328] This method can ignore the jamming caused by a single burst of long instructions, because the user will not feel the impact if there is no operation next. And it has a certain predictive performance: when there is continuous jamming, or when more instructions are piled up due to concurrency, it will quickly converge to a higher level, even if the session jamming is not high in the past period of time or the CPU occupancy is not high. The jamming that users can perceive is usually more concentrated, and it will not fall back immediately after entering a high load. Only when the user does not feel the jamming for a long time will the estimated load slowly decrease. In addition, this method is easy to use, and compared with the server pressure, it can better reflect the degree of user-perceived jamming, and is suitable for the front-end, back-end or other components to use this data to optimize the user experience in a targeted manner. No information from the hardware is required. Unlike the load calculation based on the server hardware utilization ratio, no processing is required for hardware scheduling. The data is simple and easy to collect. The required data is usually covered by conventional buried points, and the calculation load consumes less resources.
[0329] It should be noted that, in addition to the contents recorded above, this embodiment may also include (or may not include) the technical features described in the above embodiments, so as to achieve the technical effects of the load generation method shown above. Please refer to the above description for details. For the sake of brevity, it will not be elaborated here.
[0330] The load generation method provided in the embodiment of the present application can control the target page to respond to operations through the preset strategy once the preset strategy is determined to be enabled, so as to improve the operation response speed of the target page. In this way, the occurrence of target page freeze can be alleviated.
[0331] Figure 4 A schematic diagram of a load generation device provided in an embodiment of the present application. Specifically comprising:
[0332] A first determining unit 401 is used to determine the operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction;
[0333] A second determining unit 402 is used to determine a target process load based on the operation data, wherein the target process load is a process load of the target page;
[0334] The generating unit 403 is configured to generate a page load of the target page based on the target process load.
[0335] In a possible implementation manner, the target time period includes a first time period, a start time of the first time period is a creation time of the current session, and an end time of the first time period is the current time; and
[0336] The step of determining the target process load based on the operation data includes:
[0337] Based on the operation data, determining a target operation set to be performed on the target page, wherein the target operation set is a set of operations triggered within the first time period;
[0338] Determine the execution time of each target operation in the target operation set, wherein the execution time is the time between the trigger start time and the response completion time of the target operation;
[0339] Based on the execution duration of each target operation, a target process load corresponding to the first time period is determined.
[0340] In a possible implementation, the target operation set includes target operations to be responded to; and
[0341] The execution time of the target operation to be responded is determined in the following manner:
[0342] Determine the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period;
[0343] Determine a first weight of each execution of the same type of operation based on a first time difference between the current moment and the execution moment of each execution of the same type of operation, wherein the first time difference is negatively correlated with the first weight;
[0344] Based on the first weight of each execution of the same type of operation, a weighted average of the execution time of each execution of the same type of operation is calculated to obtain the execution time of the target operation to be responded to.
[0345] In a possible implementation, determining the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period includes:
[0346] Determine the number of times the same type of operation as the target operation to be responded to is performed within the target historical time period;
[0347] When the number of executions is greater than or equal to a preset threshold, determining the execution duration and execution time of each execution of the same type of operation within the target historical time period; and
[0348] When the number of executions is less than the preset threshold, the execution duration of the target operation to be responded to is determined in one of the following ways:
[0349] Extending the duration of the target historical time period so that the number of executions of the same type of operation within the extended target historical time period is greater than or equal to the preset threshold; determining the execution duration of the target operation to be responded to based on the extended target historical time period;
[0350] Determine the total execution time of the preset threshold number of executions of the same type of operation whose execution time is closest to the current time; and determine the quotient of the total execution time and the preset threshold as the execution time of the target operation to be responded to.
[0351] In a possible implementation manner, the target time period includes a second time period sequence, the second time period sequence is a sequence including at least one second time period, and the duration of the second time period is a preset second duration; and
[0352] The step of determining the target process load based on the operation data includes:
[0353] Based on the operation data, determining the number of freezes of the target page in each of the second time periods, and obtaining a first freeze number sequence;
[0354] Based on the first freeze number sequence, determine the target process load corresponding to the second time period sequence.
[0355] In a possible implementation, determining the target process load corresponding to the second time period sequence based on the first freeze number sequence includes:
[0356] Determine the freeze time of each first freeze number in the first freeze number sequence;
[0357] Determine a second weight of each of the first freeze times based on a second time difference between the current moment and the determined freeze moment, wherein the second time difference is negatively correlated with the second weight;
[0358] Based on the second weight of each freeze, a target process load corresponding to the second time period sequence is determined.
[0359] In a possible implementation manner, the time difference between the current moment and the end moment of the last second time period in the second time period sequence is less than the preset second duration.
[0360] In a possible implementation manner, the target time period includes a third time period, a start time of the third time period is a creation time of the current session, and an end time of the third time period is the current time; and
[0361] The step of determining the target process load based on the operation data includes:
[0362] Based on the operation data, determine the number of freezes of the target page in the third time period to obtain a second freeze number;
[0363] Based on the second number of freezes, a target process load corresponding to the third time period is determined.
[0364] In a possible implementation, whether a freeze occurs is determined in the following manner:
[0365] Determine a trigger start time and a response start time for an operation on the target page;
[0366] Determining a fourth time difference between the response start time and the trigger start time;
[0367] When the fourth time difference is greater than the preset third time length, determining that a freeze occurs;
[0368] When the fourth time difference is less than or equal to the preset third duration, it is determined that no freeze occurs.
[0369] In a possible implementation, generating the page load of the target page based on the target process load includes:
[0370] When at least one of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period is obtained, the page load of the target page is determined based on at least one of the obtained target process loads.
[0371] In a possible implementation, determining the page load of the target page based on at least one of the obtained target process loads includes:
[0372] Performing interval mapping on the obtained target process load to obtain a target value;
[0373] Based on the target value, a page load of the target page is determined.
[0374] In a possible implementation, the determined target load includes at least two of the following: a target process load corresponding to the first time period, a target process load corresponding to the second time period sequence, and a target process load corresponding to the third time period; and
[0375] The generating the page load of the target page based on the target process load includes:
[0376] The page load of the target page is generated based on at least two of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period.
[0377] In a possible implementation manner, after generating the page load of the target page based on the target process load, the device further includes:
[0378] A third determination unit (not shown in the figure) is used to determine whether to enable a preset strategy based on the page load and the target load, wherein the preset strategy is used to adjust the operation response speed of the target page;
[0379] A control unit (not shown in the figure) is used to control the target page to respond to an operation through the preset policy when it is determined that the preset policy is enabled.
[0380] In a possible implementation, the page load is determined in the following manner:
[0381] During the maintenance period of the session to which the page access operation belongs, determining the page load of the target page according to a preset frequency; and
[0382] The target load is updated in the following manner:
[0383] In the case where the page load is greater than or equal to the corresponding target load, the current target load is increased to obtain a new target load, wherein the initial value of the target load is a preset value, and the target load corresponding to the page load determined for the first time according to the preset frequency is the preset value;
[0384] When the page load is less than the corresponding target load, reducing the current target load to obtain a new target load;
[0385] The obtained new target load is determined as the target load corresponding to the page load to be determined next time.
[0386] In a possible implementation manner, increasing the current target load includes:
[0387] Increase the current target load according to the Fibonacci sequence; and
[0388] The reducing the current target load includes:
[0389] The difference between the current target load and the preset positive integer is determined as the new target load.
[0390] The load generating device provided in this embodiment may be as follows Figure 4The load generation device shown in can execute all the steps of the load generation methods described above, thereby achieving the technical effects of the load generation methods described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0391] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 5 The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505 .
[0392] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0393] It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0394] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
[0395] Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.
[0396] In this embodiment, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:
[0397] Determining operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction;
[0398] Based on the operation data, determining a target process load, wherein the target process load is a process load of the target page;
[0399] Based on the target process load, a page load of the target page is generated.
[0400] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0401] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0402] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0403] The electronic device provided in this embodiment may be Figure 5 The electronic device shown in can execute all the steps of the load generation methods described above, thereby achieving the technical effects of the load generation methods described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0404] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0405] When one or more programs in the storage medium can be executed by one or more processors, the load generation method executed on the electronic device side can be implemented.
[0406] The processor is used to execute the load generation program stored in the memory to implement the following steps of the load generation method performed on the electronic device side:
[0407] Determining operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction;
[0408] Based on the operation data, determining a target process load, wherein the target process load is a process load of the target page;
[0409] Based on the target process load, a page load of the target page is generated.
[0410] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0411] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0412] The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. In addition, for the aforementioned embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present invention.
Claims
1. A load generation method, It is characterized in that The method comprises: Determining operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction; Determine a target process load based on the operation data, wherein the target process load is a process load of the target page; Based on the target process load, a page load of the target page is generated.
2. The method according to claim 1, It is characterized in that The target time period includes a first time period, the start time of the first time period is the creation time of the current session, and the end time of the first time period is the current time; as well as The step of determining the target process load based on the operation data includes: Based on the operation data, determining a target operation set to be performed on the target page, wherein the target operation set is a set of operations triggered within the first time period; Determining the execution time of each target operation in the target operation set; Based on the execution duration of each target operation, a target process load corresponding to the first time period is determined.
3. The method according to claim 2, It is characterized in that The target operation set includes target operations to be responded to; and The execution time of the target operation to be responded is determined in the following manner: Determine the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to within the target historical time period; Determine a first weight of each execution of the same type of operation based on a first time difference between the current moment and the execution moment of each execution of the same type of operation, wherein the first time difference is negatively correlated with the first weight; Based on the first weight of each execution of the same type of operation, a weighted average of the execution time of each execution of the same type of operation is calculated to obtain the execution time of the target operation to be responded to.
4. The method according to claim 3, It is characterized in that The determining, within the target historical time period, the execution duration and execution time of each execution of the same type of operation of the target operation to be responded to, includes: Determine the number of times the same type of operation as the target operation to be responded to is performed within the target historical time period; When the number of executions is greater than or equal to a preset threshold, determining the execution duration and execution time of each execution of the same type of operation within the target historical time period; When the number of executions is less than the preset threshold, the execution duration of the target operation to be responded to is determined in one of the following ways: Extending the duration of the target historical time period so that the number of executions of the same type of operation within the extended target historical time period is greater than or equal to the preset threshold; determining the execution duration of the target operation to be responded to based on the extended target historical time period; Determine the total execution time of the preset threshold number of executions of the same type of operation whose execution time is closest to the current time; and determine the quotient of the total execution time and the preset threshold as the execution time of the target operation to be responded to.
5. The method according to claim 1, It is characterized in that The target time period includes a second time period sequence, the second time period sequence is a sequence including at least one second time period, and the duration of the second time period is a preset second duration; as well as The step of determining the target process load based on the operation data includes: Based on the operation data, determining the number of freezes of the target page in each of the second time periods, and obtaining a first freeze number sequence; Based on the first freeze number sequence, determine the target process load corresponding to the second time period sequence.
6. The method according to claim 5, It is characterized in that The determining, based on the first freeze number sequence, a target process load corresponding to the second time period sequence includes: Determine the freeze time of each first freeze number in the first freeze number sequence; Determine a second weight of each of the first freeze times based on a second time difference between the current moment and the determined freeze moment, wherein the second time difference is negatively correlated with the second weight; Based on the second weight of each freeze, a target process load corresponding to the second time period sequence is determined.
7. The method according to claim 5, It is characterized in that The time difference between the current moment and the end moment of the last second time period in the second time period sequence is less than the preset second duration.
8. The method according to claim 1, It is characterized in that The target time period includes a third time period, the start time of the third time period is the creation time of the current session, and the end time of the third time period is the current time; as well as The step of determining the target process load based on the operation data includes: Based on the operation data, determine the number of freezes of the target page in the third time period to obtain a second freeze number; Based on the second number of freezes, a target process load corresponding to the third time period is determined.
9. The method according to any one of claims 5 to 8, It is characterized in that Use the following method to determine whether lag occurs: Determine a trigger start time and a response start time for an operation on the target page; Determining a fourth time difference between the response start time and the trigger start time; When the fourth time difference is greater than the preset third time length, determining that a freeze occurs; When the fourth time difference is less than or equal to the preset third duration, it is determined that no freeze occurs.
10. The method according to any one of claims 2 to 8, It is characterized in that The generating the page load of the target page based on the target process load includes: When at least one of the target process load corresponding to the first time period, the target process load corresponding to the second time period sequence, and the target process load corresponding to the third time period is obtained, the page load of the target page is determined based on at least one of the obtained target process loads.
11. The method according to claim 10, It is characterized in that The determining the page load of the target page based on at least one of the obtained target process loads includes: Performing interval mapping on the obtained target process load to obtain a target value; Based on the target value, a page load of the target page is determined.
12. The method according to any one of claims 1 to 8, It is characterized in that After generating the page load of the target page based on the target process load, the method further includes: Based on the page load and the target load, determining whether to enable a preset strategy, wherein the preset strategy is used to adjust the operation response speed of the target page; In the case where it is determined to enable the preset policy, the target page is controlled to perform an operation response through the preset policy.
13. The method according to claim 12, It is characterized in that The page load is determined in the following manner: During the maintenance period of the session to which the page access operation belongs, determining the page load of the target page according to a preset frequency; and The target load is updated in the following manner: In the case where the page load is greater than or equal to the corresponding target load, the current target load is increased to obtain a new target load, wherein the initial value of the target load is a preset value, and the target load corresponding to the page load determined for the first time according to the preset frequency is the preset value; When the page load is less than the corresponding target load, reducing the current target load to obtain a new target load; The obtained new target load is determined as the target load corresponding to the page load to be determined next time.
14. The method according to claim 13, It is characterized in that The increasing the current target load includes: Increase the current target load according to the Fibonacci sequence; and The reducing the current target load includes: The difference between the current target load and the preset positive integer is determined as the new target load.
15. A load generating device, It is characterized in that The device comprises: A first determining unit, configured to determine operation data generated by a target page within a target time period, wherein the target page is a page accessed by a page access operation instruction; A second determining unit, configured to determine a target process load based on the operation data, wherein the target process load is a process load of the target page; A generating unit is used to generate a page load of the target page based on the target process load.
16. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 14.
17. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method described in any one of claims 1 to 14 is implemented.
