Business operation environment loading method and device, storage medium and electronic equipment

By dynamically adjusting the status of the business operation environment and using window functions to predict execution requests, the problem of long-term physical resources loading in the business operation environment is solved, and the resource usage efficiency and environmental response capabilities are improved.

CN120216054APending Publication Date: 2025-06-27中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510299355.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, the loading of the business operation environment occupies physical resources for a long time, resulting in waste of resources and inefficiency.

Method used

By determining the business type of the target service and determining the corresponding window function according to its type, predicting whether there is an execution request and dynamically adjusting the operating status of the business operation environment, thereby avoiding the redundant operation environment from occupying machine resources for a long time.

Benefits of technology

It has achieved improvement of environmental utilization efficiency, reduced resource occupation, and reduced the number of unloading times, thus solving the problem of long-term physical resources loading in the business operation environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216054A_ABST
    Figure CN120216054A_ABST
Patent Text Reader

Abstract

The invention provides a business operation environment loading method and device, a storage medium and electronic equipment, and the method comprises the steps: determining the business type of a target business, and determining a corresponding window function according to the business type; a window function is adopted to predict whether an execution request of the target service exists in the first time period or not, a prediction request result is obtained, and the execution request is a request for executing the target service; according to the prediction request result, determining an initial operation state of a service operation environment corresponding to the target service; and determining whether an execution request of the actually existing target service is received, obtaining an actual request result, and dynamically adjusting the operation state of the service operation environment according to the actual request result to obtain a target operation state of the service operation environment. The method has the advantages that scheduling and using of physical resources are optimized, and meanwhile the number of loading and unloading times of the environment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer software and hardware. Specifically, it relates to a method for loading a service operation environment, a device for loading a service operation environment, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the development of computer software and hardware, various dynamic expansion technologies have been widely used. For example, cross-language call is a technology that loads software environments required for corresponding languages to run, such as virtual machines, and directly calls them through a general interface protocol when needed.

[0003] Loading software environments for cross-language calls at all levels, including systems and processes, at the initial stage of system / program operation and having their life cycles continue throughout the life cycle of the system / program will consume a great deal of physical resources. For example, some languages, functions, and modules are only used at specific time nodes, and their actual usage time is very short compared to the length of the entire system's life cycle, which means that the physical resources such as memory and CPU they occupy are wasted. Summary of the Invention

[0004] The main object of the present application is to provide a method for loading a service operation environment, a device for loading a service operation environment, a computer-readable storage medium, and an electronic device, so as to at least solve the problem that the loading of the service operation environment in the prior art occupies physical resources for a long time.

[0005] To achieve the above object, according to one aspect of the present application, there is provided a method for loading a service operation environment, including: determining the service type of a target service, and determining a corresponding window function according to the service type; using the window function to predict whether there is an execution request for the target service within a first time period to obtain a prediction request result, where the execution request is a request to execute the target service; determining an initial operating state of the service operation environment corresponding to the target service according to the prediction request result; determining whether an execution request for the target service that actually exists is received to obtain an actual request result, and dynamically adjusting the operating state of the service operation environment according to the actual request result to obtain a target operating state of the service operation environment.

[0006] Optionally, the window function is used to predict whether there is an execution request for the target service in the first period, and a prediction request result is obtained, including: determining T historical periods, where the historical period is the same period as the first period at a historical moment. One historical period includes multiple historical sub-periods, and the historical sub-periods in one historical period are different. The first period includes multiple prediction sub-periods, and the historical sub-periods and the prediction sub-periods correspond one by one. The time length of the historical sub-period and the time length of the prediction sub-period are the same as the window width of the window function, and T is a positive integer; obtaining the number of execution requests for the target service in each historical sub-period to obtain a historical request number; determining the average value of all the historical request numbers corresponding to all the historical sub-periods in all the historical periods as the target average value, and the number of the target average values is the same as the number of historical sub-periods in one historical period; in the case that the target average value is greater than the threshold value of the window function, predicting that there is an execution request for the target service in the corresponding prediction sub-period to obtain a first prediction result; in the case that the target average value is less than or equal to the threshold value of the window function, predicting that there is no execution request for the target service in the corresponding prediction sub-period to obtain a second prediction result.

[0007] Optionally, according to the prediction request result, the initial running state of the service running environment corresponding to the target service is determined, including: in the case that the prediction request result is the first prediction result, determining the initial running state of the service running environment as the loading state, where the first prediction result is the prediction result that there is an execution request for the target service in the prediction sub-period in the first period, and the loading state is the state where there is no execution request and the service running environment is loaded; in the case that the prediction request result is the second prediction result, determining the initial running state of the service running environment as the idle state, where the second prediction result is the prediction result that there is no execution request for the target service in the prediction sub-period in the first period, and the idle state is the state where there is no execution request and the service running environment is not loaded; in the case that the prediction request result is the third prediction result, determining the initial running state of the service running environment as the starvation state, where the third prediction result is the prediction result that there is no execution request for the target service in the service running environment in the loading state and in a continuous first preset number of prediction sub-periods, and the starvation state is the state where there is no execution request and the service running environment is loaded; in the case that the prediction request result is the fourth prediction result, determining to unload the service running environment, where the fourth prediction result is the prediction result that there is no execution request for the target service in the service running environment in the starvation state and in a continuous second preset number of prediction sub-periods.

[0008] Optionally, according to the actual request result, dynamically adjust the running state of the service running environment to obtain the target running state of the service running environment, including: when receiving an execution request for the target service that actually exists, determining that the target running state of the service running environment is a saturated state, where the saturated state is a state in which the execution request exists and the service running environment is loaded; when the service running environment is in a saturated state and no execution request for the target service that actually exists is received within the window width of the third preset window function, determining that the target running state of the service running environment is a starvation state.

[0009] Optionally, determine the corresponding window function according to the service type, including: determining the corresponding service running environment according to the service type of the target service; determining the environment loading duration of the service running environment, and determining the window width and threshold value of the window function according to the environment loading duration.

[0010] Optionally, determine the environment loading duration of the service running environment, and determine the window width of the window function according to the environment loading duration, including: obtaining the total single - environment loading duration of multiple service running environments; determining the average value of all the total single - environment loading durations as the environment loading duration; determining k times the environment loading duration as the window width of the window function, where k is a positive integer.

[0011] Optionally, determine the threshold value of the window function according to the environment loading duration, including: determining the historical period according to the service type of the target service; collecting the execution request data of the target service within N historical periods, where N is a positive integer; discretizing the execution request data with the environment loading duration as the minimum unit to obtain discretized request data; excluding the data with a value of zero in the discretized request data, and arranging the discretized request data in ascending order; determining the M - th discretized request data in the ranking as the threshold value of the window function.

[0012] According to another aspect of the present application, there is provided a loading device for a service running environment, including: a first determination unit, configured to determine the service type of the target service and determine the corresponding window function according to the service type; a prediction unit, configured to use the window function to predict whether there is an execution request for the target service within the first time period to obtain a prediction request result, where the execution request is a request to execute the target service; a second determination unit, configured to determine the initial running state of the service running environment corresponding to the target service according to the prediction request result; a third determination unit, configured to determine whether an execution request for the target service that actually exists is received to obtain an actual request result, and dynamically adjust the running state of the service running environment according to the actual request result to obtain the target running state of the service running environment.

[0013] According to another aspect of the present application, there is provided a computer-readable storage medium, which includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute any one of the loading methods of the service operating environment.

[0014] According to yet another aspect of the present application, there is provided an electronic device, including: one or more processors, a memory, and one or more programs. The one or more programs are stored in the memory and are configured to be executed by the one or more processors. The one or more programs include those for executing any one of the loading methods of the service operating environment.

[0015] Applying the technical solution of the present application, for the above-mentioned loading method of the service operating environment, first determine the service type of the target service, and determine the corresponding window function according to the service type; then use the window function to predict whether there is an execution request for the target service within the first time period to obtain a predicted request result, and the execution request is a request to execute the target service; then determine the initial operating state of the service operating environment corresponding to the target service according to the predicted request result; finally, determine whether an execution request for the target service that actually exists is received to obtain an actual request result, and dynamically adjust the operating state of the service operating environment according to the actual request result to obtain the target operating state of the service operating environment. This method can ensure that all requests corresponding to specific environments can be responded to, improve the environmental utilization efficiency, avoid redundant operating environments occupying machine resources for a long time, and at the same time, reduce the number of loading and unloading times, achieving the purpose of reducing the overall physical resource occupation, and solving the problem that the loading of the service operating environment in the prior art occupies physical resources for a long time. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The specification drawings constituting a part of the present application are used to provide a further understanding of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0017] Figure 1 Shows a hardware structure block diagram of a mobile terminal for executing a loading method of a service operating environment provided in an embodiment of the present application;

[0018] Figure 2 Shows a schematic flowchart of a loading method of a service operating environment provided in an embodiment of the present application;

[0019] Figure 3 Shows a schematic flowchart of the cyclic switching state transition of a thin environment and a fat environment provided in an embodiment of the present application;

[0020] Figure 4 Shows a schematic diagram of controlling state transition by an environment loading and unloading control algorithm provided according to an embodiment of the present application;

[0021] Figure 5 Shows a schematic flow diagram of state transition conditions of an environment loading and unloading control algorithm provided according to an embodiment of the present application;

[0022] Figure 6 Shows a schematic diagram of a prediction result of a service request provided according to an embodiment of the present application;

[0023] Figure 7 Shows a schematic diagram of the actual situation of a service request provided according to an embodiment of the present application;

[0024] Figure 8 Shows a block diagram of a loading device for a service operation environment provided according to an embodiment of the present application.

[0025] Among them, the above-mentioned drawings include the following reference numerals:

[0026] 102, a processor; 104, a memory; 106, a transmission device; 108, an input / output device. Specific embodiments

[0027] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances for the embodiments of the present application described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0030] For ease of description, some nouns or terms related to the embodiments of the present application are described below:

[0031] Lean environment: Refers to an environment that only meets the environmental resources required for the current system / service / application to run, and no redundant one or more environmental resources are loaded. A strictly lean environment means that the system / service / application does not load redundant environmental resources at all. A loose lean environment means that for a specific scenario or language, no redundant environmental resources are loaded. Unless otherwise specified in this application, the lean environment mentioned herein refers to the loose lean environment.

[0032] Fat environment: Opposite to the lean environment, it refers to an environment where the loaded environment exceeds the scope of the environmental resources for running the current system / service / application, and there is a redundancy.

[0033] Physical resources: Related physical medium resources for data transmission, operation, and storage, such as network bandwidth, CPU, memory, external storage, etc.

[0034] As introduced in the background art, for cross-language call software environments at all levels including systems and processes, if they are all loaded together with them at the initial stage of system / program operation and their life cycles last throughout the life cycle of the system / program, it will be very resource-consuming. In the prior art, some languages, functions, and modules are only used at specific time nodes, and their actual usage time is very short compared to the length of the entire system life cycle, which means that the physical resources such as memory and CPU occupied by them are wasted. To solve the problem that the loading of the service operation environment in the prior art long-term occupies physical resources, the embodiments of the present application provide a method for loading a service operation environment, a device for loading a service operation environment, a computer-readable storage medium, and an electronic device.

[0035] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0036] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal for a method of loading a service operation environment according to an embodiment of the present invention. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1 only one is shown in Figure 1The structure shown is only illustrative and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may further include more or fewer components than those shown in Figure 1 or have a different configuration from that shown in Figure 1 .

[0037] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the loading method of the service operation environment in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include the wireless network provided by the communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0038] In this embodiment, a method for loading a service operation environment running on a mobile terminal, a computer terminal, or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from that here.

[0039] Figure 2 is a flowchart of the method for loading a service operation environment according to an embodiment of the present application. As Figure 2 shown, the method includes the following steps:

[0040] Step S201, determine the service type of the target service, and determine the corresponding window function according to the service type;

[0041] Specifically, according to the type of the target service, selecting an appropriate window function can accurately predict the operating status of the system, ensure that all requests corresponding to specific environments can be responded to, and prevent relevant requests from being rejected due to the control of system environment loading. That is, each target service has a corresponding window function used to predict whether the target service will send a request.

[0042] Among them, determining the corresponding window function according to the service type includes the following steps:

[0043] Step S301: Determine the corresponding service operating environment according to the service type of the target service;

[0044] Step S302: Determine the environment loading duration of the service operating environment, and determine the window width and threshold value of the window function according to the environment loading duration.

[0045] Specifically, the service operating environment can be divided into thin environment 1, fat environment, and thin environment 2. Thin environment 1 is the smallest operating environment during application initialization. That is, the situation where the service operating environment is not loaded and no actual service requests are received is thin environment 1, and the system mostly runs in this state. When the algorithm predicts that relevant requests are about to arrive, it will start the loading work of the relevant environment. After the loading is completed, the system will briefly be in the fat environment state to process the upcoming requests. That is, the situation where the service operating environment is loaded and no service requests are received is the fat environment. When a request arrives at the system, the system will be in the new thin environment 2 state, and the previously loaded environment is in use at this time. That is, the situation where the service operating environment is loaded and service requests are received is thin environment 2. When the service request is processed and the request is returned, the system will briefly be in the fat environment state, that is, the service operating environment in the system is loaded and no new service requests are received at this time. Under the prediction of the algorithm, the system will timely unload relevant environmental resources, so that the system returns to the thin environment 1 state, thereby reducing the time the system is in the fat environment state, improving the environmental utilization efficiency, and preventing redundant operating environments from occupying machine resources for a long time.

[0046] Furthermore, thin environment 1 is a state without tools (service operating environment) and without requests (service requests), corresponding to the idle state; the new thin environment 2 is a state with tools and with requests, corresponding to the saturated state; the fat environment is a state with tools and without requests, corresponding to the starvation state. The cyclic switching state transition process of the thin environment and the fat environment is as Figure 3As shown, the system is generally in the thin environment 1 state. When the algorithm is loaded into the business to be processed, the system converts and briefly enters the fat environment 1 state. When the environment usage request passes, the system is in the new thin environment 2 state. After the business processing is completed, the system will briefly be in the fat environment 2 state. After unloading the relevant environmental resources, the system will return to the thin environment 1 state to wait for new business requests. Among them, the fat environment 1 and the fat environment 2 are in the same environmental state.

[0047] Among them, determining the environment loading duration of the business operation environment and determining the window width of the window function according to the environment loading duration includes the following steps:

[0048] Step S401, obtain the total single - environment loading duration of multiple business operation environments;

[0049] Step S402, determine the average value of all the total single - environment loading durations as the environment loading duration;

[0050] Step S403, determine k times the environment loading duration as the window width of the window function, where k is a positive integer.

[0051] Specifically, the parameters of the window function method include the window width and the window threshold. The window width is a left - closed and right - open range starting from the current moment and ending at a future value. The method for determining the window width is as follows: measure the total single - environment loading duration, test repeatedly for multiple times, take the average value, and this average value is called the environment loading duration EL. Take three times the environment loading duration as the window width, that is, the above k value is 3.

[0052] Among them, determining the threshold value of the window function according to the environment loading duration includes the following steps:

[0053] Step S501, determine the historical period according to the business type of the target business;

[0054] Step S502, collect the execution request data of the target business within N historical periods, where N is a positive integer;

[0055] Step S503, discretize the execution request data with the environment loading duration as the minimum unit to obtain discretized request data;

[0056] Step S504, exclude the data with a value of zero in the discretized request data and sort the discretized request data in ascending order;

[0057] Step S505, determine the discretized request data ranked Mth as the threshold value of the window function.

[0058] Specifically, the request data for the past N cycles of the acquisition system is collected. The specific value of the cycle (such as hours, days, months, etc.) depends on the business type and is not limited here. Taking the environment loading duration EL as the minimum unit, the request data for the above N cycles is discretized, that is, the time axis is divided into time periods that are connected end to end. The length of these time periods is the environment loading duration EL. Then, all the values within one EL are added up as the request count data for that period. The discretized request data is sorted in ascending order. After excluding the data with a value of zero, the fourth smallest value is selected as the threshold value of the window function, that is, M = 4. Among them, selecting the fourth smallest value as the threshold value of the window function is to prevent abnormal fluctuations and reduce the occurrence of extreme situations.

[0059] Step S202: Use the window function to predict whether there is an execution request for the target service within the first time period, and obtain a prediction request result. The execution request is a request to execute the target service.

[0060] Specifically, predicting the business demand in the future can take measures in advance to optimize resource allocation, ensure that all demands within the first time period are promptly responded to, and thus improve the operation efficiency.

[0061] Among them, using the window function to predict whether there is an execution request for the target service within the first time period and obtaining a prediction request result includes the following steps:

[0062] Step S2021: Determine T historical time periods. The historical time period is the same time period as the first time period at a historical moment. One historical time period includes multiple historical sub - time periods. The historical sub - time periods within one historical time period are different. The first time period includes multiple prediction sub - time periods. The historical sub - time periods and the prediction sub - time periods correspond one by one. The time length of the historical sub - time period and the prediction sub - time period is the same as the window width of the window function. T is a positive integer.

[0063] Step S2022: Obtain the number of execution requests for the target service within each historical sub - time period to get the historical request count.

[0064] Step S2023: Determine the average value of all the historical request counts corresponding to all the historical sub - time periods within all the historical time periods as the target average value. The number of the target average value is the same as the number of historical sub - time periods within one historical time period.

[0065] Step S2024: When the target average value is greater than the threshold value of the window function, predict that there is an execution request for the target service within the corresponding prediction sub - time period to obtain a first prediction result.

[0066] Step S2025, in the case where the target mean value is less than or equal to the threshold value of the window function, it is predicted that there is no execution request for the target service within the corresponding prediction sub-period, and a second prediction result is obtained.

[0067] Specifically, for initialization, the algorithm is in an idle state. The algorithm calculates the mean value of the total number of requests within the window width in the same time period of the past T historical cycles with the current moment as the origin. If it does not exceed the threshold, the algorithm remains in the idle state; if it exceeds the threshold, the system starts environment loading and enters the loading state; if a request is received in the idle state, the environment loading starts immediately and switches to the saturated state. The value of T is less than the number of historical cycles N.

[0068] Step S203, according to the prediction request result, determine the initial operating state of the service operating environment corresponding to the target service;

[0069] Specifically, the initial operating state of the system needs to match the expected service requirements, so as to ensure that all requests corresponding to specific environments can be responded to, and relevant requests will not be rejected due to the control of system environment loading. At the same time, the efficiency of environment use is improved, and redundant operating environments are prevented from occupying machine resources for a long time.

[0070] Among them, determining the initial operating state of the service operating environment corresponding to the target service according to the prediction request result includes the following steps:

[0071] Step S2031, in the case where the prediction request result is the first prediction result, determine that the initial operating state of the service operating environment is the loading state. The first prediction result is the prediction result that there is an execution request for the target service in the prediction sub-period within the first period. The loading state is the state where there is no execution request and the service operating environment is loaded.

[0072] Step S2032, in the case where the prediction request result is the second prediction result, determine that the initial operating state of the service operating environment is the idle state. The second prediction result is the prediction result that there is no execution request for the target service within the prediction sub-period in the first period. The idle state is the state where there is no execution request and the service operating environment is not loaded.

[0073] Step S2033, in the case where the prediction request result is the third prediction result, determine that the initial operating state of the service operating environment is the starvation state. The third prediction result is the prediction result that there is no execution request for the target service within the first preset number of consecutive prediction sub-periods when the service operating environment is in the loading state. The starvation state is the state where there is no execution request and the service operating environment is loaded.

[0074] Among them, the first preset value can take 3 values.

[0075] Step S2034, when the prediction request result is the fourth prediction result, determine to unload the service running environment, where the fourth prediction result is the prediction result that there is no execution request of the target service in the service running environment in a state of starvation and within a second preset number of consecutive prediction sub-periods.

[0076] Among them, the second preset value can take 3 values.

[0077] Specifically, this application designs an environment loading and unloading control algorithm. The above algorithm uses the window function method, and the window width is based on the service cycle analyzed from historical service data such as daily, weekly, monthly, or yearly. The loading and unloading algorithm gives four states: idle, loading, saturated, and starving. Among them, the idle state means that the algorithm has not loaded a specific environment, and at this time the system is in a thin environment state; the loading state is the stage when the relevant environmental resources are loaded and waiting for requests to arrive, that is, a transition state. At this stage, the system is between the thin environment state and the fat environment state. After the environment is loaded, the system is in the fat environment state; the saturated state is the state when the system actually receives and processes requests corresponding to the relevant environment, and at this time the system is in the thin environment state; the starving state is the state when the system has loaded the relevant environment and is ready to unload the environment or process requests again under certain conditions. The purpose of designing this state is to prevent the system from re-triggering environment loading due to new requests arriving after rapid unloading. At this time, the system is in the fat environment state. The system will switch between the above four states according to actual needs, and the achievable state transitions are as Figure 4 shown.

[0078] If the system in the loading state receives a request for the corresponding environment, it immediately enters the saturated state; otherwise, if the system has no historical data mean exceeding the threshold value for three consecutive complete window width periods, it enters the starving state; otherwise, it remains in the loading state.

[0079] If the system in the starving state receives a relevant request, it immediately returns to the saturated state; otherwise, if the historical data mean does not exceed the threshold value for three consecutive complete window width periods, it starts to unload the relevant environment, and the system state transitions to the idle state. Otherwise, it remains in the starving state.

[0080] Step S204, determine whether an execution request for the actually existing target service is received, obtain an actual request result, and dynamically adjust the running state of the service running environment according to the actual request result to obtain the target running state of the service running environment.

[0081] Specifically, dynamically adjusting the operating state of a service is beneficial for the system to operate most efficiently, improving service processing efficiency and avoiding redundant operating environments from occupying machine resources for a long time. Additionally, dynamically adjusting the operating state of a service can reduce the number of loading and unloading operations, reduce the occurrence of extreme situations where requests are blocked and need to wait for an entire loading and unloading cycle, and can optimize the scheduling and use of physical resources.

[0082] Among them, according to the actual request result, dynamically adjusting the operating state of the service operating environment to obtain the target operating state of the service operating environment includes the following steps:

[0083] Step S2041, when receiving an execution request for the target service that actually exists, determining that the target operating state of the service operating environment is the saturated state, where the saturated state is the state in which the execution request exists and the service operating environment is loaded;

[0084] Step S2042, when the service operating environment is in the saturated state and no execution request for the target service that actually exists is received within the window width of the third preset window function, determining that the target operating state of the service operating environment is the starvation state.

[0085] Among them, the third preset can be set to 1.

[0086] Specifically, if a system in the saturated state does not receive a request within one window width period, it enters the starvation state; otherwise, it remains in the saturated state.

[0087] The overall process of the state transition of the algorithm is as Figure 5 shown. First, initialization is performed. The algorithm is in the idle state. The algorithm calculates the average value of the total number of requests within the window width at the same time period in the past T historical cycles with the current moment as the origin. If it does not exceed the threshold, the algorithm remains in the idle state; if it exceeds the threshold, the system starts environment loading and enters the loading state; if a request is received in the idle state, the environment loading immediately starts and switches to the saturated state. If the system in the loading state receives a request for the corresponding environment, it immediately enters the saturated state; otherwise, if the average value of historical data does not exceed the threshold value for three consecutive complete window width periods, it enters the starvation state; otherwise, it remains in the loading state. If the system in the saturated state does not receive a request within one window width period, it enters the starvation state; otherwise, it remains in the saturated state. When the system in the starvation state receives a relevant request, it immediately returns to the saturated state; otherwise, if the average value of historical data does not exceed the threshold value for three consecutive complete window width periods, it starts to unload the relevant environment and the system state transitions to the idle state. Otherwise, it remains in the starvation state.

[0088] In one embodiment, Figure 6It is a schematic diagram of the business request situation and status transfer time predicted before the request is received, which is the prediction result obtained according to the window function. In the figure, the dashed line A is the threshold value, the dashed line B is three times the threshold value, the box C scales the window width, and the vertical solid line is the request mean value at this moment of the N historical data obtained by prediction. Among them, exceeding the dashed line A means that there is a request. It can be seen from the figure that the algorithm can pre-load the environment to meet the request in advance and unload the environment in a timely manner, improving the utilization rate of the environment.

[0089] In another embodiment, Figure 7 What is shown is the situation of an actually received business request and the actual status transfer of the corresponding business operation environment, which is the reception situation of the business request and the status of the business operation environment in the real situation. The vertical solid line enclosed by the dashed box in the figure is the part of the actually received business request. It can be seen from the figure that the algorithm maintains a loaded state within a certain period of time to prevent premature triggering of unloading, which may lead to frequent loading and unloading. By Figure 6 and Figure 7 comparison, the above embodiment predicts to a certain extent the reception situation of the business request and adjusts the status of the business operation environment accordingly. And in the case where there are differences between the actually received business request situation and the prediction, it can also well adjust the status of the business operation environment, thus avoiding the problem that the status of the business operation environment is overloaded and occupies system resources.

[0090] The above method for loading the business operation environment of the present application first determines the business type of the target business and determines the corresponding window function according to the business type; then uses the window function to predict whether there is an execution request for the target business within the first time period to obtain a predicted request result, and the execution request is a request to execute the target business; then determines the initial running state of the business operation environment corresponding to the target business according to the predicted request result; finally determines whether an execution request for the actually existing target business is received to obtain an actual request result, and dynamically adjusts the running state of the business operation environment according to the actual request result to obtain the target running state of the business operation environment. This method can ensure that all requests corresponding to specific environments can be responded to, improve the environmental utilization efficiency, avoid redundant running environments occupying machine resources for a long time, and at the same time, reduce the number of loading and unloading times, achieving the purpose of reducing the overall physical resource occupation, and solving the problem that the loading of the business operation environment in the prior art occupies physical resources for a long time.

[0091] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0092] The embodiments of the present application also provide a loading device for a service operation environment. It should be noted that the loading device for the service operation environment in the embodiments of the present application can be used to execute the loading method for the service operation environment provided by the embodiments of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0093] The following introduces the loading device for the service operation environment provided by the embodiments of the present application.

[0094] Figure 8 It is a schematic diagram of the loading device for the service operation environment according to the embodiments of the present application. As Figure 8 shown, the device includes: a first determination unit 10, a prediction unit 20, a second determination unit 30, and a third determination unit 40. The first determination unit 10 is used to determine the service type of the target service and determine the corresponding window function according to the service type; the prediction unit 20 is used to use the window function to predict whether there is an execution request for the target service within the first time period to obtain a prediction request result, and the execution request is a request to execute the target service; the second determination unit 30 determines the initial operating state of the service operation environment corresponding to the target service according to the prediction request result; the third determination unit 40 determines whether it has received an execution request for the target service that actually exists to obtain an actual request result, and dynamically adjusts the operating state of the service operation environment according to the actual request result to obtain the target operating state of the service operation environment.

[0095] The loading device for the above-mentioned service operation environment of the present application includes: a first determination unit, a prediction unit, a second determination unit, and a third determination unit. The first determination unit is used to determine the service type of the target service and determine the corresponding window function according to the service type; the prediction unit is used to use the window function to predict whether there is an execution request for the target service within the first time period to obtain a prediction request result, and the execution request is a request to execute the target service; the second determination unit determines the initial operating state of the service operation environment corresponding to the target service according to the prediction request result; the third determination unit determines whether it has received an execution request for the target service that actually exists to obtain an actual request result, and dynamically adjusts the operating state of the service operation environment according to the actual request result to obtain the target operating state of the service operation environment. This device can ensure that all requests corresponding to specific environments can be responded to, improve the environmental utilization efficiency, avoid redundant operating environments occupying machine resources for a long time, and at the same time, minimize the number of loading and unloading operations as much as possible, which can reduce the occurrence of such extreme situations and reduce the request blocking time, so as to achieve the purpose of reducing the overall physical resource occupation, and solve the problem that the loading of the service operation environment in the prior art occupies physical resources for a long time.

[0096] In some examples, the first determination unit includes a first determination module and a second determination module. The first determination module is used to determine the corresponding service operation environment according to the service type of the target service; the second determination module is used to determine the environment loading duration of the service operation environment and determine the window width and threshold value of the window function according to the environment loading duration. Selecting an appropriate window function can accurately predict the operating condition of the system and ensure that all requests corresponding to specific environments can be responded to.

[0097] In some examples, the second determination module includes a first determination sub-module, a second determination sub-module, and a third determination sub-module. The first determination sub-module is used to obtain the total duration of a single environment loading of multiple service operation environments; the second determination sub-module is used to determine the average value of all the total durations of a single environment loading as the environment loading duration; the third determination sub-module is used to determine k times the environment loading duration as the window width of the window function, where k is a positive integer. Set appropriate window width parameters according to the service type to accurately predict the operating condition of the system.

[0098] In some examples, the second determination module further includes a fourth determination sub-module, a fifth determination sub-module, a sixth determination sub-module, a seventh determination sub-module, and an eighth determination sub-module. The fourth determination sub-module is configured to determine a historical period according to the service type of the target service; the fifth determination sub-module is configured to collect execution request data of the target service within N historical periods, where N is a positive integer; the sixth determination sub-module is configured to discretize the execution request data with the environment loading duration as the minimum unit to obtain discretized request data; the seventh determination sub-module is configured to exclude the data with a value of zero in the discretized request data and sort the discretized request data in ascending order; the eighth determination sub-module is configured to determine the M-th discretized request data as the threshold value of the window function. Set appropriate threshold parameters according to the service type to accurately predict the operating status of the system.

[0099] In some examples, the prediction unit is used for a first prediction module, a second prediction module, a third prediction module, a fourth prediction module, and a fifth prediction module. The first prediction module is configured to determine T historical time periods, where the historical time periods are the same time periods as the first time period at historical moments. One historical time period includes multiple historical sub-time periods, and the historical sub-time periods in one historical time period are different. The first time period includes multiple prediction sub-time periods, and the historical sub-time periods and the prediction sub-time periods correspond one by one. The time length of the historical sub-time periods and the time length of the prediction sub-time periods are the same as the window width of the window function, and T is a positive integer; the second prediction module is configured to obtain the number of execution requests of the target service within each historical sub-time period to obtain historical request quantities; the third prediction module is configured to determine the average value of all the historical request quantities corresponding to all the historical sub-time periods within all the historical time periods as the target average value, and the number of the target average values is the same as the number of the historical sub-time periods within one historical time period; the fourth prediction module is configured to predict that there are execution requests of the target service within the corresponding prediction sub-time period to obtain a first prediction result when the target average value is greater than the threshold value of the window function; the fifth prediction module is configured to predict that there are no execution requests of the target service within the corresponding prediction sub-time period to obtain a second prediction result when the target average value is less than or equal to the threshold value of the window function. Predicting the business demand in the future can take measures in advance to optimize resource allocation, ensure that all demands within the first time period are timely responded to, and thus improve the operation efficiency.

[0100] In some examples, the second determination unit includes a third determination module, a fourth determination module, a fifth determination module, and a sixth determination module. The third determination module is configured to determine that the initial operating state of the service operating environment is a loading state when the prediction request result is a first prediction result, where the first prediction result is a prediction result that there is an execution request for the target service in a predicted sub-period within the first period, and the loading state is a state where there is no such execution request and the service operating environment is being loaded; the fourth determination module is configured to determine that the initial operating state of the service operating environment is an idle state when the prediction request result is a second prediction result, where the second prediction result is a prediction result that there is no execution request for the target service within a predicted sub-period within the first period, and the idle state is a state where there is no such execution request and the service operating environment is not loaded; the fifth determination module is configured to determine that the initial operating state of the service operating environment is a starvation state when the prediction request result is a third prediction result, where the third prediction result is a prediction result that there is no execution request for the target service within a first preset number of consecutive predicted sub-periods while the service operating environment is in the loading state, and the starvation state is a state where there is no such execution request and the service operating environment has been loaded; the sixth determination module is configured to determine to unload the service operating environment when the prediction request result is a fourth prediction result, where the fourth prediction result is a prediction result that there is no execution request for the target service within a second preset number of consecutive predicted sub-periods while the service operating environment is in the starvation state. This ensures that the initial operating state of the system matches the expected service requirements and improves the efficiency of environment utilization.

[0101] In some examples, the third determination unit includes a seventh determination module and an eighth determination module. The seventh determination module is configured to determine that the target operating state of the service operating environment is a saturation state when receiving an execution request for the target service that actually exists, where the saturation state is a state where there is such an execution request and the service operating environment is being loaded; the eighth determination module is configured to determine that the target operating state of the service operating environment is a starvation state when the service operating environment is in the saturation state and no execution request for the target service that actually exists is received within the window width of a third preset window function. This solves the problem of long-term occupation of physical resources by cyclic state switching and enables efficient execution of services.

[0102] The loading device of the service operating environment includes a processor and a memory. The above-mentioned first determination unit, etc. are all stored in the memory as program units, and the corresponding functions are implemented by the processor executing the above program units stored in the memory. The above modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.

[0103] The processor contains a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the problem that the loading of the business operation environment in the prior art occupies physical resources for a long time can be solved.

[0104] The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.

[0105] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the method for loading the business operation environment.

[0106] Specifically, the method for loading the business operation environment includes:

[0107] Step S201: Determine the business type of the target business, and determine the corresponding window function according to the business type;

[0108] Specifically, by selecting an appropriate window function according to the type of the target business, the operation status of the system can be accurately predicted, ensuring that all requests corresponding to a specific environment can be responded to, and relevant requests will not be rejected due to the control of the system environment loading.

[0109] Step S202: Use the window function to predict whether there is an execution request for the target business within the first time period, and obtain a prediction request result, where the execution request is a request to execute the target business;

[0110] Specifically, predicting the business requirements in the future can take measures in advance to optimize resource allocation, ensure that all requirements within the first time period are responded to in a timely manner, and thus improve the operation efficiency.

[0111] Step S203: Determine the initial operating state of the business operation environment corresponding to the target business according to the prediction request result;

[0112] Specifically, the initial operating state of the system needs to match the expected business requirements, so as to ensure that all requests corresponding to a specific environment can be responded to, and relevant requests will not be rejected due to the control of the system environment loading. At the same time, the efficiency of environment use is improved, and redundant operating environments are prevented from occupying machine resources for a long time.

[0113] Step S204: Determine whether an execution request for the target business that actually exists is received, obtain an actual request result, and dynamically adjust the operating state of the business operation environment according to the actual request result to obtain the target operating state of the business operation environment.

[0114] Specifically, dynamically adjusting the running state of the service is beneficial to the most efficient operation of the system, improving the service processing efficiency, and at the same time avoiding the redundant running environment from occupying machine resources for a long time. In addition, dynamically adjusting the running state of the service can reduce the number of loading and unloading times, reduce the extreme situation where requests are blocked and need to wait for an entire loading and unloading cycle again, and can optimize the scheduling and use of physical resources.

[0115] Optionally, using the window function to predict whether there is an execution request of the target service in the first time period, and obtaining a prediction request result, including: determining T historical time periods, where the historical time periods are time periods that are the same as the first time period at historical moments, one historical time period includes multiple historical sub-time periods, and the historical sub-time periods in one historical time period are different. The first time period includes multiple prediction sub-time periods, and the historical sub-time periods and the prediction sub-time periods correspond one by one. The time length of the historical sub-time period and the time length of the prediction sub-time period are the same as the window width of the window function, and T is a positive integer; obtaining the number of execution requests of the target service in each historical sub-time period to obtain historical request numbers; determining the average value of all the historical request numbers corresponding to all the historical sub-time periods in all the historical time periods as the target average value, and the number of the target average values is the same as the number of historical sub-time periods in one historical time period; in the case where the target average value is greater than the threshold value of the window function, predicting that there is an execution request of the target service in the corresponding prediction sub-time period to obtain a first prediction result; in the case where the target average value is less than or equal to the threshold value of the window function, predicting that there is no execution request of the target service in the corresponding prediction sub-time period to obtain a second prediction result.

[0116] Optionally, determine the initial operating state of the service operating environment corresponding to the target service according to the prediction request result, including: when the prediction request result is the first prediction result, determine the initial operating state of the service operating environment as the loading state, where the first prediction result is the prediction result that there is an execution request for the target service in the prediction sub-period within the first period, and the loading state is the state where there is no such execution request and the service operating environment is loaded; when the prediction request result is the second prediction result, determine the initial operating state of the service operating environment as the idle state, where the second prediction result is the prediction result that there is no execution request for the target service within the prediction sub-period in the first period, and the idle state is the state where there is no such execution request and the service operating environment is not loaded; when the prediction request result is the third prediction result, determine the initial operating state of the service operating environment as the starvation state, where the third prediction result is the prediction result that there is no execution request for the target service within the service operating environment in the loading state and within the first preset number of consecutive prediction sub-periods, and the starvation state is the state where there is no such execution request and the service operating environment is loaded; when the prediction request result is the fourth prediction result, determine to unload the service operating environment, where the fourth prediction result is the prediction result that there is no execution request for the target service within the service operating environment in the starvation state and within the second preset number of consecutive prediction sub-periods.

[0117] Optionally, dynamically adjust the operating state of the service operating environment according to the actual request result to obtain the target operating state of the service operating environment, including: when an execution request for the target service that actually exists is received, determine the target operating state of the service operating environment as the saturation state, where the saturation state is the state where there is such an execution request and the service operating environment is loaded; when the service operating environment is in the saturation state and no execution request for the target service that actually exists is received within the window width of the third preset window function, determine the target operating state of the service operating environment as the starvation state.

[0118] Optionally, determine the corresponding window function according to the service type, including: determine the corresponding service operating environment according to the service type of the target service; determine the environment loading duration of the service operating environment, and determine the window width and threshold value of the window function according to the environment loading duration.

[0119] Optionally, determine the environment loading duration of the service operating environment, and determine the window width of the window function according to the environment loading duration, including: obtaining the total single - environment loading duration of multiple service operating environments; determining the average value of all the total single - environment loading durations as the environment loading duration; determining k times the environment loading duration as the window width of the window function, where k is a positive integer.

[0120] Optionally, determine the threshold value of the window function according to the environment loading duration, including: determining the historical period according to the service type of the target service; collecting the execution request data of the target service within N historical periods, where N is a positive integer; discretizing the execution request data with the environment loading duration as the minimum unit to obtain discretized request data; excluding the data with a value of zero in the discretized request data, and arranging the discretized request data in ascending order; determining the M - th discretized request data in the ranking as the threshold value of the window function.

[0121] An embodiment of the present invention provides a processor for running a program, wherein when the program runs, it executes the loading method of the service operating environment.

[0122] Specifically, the loading method of the service operating environment includes:

[0123] Step S201, determine the service type of the target service, and determine the corresponding window function according to the service type;

[0124] Specifically, according to the type of the target service, selecting an appropriate window function can accurately predict the operating status of the system, ensure that all requests corresponding to a specific environment can be responded to, and prevent relevant requests from being rejected due to the control of system environment loading.

[0125] Step S202, use the window function to predict whether there is an execution request of the target service within the first time period to obtain a prediction request result, where the execution request is a request to execute the target service;

[0126] Specifically, predicting the business requirements in the future period can take measures in advance to optimize resource allocation, ensure that all requirements within the first time period are timely responded to, and thus improve the operation efficiency.

[0127] Step S203, determine the initial operating state of the service operating environment corresponding to the target service according to the prediction request result;

[0128] Specifically, the initial operating state of the system needs to match the expected business requirements, so as to ensure that all requests corresponding to specific environments can be responded to, and relevant requests will not be rejected due to the control of system environment loading. At the same time, the utilization efficiency of the environment is improved, and redundant operating environments are prevented from occupying machine resources for a long time.

[0129] Step S204, determine whether an execution request for the target business that actually exists is received, obtain an actual request result, and dynamically adjust the operating state of the business operating environment according to the actual request result to obtain the target operating state of the business operating environment.

[0130] Specifically, dynamically adjusting the operating state of the business is beneficial to the most efficient operation of the system, improves business processing efficiency, and at the same time prevents redundant operating environments from occupying machine resources for a long time. In addition, dynamically adjusting the operating state of the business can reduce the number of loading and unloading times, reduce the extreme situation where requests are blocked and need to wait for an entire loading and unloading cycle again, and can optimize the scheduling and use of physical resources.

[0131] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:

[0132] Step S201, determine the business type of the target business, and determine the corresponding window function according to the business type;

[0133] Specifically, according to the type of the target business, selecting an appropriate window function can accurately predict the operating condition of the system, ensure that all requests corresponding to specific environments can be responded to, and relevant requests will not be rejected due to the control of system environment loading.

[0134] Step S202, use the window function to predict whether there is an execution request for the target business within a first time period to obtain a predicted request result, where the execution request is a request to execute the target business;

[0135] Specifically, predicting the business requirements within a future period of time can take measures in advance to optimize resource allocation, ensure that all requirements within the first time period are responded to in a timely manner, and thus improve the operating efficiency.

[0136] Step S203, according to the predicted request result, determine the initial operating state of the business operating environment corresponding to the target business;

[0137] Specifically, the initial operating state of the system needs to match the expected business requirements, so as to ensure that all requests corresponding to specific environments can be responded to, and relevant requests will not be rejected due to the control of system environment loading. At the same time, the utilization efficiency of the environment is improved, and redundant operating environments are prevented from occupying machine resources for a long time.

[0138] Step S204, determine whether an execution request for the target service that actually exists is received, obtain an actual request result, and dynamically adjust the running state of the service running environment according to the actual request result to obtain the target running state of the service running environment.

[0139] Specifically, dynamically adjusting the running state of the service is beneficial to the most efficient operation of the system, improving service processing efficiency, and at the same time avoiding redundant running environments from occupying machine resources for a long time. In addition, dynamically adjusting the running state of the service can reduce the number of loading and unloading times, reduce the extreme situation where requests are blocked and need to wait for an entire loading and unloading cycle again, and can optimize the scheduling and use of physical resources.

[0140] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0141] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with at least the following method steps:

[0142] Step S201, determine the service type of the target service, and determine the corresponding window function according to the service type;

[0143] Specifically, according to the type of the target service, selecting an appropriate window function can accurately predict the running status of the system, ensure that all requests corresponding to specific environments can be responded to, and will not reject relevant requests due to the control of system environment loading.

[0144] Step S202, use the window function to predict whether there is an execution request for the target service within the first time period to obtain a predicted request result, where the execution request is a request to execute the target service;

[0145] Specifically, predicting the service demand within a period of time in the future can take measures in advance to optimize resource allocation, ensure that all demands within the first time period are responded to in a timely manner, and thus improve the running efficiency.

[0146] Step S203, according to the predicted request result, determine the initial running state of the service running environment corresponding to the target service;

[0147] Specifically, the initial running state of the system needs to match the expected service demand, so as to ensure that all requests corresponding to specific environments can be responded to, and will not reject relevant requests due to the control of system environment loading. At the same time, improve the environmental use efficiency and avoid redundant running environments from occupying machine resources for a long time.

[0148] Step S204: Determine whether an execution request for the target service that actually exists is received, obtain an actual request result, and dynamically adjust the running state of the service running environment according to the actual request result to obtain the target running state of the service running environment.

[0149] Specifically, dynamically adjusting the running state of the service is beneficial to the most efficient operation of the system, improving service processing efficiency, and at the same time preventing redundant running environments from occupying machine resources for a long time. In addition, dynamically adjusting the running state of the service can reduce the number of loading and unloading operations, reduce the occurrence of extreme situations where requests are blocked and need to wait for an entire loading and unloading cycle, and can optimize the scheduling and use of physical resources.

[0150] Obviously, those skilled in the art should understand that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. They can be implemented by program code executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a sequence different from that here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.

[0151] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0152] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0153] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements in the process Figure 1 one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.

[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0155] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0156] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.

[0157] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0158] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.

[0159] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0160] 1), The above method for loading the business operation environment of the present application first determines the business type of the target business and determines the corresponding window function according to the business type; then uses the window function to predict whether there is an execution request for the target business within the first time period to obtain a prediction request result, and the execution request is a request to execute the target business; then determines the initial running state of the business operation environment corresponding to the target business according to the prediction request result; finally determines whether an execution request for the target business that actually exists is received to obtain an actual request result, and dynamically adjusts the running state of the business operation environment according to the actual request result to obtain the target running state of the business operation environment. This method can ensure that all requests corresponding to specific environments can be responded to, improve the environmental utilization efficiency, avoid redundant running environments from occupying machine resources for a long time, and at the same time, reduce the number of loading and unloading times, achieving the purpose of reducing the overall physical resource occupancy, and solving the problem of long-term occupation of physical resources by the loading of the business operation environment in the prior art.

[0161] 2) The loading device for the above-mentioned service operation environment of the present application includes: a first determination unit, a prediction unit, a second determination unit, and a third determination unit. The first determination unit is configured to determine the service type of the target service and determine the corresponding window function according to the service type; the prediction unit is configured to use the window function to predict whether there is an execution request for the target service within the first time period to obtain a prediction request result, and the execution request is a request to execute the target service; the second determination unit determines the initial operating state of the service operation environment corresponding to the target service according to the prediction request result; the third determination unit determines whether an execution request for the actually existing target service is received to obtain an actual request result, and dynamically adjusts the operating state of the service operation environment according to the actual request result to obtain the target operating state of the service operation environment. This device can ensure that all requests corresponding to specific environments can be responded to, improve the environmental utilization efficiency, avoid redundant operating environments from occupying machine resources for a long time, and at the same time, minimize the number of loading and unloading operations as much as possible to reduce the occurrence of such extreme situations and reduce the request blocking time, thereby achieving the purpose of reducing the overall physical resource occupation and solving the problem that the loading of the service operation environment in the prior art occupies physical resources for a long time.

[0162] The foregoing are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A method for loading a business operating environment, characterized in that: include: Determine the service type of the target service, and determine the corresponding window function according to the service type; Using the window function to predict whether there is an execution request for the target business within a first time period, and obtaining a predicted request result, wherein the execution request is a request to execute the target business; Determining an initial operating state of a business operating environment corresponding to the target business according to the prediction request result; Determine whether a real execution request of the target business is received, obtain an actual request result, and dynamically adjust the operating state of the business operating environment according to the actual request result to obtain a target operating state of the business operating environment.

2. The method according to claim 1, characterized in that The window function is used to predict whether there is an execution request for the target service within the first time period, and a prediction request result is obtained, including: Determine T historical periods, where the historical period is the same period as the first period at a historical moment, one historical period includes multiple historical sub-periods, each of the historical sub-periods in one historical period is different, the first period includes multiple prediction sub-periods, the historical sub-periods correspond to the prediction sub-periods one-to-one, the time length of the historical sub-period and the time length of the prediction sub-period are the same as the window width of the window function, and T is a positive integer; Obtaining the number of execution requests for the target business in each of the historical sub-periods to obtain a historical request number; Determine the average of the number of historical requests in all the historical sub-periods corresponding to all the historical periods as a target average, where the number of the target average is the same as the number of the historical sub-periods in one of the historical periods; When the target mean value is greater than the threshold value of the window function, predicting an execution request of the target service within the corresponding prediction sub-period to obtain a first prediction result; When the target mean value is less than or equal to the threshold value of the window function, it is predicted that there is no execution request for the target service in the corresponding prediction sub-period, and a second prediction result is obtained.

3. The method according to claim 1, characterized in that Determining, according to the prediction request result, an initial operating state of the business operating environment corresponding to the target business, including: In a case where the prediction request result is a first prediction result, determining that the initial running state of the business running environment is a loading state, the first prediction result is a prediction result that there is an execution request for the target business in a prediction sub-period in the first time period, and the loading state is a state in which there is no execution request and the business running environment is loaded; In the case where the prediction request result is a second prediction result, determining that the initial running state of the business running environment is an idle state, the second prediction result is a prediction result that there is no execution request for the target business in the prediction sub-period in the first time period, and the idle state is a state in which there is no execution request and the business running environment is not loaded; In the case where the prediction request result is the third prediction result, determining that the initial operation state of the business operation environment is a starving state, the third prediction result is a prediction result that the business operation environment is in a loading state and there is no execution request for the target business within a first preset prediction sub-period, and the starving state is a state in which there is no execution request and the business operation environment is loaded; When the prediction request result is the fourth prediction result, it is determined to uninstall the business operation environment, and the fourth prediction result is a prediction result that the business operation environment is in a starvation state and there is no execution request for the target business within a second preset prediction sub-period.

4. The method according to claim 1, characterized in that: According to the actual request result, dynamically adjusting the operating state of the business operating environment to obtain a target operating state of the business operating environment includes: In the case of receiving an execution request of the target business that actually exists, determining that the target operation state of the business operation environment is a saturation state, where the saturation state is a state where the execution request exists and the business operation environment is loaded; When the business operation environment is in a saturated state and no execution request of the real target business is received within a window width of a third preset window function, it is determined that the target operation state of the business operation environment is a starvation state.

5. The method according to claim 1, characterized in that: Determining a corresponding window function according to the service type includes: Determine a corresponding business operating environment according to the business type of the target business; Determine the environment loading duration of the business operation environment, and determine the window width and threshold value of the window function according to the environment loading duration.

6. The method according to claim 5, characterized in that Determining the environment loading duration of the business operation environment, and determining the window width of the window function according to the environment loading duration, including: Obtaining the total duration of a single environment loading of multiple business operation environments; The average value of the total duration of all single environment loadings is determined as the environment loading duration; k times the environment loading duration is determined as the window width of the window function, where k is a positive integer.

7. The method according to claim 5, characterized in that include: Determining a threshold value of the window function according to the environment loading duration includes: Determining a historical period according to the business type of the target business; Collecting execution request data of the target business within N historical periods, where N is a positive integer; Taking the environment loading time as the minimum unit, discretizing the execution request data to obtain discretized request data; Excluding zero data in the discretized request data, and arranging the discretized request data in ascending order; The discretized request data ranked Mth is determined as the threshold value of the window function.

8. A loading device for a business operation environment, characterized in that: include: A first determining unit, configured to determine a service type of a target service, and determine a corresponding window function according to the service type; A prediction unit, configured to use the window function to predict whether there is an execution request for the target service within a first time period, and obtain a prediction request result, wherein the execution request is a request for executing the target service; A second determining unit, configured to determine an initial operating state of a business operating environment corresponding to the target business according to the prediction request result; The third determination unit is used to determine whether a real execution request of the target business is received, obtain an actual request result, and dynamically adjust the operating state of the business operating environment according to the actual request result to obtain a target operating state of the business operating environment.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for loading the business operating environment according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a loading method for executing the business operating environment described in any one of claims 1 to 7.