Controller speed limiting method, device, equipment and product

By obtaining the key value and return feature code of the resource to be re-entered in the controller, calculating its re-entering time and performing delayed enqueue operations, the deadlock problem caused by tuning failure in the existing technology is solved, reducing resource waste and improving the operating efficiency of the controller.

CN119583459AActive Publication Date: 2025-03-07CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411785763.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-07
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

When the tuning fails, the existing controller speed limit scheme fails to achieve the deadlock due to the failure of external preconditions, and the speed limit is not large enough, resulting in the waste of computing resources and network resources.

Method used

By obtaining the key value and return feature code of the resource to be re-entered, it determines its return point in the tuning process, and calculates the re-entering time based on the return feature code and key value, and performs a delayed enqueue operation to limit the speed.

Benefits of technology

It effectively avoids deadlocks, reduces the waste of computing resources and network resources in the controller and cluster, and improves the operating efficiency of the controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583459A_ABST
    Figure CN119583459A_ABST
Patent Text Reader

Abstract

The invention provides a controller speed limiting method, device, equipment and product, and the method comprises the steps: obtaining a key value and a return feature code of a resource to be enqueued again; wherein the return feature codes are sent by the tuning process according to return point locations of the resources to be enqueued again in the tuning process, and each return point location of the tuning process corresponds to one return feature code; determining the re-enqueue time of the resource to be re-enqueued according to the key value and the returned feature code; and according to the re-enqueueing time, executing a delayed enqueueing operation of the resource to be re-enqueued. According to the key value and the return feature code of the resource to be enqueued again, the return point location of the resource in the tuning process is obtained, the enqueueing time is determined, and the delay enqueueing operation is executed at the enqueueing time, so that the speed is limited when the external precondition required by the update state cannot be reached in the tuning process, the deadlock is avoided, and the tuning efficiency is improved. The problem of idle consumption of computing resources and network resources in a controller and a cluster is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing, big data and edge computing technology, and in particular to a controller speed limiting method, device, equipment and product. Background Art

[0002] The controller is an important component in Kubernetes. The controller reconciles the resources in Kubernetes (K8s) according to the expected state and the actual state to ensure that the desired state of the cluster matches the observed state. Figure 2 As shown in the figure, the controller mainly consists of two parts: Informer and Workqueue. The existing controller speed limit scheme has a comprehensive speed limit mechanism for Workqueue, including the restriction of requeue resources. However, it does not take into account that the failure of Reconcile may be caused by deadlock due to the failure to meet the external preconditions required for updating the status. Therefore, the speed limit is not strong enough and the effect is not obvious, resulting in the waste of computing resources and network resources in the controller and cluster. Summary of the invention

[0003] The purpose of the present invention is to provide a controller speed limiting method, device, equipment and product, which is used to solve the problem in the prior art that tuning failure may be caused by deadlock due to the inability to meet the external preconditions required for updating the status. Therefore, the speed limiting force is not strong enough and the effect is not obvious, resulting in the waste of computing resources and network resources in the controller and cluster.

[0004] To achieve the above object, an embodiment of the present invention provides a controller speed limiting method, which includes:

[0005] Obtaining the key value and return characteristic code of the resource to be re-queued; wherein the return characteristic code is sent by the tuning process according to the return point of the resource to be re-queued in the tuning process, and each return point of the tuning process corresponds to a return characteristic code;

[0006] Determining a requeuing time of the resource to be requeued according to the key value and the returned feature code;

[0007] According to the re-queuing time, a delayed enqueuing operation of the resource to be re-queued is performed.

[0008] Optionally, in the method, the returned feature code is related to one or more of the following information:

[0009] The code sequence in the code logic of the tuning process;

[0010] The code corresponding to the return point in the code logic;

[0011] The line number of the code corresponding to the return point.

[0012] Optionally, the method, wherein the determining the re-queuing time of the resource to be re-queued according to the key value and the returned feature code, comprises:

[0013] Determine the return frequency of the delayed enqueuing process of the resource to be re-queued according to the key value and the return feature code, and determine the resource record change state of the resource to be re-queued;

[0014] The re-queuing time of the resource to be re-queued is determined according to the return frequency and the resource record change status.

[0015] Optionally, in the method, the resource record change status includes one or more of the following:

[0016] The key value and the return characteristic code of the resource to be re-queued have no first record status of the pre-acquired record;

[0017] The key value and the return characteristic code of the resource to be re-queued both have a second record state of pre-acquired records;

[0018] The key value of the resource to be re-queued has a pre-acquisition record, and the return feature code has a third record state of no pre-acquisition record.

[0019] Optionally, the method, wherein determining the return frequency of the resource to be re-queued into the delayed enqueuing process according to the key value and the return feature code, comprises:

[0020] When the resource record change state is the first record state, determining the return frequency to be 1;

[0021] In the case where the resource record change state is the second record state, the return frequency is determined to be the previous return frequency plus 1; wherein the previous return frequency is the return frequency correspondingly determined when the return feature code was obtained last time;

[0022] When the resource record change state is the third record state, the return frequency is determined to be 1.

[0023] Optionally, the method, wherein determining the re-queuing time of the resource to be re-queued according to the return frequency and the resource record change state, comprises:

[0024] In a case where the resource record change state is the first record state, determining the first time as the re-queuing time;

[0025] When the resource record change state is the second record state, determining the later of the first time and the second time as the re-queuing time; wherein the second time is the re-queuing time correspondingly determined when the return feature code was obtained last time;

[0026] When the resource record change state is the third record state, determining the first time as the re-queuing time;

[0027] The first time is a time point after a delay time from the current time; the delay time is a time obtained by inputting the return frequency into a binary exponential backoff algorithm.

[0028] Optionally, in the method, when the resource record change state is a third record state, the method further comprises:

[0029] The resource to be requeued corresponding to the last time the key value was obtained is immediately requeued.

[0030] Optionally, the method, wherein the performing the delayed enqueuing operation of the resource to be requeued according to the requeuing time, includes:

[0031] At the re-queue time, the key value is sent to the work queue by starting an independent process and / or thread.

[0032] In order to achieve the above object, an embodiment of the present invention further provides a controller speed limiting device, which includes:

[0033] A first acquisition module is used to acquire a key value and a return feature code of a resource to be re-queued; wherein the return feature code is sent by a tuning process according to a return point of the resource to be re-queued in the tuning process, and each return point of the tuning process corresponds to a return feature code;

[0034] A first determination module, used for determining the re-queuing time of the resource to be re-queued according to the key value and the returned feature code;

[0035] The first processing module is used to perform a delayed enqueuing operation of the resource to be requeued according to the requeuing time.

[0036] To achieve the above objectives, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a program or instruction stored in the memory and executable on the processor; wherein the controller speed limiting method as described above is implemented when the processor executes the program or instruction.

[0037] To achieve the above objective, an embodiment of the present invention further provides a readable storage medium having a program or instruction stored thereon, wherein the program or instruction, when executed by a processor, implements the steps in the controller speed limiting method as described above.

[0038] To achieve the above objective, an embodiment of the present invention further provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, the steps of the controller speed limiting method described above are implemented.

[0039] The beneficial effects of the above technical solution of the present invention are as follows:

[0040] The embodiment of the present invention obtains the return point of the resource in the tuning process according to the key value and return feature code of the resource to be re-queued, determines the re-queuing time, and performs a delayed enqueuing operation at the re-queuing time, thereby limiting the speed when the external preconditions required for updating the status cannot be met in the tuning process, avoiding deadlock, and solving the problem of wasted computing resources and network resources in the controller and cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a controller speed limiting method according to an embodiment of the present invention;

[0042] Figure 2 It is a schematic diagram of the prior art;

[0043] Figure 3 A schematic diagram of a tuning process of a controller speed limiting method according to an embodiment of the present invention;

[0044] Figure 4 This is a flow chart of the controller speed limiting method according to an embodiment of the present invention;

[0045] Figure 5 It is a schematic diagram of a controller speed limiting device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0047] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0048] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0049] Additionally, the terms "system" and "network" are often used interchangeably herein.

[0050] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0051] For ease of understanding, some contents involved in the embodiments of the present invention are described below:

[0052] like Figure 1 As shown, a controller speed limiting method according to an embodiment of the present invention includes:

[0053] S10, obtaining the key value and return characteristic code of the resource to be re-queued; wherein the return characteristic code is sent by the tuning process according to the return point of the resource to be re-queued in the tuning process, and each return point of the tuning process corresponds to one return characteristic code;

[0054] It should be noted that if Figure 3 As shown, a Feedback Module is added after multiple processors in the reconcile process. If the required external precondition state has not changed, the same resource will be returned from the reconcile process at the same code. Therefore, if the same resource returns to the same position in the reconcile, it can be determined that the reconcile is invalid. By setting a corresponding return feature code at each return point, the Feedback Module can determine the specific return point according to the return feature code, so as to perform targeted speed limit processing, which can improve the operating efficiency of the controller and reduce the consumption of computing and network resources in the cluster.

[0055] S20, determining a re-queuing time of the resource to be re-queued according to the key value and the returned feature code;

[0056] It should be noted that the feedback module maintains a map (key-value pair), the key value of the map is the key value of the resource to be re-queued in the reconcile output parameter, and the value of the map is a struct (structure) containing the return feature code, a number indicating the number of occurrences of the return feature code, and the re-queuing time.

[0057] S30, performing a delayed enqueuing operation of the resource to be requeued according to the requeuing time.

[0058] In this embodiment, the return point of the resource in the tuning process is obtained based on the key value and the return feature code of the resource to be re-queued, the re-queuing time is determined, and a delayed enqueuing operation is performed at the re-queuing time, thereby limiting the speed when the external preconditions required for updating the status cannot be met in the tuning process, avoiding deadlock and solving the problem of wasted computing resources and network resources in the controller and cluster.

[0059] Optionally, in the method, the returned feature code is related to one or more of the following information:

[0060] The code sequence in the code logic of the tuning process;

[0061] The code corresponding to the return point in the code logic;

[0062] The line number of the code corresponding to the return point.

[0063] In this embodiment, the return feature code is set in the tuning process and can be numbered according to the order of the code, or the line number of the code can be directly used as the return feature code, or the output of the code corresponding to the return point input into the hash function can be used as the return feature code.

[0064] Optionally, in the method, step S20 includes:

[0065] Determine the return frequency of the delayed enqueuing process of the resource to be re-queued according to the key value and the return feature code, and determine the resource record change state of the resource to be re-queued;

[0066] The re-queuing time of the resource to be re-queued is determined according to the return frequency and the resource record change status.

[0067] In this embodiment, according to the occurrence of the key value and the occurrence of the return feature code, records are made and the return frequency is determined, thereby obtaining the re-queuing time.

[0068] Optionally, in the method, the resource record change status includes one or more of the following:

[0069] The key value and the return characteristic code of the resource to be re-queued have no first record status of the pre-acquired record;

[0070] The key value and the return characteristic code of the resource to be re-queued both have a second record state of pre-acquired records;

[0071] The key value of the resource to be re-queued has a pre-acquisition record, and the return feature code has a third record state of no pre-acquisition record.

[0072] In this embodiment, the first record state is the first appearance of the key value, and the return feature code also appears for the first time; the second record state is that the key value has a pre-acquired record, and the return feature code does not appear for the first time, that is, the same return point in the tuning process returns more than once; the third record state is that the key value does not appear for the first time, but the return feature code appears for the first time, that is, after a certain return point in the tuning process returned, the external precondition state changed, and it returned for the first time at another return point. Figure 4 As shown, after the process starts, in step S10, the key value (key) of the resource to be re-queued and the return feature code are obtained, and whether there is a record based on the key query is determined, and whether the return feature code is consistent, thereby dividing into the above three states.

[0073] Optionally, the method, wherein determining the return frequency of the resource to be re-queued into the delayed enqueuing process according to the key value and the return feature code, comprises:

[0074] When the resource record change state is the first record state, determining the return frequency to be 1;

[0075] In the case where the resource record change state is the second record state, the return frequency is determined to be the previous return frequency plus 1; wherein the previous return frequency is the return frequency correspondingly determined when the return feature code was obtained last time;

[0076] When the resource record change state is the third record state, the return frequency is determined to be 1.

[0077] In this embodiment, when the return feature code appears for the first time, the return frequency is set to 1. If the same return feature code appears again or multiple times, the return frequency is increased by 1. Generally speaking, if the return feature code changes, it means that the problem of the previous return point has been solved. The return feature code is updated to the newly appeared return feature code, and the corresponding return frequency is set to 1. Figure 4 As shown, when the answer of the key query whether there is an existing record is no, it is the first record state, and the frequency is 1; when the answer of the key query whether there is an existing record is yes, and the returned feature code is consistent is yes, it is the second record state, and the frequency in the record is increased by 1; when the answer of the key query whether there is an existing record is yes, and the returned feature code is consistent is no, it is the third record state, and the frequency in the record is reset to 1.

[0078] Optionally, the method, wherein determining the re-queuing time of the resource to be re-queued according to the return frequency and the resource record change state, comprises:

[0079] In a case where the resource record change state is the first record state, determining the first time as the re-queuing time;

[0080] When the resource record change state is the second record state, determining the later of the first time and the second time as the re-queuing time; wherein the second time is the re-queuing time correspondingly determined when the return feature code was obtained last time;

[0081] When the resource record change state is the third record state, determining the first time as the re-queuing time;

[0082] The first time is a time point after a delay time from the current time; the delay time is a time obtained by inputting the return frequency into a binary exponential backoff algorithm.

[0083] In this embodiment, in the case of the first recording state, the return frequency 1 is input into the binary exponential backoff algorithm to obtain the re-queuing time; in the case of the second recording state, the same return feature code appears again or multiple times, that is, the return point in the tuning process remains unchanged, and the state in which the required external preconditions cannot be reached has not changed, so the later of the first time and the second time is used as the re-queuing time, thereby maintaining the speed limit action for a longer time and reducing the consumption of computing and network resources in the cluster; in the case of the third recording state, the return feature code has changed, that is, the problem of the return point corresponding to the previous return feature code has been solved, so the first time is used as the re-queuing time. Figure 4 As shown, in step S20, in the case of the first recording state, the time for re-entry is calculated and two items (return frequency and re-entry time) are added to the record; in the case of the second recording state, the entry time is calculated according to the latest frequency, and if the entry time is later than the existing entry time, the record is updated (update the re-entry time) and the entry time in the re-entry operation; in the case of the third recording state, the entry time is calculated according to the latest frequency and the record is updated.

[0084] Optionally, in the method, when the resource record change state is a third record state, the method further comprises:

[0085] The resource to be requeued corresponding to the last time the key value was obtained is immediately requeued.

[0086] In this embodiment, in the case of the third recording state, the return feature code has changed, that is, the problem of the return point corresponding to the return feature code has been solved, so the resource to be re-queued corresponding to the last acquisition of the key value is immediately re-queued, and there is no need to delay the re-queuing, thereby improving the operating efficiency of the controller. Figure 4 As shown, in step S30, in the case of the third recording state, the original delayed queueing operation is immediately executed and the delayed queueing operation is re-executed according to the latest re-queuing time.

[0087] Optionally, in the method, step S30 includes:

[0088] At the re-queue time, the key value is sent to the work queue by starting an independent process and / or thread.

[0089] In this embodiment, the delayed enqueue operation of the resource to be re-queued is performed by starting an independent process and / or thread to send the key value to the work queue, and after the delayed enqueue operation is completed, the cache information corresponding to the resource to be re-queued is deleted. Figure 4 In step S30, in the case of the first recording state, the key is delayed in the queue according to the time of entering the queue; in the case of the second recording state, the key is delayed in the queue according to the time of entering the queue.

[0090] It should be noted that the embodiment of the present invention also provides an example, in which the controller includes the following logic when processing obj (target file) 1: it is desired to create a Pod (Pod is the basic scheduling unit of Kubernetes), and when the creation is successful, obj1 is processed.

[0091] After the controller sends a CREATE request to the K8s cluster, the K8s control logic completes the Pod creation. The controller executes reconcile to check whether the corresponding Pod is in the running state. If it is already running, it will execute the subsequent processing logic. If the Pod state is not running, it will report an error and re-queue it for processing.

[0092] If the Pod cannot be initialized when it is created, such as if there is no schedulable node for the Pod, the Pod will remain in the Pending state.

[0093] The controller will execute the requested Pod status every time it reconciles, and will return an error, obj key, and return feature code (the number of lines of code at the return point is used as the return feature code in this example) when it finds Pod Pending, and enter the feedback module. The feedback module will calculate the first time of the obj based on the key and return feature code, and the return frequency (how many times this obj is returned in reconciliation due to this error), and delay the re-queuing time of this obj to that time.

[0094] If the controller reconciles obj1 before the requeue time arrives and the Pod is still in the Pending state, an error will continue to be returned at the same position during the reconcile process. The feedback module updates the maintained data structure (return frequency) and calculates the first time. If this time is later than the existing requeue time of obj1 (the possibility of it being earlier or later is due to the exponential backoff algorithm), the requeue time of obj1 in the memory is updated, and a later time is selected for enqueueing.

[0095] If the Pod changes to running, the controller will directly reconcile obj1 due to the update of the Pod changing to the running state. It does not need to wait until the requeue time to execute the reconcile that will continue to execute the control logic backwards.

[0096] The embodiment of the present invention also provides an example, in which the controller contains the logic of updating obj2. When a large number of controllers in the cluster want to update obj2 at the same time, only one controller can update successfully at the same time. At this time, the request to update obj2 in this controller is likely to return an error. At this time, the controller will execute the code of updating obj2 and return every time it reconciles.

[0097] The controller will execute the update pod every time reconcile is executed. If an update request is found, reconcile returns an error, and enters the feedback module with the obj key and return feature code (the number of lines of code at the return point). The feedback module will calculate the return frequency (how many times this obj is returned in reconcile due to this error) based on the key and return feature code, obtain the first time of the obj, and delay the re-queuing time of the obj to that time.

[0098] If the controller reconciles obj2 again before the requeue time arrives, but reports an error for another request, an error will be reported at another return point in the reconcile process. The feedback module updates the maintained data structure (return feature code and return frequency) and calculates the first time, immediately executing the previous requeue operation and updating the requeue time of obj2 in the memory.

[0099] like Figure 5 As shown, in order to achieve the above purpose, an embodiment of the present invention further provides a controller speed limiting device, which includes:

[0100] The first acquisition module 501 is used to acquire the key value and return feature code of the resource to be re-queued; wherein the return feature code is sent by the tuning process according to the return point of the resource to be re-queued in the tuning process, and each return point of the tuning process corresponds to a return feature code;

[0101] A first determining module 502, configured to determine a re-queuing time of the resource to be re-queued according to the key value and the returned feature code;

[0102] The first processing module 503 is used to perform a delayed enqueuing operation of the resource to be requeued according to the requeuing time.

[0103] Optionally, in the device, the returned feature code is related to one or more of the following information:

[0104] The code sequence in the code logic of the tuning process;

[0105] The code corresponding to the return point in the code logic;

[0106] The line number of the code corresponding to the return point.

[0107] Optionally, in the device, the first determining module 502 includes:

[0108] A first determining unit, configured to determine a return frequency of the resource to be re-queued into a delayed enqueuing process according to the key value and the return feature code, and to determine a resource record change state of the resource to be re-queued;

[0109] The second determining unit is used to determine the re-queuing time of the resource to be re-queued according to the return frequency and the resource record change status.

[0110] Optionally, in the device, the resource record change status includes one or more of the following:

[0111] The key value and the return characteristic code of the resource to be re-queued have no first record status of the pre-acquired record;

[0112] The key value and the return characteristic code of the resource to be re-queued both have a second record state of pre-acquired records;

[0113] The key value of the resource to be re-queued has a pre-acquisition record, and the return feature code has a third record state of no pre-acquisition record.

[0114] Optionally, in the device, the first determining unit includes:

[0115] A first determining component, configured to determine that the return frequency is 1 when the resource record change state is a first record state;

[0116] A second determination component is used to determine, when the resource record change state is the second record state, that the return frequency is the previous return frequency plus 1; wherein the previous return frequency is the return frequency correspondingly determined when the return feature code was obtained last time;

[0117] The third determining component is used to determine that the return frequency is 1 when the resource record change state is a third record state.

[0118] Optionally, in the device, the second determining unit includes:

[0119] A fourth determining component, configured to determine, when the resource record change state is the first record state, a first time as the re-queuing time;

[0120] A fifth determination component, used for determining, when the resource record change state is the second record state, the later of the first time and the second time as the re-queuing time; wherein the second time is the re-queuing time correspondingly determined when the return feature code was obtained last time;

[0121] A sixth determining component, configured to determine, when the resource record change state is a third record state, that the first time is the re-queuing time;

[0122] The first time is a time point after a delay time from the current time; the delay time is a time obtained by inputting the return frequency into a binary exponential backoff algorithm.

[0123] Optionally, the device further comprises:

[0124] The second processing module is used to immediately re-queue the resource to be re-queued corresponding to the last time the key value was obtained.

[0125] Optionally, in the device, the first processing module 503 includes:

[0126] The first sending unit is used to send the key value to the work queue by starting an independent process and / or thread at the re-queue time.

[0127] To achieve the above objectives, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a program or instruction stored in the memory and executable on the processor; wherein the controller speed limiting method as described above is implemented when the processor executes the program or instruction.

[0128] To achieve the above objective, an embodiment of the present invention further provides a readable storage medium having a program or instruction stored thereon, wherein the program or instruction, when executed by a processor, implements the steps in the controller speed limiting method as described above.

[0129] It should be further explained that the terminals described in this specification include but are not limited to smart phones, tablet computers, etc., and many of the functional components described are called modules in order to more particularly emphasize the independence of their implementation methods.

[0130] In the embodiment of the present invention, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.

[0131] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.

[0132] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.

[0133] To achieve the above objective, an embodiment of the present invention further provides a computer program product, which includes computer instructions, and when the computer instructions are executed by a processor, the steps of the controller speed limiting method described above are implemented.

[0134] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present invention. Therefore, the present invention should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present invention will be perfect and complete, and the scope of the present invention will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "including" and / or "comprising" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values ​​includes the upper and lower limits of that range and any subranges therebetween.

[0135] The above is a preferred embodiment of the present invention. 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 invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A controller speed limiting method, characterized in that: include: Obtaining the key value and return characteristic code of the resource to be re-queued; wherein the return characteristic code is sent by the tuning process according to the return point of the resource to be re-queued in the tuning process, and each return point of the tuning process corresponds to a return characteristic code; Determining a requeuing time of the resource to be requeued according to the key value and the returned feature code; According to the re-queuing time, a delayed enqueuing operation of the resource to be re-queued is performed.

2. The method according to claim 1, characterized in that The returned feature code is related to one or more of the following information: The code sequence in the code logic of the tuning process; The code corresponding to the return point in the code logic; The line number of the code corresponding to the return point.

3. The method according to claim 1, characterized in that The step of determining the re-queuing time of the resource to be re-queued according to the key value and the returned feature code includes: Determine the return frequency of the delayed enqueuing process of the resource to be re-queued according to the key value and the return feature code, and determine the resource record change state of the resource to be re-queued; The re-queuing time of the resource to be re-queued is determined according to the return frequency and the resource record change status.

4. The method according to claim 3, characterized in that: The resource record change status includes one or more of the following: The key value and the return characteristic code of the resource to be re-queued have no first record status of the pre-acquired record; The key value and the return characteristic code of the resource to be re-queued both have a second record state of pre-acquired records; The key value of the resource to be re-queued has a pre-acquisition record, and the return feature code has a third record state of no pre-acquisition record.

5. The method according to claim 4, characterized in that Determining the return frequency of the delayed enqueuing process of the resource to be re-enqueued according to the key value and the return feature code includes: When the resource record change state is the first record state, determining the return frequency to be 1; In the case where the resource record change state is the second record state, the return frequency is determined to be the previous return frequency plus 1; wherein the previous return frequency is the return frequency correspondingly determined when the return feature code was obtained last time; When the resource record change state is the third record state, the return frequency is determined to be 1.

6. The method according to claim 4, characterized in that Determining the re-queuing time of the resource to be re-queued according to the return frequency and the resource record change state includes: In a case where the resource record change state is the first record state, determining the first time as the re-queuing time; When the resource record change state is the second record state, determining the later of the first time and the second time as the re-queuing time; wherein the second time is the re-queuing time correspondingly determined when the return feature code was obtained last time; When the resource record change state is the third record state, determining the first time as the re-queuing time; The first time is a time point after a delay time from the current time; the delay time is a time obtained by inputting the return frequency into a binary exponential backoff algorithm.

7. The method according to claim 6, characterized in that When the resource record change state is a third record state, the method further includes: The resource to be requeued corresponding to the last time the key value was obtained is immediately requeued.

8. The method according to claim 1, characterized in that The step of performing a delayed queueing operation of the resource to be requeued according to the requeuing time includes: At the re-queue time, the key value is sent to the work queue by starting an independent process and / or thread.

9. A controller speed limiting device, characterized in that: include: A first acquisition module is used to acquire a key value and a return feature code of a resource to be re-queued; wherein the return feature code is sent by a tuning process according to a return point of the resource to be re-queued in the tuning process, and each return point of the tuning process corresponds to a return feature code; A first determination module, used for determining the re-queuing time of the resource to be re-queued according to the key value and the returned feature code; The first processing module is used to perform a delayed enqueuing operation of the resource to be requeued according to the requeuing time.

10. An electronic device, comprising: A processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that when the processor executes the program or instruction, the controller speed limiting method as described in any one of claims 1-8 is implemented.

11. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, the steps in the controller speed limiting method according to any one of claims 1 to 8 are implemented.

12. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the controller speed limiting method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Message sending method and device, node equipment and storage medium

    CN111245745A

  • Job scheduling method and device based on priority queue

    CN115237577A

  • Operation control method and device, electronic equipment and storage medium

    CN118113303A

  • Systems, Apparatuses and Methods for Network Packet Management

    US20180048567A1

  • System and method for dequeue optimization using conditional iteration

    US20180324129A1