Adjustment method and device for function call parameters, storage medium and electronic equipment
By detecting and adjusting the function recycling time, combining function call frequency and resource utilization, the problem of low function recycling efficiency in the existing technology is solved, and more efficient function recycling is achieved.
Patent Information
- Application Number
- CN202411773222.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-04
AI Technical Summary
In the prior art, the recycling efficiency of function recycling is low and there is a lack of effective solutions.
By detecting the reference call information and reference usage information of the objective function on the running device, the degree of matching between the initial recycling time and the objective function is calculated, and adjustment parameters are generated based on the matching degree, and the initial recycling time is adjusted to meet the matching conditions of the target recycling time.
It improves the recycling efficiency of function recycling, so that the recovery time setting of the function is more in line with the specific operation situation, and solves the inefficiency problem caused by inflexible recycling solutions.
Smart Images

Figure CN119806641A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing, and in particular to a method, device, storage medium and electronic device for adjusting function call parameters. Background Art
[0002] Function Compute is a fully managed computing service under the serverless architecture. The function load scheduling capability needs to be provided by the platform. Due to the characteristics of Function Compute, a function instance must undergo a cold start in the function call chain to become a hot instance. After the call chain ends, if there is no other request to reuse the hot instance, the instance needs to be recycled after a certain period of time. Specifically, if the hot instance is not called within a fixed period of time after the last call to the hot instance, the hot instance will be marked as pending recycling. If the instance is reused before the actual recycling, the pending recycling state will be released; the markings of all hot instances are scanned regularly, and if an instance marked as pending recycling is scanned, the function recycling operation is performed. The above fixed-time recycling scheme is adopted for different functions and different platform states, resulting in unsatisfactory results of the function recycling operation.
[0003] With regard to the problem of low recycling efficiency of function recycling in related technologies, no effective solution has been proposed yet. Summary of the invention
[0004] The main purpose of the present application is to provide a method, device, storage medium and electronic device for adjusting function call parameters to solve the problem of low recovery efficiency of function recovery in related technologies.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for adjusting function call parameters is provided. The method comprises: detecting the matching degree between the initial recovery duration configured on the running device and the target function according to the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, wherein the reference call information is used to indicate the situation that the target function is called by the running device in the reference period, and the reference usage information is used to indicate the usage of the running resources on the running device in the reference period, and the initial recovery duration is the duration that the target function is allowed to occupy the allocated running resources when the target function is called by the running device; generating an adjustment parameter for the initial recovery duration according to the matching degree, wherein the adjustment parameter is used to indicate the adjustment method for the initial recovery duration, and the adjustment method is used to adjust the matching degree to meet the matching condition between the initial recovery duration and the target function; generating a target recovery duration according to the adjustment parameter and the initial recovery duration; and adjusting the configuration on the running device from the initial recovery duration to the target recovery duration.
[0006] As an optional implementation, the method of detecting the degree of match between the initial recovery duration configured on the running device and the target function based on the reference call information of the target function on the running device within the reference period before the current moment and the reference usage information of the running device includes: extracting the reference call parameters of the target function from the reference call information, and extracting the reference allocation parameters of the target function and multiple reference remaining parameters of the running device from the reference usage information, wherein the reference call parameters are used to indicate the number of times the target function is called within the reference period, the reference allocation parameters are used to indicate the number of times the running device allocates running resources to the target function within the reference period, and each of the reference remaining parameters is used to indicate the remaining amount of running resources of the running device after the running device allocates running resources to the target function each time; and calculating the degree of match based on the reference call parameters, the reference allocation parameters and the multiple reference remaining parameters.
[0007] As an optional implementation, the calculating the degree of match based on the reference call parameter, the reference allocation parameter and the plurality of reference remaining parameters includes: calculating a parameter ratio between the reference call parameter and the reference allocation parameter, and calculating an average value of the plurality of reference remaining parameters; calculating a first difference between the parameter ratio and a ratio threshold, and calculating a second difference between the average value and a remaining threshold; and calculating the degree of match based on the first difference and the second difference.
[0008] As an optional implementation, generating the adjustment parameter of the initial recovery duration based on the matching degree includes: detecting the size relationship between the matching degree and a matching threshold, wherein the matching condition is that the matching degree is greater than or equal to the matching threshold; when it is detected that the matching degree is greater than or equal to the matching threshold, determining the adjustment parameter to indicate that the adjustment method for the initial recovery duration is not to adjust; when it is detected that the matching degree is less than the matching threshold, calculating the adjustment parameter based on the reference call information and the reference usage information.
[0009] As an optional implementation, the calculating the adjustment parameter based on the reference call information and the reference usage information includes: extracting from the reference call information a plurality of reference call moments at which the target function is called within the reference period; searching from the reference usage information a plurality of reference remaining amounts of the running resources on the running device corresponding to the plurality of reference call moments before the running resources are allocated to the target function; and filtering out the adjustment parameter from a plurality of first candidate parameters based on the time relationship between the plurality of reference call moments and the plurality of reference remaining amounts corresponding to the plurality of reference call moments, wherein the degree of match between the target recovery duration corresponding to the adjustment parameter and the target function within the reference period is greater than or equal to the matching threshold.
[0010] As an optional implementation, the calculation of the adjustment parameter based on the reference call information and the reference usage information includes: updating a reference model based on the reference call information and the reference usage information to obtain a target model, wherein the target model maintains an association relationship between a time period and a call moment of the target function in the call information and an association relationship between the time period and a remaining amount of the running resource on the running device corresponding to the call moment in the usage information before the running resource is allocated to the target function, the time period including the reference period and the target period; using the target model to predict multiple target call moments within the target period and multiple target remaining amounts corresponding to the multiple target call moments; filtering out the adjustment parameter from multiple second candidate parameters based on the time relationship between the multiple target call moments and the multiple target remaining amounts corresponding to the multiple target call moments, wherein the adjustment method indicated by the adjustment parameter is used to adjust the matching degree to be greater than or equal to the matching threshold within the target period.
[0011] As an optional implementation, generating a target recovery duration based on the adjustment parameters and the initial recovery duration includes: extracting a target value and an adjustment direction from the adjustment parameters, wherein the target value is used to indicate an adjustment amplitude of the initial recovery duration, and the adjustment direction includes an extension direction and a shortening direction; adjusting the initial recovery duration by the target value along the adjustment direction to obtain the target recovery duration.
[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a device for adjusting function call parameters is provided. The device includes: a detection module, which is used to detect the matching degree between the initial recovery duration configured on the running device and the target function according to the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, wherein the reference call information is used to indicate the situation that the target function is called by the running device in the reference period, and the reference usage information is used to indicate the usage of the running resources on the running device in the reference period, and the initial recovery duration is the duration that the target function is allowed to occupy the allocated running resources when the target function is called by the running device; a first generation module, which is used to generate an adjustment parameter of the initial recovery duration according to the matching degree, wherein the adjustment parameter is used to indicate the adjustment method of the initial recovery duration, and the adjustment method is used to adjust the matching degree to meet the matching condition between the initial recovery duration and the target function; a second generation module, which is used to generate a target recovery duration according to the adjustment parameter and the initial recovery duration; and an adjustment module, which is used to adjust the configuration on the running device from the initial recovery duration to the target recovery duration.
[0013] As an optional implementation, the detection module includes: a first extraction unit, used to extract reference call parameters of the target function from the reference call information, and to extract reference allocation parameters of the target function and multiple reference remaining parameters of the operating device from the reference usage information, wherein the reference call parameters are used to indicate the number of times the target function is called within the reference cycle, the reference allocation parameters are used to indicate the number of times the operating device allocates operating resources to the target function within the reference cycle, and each of the reference remaining parameters is used to indicate the remaining amount of operating resources of the operating device after the operating device allocates operating resources to the target function each time; a first calculation unit, used to calculate the matching degree based on the reference call parameters, the reference allocation parameters and multiple reference remaining parameters.
[0014] As an optional embodiment, the first calculation unit is also used to: calculate the parameter ratio of the reference call parameter and the reference allocation parameter, and calculate the average value of multiple reference remaining parameters; calculate the first difference between the parameter ratio and the ratio threshold, and calculate the second difference between the average value and the remaining threshold; calculate the matching degree based on the first difference and the second difference.
[0015] As an optional implementation, the first generation module includes: a detection unit, used to detect the size relationship between the matching degree and the matching threshold, wherein the matching condition is that the matching degree is greater than or equal to the matching threshold; a determination unit, used to determine the adjustment parameter for indicating that the adjustment method for the initial recovery duration is not to adjust when it is detected that the matching degree is greater than or equal to the matching threshold; a second calculation unit, used to calculate the adjustment parameter based on the reference call information and the reference usage information when it is detected that the matching degree is less than the matching threshold.
[0016] As an optional implementation, the second calculation unit is further used to: extract multiple reference call times when the target function is called within the reference period from the reference call information; search from the reference usage information for multiple reference remaining amounts of the running resources on the running device corresponding to the multiple reference call times before the running resources are allocated to the target function; and filter out the adjustment parameter from multiple first candidate parameters based on the time relationship between the multiple reference call times and the multiple reference remaining amounts corresponding to the multiple reference call times, wherein the degree of match between the target recovery duration corresponding to the adjustment parameter and the target function within the reference period is greater than or equal to the matching threshold.
[0017] As an optional implementation, the second computing unit is further used to: update a reference model according to the reference call information and the reference usage information to obtain a target model, wherein the target model maintains an association relationship between a time period and the call moment of the target function in the call information and an association relationship between the time period and the remaining amount of the running resources on the running device corresponding to the call moment in the usage information before the running resources are allocated to the target function, and the time period includes the reference period and the target period; use the target model to predict multiple target call moments within the target period and multiple target remaining amounts corresponding to the multiple target call moments; filter out the adjustment parameter from multiple second alternative parameters according to the time relationship between the multiple target call moments and the multiple target remaining amounts corresponding to the multiple target call moments, wherein the adjustment method indicated by the adjustment parameter is used to adjust the matching degree to be greater than or equal to the matching threshold within the target period.
[0018] As an optional implementation, the second generation module includes: a second extraction unit, used to extract a target value and an adjustment direction from the adjustment parameters, wherein the target value is used to indicate the adjustment amplitude of the initial recovery duration, and the adjustment direction includes an extension direction and a shortening direction; an adjustment unit, used to adjust the initial recovery duration by the target value along the adjustment direction to obtain the target recovery duration.
[0019] In an embodiment of the present application, the matching degree between the initial recovery time configured on the running device and the target function is detected based on the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, and then the adjustment parameter of the initial recovery time is generated based on the matching degree, and the target recovery time is generated based on the adjustment parameter and the initial recovery time, and the configuration on the running device is adjusted from the initial recovery time to the target recovery time. The matching degree of the initial recovery time and the target function is judged according to the historical call situation and the historical resource usage situation, and the adjustment parameter of the initial recovery time is generated based on the matching degree to further adjust the initial recovery time to the target recovery time that meets the matching condition with the target function as the new recovery time of the target function, that is, the recovery time of the target function is adjusted in combination with the specific running situation, taking into account the function call frequency angle and the resource utilization angle, so that the recovery time of the function is set to be more in line with the specific running situation of the function, and the purpose of improving the recovery efficiency of the function recovery is achieved, and the technical effect of improving the recovery efficiency of the function recovery is achieved, thereby solving the technical problem of low recovery efficiency of function recovery caused by the inflexible recovery scheme of the function. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for adjusting function call parameters is shown;
[0022] Figure 2 is a flow chart of a method for adjusting function call parameters provided in an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of a device for adjusting function call parameters provided in an embodiment of the present application;
[0024] Figure 4 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] 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 are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0028] Function Compute: Function Compute is a form of serverless architecture, oriented to function programming, and is an event-driven fully managed computing service. With Function Compute, users do not need to manage infrastructure such as servers, but only need to write and upload code. The Function Compute platform will prepare computing resources for users and run their code in an elastic and reliable manner.
[0029] Function cold start: Cold start refers to the startup process in the function call link that includes code download, runtime initialization, code initialization, and other links.
[0030] Function recycling: The process in which a function instance is destroyed and its occupied resources are recycled when no requests are made to use it for a period of time after it is started.
[0031] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.
[0032] Example 1
[0033] According to an embodiment of the present application, a method embodiment for adjusting function call parameters is also 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 a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for adjusting function call parameters is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0035] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0036] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for adjusting the function call parameters in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the method for adjusting the function call parameters described above is implemented. 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 memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0038] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0039] Under the above operating environment, this application provides Figure 2 The method for adjusting the function call parameters is shown. Figure 2 1 is a flow chart of a method for adjusting function call parameters according to Embodiment 1 of the present application. Figure 2 As shown, the adjustment method includes the following steps:
[0040] Step S201, detecting the degree of match between the initial recycling duration configured on the running device and the target function according to the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, wherein the reference call information is used to indicate the situation that the target function is called by the running device in the reference period, the reference usage information is used to indicate the usage of the running resources on the running device in the reference period, and the initial recycling duration is the duration that the target function is allowed to occupy the allocated running resources when the target function is called by the running device for running;
[0041] Step S202, generating an adjustment parameter for the initial recycling time according to the matching degree, wherein the adjustment parameter is used to indicate an adjustment method for the initial recycling time, and the adjustment method is used to adjust the matching degree to satisfy a matching condition between the initial recycling time and the objective function;
[0042] Step S203, generating a target recycling time according to the adjustment parameter and the initial recycling time;
[0043] Step S204: Adjust the configuration on the running device from the initial recycling duration to the target recycling duration.
[0044] The method for adjusting function call parameters provided in the embodiment of the present application adopts a method of detecting the matching degree between the initial recovery time configured on the running device and the target function based on the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, and then generating an adjustment parameter of the initial recovery time based on the matching degree, generating the target recovery time based on the adjustment parameter and the initial recovery time, and adjusting the configuration on the running device from the initial recovery time to the target recovery time. The matching degree of the initial recovery time and the target function is judged according to the historical call situation and the historical resource usage situation, and the adjustment parameter of the initial recovery time is generated according to the matching degree to further adjust the initial recovery time to the target recovery time that meets the matching condition with the target function as the new recovery time of the target function, that is, it is realized that the recovery time of the target function is adjusted in combination with the specific running situation, taking into account the function call frequency angle and the resource utilization angle, so that the recovery time of the function is set to be more in line with the specific running situation of the function, solves the technical problem of low recovery efficiency of function recovery caused by the inflexible recovery scheme of the function, and achieves the technical effect of improving the recovery efficiency of function recovery.
[0045] Optionally, in the embodiment provided in step S201 of the present application, the reference period may be, but is not limited to, a time period closest to the current moment before the current moment, and the reference period may also be, but is not limited to, a time period that is most representative of the function call situation selected from multiple time periods before the current moment, and the present application does not make specific limitations on this.
[0046] Optionally, in the embodiment of the present application, the operating device may be, but is not limited to, a cloud computing platform, and the operating device may be, but is not limited to, providing operating resources for the target function. The operating device may be, but is not limited to, running multiple functions, that is, the operating device also provides operating resources for other functions besides the target function. Therefore, when adjusting the recycling time of the target function, it is necessary to pay attention to the calling of the target function so that the target function can reuse the allocated operating resources as much as possible, reduce the number of times the operating resources are allocated to the target function, and ensure that the occupation of the operating resources by the target function does not excessively affect other functions run by the operating device or other functions supported by the operating device, so as to avoid excessive occupation of the operating resources.
[0047] Optionally, in an embodiment of the present application, detecting the degree of match between the initial recovery duration configured on the running device and the target function based on the reference call information of the target function on the running device within the reference period before the current moment and the reference usage information of the running device may also include but is not limited to: detecting the duration for which the amount of allocated running resources occupied by the target function recorded in the reference usage information exceeds the resource threshold, and when the duration exceeds the allowed duration, determining that the degree of match does not meet the matching condition; when the duration does not exceed the allowed duration, determining multiple adjacent time differences based on each call moment of the target function recorded in the reference call information, wherein the adjacent time difference is the time difference between each two adjacent call moments in each call moment; searching for the minimum adjacent time difference from the multiple adjacent time differences, and comparing the minimum adjacent time difference with the time difference threshold, and when the minimum adjacent time difference is less than the time difference threshold, determining that the degree of match does not meet the matching condition; when the duration does not exceed the allowed duration and the minimum adjacent time difference is greater than or equal to the time difference threshold, determining that the degree of match meets the matching condition.
[0048] Optionally, in the embodiment provided in step S202 of the present application, the adjustment parameters may include but are not limited to an adjustment value and an adjustment direction. The adjustment value may include but is not limited to indicating an adjustment amplitude of the initial recovery duration. The adjustment direction includes but is not limited to shortening the initial recovery duration or delaying the initial recovery duration.
[0049] Optionally, in an embodiment of the present application, possible problem factors that cause the matching degree to fail to meet the matching requirements, the factor manifestations of the above possible problem factors and the correlation between the adjustment parameters can be recorded on the running device, but are not limited to. Generating the adjustment parameters of the initial recovery time according to the matching degree includes but is not limited to finding the problem factors that cause the matching degree to fail to meet the matching conditions when the matching degree does not meet the matching conditions, finding the factor values of the problem factors, and matching the adjustment parameters for the initial recovery time according to the problem factors and the factor values and the above correlation.
[0050] Optionally, in the embodiment provided in step S203 of the present application, the adjustment parameter can also be but is not limited to a parameter value that can be positive or negative. Generating the target recovery time based on the adjustment parameter and the initial recovery time includes but is not limited to calculating the sum of the initial recovery time and the adjustment parameter to obtain the target recovery time.
[0051] Optionally, in the function call parameter adjustment method provided in an embodiment of the present application, the degree of match between the initial recovery duration configured on the running device and the target function is detected based on the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, including: extracting the reference call parameters of the target function from the reference call information, and extracting the reference allocation parameters of the target function and multiple reference remaining parameters of the running device from the reference usage information, wherein the reference call parameters are used to indicate the number of times the target function is called within the reference period, the reference allocation parameters are used to indicate the number of times the running device allocates running resources to the target function within the reference period, and each reference remaining parameter is used to indicate the remaining amount of running resources of the running device after the running device allocates running resources to the target function each time; the degree of match is calculated based on the reference call parameters, the reference allocation parameters and the multiple reference remaining parameters.
[0052] Through the above steps, the matching degree between the initial recycling time and the objective function is measured by combining the resource usage performance and call status as well as the resource allocation operation status. Taking multiple angles into consideration, the matching degree evaluation of the initial recycling time is more in line with the actual operation of the objective function.
[0053] As an optional implementation, the matching degree is calculated based on the reference call parameters, the reference allocation parameters and multiple reference remaining parameters, including: calculating the parameter ratio of the reference call parameters and the reference allocation parameters, and calculating the average value of multiple reference remaining parameters; calculating a first difference between the parameter ratio and a ratio threshold, and calculating a second difference between the average value and the remaining threshold; and calculating the matching degree based on the first difference and the second difference.
[0054] Optionally, in this embodiment, including but not limited to setting a first weight of the first difference and a second weight of the second difference according to requirements, calculating a weighted sum of the first difference and the second difference to determine the degree of matching.
[0055] Through the above steps, a simple and feasible matching quantification scheme is given that takes into account both resource usage and call conditions, providing a basis for adjusting the recycling time of the objective function of the content that takes into account the above two perspectives.
[0056] As an optional implementation, an adjustment parameter for the initial recovery duration is generated based on the matching degree, including: detecting the relationship between the matching degree and a matching threshold, wherein the matching condition is that the matching degree is greater than or equal to the matching threshold; when it is detected that the matching degree is greater than or equal to the matching threshold, determining an adjustment parameter to indicate that the adjustment method for the initial recovery duration is not to adjust; when it is detected that the matching degree is less than the matching threshold, calculating the adjustment parameter based on reference call information and reference usage information.
[0057] Optionally, in this embodiment, the matching threshold may be, but is not limited to, manually set, or may be determined based on the matching degree between the objective function in the last time period before the reference period and the recycling duration in the time period.
[0058] Through the above steps, whether to adjust the initial recycling time is determined based on the relationship between the matching degree and the matching threshold. The recycling time is adjusted only when the matching degree is less than the matching threshold, ensuring that the recycling time adjustment operation is performed only when the demand is sufficient, avoiding unnecessary adjustment operations and saving operation resources.
[0059] As an optional implementation, the adjustment parameters are calculated based on the reference call information and the reference usage information, including: extracting multiple reference call moments at which the target function is called within a reference period from the reference call information; searching the reference usage information for multiple reference remaining amounts of running resources on the running devices corresponding to the multiple reference call moments before allocating running resources to the target function; and filtering out the adjustment parameters from multiple first candidate parameters based on the time relationship between the multiple reference call moments and the multiple reference remaining amounts corresponding to the multiple reference call moments, wherein the target recovery duration corresponding to the adjustment parameter has a matching degree with the target function within the reference period that is greater than or equal to a matching threshold.
[0060] Through the above steps, referring to the calling time within the reference period and the amount of allocatable running resources within the reference period, the adjustment parameters for adjusting the recovery time are screened from multiple first candidate parameters, and the obtained target recovery time is determined by combining the function calling situation and the resource supply capacity. The determined target recovery time fits the running performance of the target function, and is more conducive to improving the recovery efficiency of function recovery than a fixed recovery time.
[0061] As an optional implementation, the adjustment parameters are calculated based on the reference call information and the reference usage information, including: updating the reference model based on the reference call information and the reference usage information to obtain a target model, wherein the target model maintains the association between the time period and the call moment of the target function in the call information and the association between the time period and the remaining amount of running resources on the running device corresponding to the call moment in the usage information before the running resources are allocated to the target function, and the time period includes a reference period and a target period; using the target model to predict multiple target call moments within the target period and multiple target remaining amounts corresponding to the multiple target call moments; filtering out the adjustment parameters from multiple second alternative parameters based on the time relationship between the multiple target call moments and the multiple target remaining amounts corresponding to the multiple target call moments, wherein the adjustment method indicated by the adjustment parameter is used to adjust the matching degree to be greater than or equal to the matching threshold within the target period.
[0062] Optionally, in this embodiment, the reference model can be, but is not limited to, trained using call time data of the target function in multiple time periods before the current moment and remaining amount data of the running resources corresponding to each call time.
[0063] Through the above steps, the reference model is updated using the reference call information and reference usage information within the reference cycle, and the updated target model is used to predict the future target function call performance and operating resource performance. Data that is closer to future usage conditions can be obtained as the basis for determining the adjustment parameters, and further, the target recovery time of the target function that is more suitable for the target cycle can be obtained, thereby improving the recovery efficiency of function recovery.
[0064] As an optional implementation, a target recovery time is generated based on adjustment parameters and an initial recovery time, including: extracting a target value and an adjustment direction from the adjustment parameters, wherein the target value is used to indicate an adjustment amplitude of the initial recovery time, and the adjustment direction includes an extension direction and a shortening direction; adjusting the initial recovery time by the target value along the adjustment direction to obtain a target recovery time.
[0065] Through the above steps, the initial recycling duration is adjusted using the adjustment range and adjustment direction indicated by the adjustment parameters, and the target recycling duration that meets the matching conditions is obtained to control the future function recycling mechanism. A simple and feasible way to obtain the target recycling duration is given, which provides a basis for improving the recycling efficiency of function recycling.
[0066] As an optional implementation, the present application also provides a serverless function hot instance recovery method based on machine learning, which supports taking function scheduling time (i.e., reference call information), remaining resources (i.e., reference usage information), and actual function recovery time (i.e., initial recovery duration) as input, and predicts the next reasonable recovery time of the function through machine learning methods.
[0067] The specific implementation steps of this method are:
[0068] Step S1: Obtain and confirm the resource demand information of each function, and calibrate the amount of resources required for one scheduling of the function based on the demand information;
[0069] Step S2: Obtain the time of each scheduling of each function, the remaining amount of the resource pool at each scheduling time, and the actual recovery time of the hot instance started after the function is triggered;
[0070] Step S3: Analyze the time characteristics of the function request and the time characteristics of the next request based on the machine learning model, predict the future function request situation, and analyze the remaining quantity information based on the machine learning model to predict the future remaining quantity information, and determine a reasonable time T as the time interval for new function recycling based on the future remaining quantity information and the future function request situation;
[0071] Step S4: When a reasonable time T is reached, the running resources occupied by the function are immediately recovered;
[0072] Step S5: Repeat the above S2-S4 process to optimize the resource recovery time T in each time period.
[0073] Through the above steps, the cold start characteristics, resource remaining amount, and scheduling frequency characteristics of the function instance are processed and analyzed in time, and the recovery time of the hot instance is reasonably and dynamically adjusted to improve the resource utilization rate. At the same time, the machine learning model is used to realize intelligent resource recovery, and different recovery strategies are dynamically set for different functions. The recovery strategy is adjusted in real time through the scheduling characteristics and resource occupancy characteristics in the actual environment, which can alleviate the contradiction of cold restarting within a short time after the function is recovered.
[0074] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0075] Example 2
[0076] The embodiment of the present application also provides a function call parameter adjustment device. It should be noted that the function call parameter adjustment device of the embodiment of the present application can be used to execute the function call parameter adjustment method provided in the embodiment of the present application. The function call parameter adjustment device provided in the embodiment of the present application is introduced below.
[0077] According to an embodiment of the present application, a device for implementing the above-mentioned method for adjusting function call parameters is also provided, such as Figure 3 As shown, the device comprises:
[0078] The detection module 301 is used to detect the matching degree between the initial recycling duration configured on the running device and the target function according to the reference call information of the target function on the running device in the reference period before the current moment and the reference use information of the running device, wherein the reference call information is used to indicate the situation that the target function is called by the running device in the reference period, the reference use information is used to indicate the use of the running resources on the running device in the reference period, and the initial recycling duration is the duration that the target function is allowed to occupy the allocated running resources when the target function is called by the running device for running;
[0079] A first generating module 302 is used to generate an adjustment parameter of the initial recycling time according to the matching degree, wherein the adjustment parameter is used to indicate an adjustment method of the initial recycling time, and the adjustment method is used to adjust the matching degree to satisfy a matching condition between the initial recycling time and the objective function;
[0080] A second generating module 303, configured to generate a target recycling duration according to the adjustment parameter and the initial recycling duration;
[0081] The adjustment module 304 is used to adjust the configuration on the running device from the initial recycling duration to the target recycling duration.
[0082] The function call parameter adjustment device provided in the embodiment of the present application adopts a method of detecting the matching degree between the initial recovery time configured on the running device and the target function according to the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, and then generating an adjustment parameter of the initial recovery time according to the matching degree, generating the target recovery time according to the adjustment parameter and the initial recovery time, and adjusting the configuration on the running device from the initial recovery time to the target recovery time. The matching degree of the initial recovery time and the target function is judged according to the historical call situation and the historical resource usage situation, and the adjustment parameter of the initial recovery time is generated according to the matching degree to further adjust the initial recovery time to the target recovery time that meets the matching condition with the target function as the new recovery time of the target function, that is, it realizes the adjustment of the recovery time of the target function in combination with the specific running situation, taking into account the function call frequency angle and the resource utilization angle, so that the recovery time of the function is set to be more in line with the specific running situation of the function, solves the technical problem of low recovery efficiency of function recovery caused by the inflexible recovery scheme of the function, and achieves the technical effect of improving the recovery efficiency of function recovery.
[0083] As an optional implementation, the detection module includes: a first extraction unit, used to extract reference call parameters of the target function from the reference call information, and extract reference allocation parameters of the target function and multiple reference remaining parameters of the operating device from the reference usage information, wherein the reference call parameters are used to indicate the number of times the target function is called within the reference cycle, the reference allocation parameters are used to indicate the number of times the operating device allocates operating resources to the target function within the reference cycle, and each reference remaining parameter is used to indicate the remaining amount of operating resources of the operating device after the operating device allocates operating resources to the target function each time; a first calculation unit, used to calculate the degree of matching based on the reference call parameters, the reference allocation parameters and the multiple reference remaining parameters.
[0084] As an optional implementation, the first calculation unit is also used to: calculate the parameter ratio of the reference call parameter and the reference allocation parameter, and calculate the average value of multiple reference remaining parameters; calculate the first difference between the parameter ratio and the ratio threshold, and calculate the second difference between the average value and the remaining threshold; calculate the matching degree based on the first difference and the second difference.
[0085] As an optional implementation, the first generation module includes: a detection unit, which is used to detect the size relationship between the matching degree and the matching threshold, wherein the matching condition is that the matching degree is greater than or equal to the matching threshold; a determination unit, which is used to determine the adjustment parameter for indicating that the adjustment method for the initial recovery time is not to adjust when it is detected that the matching degree is greater than or equal to the matching threshold; and a second calculation unit, which is used to calculate the adjustment parameter based on the reference call information and the reference usage information when it is detected that the matching degree is less than the matching threshold.
[0086] As an optional implementation, the second computing unit is further used to: extract multiple reference call moments at which the target function is called within the reference period from the reference call information; search from the reference usage information for multiple reference remaining amounts of running resources on the running devices corresponding to the multiple reference call moments before allocating running resources to the target function; and filter out adjustment parameters from multiple first candidate parameters based on the time relationship between the multiple reference call moments and the multiple reference remaining amounts corresponding to the multiple reference call moments, wherein the target recovery duration corresponding to the adjustment parameter has a matching degree with the target function within the reference period that is greater than or equal to a matching threshold.
[0087] As an optional implementation, the second computing unit is further used to: update the reference model according to the reference call information and the reference usage information to obtain a target model, wherein the target model maintains the association between the time period and the call moment of the target function in the call information and the association between the time period and the remaining amount of running resources on the running device corresponding to the call moment in the usage information before the running resources are allocated to the target function, and the time period includes a reference period and a target period; use the target model to predict multiple target call moments within the target period and multiple target remaining amounts corresponding to the multiple target call moments; filter out an adjustment parameter from multiple second alternative parameters according to the time relationship between the multiple target call moments and the multiple target remaining amounts corresponding to the multiple target call moments, wherein the adjustment method indicated by the adjustment parameter is used to adjust the matching degree to be greater than or equal to the matching threshold within the target period.
[0088] As an optional implementation, the second generation module includes: a second extraction unit, used to extract a target value and an adjustment direction from the adjustment parameters, wherein the target value is used to indicate the adjustment amplitude of the initial recovery duration, and the adjustment direction includes an extension direction and a shortening direction; an adjustment unit, used to adjust the initial recovery duration by the target value along the adjustment direction to obtain the target recovery duration.
[0089] It should be noted that the detection module 301, the first generation module 302, the second generation module 303 and the adjustment module 304 correspond to steps S201 to S204 in Example 1, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules can also be part of the device and can be run in the computer terminal 10 provided in Example 1.
[0090] Example 3
[0091] An embodiment of the present application may provide an electronic device, Figure 4 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (only one is shown) processor 402, memory 404, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0092] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory 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 memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0093] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: detect the matching degree between the initial recovery time configured on the running device and the target function based on the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, wherein the reference call information is used to indicate the situation of the target function being called by the running device in the reference period, and the reference usage information is used to indicate the usage of the running resources on the running device in the reference period, and the initial recovery time is the time duration during which the target function is allowed to occupy the allocated running resources when the target function is called by the running device to run; generate an adjustment parameter for the initial recovery time based on the matching degree, wherein the adjustment parameter is used to indicate the adjustment method for the initial recovery time, and the adjustment method is used to adjust the matching degree to meet the matching condition between the initial recovery time and the target function; generate a target recovery time based on the adjustment parameter and the initial recovery time; and adjust the configuration on the running device from the initial recovery time to the target recovery time.
[0094] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: extract the reference call parameters of the target function from the reference call information, and extract the reference allocation parameters of the target function and multiple reference remaining parameters of the operating device from the reference usage information, wherein the reference call parameters are used to indicate the number of times the target function is called within the reference cycle, the reference allocation parameters are used to indicate the number of times the operating device allocates operating resources to the target function within the reference cycle, and each reference remaining parameter is used to indicate the remaining amount of operating resources of the operating device after the operating device allocates operating resources to the target function each time; calculate the matching degree based on the reference call parameters, the reference allocation parameters and the multiple reference remaining parameters.
[0095] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: calculate the parameter ratio of the reference call parameter and the reference allocation parameter, and calculate the average value of multiple reference remaining parameters; calculate the first difference between the parameter ratio and the ratio threshold, and calculate the second difference between the average value and the remaining threshold; calculate the matching degree based on the first difference and the second difference.
[0096] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: detect the size relationship between the matching degree and the matching threshold, wherein the matching condition is that the matching degree is greater than or equal to the matching threshold; when it is detected that the matching degree is greater than or equal to the matching threshold, determine the adjustment parameter to indicate that the adjustment method for the initial recovery time is not to adjust; when it is detected that the matching degree is less than the matching threshold, calculate the adjustment parameter based on the reference call information and the reference usage information.
[0097] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: extract multiple reference call times when the target function is called within the reference period from the reference call information; search from the reference usage information for multiple reference remaining amounts of running resources on the running device corresponding to the multiple reference call times before allocating running resources to the target function; and filter out adjustment parameters from multiple first candidate parameters based on the time relationship between the multiple reference call times and the multiple reference remaining amounts corresponding to the multiple reference call times, wherein the target recovery time corresponding to the adjustment parameter has a matching degree with the target function within the reference period that is greater than or equal to a matching threshold.
[0098] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: update the reference model according to the reference call information and the reference usage information to obtain the target model, wherein the target model maintains the association relationship between the time period and the call time of the target function in the call information and the association relationship between the time period and the remaining amount of running resources on the running device corresponding to the call time in the usage information before the running resources are allocated to the target function, and the time period includes a reference period and a target period; use the target model to predict multiple target call moments within the target period and multiple target remaining amounts corresponding to the multiple target call moments; filter out adjustment parameters from multiple second alternative parameters according to the time relationship between the multiple target call moments and the multiple target remaining amounts corresponding to the multiple target call moments, wherein the adjustment method indicated by the adjustment parameter is used to adjust the matching degree to be greater than or equal to the matching threshold within the target period.
[0099] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: extract the target value and adjustment direction from the adjustment parameters, wherein the target value is used to indicate the adjustment amplitude of the initial recovery time, and the adjustment direction includes an extension direction and a shortening direction; the initial recovery time is adjusted to the target value along the adjustment direction to obtain the target recovery time.
[0100] According to an embodiment of the present application, a function call parameter adjustment scheme is provided, which detects the degree of match between the initial recovery time configured on the running device and the target function based on the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device, and then generates an adjustment parameter for the initial recovery time based on the matching degree, generates the target recovery time based on the adjustment parameter and the initial recovery time, and adjusts the configuration on the running device from the initial recovery time to the target recovery time. The degree of match between the initial recovery time and the target function is judged based on historical call conditions and historical resource usage conditions, and the adjustment parameter for the initial recovery time is generated based on the matching degree to further adjust the initial recovery time to the target recovery time that meets the matching condition with the target function as the new recovery time of the target function, that is, the recovery time of the target function is adjusted in combination with the specific running conditions, taking into account the function call frequency angle and the resource utilization angle, so that the recovery time of the function is set to be more in line with the specific running conditions of the function, solves the technical problem of low recovery efficiency of function recovery caused by the inflexible recovery scheme of the function, and achieves the technical effect of improving the recovery efficiency of function recovery.
[0101] It can be understood by those skilled in the art that Figure 4The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 4 The structure of the electronic device is not limited. Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4 Different configurations are shown.
[0102] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0103] Example 4
[0104] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for adjusting function call parameters provided in the first embodiment.
[0105] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0106] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program steps of the method for adjusting function call parameters.
[0107] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0108] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0109] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0113] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for adjusting function call parameters, characterized in that: include: Detecting the degree of match between the initial recycling duration configured on the running device and the target function according to reference call information of the target function on the running device in a reference period before the current moment and reference usage information of the running device, wherein the reference call information is used to indicate the situation in which the target function is called by the running device in the reference period, the reference usage information is used to indicate the usage of the running resources on the running device in the reference period, and the initial recycling duration is the duration in which the target function is allowed to occupy the allocated running resources when the target function is called and run by the running device; generating an adjustment parameter for the initial recycling duration according to the matching degree, wherein the adjustment parameter is used to indicate an adjustment method for the initial recycling duration, and the adjustment method is used to adjust the matching degree to satisfy a matching condition between the initial recycling duration and the objective function; Generate a target recycling duration according to the adjustment parameter and the initial recycling duration; The configuration on the running device is adjusted from the initial recycling duration to the target recycling duration.
2. The method according to claim 1, characterized in that: The detecting the matching degree between the initial recycling duration configured on the running device and the target function according to the reference call information of the target function on the running device in the reference period before the current moment and the reference usage information of the running device includes: Extracting reference call parameters of the target function from the reference call information, and extracting reference allocation parameters of the target function and a plurality of reference remaining parameters of the operating device from the reference usage information, wherein the reference call parameters are used to indicate the number of times the target function is called within the reference cycle, the reference allocation parameters are used to indicate the number of times the operating device allocates operating resources to the target function within the reference cycle, and each of the reference remaining parameters is used to indicate the remaining amount of the operating resources of the operating device after the operating device allocates operating resources to the target function each time; The matching degree is calculated according to the reference call parameter, the reference allocation parameter and a plurality of the reference remaining parameters.
3. The method according to claim 2, characterized in that The calculating the matching degree according to the reference call parameter, the reference allocation parameter and the plurality of reference remaining parameters comprises: calculating a parameter ratio of the reference call parameter to the reference allocation parameter, and calculating an average value of a plurality of the reference remaining parameters; calculating a first difference between the parameter ratio and a ratio threshold, and calculating a second difference between the average value and a residual threshold; The matching degree is calculated according to the first difference and the second difference.
4. The method according to claim 1, characterized in that: Generating the adjustment parameter of the initial recycling time according to the matching degree includes: Detecting a magnitude relationship between the matching degree and a matching threshold, wherein the matching condition is that the matching degree is greater than or equal to the matching threshold; In the case where it is detected that the matching degree is greater than or equal to the matching threshold, determining that the adjustment parameter is used to indicate that the adjustment mode of the initial recycling time is not to adjust; When it is detected that the matching degree is less than the matching threshold, the adjustment parameter is calculated according to the reference calling information and the reference using information.
5. The method according to claim 4, characterized in that The calculating the adjustment parameter according to the reference call information and the reference usage information includes: Extracting a plurality of reference call times at which the target function is called within the reference period from the reference call information; Searching, from the reference usage information, a plurality of reference remaining amounts of the running resource on the running device corresponding to the plurality of reference call moments before the running resource is allocated to the target function; The adjustment parameter is selected from multiple first candidate parameters according to the time relationship between the multiple reference call moments and the multiple reference remaining amounts corresponding to the multiple reference call moments, wherein the degree of match between the target recovery duration corresponding to the adjustment parameter and the objective function within the reference period is greater than or equal to the matching threshold.
6. The method according to claim 4, characterized in that The calculating the adjustment parameter according to the reference call information and the reference usage information includes: updating a reference model according to the reference call information and the reference usage information to obtain a target model, wherein the target model maintains an association relationship between a time period and a call time of the target function in the call information and an association relationship between the time period and a remaining amount of the operating resource on the operating device corresponding to the call time in the usage information before the operating resource is allocated to the target function, the time period including the reference period and the target period; Using the target model to predict multiple target call moments within the target period and multiple target remaining amounts corresponding to the multiple target call moments; The adjustment parameter is selected from multiple second alternative parameters according to the time relationship between the multiple target call moments and the multiple target remaining amounts corresponding to the multiple target call moments, wherein the adjustment method indicated by the adjustment parameter is used to adjust the matching degree to be greater than or equal to the matching threshold within the target period.
7. The method according to claim 1, characterized in that The generating a target recycling duration according to the adjustment parameter and the initial recycling duration includes: Extracting a target value and an adjustment direction from the adjustment parameter, wherein the target value is used to indicate an adjustment amplitude of the initial recycling time, and the adjustment direction includes a lengthening direction and a shortening direction; The initial recycling time is adjusted by the target value along the adjustment direction to obtain the target recycling time.
8. A device for adjusting function call parameters, characterized in that: include: A detection module, configured to detect a degree of match between an initial recycling duration configured on the running device and the target function according to reference call information of the target function on the running device in a reference period before a current moment and reference usage information of the running device, wherein the reference call information is used to indicate a situation where the target function is called by the running device in the reference period, the reference usage information is used to indicate a situation where running resources on the running device are used in the reference period, and the initial recycling duration is a duration during which the target function is allowed to occupy the allocated running resources when the target function is called by the running device for execution; A first generating module, configured to generate an adjustment parameter of the initial recycling duration according to the matching degree, wherein the adjustment parameter is used to indicate an adjustment method for the initial recycling duration, and the adjustment method is used to adjust the matching degree to satisfy a matching condition between the initial recycling duration and the objective function; A second generating module, configured to generate a target recycling duration according to the adjustment parameter and the initial recycling duration; The adjustment module is used to adjust the configuration on the running device from the initial recycling time to the target recycling time.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the method for adjusting function call parameters according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Equipment running time scheduling method and device, equipment and computer readable medium
CN112183942A
Server-free computing dynamic dormancy method for resource optimization in edge scene and application
CN115543450A
Handle resource monitoring method and device, storage medium, electronic equipment and vehicle
CN116431298A
Memory recovery processing method and device, electronic equipment and storage medium
CN118363877A
Method for adjusting operating state of application, terminal and storage medium
WO2023241052A1