Resource management method, device and system, storage medium and electronic equipment

By detecting the task processing time status and releasing resources, the problem of downstream service pressure in multi-service systems is solved, system crashes are avoided, and system stability and resource management efficiency are improved.

CN119149235APending Publication Date: 2024-12-17DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411284694.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In multi-service systems, downstream services are prone to timeouts due to insufficient instance resources or excessive database load, resulting in concentrated pressure and even system crashes. The existing technology is difficult to effectively solve this problem.

Method used

By detecting the processing time status of the task, if the timeout is exceeded, the resources dependent on the target task will be released, and the downstream service will be notified to perform resource release operations, and the timeout processing indication information will be passed to the upstream service so that the upstream service can manage the task and reduce the pressure on downstream services.

Benefits of technology

It effectively reduces the pressure on downstream services, avoids system crashes, improves system stability and reliability, and prevents resource leakage and system performance degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149235A_ABST
    Figure CN119149235A_ABST
Patent Text Reader

Abstract

The invention provides a resource management method, device and system, a storage medium and electronic equipment, and the method comprises the steps: detecting the processing time state of each task in at least one task; when the target task of which the processing time state is the timeout state is detected, performing resource release on the target task; target downstream service equipment of the target service equipment is determined, the target downstream service equipment is notified to execute target resource release operation, and the target resource release operation supports resources which the target task depends on in the target downstream service equipment; and when the target upstream service equipment exists in the target service equipment, transmitting the timeout processing indication information to the target upstream service equipment, so that the target upstream service equipment performs task management on the target task based on the timeout processing indication information. According to the embodiment of the invention, the pressure of downstream service can be effectively reduced through resource management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a resource management method, device, system, storage medium and electronic equipment. Background Art

[0002] At present, when a multi-service (i.e., service device, also called server) system faces high concurrent task requests, downstream services will have a large number of timeouts due to insufficient instance resources, high database load, etc. In this case, related technologies usually implement a timeout retry mechanism (i.e., automatic retry, such as requesting the target task from the downstream service again) when the upstream service finds that the target task in the downstream service has timed out, resulting in increasing pressure on the downstream service and even overwhelming the entire system. Based on this, there is currently no good solution for how to manage resources to reduce the pressure on downstream services. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a resource management method, device, system, storage medium and electronic device to solve the problem that related technologies cause high pressure on downstream services and even overwhelm the entire system. In other words, an embodiment of the present invention can release the resources relied on by the target task whose processing time status is a timeout state through resource management, so as to effectively reduce the pressure on the target service device and the target downstream service device, thereby effectively reducing the pressure on the downstream services, and then avoiding the pressure on the downstream services from becoming increasingly greater, which can effectively avoid the downstream service pressure from being too high and overwhelmed the entire system.

[0004] According to one aspect of an embodiment of the present invention, a resource management method is provided, the method being applied to a target service device in a resource management system, the resource management system comprising a plurality of service devices, the target service device being any service device among the plurality of service devices, one service device having M upstream service devices and N downstream service devices in the resource management system, a task in one service device being dependent on a downstream service device of the corresponding service device, and M and N being both non-negative integers; the method comprising:

[0005] detecting a processing time status of each task in at least one task;

[0006] When detecting that the processing time status of a target task is in a timeout status, releasing resources for the target task;

[0007] Determine a target downstream service device of the target service device, and notify the target downstream service device to perform a target resource release operation, where the target resource release operation supports releasing resources that the target task depends on in the target downstream service device;

[0008] When the target service device has a target upstream service device, the timeout processing indication information is transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information.

[0009] According to another aspect of an embodiment of the present invention, a resource management device is provided, the device running on a target service device in a resource management system, the resource management system including multiple service devices, the target service device being any service device among the multiple service devices, one service device having M upstream service devices and N downstream service devices in the resource management system, a task in one service device being dependent on a downstream service device of the corresponding service device, M and N being both non-negative integers; the device comprising:

[0010] a processing unit, configured to detect a processing time status of each task in at least one task;

[0011] The processing unit is further configured to release resources for the target task when detecting that the processing time status of the target task is in a timeout status;

[0012] The processing unit is further used to determine a target downstream service device of the target service device;

[0013] a notification unit, configured to notify the target downstream service device to execute a target resource release operation, wherein the target resource release operation supports releasing resources that the target task depends on in the target downstream service device;

[0014] The notification unit is further configured to transmit timeout processing indication information to the target upstream service device when there is a target upstream service device for the target service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information.

[0015] According to another aspect of an embodiment of the present invention, a resource management system is provided, which includes multiple service devices, one service device has M upstream service devices and N downstream service devices in the resource management system, a task in one service device depends on the downstream service devices of the corresponding service device, and M and N are both non-negative integers; wherein the target service device in the resource management system is used to execute the above-mentioned method.

[0016] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor and a memory storing a program, wherein the program comprises instructions, which, when executed by the processor, enable the processor to perform the above-mentioned method.

[0017] According to another aspect of an embodiment of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method.

[0018] The embodiment of the present invention can detect the processing time status of each task in at least one task; when a target task whose processing time status is a timeout status is detected, the target task is released for resource release. Based on this, the target downstream service device of the target service device can be determined, and the target downstream service device can be notified to perform a target resource release operation, and the target resource release operation supports the release of resources that the target task depends on in the target downstream service device; when the target service device has a target upstream service device, the timeout processing indication information is transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information. It can be seen that the embodiment of the present invention can release the resources that the target task whose processing time status is a timeout status depends on through resource management, so as to effectively reduce the pressure of the target service device and the target downstream service device, thereby effectively reducing the pressure of the downstream service, and then avoiding the increasing pressure of the downstream service, which can effectively avoid the excessive pressure of the downstream service and crushing the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Further details, features and advantages of the invention are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0020] Figure 1 A schematic diagram of a process of a resource management method according to an exemplary embodiment of the present invention is shown;

[0021] Figure 2 A schematic diagram showing a flow chart of another resource management method according to an exemplary embodiment of the present invention is shown;

[0022] Figure 3 A schematic diagram of a resource management system according to an exemplary embodiment of the present invention is shown;

[0023] Figure 4 A schematic diagram showing a resource management device according to an exemplary embodiment of the present invention is shown;

[0024] Figure 5 A block diagram of an exemplary electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0025] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0026] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0027] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0030] It should be noted that an embodiment of the present invention may involve a resource management system, which may include but is not limited to: multiple service devices, one service device has M upstream service devices and N downstream service devices in the resource management system, and the tasks in one service device depend on the downstream service devices of the corresponding service device, and M and N are both non-negative integers; wherein the resource management system includes a target service device, and the target service device can be any service device among the multiple service devices, and one service device can be an electronic device.

[0031] In an embodiment of the present invention, the resource management method provided by the embodiment of the present invention can be applied to a target service device in a resource management system, that is, the execution subject of the resource management method provided by the embodiment of the present invention can be a target service device, that is, the execution subject of the resource management method provided by the embodiment of the present invention can be any service device in the resource management system.

[0032] Optionally, the electronic device may be a terminal (i.e., a client) or a server. The terminals mentioned here may include, but are not limited to, smart phones, tablet computers, laptop computers, desktop computers, smart watches, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, and the like. The server mentioned here may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, and the like.

[0033] Based on the above description, an embodiment of the present invention proposes a resource management method, which can be applied to a target service device in a resource management system. The resource management system may include multiple service devices. The target service device may be any service device among the multiple service devices. A service device has M upstream service devices and N downstream service devices in the resource management system. Figure 1 As shown, the resource management method may include the following steps S101-S104:

[0034] S101, detecting a processing time status of each task in at least one task.

[0035] Optionally, at least one task may include all tasks being run in the target service device, or may include all unfinished tasks in the target service device (such as tasks being run or waiting to be run), etc.; this is not limited in the embodiment of the present invention. Optionally, a task may also be referred to as a task request (also referred to as a request for short).

[0036] Among them, the processing time status of a task can be a timeout state or a non-timeout state. When the processing time status of a task is a timeout state, it means that the processing of the corresponding task has timed out (that is, the corresponding task has timed out). When the processing time status of a task is a non-timeout state, it means that the processing of the corresponding task has not timed out (that is, the corresponding task has not timed out).

[0037] S102, when it is detected that the target task has a processing time status of a timeout state, releasing resources for the target task.

[0038] Optionally, the number of target tasks may be H, where H is a non-negative integer; in an embodiment of the present invention, each task in at least one task whose processing time state is a timeout state may be used as a target task (i.e., a timeout task). In an embodiment of the present invention, the target service device may stop the target task, i.e., terminate the target task.

[0039] It should be understood that when there are multiple target tasks, the target service device can release resources for each of the multiple target tasks to release the resources that each target task depends on. For ease of explanation, the following description will be made using one target task as an example.

[0040] Based on this, when detecting that the target task has a processing time status of a timeout state, the target service device can actively release the resources that the target task depends on to prevent resource leakage and excessive occupation of system resources.

[0041] Optionally, the released resources may include but are not limited to: server I / O (input / output) resources and database resources that the target task depends on, etc., which are not limited in the embodiment of the present invention. Accordingly, when releasing resources for the target task, the file handle opened for processing the target task may be closed (i.e., the file handle opened under the target task is closed); and / or, the database connection occupied by the target task may be released (i.e., the database connection occupied by the target task is released); and / or, the network request that is not completed for processing the target task may be canceled (i.e., the uncompleted network request under the target task is canceled), etc.; the embodiment of the present invention does not limit this.

[0042] Optionally, different release strategies may be used for different types of resources, that is, different types of resources support being released according to different release strategies. For example, for the release of file handles, RAII (Resource Acquisition Is Initialization) and other automated means may be used for release; for the release of database connections, connection pool management and other methods may be used for release, so that the database connection occupied by the target task is returned to the connection pool for use by tasks other than the target task, etc. Based on this, the embodiments of the present invention can provide a detailed and robust resource release mechanism.

[0043] S103, determining a target downstream service device of the target service device, and notifying the target downstream service device to execute a target resource release operation, where the target resource release operation supports releasing resources that the target task depends on in the target downstream service device.

[0044] Optionally, the target service device may use all downstream service devices used to process subtasks of the target task as target downstream service devices, the subtasks of the target task may refer to the task requests issued for processing the target task, and the downstream service devices used to process subtasks of the target task may refer to the downstream service devices that issue subtasks of the target task; or, each downstream service device of the target service device may be used as a target downstream service device, and so on; the embodiments of the present invention are not limited to this. It should be understood that when a target downstream service device receives a notification to perform a target resource release operation, if the subtasks of the target task do not exist in the target downstream service device (i.e., the subtask request sent by the target service device for the target task is not received), then the target downstream service device may not perform any operation. Optionally, if the target downstream service device is a downstream service device for processing subtasks of the target task, then when the target service device sends any subtask of the target task, it may record the sending indication information of any subtask (which can be used to indicate the downstream service device to which any subtask is sent). In this case, the target service device may determine the downstream service device for processing the subtask of the target task based on the recorded sending indication information, so as to determine the target downstream service device; Optionally, the sending indication information of any subtask may include but is not limited to at least one of the following: the service device identifier of the downstream service device to which any task is sent, the task identifier of the target task, and the task identifier of any subtask, etc., which is not limited in the embodiment of the present invention. Optionally, the service device identifier of a service device may be a service device name, or a service device number, etc., which is not limited in the embodiment of the present invention; Optionally, the task identifier of a task may be a task number, or a task name, etc., which is not limited in the embodiment of the present invention.

[0045] Based on this, the target service device can notify the target downstream service device to stop the corresponding task, that is, terminate the subtask of the target task in the target downstream service device, that is, the task request sent by the target service device to the target downstream service device for the target task (here it can be the subtask of the target task) can be terminated.

[0046] Optionally, the number of target downstream service devices may be P, where P is a non-negative integer, which is not limited in the embodiment of the present invention. Optionally, when the value of P is greater than 1, that is, when the number of target downstream service devices is multiple, the target service device may separately notify each of the multiple target downstream service devices to perform a target resource release operation; optionally, the target resource release operations performed by different target downstream service devices may be the same or different, that is, the resources released by different target downstream service devices performing target resource release operations may be the same or different, which is not limited in the embodiment of the present invention. For ease of explanation, the following explanation will be given using one target downstream service device as an example.

[0047] It should be understood that when the target downstream service device does not exist, that is, the number of target downstream service devices is zero, the target service device may not trigger the execution of the above-mentioned notification of the target downstream service device to perform the target resource release operation; when the number of target downstream service devices is not zero, that is, the target downstream service device exists, it may trigger the execution of the above-mentioned notification of the target downstream service device to perform the target resource release operation.

[0048] S104: When there is a target upstream service device for the target service device, the timeout processing indication information is transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information.

[0049] Optionally, the number of target upstream service devices may be Q, where Q is a non-negative integer, which is not limited in the embodiments of the present invention. Optionally, the target upstream service device may include an upstream service device that issues a target task to the target service device, that is, the upstream service device that issues the target task may be used as the target upstream service device; or, the target upstream service device may include all upstream service devices of the target service device, that is, all upstream service devices of the target service device may be used as the target upstream service device, and so on; this is not limited in the embodiments of the present invention. For ease of explanation, the target upstream service device will be taken as an upstream service device that issues a target task to the target service device as an example for explanation in the following.

[0050] Optionally, the timeout processing indication information may include but is not limited to at least one of the following: a task identifier of the target task, a timeout status identifier (which can be used to indicate that the processing time status is a timeout status), a first timeout processing process completion identifier (which can be used to indicate that the target service device has completed the timeout processing process for the target task), and a second timeout processing process completion identifier (which can be used to indicate that the target service device and the target downstream service device have completed the timeout processing process for the target task), etc.; the embodiment of the present invention does not limit this. Among them, the timeout processing process of a task may include but is not limited to at least one of the following: a resource release process and a thread return process for the corresponding task, etc., which are not limited in the embodiment of the present invention.

[0051] Optionally, the timeout status flag, the first timeout processing process completion flag, and the second timeout processing process completion flag can all be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this. Optionally, the target service device can transmit the timeout processing indication information to the target upstream service device by means of an asynchronous message or a callback function, and the embodiment of the present invention does not limit this; based on this, the embodiment of the present invention can implement an upstream system notification mechanism, wherein the upstream system notification mechanism needs to match the architecture and communication protocol of the upstream system (i.e., the upstream service device).

[0052] Based on this, the target service device can report the processing timeout to the target upstream service device so that the target upstream service device can take appropriate measures. Optionally, when the target upstream service device performs task management on the target task based on the timeout processing indication information, the target upstream service device can retry the target task, that is, re-issue the target task, such as when the task level of the target task is greater than the preset level; or, the target task can be downgraded, such as the task level of the target task can be reduced by one task level, then when the task level of the target task is less than or equal to the preset level, the target task can no longer be requested, that is, the target task can no longer be re-issued, and so on; the embodiment of the present invention does not limit this. In this case, a task can correspond to an initial task level; the initial task levels of different tasks can be the same or different, and the embodiment of the present invention does not limit this. Optionally, the initial task level and preset level of a task can be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this.

[0053] In the embodiment of the present invention, timeout processing is a crucial function, which not only improves the reliability and stability of the system, but also enables the target service device to actively handle request timeouts caused by network delays, resource bottlenecks, etc., thereby effectively reducing resource usage.

[0054] The embodiment of the present invention can detect the processing time status of each task in at least one task; when a target task whose processing time status is a timeout status is detected, the target task is released for resource release. Based on this, the target downstream service device of the target service device can be determined, and the target downstream service device can be notified to perform a target resource release operation, and the target resource release operation supports the release of resources that the target task depends on in the target downstream service device; when the target service device has a target upstream service device, the timeout processing indication information is transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information. It can be seen that the embodiment of the present invention can release the resources that the target task whose processing time status is a timeout status depends on through resource management, so as to effectively reduce the pressure of the target service device and the target downstream service device, thereby effectively reducing the pressure of the downstream service, and then avoiding the increasing pressure of the downstream service, which can effectively avoid the excessive pressure of the downstream service and crushing the entire system.

[0055] Based on the above description, the embodiment of the present invention further proposes a more specific resource management method, which can be applied to a target service device in a resource management system. The resource management system may include multiple service devices. The target service device may be any service device among the multiple service devices. A service device has M upstream service devices and N downstream service devices in the resource management system; see Figure 2 , the resource management method may include the following steps S201-S205:

[0056] S201, detecting a processing time status of each task in at least one task.

[0057] Among them, each task is transmitted to the target service device by the corresponding upstream service device of the target service device, that is, a task in the target service device can be transmitted by an upstream service device of the target service device, that is, it can be issued to the target service device by an upstream service device of the target service device. In other words, one task can correspond to one upstream service device, that is, one task can correspond to the upstream service device that transmits the corresponding task.

[0058] In one embodiment, for any task among at least one task, the target service device may receive the initial timeout determination time of any task transmitted by the upstream service device corresponding to any task; and based on the initial timeout determination time, determine the target timeout determination time of any task; when the processing time of any task exceeds the target timeout determination time, it may be determined that the processing time state of any task is a timeout state; when the processing time of any task does not exceed the target timeout determination time, it may be determined that the processing time state of any task is a non-timeout state, so as to detect the processing time state of any task. Optionally, the processing time (i.e., execution time) of any task may be the difference between the current system time and the start processing time of any task, or the difference between the current system time and the receiving time of any task, and so on; this is not limited in the embodiment of the present invention.

[0059] Optionally, when determining the target timeout determination time of any task based on the initial timeout determination time, a preset timeout determination time may be determined, and the minimum time between the initial timeout determination time and the preset timeout determination time (i.e., min (initial timeout determination time, preset timeout determination time)) is used as the target timeout determination time; or, the initial timeout determination time may be used as the target timeout determination time, and so on; the embodiments of the present invention do not limit this. Optionally, the preset timeout determination time may be set according to experience or according to actual needs, and the embodiments of the present invention do not limit this.

[0060] Optionally, the initial timeout determination time may be determined based on the network status when the corresponding upstream service device sends any task, that is, the upstream service device corresponding to any task may determine the initial timeout determination time based on the current network status when sending any task. For example, a network status level may correspond to a timeout determination time, and the timeout determination time corresponding to the network status level of the current network status may be used as the initial timeout determination time. A network status level may correspond to a network status interval (such as a network transmission speed interval). In this case, the better the network status indicated by a network status level, the shorter the timeout determination time corresponding to the corresponding network status level; or, the initial timeout determination time may be a preset timeout time threshold in the corresponding upstream service device, and so on; the embodiment of the present invention does not limit this. Optionally, the preset timeout time threshold may be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this.

[0061] Optionally, the default timeout times in different service devices (such as the preset timeout determination time in the target service device or the preset timeout threshold in the upstream service device corresponding to any task, etc.) may be the same or different, and this is not limited in the embodiment of the present invention.

[0062] In another embodiment, for any task among at least one task, the upstream service device corresponding to any task can detect the processing time status of any task based on the initial timeout determination time of any task; based on this, if it is detected that the processing time status of any task is a timeout status, the upstream service device corresponding to any task can issue a timeout processing instruction for any task to the target service device, so that the target service device detects that the processing time status of any task is a timeout status, that is, the target service device can determine that the processing time status of any task is a timeout status when detecting the timeout processing instruction of any task; if the target service device does not receive the timeout processing instruction of any task, it can determine that the processing time status of any task is not a timeout status, so as to realize the detection of the processing time status of any task.

[0063] Exemplarily, after the upstream service device corresponding to any task issues any task, if the task execution result of any task is not received within the initial timeout determination time, the processing time status of any task is determined to be a timeout state; if the detection duration does not exceed the initial timeout determination time or the task execution result of any task is received within the initial timeout determination time, the processing time status of any task can be determined to be a non-timeout state, and so on; the embodiment of the present invention does not limit the implementation method of the upstream service device corresponding to any task detecting the processing time status of any task.

[0064] In another embodiment, the target service device may determine that the processing time status of any task is a timeout state when it receives a timeout processing instruction for any task, or when the processing time of any task exceeds the target timeout determination time; correspondingly, the target service device may determine that the processing time status of any task is a non-timeout state when it does not receive a timeout processing instruction for any task and when the processing time of any task does not exceed the target timeout determination time, and so on.

[0065] Based on this, the embodiments of the present invention can use a timeout period (such as a preset timeout determination time, etc.) to prevent the task processing time from being too long, resulting in system performance degradation or poor user experience. In other words, the embodiments of the present invention can use a timeout period to improve the performance of the resource management system and effectively improve the user experience.

[0066] S202: When it is detected that the processing time status of a target task is in a timeout status, resources of the target task are released.

[0067] Optionally, the target service device may use asynchronous processing to release resources for the target task; based on this, the embodiment of the present invention can use asynchronous processing to enable the target service device to continue processing other tasks while waiting for resource release, thereby effectively improving the concurrency capability of the resource management system.

[0068] S203: Return the target thread for processing the target task to the thread pool, so that the target thread can be used by tasks other than the target task in the target service device.

[0069] The thread pool is used to manage threads in the target service device.

[0070] In the embodiment of the present invention, in order to prevent thread resource waste due to processing timeout, the target service device can return the target thread processing the target task in time. It can be seen that the management of the thread pool is a key link. The embodiment of the present invention can ensure that the thread can be quickly recovered and can be used by other requests, thereby improving the concurrent processing capability of the system.

[0071] Based on this, the embodiments of the present invention can implement effective thread management and thread pool mechanisms, and can realize careful design of thread creation, destruction, and recycling to ensure that the resource management system can operate stably in high concurrency scenarios; and, the embodiments of the present invention can effectively reduce the overhead of thread creation and destruction through the thread pool, and can effectively improve the performance of the resource management system.

[0072] In other embodiments, step S203 may also be a specific implementation of step S202, that is, when releasing resources for the target task, the target thread processing the target task may be returned to the thread pool, that is, the released resources may also include the target thread, and so on; the present invention is not limited to this.

[0073] S204, determining a target downstream service device of the target service device, and notifying the target downstream service device to execute a target resource release operation, where the target resource release operation supports releasing resources that the target task depends on in the target downstream service device.

[0074] Optionally, the resources that the target task depends on in the target downstream service device may refer to the resources that the subtasks of the target task in the target downstream service device depend on, that is, may refer to the resources that the request sent by the target service device to the target downstream service device for the target task depends on.

[0075] In an embodiment of the present invention, the target service device may determine the resource release indication information of the target task under the target downstream service device; optionally, the resource release indication information may include but is not limited to at least one of the following: the task identifier of the target task and the task identifier of the subtask sent to the target downstream service device, etc., which is not limited in the embodiment of the present invention. Based on this, the target service device may send a target resource release instruction to the target downstream service device based on the resource release indication information, and the target resource release instruction carries the resource release indication information to notify the target downstream service device to perform the target resource release operation; wherein the resource release indication information can be used to guide the target downstream service device to determine the resources that the target task depends on in the target downstream service device, that is, the target downstream service device can determine the subtask of the target task in the target downstream service device based on the resource release indication information, thereby determining the resources that the subtask of the target task in the target downstream service device depends on. Then, accordingly, the target downstream service device can release the resources that the target task depends on in the target downstream service device; optionally, the thread used to process the subtask of the target task in the target downstream service device can also be returned, and so on.

[0076] Optionally, the downstream service device may have a downstream service device interface, which may define a clear protocol and message format to ensure that the target service device can accurately transmit the resource release instruction through the resource release indication information. Optionally, the embodiment of the present invention may use a RESTful API (a REST (Representational State Transfer) API (Application Program Interface)) or a message queue or other methods for notification.

[0077] For example, Figure 3As shown, taking the target service device as server A3 as an example, when server A3 is detected to time out (i.e., there is a target task in server A3), server A3 can actively release resources (i.e., release the resources that the target task depends on), thereby actively releasing database resources (i.e., releasing the database connection occupied by the target task), and can notify the target downstream service device (such as server B3) to release resources. Exemplarily, server A1, server A2, and server A3 can be downstream service devices of a load balancing server, and server B3 can be a downstream service device of server A3.

[0078] Optionally, the target service device may also detect whether each downstream service device of the target service device is abnormal; when it is detected that there is an abnormal downstream service device of the target service device, load balancing management may be performed on each downstream service device of the target service device according to the abnormal state of the abnormal downstream service device. Optionally, for any downstream service device of the target service device, the target service device may count the number of task request failures of any downstream service device, and detect whether any downstream service device is abnormal based on the number of task request failures, which may refer to the number of failures of the target service device to obtain the task execution result from any downstream service device; based on this, multiple abnormal state ranges may be determined (one abnormal state range may correspond to one abnormal state), and the abnormal state indicated by the abnormal state range where the number of task request failures is located may be used as the abnormal state of any downstream service device; optionally, multiple abnormal state ranges may be set according to experience or according to actual needs, and the embodiments of the present invention are not limited to this.

[0079] Optionally, the target service device may set the load balancing weight of each downstream service device of the target service device according to the abnormal state of the abnormal downstream service device, so as to perform load balancing management on each downstream service device of the target service device based on the load balancing weight of each downstream service device of the target service device; exemplarily, when the abnormal state of the abnormal downstream service device is a completely abnormal state, the load balancing weight of the abnormal downstream service device may be set to 0, and the sum of the load balancing weights of the downstream service devices of the target service device except the abnormal downstream service device may be 1; or, when the abnormal state of the abnormal downstream service device is not a completely abnormal state, the load balancing weight of the abnormal downstream service device may be reduced according to a preset reduction ratio, and so on; the embodiment of the present invention does not limit this. Optionally, the preset reduction ratio may be set according to experience or according to actual needs, and the embodiment of the present invention does not limit this. Based on this, the target service device may reduce or even avoid requesting abnormal downstream service devices, and the target service device may take into account the processing mechanism of abnormal situations such as network abnormalities and unavailability of downstream service devices, thereby effectively ensuring the reliability of resource management and the reliability of task management.

[0080] Optionally, when the target service device detects an abnormal downstream service device, it may also send abnormal indication information of the abnormal downstream service device to other upstream service devices of the abnormal downstream service device (i.e., upstream service devices other than the target service device in the upstream service devices of the abnormal downstream service device), so that the upstream service device that receives the abnormal indication information can perform load balancing management based on the abnormal indication information, thereby reducing or avoiding task requests to the abnormal downstream service device. Optionally, the abnormal indication information may include but is not limited to the abnormal identifier and the service device identifier of the abnormal downstream service device; optionally, the abnormal identifier may be set according to experience or according to actual needs, which is not limited in the embodiments of the present invention.

[0081] Optionally, the target service device may also monitor the load condition and / or response time of each downstream service device in real time, so as to determine the load balancing weight of each downstream service device based on the load condition and / or response time of each downstream service device, thereby performing load balancing management on each downstream service device based on the load balancing weight of each downstream service device. The load balancing weight of a downstream service device is negatively correlated with the load condition and / or response time of the corresponding downstream service device.

[0082] It should be understood that when there are multiple target downstream service devices, for any target downstream service device among the multiple target downstream service devices, the target service device can determine the resource release indication information of the target task under any target downstream service device, and send a target resource release instruction to any target downstream service device based on the resource release indication information of the target task under any target downstream service device. The target resource release instruction sent to any target downstream service device may carry the resource release indication information of the target task under any target downstream service device, so as to notify any target downstream service device to perform the target resource release operation.

[0083] Based on this, the embodiment of the present invention can notify the downstream service device that the timeout service (i.e., the target service device containing the target task) depends on to release resources, ensure that the resources on the entire service link can be reasonably released, and ensure that the entire system can quickly and effectively recycle resources in the event of a timeout. In addition, the embodiment of the present invention can have dynamic adaptability, that is, it can be dynamically adjusted according to the real-time status of the downstream service to achieve dynamic load balancing, that is, the embodiment of the present invention can monitor the abnormal status of the downstream service in real time, and can monitor the load situation and / or response time in real time, so as to dynamically adjust the load balancing weight; based on this, the embodiment of the present invention can implement a dynamic adjustment strategy, so as to more flexibly respond to the situation of high-concurrency task requests, and can effectively avoid the system avalanche effect to achieve reasonable allocation and adjustment of system resources.

[0084] S205: When the target service device has a target upstream service device, the timeout processing indication information is transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information.

[0085] Optionally, the target service device may also determine a preset upstream feedback duration; after sending the timeout processing indication information to the target upstream service device, if the feedback information of the target upstream service device is not received within the preset upstream feedback duration, the retry mechanism is triggered, that is, the above-mentioned transmission of the timeout processing indication information to the target upstream service device may be retriggered at this time, so as to cope with the situation of unstable network or busy upstream service device. Optionally, the preset upstream feedback duration may be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this.

[0086] Optionally, the target service device may also perform log recording to obtain a target log; optionally, the target log may include but is not limited to processing time status detection records, retry records, downstream service device abnormality detection records, etc. of any task, which is not limited to the embodiments of the present invention.

[0087] Optionally, the target service device may also have a monitoring alarm function; illustratively, when a target task whose processing time status is a timeout status is detected, the monitoring alarm function may be triggered to send a timeout prompt message of the target task and a task identifier of the target task to the monitoring personnel; or, when an abnormal downstream service device is detected, abnormal downstream service device prompt message of the abnormal downstream service device and a service device identifier of the abnormal downstream service device may be sent to the monitoring personnel, etc.; the embodiment of the present invention is not limited to this. Optionally, both the timeout prompt message and the abnormal downstream service device prompt message may be set according to experience or according to actual needs, and the embodiment of the present invention is not limited to this.

[0088] In summary, the embodiments of the present invention can enhance the fault tolerance of the resource management system so that the target service device can consider the handling of abnormal situations. Based on this, during the entire timeout processing process, appropriate retry mechanisms, log records, monitoring and alarm functions can be used to timely discover and handle problems when abnormalities occur.

[0089] The embodiment of the present invention can detect the processing time status of each task in at least one task; when detecting a target task whose processing time status is a timeout status, the target task is resource released, and the target thread processing the target task is returned to the thread pool, so that the target thread can be used by tasks other than the target task in the target service device. Accordingly, the target downstream service device of the target service device can be determined, and the target downstream service device can be notified to perform a target resource release operation, and the target resource release operation supports the release of resources that the target task depends on in the target downstream service device; when the target service device has a target upstream service device, the timeout processing indication information can be transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information. It can be seen that the embodiment of the present invention can automatically terminate the target task when the target task is detected, release the currently occupied resources (i.e., the resources occupied by the target task), and can also notify the dependent downstream service equipment to stop the corresponding task and release the resources occupied by the downstream, thereby protecting the downstream services, ensuring the effective management and sharing of resources, and further protecting the overall system; based on this, the embodiment of the present invention can realize task execution time (i.e., processing time) monitoring, that is, a mechanism can be introduced to detect the execution time of the task, and the running status of the task can be monitored in real time, so as to terminate the timeout task (i.e., the target task whose processing time status is the timeout status) in time, so as to realize protection at the task level and avoid adverse effects on the entire system.

[0090] Based on the description of the relevant embodiments of the above resource management method, the embodiment of the present invention further proposes a resource management device, which runs on a target service device in a resource management system, the resource management system includes multiple service devices, the target service device is any service device among the multiple service devices, one service device has M upstream service devices and N downstream service devices in the resource management system, a task in one service device depends on the downstream service device of the corresponding service device, and M and N are both non-negative integers; Figure 4 As shown, the resource management device may include a processing unit 401 and a notification unit 402. The resource management device may execute Figure 1 or Figure 2 The resource management method shown, that is, the resource management device can run the above-mentioned units:

[0091] The processing unit 401 is used to detect the processing time status of each task in at least one task;

[0092] The processing unit 401 is further configured to release resources for the target task when detecting that the processing time status of the target task is in a timeout status;

[0093] The processing unit 401 is further configured to determine a target downstream service device of the target service device;

[0094] A notification unit 402, configured to notify the target downstream service device to execute a target resource release operation, wherein the target resource release operation supports releasing resources that the target task depends on in the target downstream service device;

[0095] The notification unit 402 is further configured to transmit timeout processing indication information to the target upstream service device when the target service device has a target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information.

[0096] In one implementation, each of the tasks is transmitted to the target service device by a corresponding upstream service device of the target service device; when the processing unit 401 detects the processing time status of each task in at least one task, it can be specifically used to:

[0097] For any task among the at least one task, receiving an initial timeout determination time of the any task transmitted by an upstream service device corresponding to the any task;

[0098] Determining a target timeout determination time for any one of the tasks based on the initial timeout determination time;

[0099] When the processing time of any of the tasks exceeds the target timeout determination time, determining the processing time state of any of the tasks to be the timeout state;

[0100] When the processing time of any task does not exceed the target timeout determination time, the processing time state of any task is determined to be a non-timeout state, so as to detect the processing time state of any task.

[0101] In another implementation manner, when notifying the target downstream service device to perform a target resource release operation, the notification unit 402 may be specifically used to:

[0102] Determine resource release indication information of the target task under the target downstream service device;

[0103] Based on the resource release indication information, a target resource release instruction is sent to the target downstream service device, and the target resource release instruction carries the resource release indication information to realize the notification of the target downstream service device to perform a target resource release operation; wherein the resource release indication information is used to guide the target downstream service device to determine the resources that the target task depends on in the target downstream service device.

[0104] In another implementation, the processing unit 401 may also be used to:

[0105] Detecting whether each downstream service device of the target service device is abnormal;

[0106] When it is detected that the target service device has an abnormal downstream service device, load balancing management is performed on each downstream service device of the target service device according to the abnormal state of the abnormal downstream service device.

[0107] In another implementation, the processing unit 401 may also be used to:

[0108] Determine the preset upstream feedback duration;

[0109] After the timeout processing indication information is sent to the target upstream service device, if no feedback information from the target upstream service device is received within the preset upstream feedback time period, a retry mechanism is triggered.

[0110] In another implementation, the processing unit 401 may also be used to:

[0111] Returning the target thread processing the target task to the thread pool, so that the target thread can be used by tasks other than the target task in the target service device;

[0112] The thread pool is used to manage threads in the target service device.

[0113] According to one embodiment of the present invention, Figure 4 Each unit in the resource management device shown can be separately or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple smaller units in function to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present invention, any resource management device can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0114] According to another embodiment of the present invention, the program can be executed by running a program on a general electronic device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 1 or Figure 2 A computer program (including program code) for each step involved in the corresponding method shown in Figure 4 The resource management device shown in the embodiment of the present invention is used to implement the resource management method of the embodiment of the present invention. The computer program can be recorded on a computer storage medium, for example, and loaded into the electronic device through the computer storage medium and run therein.

[0115] The embodiment of the present invention can detect the processing time status of each task in at least one task; when a target task whose processing time status is a timeout status is detected, the target task is released for resource release. Based on this, the target downstream service device of the target service device can be determined, and the target downstream service device can be notified to perform a target resource release operation, and the target resource release operation supports the release of resources that the target task depends on in the target downstream service device; when the target service device has a target upstream service device, the timeout processing indication information is transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information. It can be seen that the embodiment of the present invention can release the resources that the target task whose processing time status is a timeout status depends on through resource management, so as to effectively reduce the pressure of the target service device and the target downstream service device, thereby effectively reducing the pressure of the downstream service, and then avoiding the increasing pressure of the downstream service, which can effectively avoid the excessive pressure of the downstream service and crushing the entire system.

[0116] Based on the description of the above method embodiment and device embodiment, the exemplary embodiment of the present invention further provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present invention when executed by the at least one processor.

[0117] Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present invention.

[0118] An exemplary embodiment of the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor of a computer, the computer is used to enable the computer to perform a method according to an embodiment of the present invention.

[0119] An exemplary embodiment of the present invention also provides a resource management system, wherein the resource management system includes multiple service devices, one service device has M upstream service devices and N downstream service devices in the resource management system, a task in one service device depends on the downstream service device of the corresponding service device, and M and N are both non-negative integers; wherein the target service device in the resource management system is used to execute the method according to an embodiment of the present invention.

[0120] refer to Figure 5 , a block diagram of an electronic device 500 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0121] like Figure 5As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0122] A plurality of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 may include, but is not limited to, a disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0123] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the resource management method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the resource management method in any other appropriate manner (e.g., by means of firmware).

[0124] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0125] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0126] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0127] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0128] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0129] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0130] Furthermore, it should be understood that what is disclosed above is only a preferred embodiment of the present invention, and certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A resource management method, characterized in that: The method is applied to a target service device in a resource management system, the resource management system includes multiple service devices, the target service device is any service device among the multiple service devices, one service device has M upstream service devices and N downstream service devices in the resource management system, a task in one service device depends on the downstream service device of the corresponding service device, and M and N are both non-negative integers; the method includes: detecting a processing time status of each task in at least one task; When detecting that the processing time status of a target task is in a timeout status, releasing resources for the target task; Determine a target downstream service device of the target service device, and notify the target downstream service device to perform a target resource release operation, where the target resource release operation supports releasing resources that the target task depends on in the target downstream service device; When the target service device has a target upstream service device, the timeout processing indication information is transmitted to the target upstream service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information.

2. The method according to claim 1, characterized in that The tasks are transmitted to the target service device by the corresponding upstream service device of the target service device; and the processing time state of each task in at least one task is detected, including: For any task among the at least one task, receiving an initial timeout determination time of the any task transmitted by an upstream service device corresponding to the any task; Determining a target timeout determination time for any one of the tasks based on the initial timeout determination time; When the processing time of any of the tasks exceeds the target timeout determination time, determining the processing time state of any of the tasks to be the timeout state; When the processing time of any task does not exceed the target timeout determination time, the processing time state of any task is determined to be a non-timeout state, so as to detect the processing time state of any task.

3. The method according to claim 1 or 2, characterized in that: The notifying the target downstream service device to execute a target resource release operation includes: Determine resource release indication information of the target task under the target downstream service device; Based on the resource release indication information, a target resource release instruction is sent to the target downstream service device, and the target resource release instruction carries the resource release indication information to realize the notification of the target downstream service device to perform a target resource release operation; wherein the resource release indication information is used to guide the target downstream service device to determine the resources that the target task depends on in the target downstream service device.

4. The method according to claim 1 or 2, characterized in that: The method further comprises: Detecting whether each downstream service device of the target service device is abnormal; When it is detected that the target service device has an abnormal downstream service device, load balancing management is performed on each downstream service device of the target service device according to the abnormal state of the abnormal downstream service device.

5. The method according to claim 1 or 2, characterized in that: The method further comprises: Determine the preset upstream feedback duration; After the timeout processing indication information is sent to the target upstream service device, if no feedback information from the target upstream service device is received within the preset upstream feedback time period, a retry mechanism is triggered.

6. The method according to claim 1 or 2, characterized in that: The method further comprises: Returning the target thread processing the target task to the thread pool, so that the target thread can be used by tasks other than the target task in the target service device; The thread pool is used to manage threads in the target service device.

7. A resource management device, characterized in that: The device is run on a target service device in a resource management system, the resource management system includes multiple service devices, the target service device is any service device among the multiple service devices, one service device has M upstream service devices and N downstream service devices in the resource management system, a task in one service device depends on the downstream service device of the corresponding service device, and M and N are both non-negative integers; the device includes: a processing unit, configured to detect a processing time status of each task in at least one task; The processing unit is further configured to release resources for the target task when detecting that the processing time status of the target task is in a timeout status; The processing unit is further used to determine a target downstream service device of the target service device; a notification unit, configured to notify the target downstream service device to execute a target resource release operation, wherein the target resource release operation supports releasing resources that the target task depends on in the target downstream service device; The notification unit is further configured to transmit timeout processing indication information to the target upstream service device when there is a target upstream service device for the target service device, so that the target upstream service device performs task management on the target task based on the timeout processing indication information.

8. An electronic device, characterized in that: include: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 6.

9. A resource management system, characterized in that: The resource management system includes a plurality of service devices, one service device has M upstream service devices and N downstream service devices in the resource management system, a task in one service device depends on the downstream service device of the corresponding service device, and M and N are both non-negative integers; The target service device in the resource management system is used to execute the method according to any one of claims 1-6.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-6.