Resource scheduling method and device, equipment and storage medium

CN122985380APending Publication Date: 2026-10-27WEICHAI POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610976888.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本申请提出一种资源调度方法、装置、设备及存储介质,能够解决相关技术中当用户操作导致系统资源消耗超出安全阈值时,应用会因资源耗尽而出现长时间卡顿、渲染进程无响应,甚至直接崩溃的技术问题

Benefits of technology

本申请提出一种资源调度方法、装置、设备及存储介质,该方法包括:在每个文档窗口创建时,确定每个文档窗口分别对应的文档类型;基于每个文档窗口分别对应的文档类型确定每个文档窗口分别对应的权重系数;在检测到系统资源占用率超过第一预设资源占用率的情况下,确定处于失活状态的多个失活窗口;基于预设窗口保留策略以及多个失活窗口分别对应的权重系数进行资源降级操作,直到系统资源占用率达到第二预设资源占用率。本申请实施例通过基于文档类型对每个文档窗口分配对应的权重系数,从而在系统资源消耗超出安全阈值时,可以按照权重系数对失活窗口进行资源降级操作,以在用户无感的情况下降低系统资源消耗。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985380A_ABST
    Figure CN122985380A_ABST
Patent Text Reader

Abstract

The application provides a resource scheduling method and device, equipment and a storage medium. The method comprises the following steps: determining the document type corresponding to each document window when each document window is created; determining the weight coefficient corresponding to each document window based on the document type corresponding to each document window; determining a plurality of inactive windows in an inactive state when it is detected that the system resource occupancy rate exceeds a first preset resource occupancy rate; and performing a resource degradation operation based on a preset window retention strategy and the weight coefficient corresponding to the plurality of inactive windows until the system resource occupancy rate reaches a second preset resource occupancy rate. According to the application, the weight coefficient corresponding to each document window is allocated based on the document type, so that when the system resource consumption exceeds a safety threshold, the inactive window can be subjected to a resource degradation operation according to the weight coefficient, thereby reducing the system resource consumption without affecting the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of web application technology, specifically relating to a resource scheduling method, apparatus, device, and storage medium. Background Technology

[0002] With the rapid development of Web technology, modern Web applications have become increasingly complex, evolving from simple information display into comprehensive work platforms capable of supporting various types of documents. These applications typically employ multi-window management frameworks (such as Dockview, Golden Layout, etc.) to build their user interfaces, allowing users to open, arrange, and manipulate multiple independent document windows simultaneously, such as code editors, spreadsheets, SVG graphics viewers, and resource-intensive 3D model renderers.

[0003] In related technologies, when facing complex application scenarios with mixed workloads (i.e., simultaneously including lightweight and resource-intensive documents), there is a lack of monitoring and proactive intervention regarding the overall system resource load. When user operations cause system resource consumption to exceed the safe threshold, the application may experience prolonged lag, unresponsive rendering processes, or even complete crashes due to resource exhaustion. Summary of the Invention

[0004] This application proposes a resource scheduling method, apparatus, device, and storage medium that can solve the technical problem in related technologies where, when user operations cause system resource consumption to exceed a safe threshold, applications will experience prolonged lag, rendering processes will become unresponsive, or even crash directly due to resource exhaustion.

[0005] A first aspect of this application provides a resource scheduling method, the method comprising: When each document window is created, the document type corresponding to each document window is determined; The weight coefficient for each document window is determined based on the document type corresponding to each document window. If the system resource utilization rate is detected to exceed the first preset resource utilization rate, multiple inactive windows that are inactive are identified. Based on the preset window retention strategy and the weight coefficients corresponding to the multiple inactive windows, resource degradation operations are performed until the system resource utilization rate reaches the second preset resource utilization rate.

[0006] A second aspect of this application provides a resource scheduling apparatus, characterized in that it includes: The determination module is used to determine the document type corresponding to each document window when each document window is created; The determining module is further configured to determine the weight coefficient corresponding to each document window based on the document type corresponding to each document window; The determining module is further configured to determine multiple inactive windows that are in an inactive state when the system resource utilization rate is detected to exceed the first preset resource utilization rate. The resource degradation module is used to perform resource degradation operations based on a preset window retention strategy and the weight coefficients corresponding to the multiple inactive windows, until the system resource utilization rate reaches a second preset resource utilization rate.

[0007] An embodiment of the third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0008] An embodiment of the fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the method described in the first aspect above.

[0009] The technical solutions provided in this application embodiment have at least the following technical effects or advantages: This application proposes a resource scheduling method, apparatus, device, and storage medium. The method includes: determining the document type corresponding to each document window when each document window is created; determining a weight coefficient corresponding to each document window based on the document type; identifying multiple inactive windows in a deactivated state when the system resource utilization rate exceeds a first preset resource utilization rate; and performing resource degradation operations based on a preset window retention policy and the weight coefficients corresponding to the multiple inactive windows until the system resource utilization rate reaches a second preset resource utilization rate. This application's embodiments assign a corresponding weight coefficient to each document window based on its document type, thereby enabling resource degradation operations to be performed on inactive windows according to the weight coefficients when system resource consumption exceeds a safety threshold, thus reducing system resource consumption without the user's awareness.

[0010] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0011] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a resource scheduling method provided in an embodiment of this application is shown; Figure 2 A flowchart illustrating a resource scheduling method provided in an embodiment of this application is shown; Figure 3 This paper shows a schematic diagram of the structure of a resource scheduling device according to an embodiment of the present application; Figure 4 This illustration shows a schematic diagram of the structure of an electronic device according to an embodiment of this application; Figure 5 A schematic diagram of a storage medium provided in one embodiment of this application is shown. Detailed Implementation

[0012] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0013] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.

[0014] In related technologies, during the creation of multiple document windows in a web application, the application fairly provides rendering areas for these windows and handles their drag-and-drop and activation events. However, the application does not perceive or intervene in the resource consumption of the document windows. The resource allocation, use, and release of each component within a window are entirely managed by its own logic and the browser's default garbage collection mechanism.

[0015] In the above method, because the web application adopts the principles of "resource neutrality" and "fair competition" for all window content, system resources (such as CPU time slices and memory) are competed for by all visible or background window components.

[0016] When a resource-intensive window (such as a model rendering window) and one or more lightweight windows (such as a data table viewer) coexist, the background activities of the lightweight windows (such as data polling) will compete with the model's rendering task for CPU resources. This resource contention makes the resources allocated to the model uncertain and unstable.

[0017] This causes users to experience noticeable stuttering and frame drops when interacting with the model (such as rotating and scaling), with drastic frame rate fluctuations, severely impacting the usability of core functions and the experience of professional applications.

[0018] Secondly, the application's resource consumption is in a state of "out of control," entirely dependent on user behavior. When a user opens multiple resource-intensive windows consecutively, or performs extremely resource-intensive operations on a particular window, the total resource demand will instantly exceed the browser's limits or the physical hardware's upper limit. This resource overload will directly cause the browser rendering process to become unresponsive or crash, which is the common "page freeze" or "crash" experienced by users.

[0019] To address the aforementioned technical problems, this application proposes a resource scheduling method, apparatus, device, and storage medium. The method includes: determining the document type corresponding to each document window upon creation; determining a weight coefficient for each document window based on its document type; identifying multiple inactive windows in a deactivated state when the system resource occupancy rate exceeds a first preset resource occupancy rate; and performing resource degradation operations based on a preset window retention policy and the weight coefficients corresponding to the multiple inactive windows until the system resource occupancy rate reaches a second preset resource occupancy rate. This application's embodiment assigns a corresponding weight coefficient to each document window based on its document type, thereby enabling resource degradation operations on inactive windows according to the weight coefficients when system resource consumption exceeds a safety threshold, reducing system resource consumption without the user's awareness.

[0020] The resource scheduling method of this application can be executed by a computing device, which can be a server, such as a single server, multiple servers, a server cluster, a cloud computing platform, etc. Optionally, the computing device can also be a terminal device, such as a mobile phone, tablet computer, game console, portable computer, desktop computer, advertising machine, all-in-one machine, etc. This application does not limit the type or number of computing devices.

[0021] The following describes a resource scheduling method according to an embodiment of this application, with reference to the accompanying drawings. See Figure 1 The method specifically includes the following steps: S101. When each document window is created, determine the document type corresponding to each document window.

[0022] S102. Determine the weight coefficient for each document window based on the document type corresponding to each document window.

[0023] S103. If the system resource utilization rate is detected to exceed the first preset resource utilization rate, determine multiple inactive windows that are inactive.

[0024] S104. Based on the preset window retention strategy and the weight coefficients corresponding to multiple inactive windows, perform resource degradation operations until the system resource utilization rate reaches the second preset resource utilization rate.

[0025] Among them, document type is a classification of the nature of the content displayed in the document window, such as "code editor", "data table", "Scalable Vector Graphics (SVG) viewer", "model renderer", etc.

[0026] A document window refers to an independent unit in a graphical user interface used to host and display specific types of content. In this application, a document window can be any dockable, detachable, and activatable panel or tab managed by a window management component such as dockview-vue.

[0027] In some embodiments, multiple predefined windows can be displayed on the display interface, and the user can select any of the predefined windows to create a corresponding document window.

[0028] In some embodiments, the web application may include a component registry. When a user triggers an action, the dockview will find the corresponding Vue / React component from the registry based on the passed component type and mount it to the new panel. Furthermore, the component type can be obtained, and the document type can be determined based on that component type.

[0029] In some embodiments, if no predefined window exists, a document window can be generated by receiving a user's drag-and-drop operation on a data source, or dynamically generated by configuring a form. Furthermore, the business type carried by the window can be determined using `documentType` (or a custom `meta.type`).

[0030] In some embodiments, the web application stores a correspondence between document types and weight coefficients, and the weight coefficient corresponding to each document window can be determined from the correspondence based on the document type corresponding to each document window.

[0031] In some embodiments, after each document window is created, a panel is mounted, rendering the components corresponding to each document window onto the Document Object Model (DOM) for display, so that user actions on any component can be received and the document window corresponding to that component can be activated.

[0032] Furthermore, the system resource utilization rate can be detected by the resource scheduler. In some embodiments, the system resource used memory can be detected at preset time intervals, and the system resource utilization rate can be determined based on the system resource used memory and the total system resource memory. The preset time interval can be flexibly set according to the actual situation, which will not be elaborated here.

[0033] In some embodiments, the resource scheduler can determine the memory used by system resources by reading performance.memory or navigator.deviceMemory.

[0034] If the system resource utilization rate is detected to exceed the first preset resource utilization rate, a resource pruning process is executed.

[0035] First, to avoid affecting the window that the user is currently interacting with, only inactive windows are trimmed. Therefore, it is necessary to identify multiple inactive windows in an inactive state and perform resource degradation operations based on a preset window retention policy and the weight coefficients corresponding to the multiple inactive windows, until the system resource utilization rate reaches the second preset resource utilization rate.

[0036] The preset window retention strategy can be to identify the target window that meets the requirements from multiple inactive windows, sort the remaining inactive windows according to the weight coefficient, and perform resource degradation operations on the sorted remaining inactive windows in turn until the system resource utilization rate reaches the second preset resource utilization rate.

[0037] The target window that meets the requirements can be a deactivated window whose operation time is earlier than the preset time, or a preset deactivated window, such as the deactivated window of an SVG viewer. The preset time can be flexibly set based on the actual situation, and will not be elaborated here.

[0038] Resource degradation operations can include multi-level operations, including a first degradation operation, a second degradation operation, and a third degradation operation. These multi-level operations can be performed sequentially on the remaining inactive windows after sorting, until the system resource utilization rate reaches a second preset resource utilization rate. Alternatively, the first degradation operation can be performed sequentially on the remaining inactive windows after sorting, followed by the second degradation operation, and finally the third degradation operation, until the system resource utilization rate reaches the second preset resource utilization rate.

[0039] The first and second preset resource utilization rates can be flexibly set based on actual conditions, and will not be elaborated further here. The first preset resource utilization rate is greater than or equal to the second preset resource utilization rate, and the web application will not experience lag, unresponsive rendering process, or even crash when running at the second preset resource utilization rate. For example, the first preset resource utilization rate is 80%, and the second preset resource utilization rate is 70%.

[0040] This application proposes a resource scheduling method, apparatus, device, and storage medium. The method includes: determining the document type corresponding to each document window when each document window is created; determining a weight coefficient corresponding to each document window based on the document type; identifying multiple inactive windows in a deactivated state when the system resource utilization rate exceeds a first preset resource utilization rate; and performing resource degradation operations based on a preset window retention policy and the weight coefficients corresponding to the multiple inactive windows until the system resource utilization rate reaches a second preset resource utilization rate. This application's embodiments assign a corresponding weight coefficient to each document window based on its document type, thereby enabling resource degradation operations to be performed on inactive windows according to the weight coefficients when system resource consumption exceeds a safety threshold, reducing system resource consumption without the user's awareness.

[0041] In some embodiments, resource degradation operations are performed based on a preset window retention strategy and weight coefficients corresponding to multiple inactive windows until the system resource utilization rate reaches a second preset resource utilization rate. This includes: determining the most recent operation time corresponding to each of the multiple inactive windows; determining at least one inactive window whose most recent operation time is earlier than a preset time as the target window; sorting the remaining windows other than the target window in ascending order of weight coefficients; and performing resource degradation operations on the sorted remaining windows in sequence until the system resource utilization rate reaches the second preset resource utilization rate.

[0042] In some embodiments, when multiple windows are frequently switched, it means that the multiple windows need to be displayed frequently in a short period of time. If resource degradation operations are performed on the multiple windows, it may cause the window to fail to respond quickly when switching to any of the multiple windows. Therefore, the preset window retention strategy can be to retain at least one inactive window whose most recent operation time is earlier than the preset time.

[0043] In this process, the most recent operation time corresponding to each of the multiple inactive windows can be determined, that is, the last time that each of the multiple inactive windows was in an active state can be determined.

[0044] In some embodiments, the process of determining the document window state can be implemented as follows: First, after the document window is mounted, the window information of the document window can be registered to the global window registry. The window information includes the window instance, representation, type, weight coefficient and state. The event of the window gaining focus (active state) or losing focus (deactivated state) is listened to through a unified EventBus (Pub / Sub), and the updated state is written to the global window registry.

[0045] Furthermore, when the system resource utilization rate is detected to exceed the first preset resource utilization rate, the current state of each document window is obtained from the global window registry, and multiple inactive windows in an inactive state are identified.

[0046] Finally, obtain the moment when the window last gained focus from the window information of multiple inactive windows, i.e., the moment of most recent operation.

[0047] The preset time can be flexibly set according to the actual situation, such as the last 2 seconds.

[0048] After acquiring at least one target window, the remaining windows (excluding the target window) are sorted in ascending order of their weight coefficients, and resource degradation operations are performed on the sorted remaining windows in turn until the system resource utilization rate reaches the second preset resource utilization rate.

[0049] In some embodiments, resource degradation operations are sequentially performed on multiple remaining windows after sorting until the system resource utilization rate reaches a second preset resource utilization rate. This includes: sequentially performing a first degradation operation on the multiple remaining windows after sorting, and determining whether the system resource utilization rate reaches the second preset resource utilization rate during the first degradation operation; if not, sequentially performing a second degradation operation on the multiple remaining windows after sorting, and determining whether the system resource utilization rate reaches the second preset resource utilization rate during the second degradation operation; if not, sequentially performing a third degradation operation on the multiple remaining windows after sorting, and determining whether the system resource utilization rate reaches the second preset resource utilization rate during the third degradation operation; if the system resource utilization rate reaches the second preset resource utilization rate during any degradation operation, the degradation operation is stopped.

[0050] As can be seen from the above, multiple levels of operations can be performed on the remaining inactive windows after sorting until the system resource utilization rate reaches the second preset resource utilization rate. Alternatively, the first degradation operation can be performed on the remaining inactive windows after sorting, followed by the second degradation operation, and finally the third degradation operation, until the system resource utilization rate reaches the second preset resource utilization rate.

[0051] In this embodiment of the application, the remaining inactive windows after sorting can be subjected to a first degradation operation in sequence, then the remaining inactive windows after sorting can be subjected to a second degradation operation in sequence, and finally the remaining inactive windows after sorting can be subjected to a third degradation operation in sequence, until the system resource utilization rate reaches the second preset resource utilization rate.

[0052] In some embodiments, stopping the downgrade operation when the system resource utilization rate reaches a second preset resource utilization rate during any downgrade operation includes: accumulating the remaining window release system resource utilization rate during any downgrade operation; stopping the downgrade operation when the difference between the system resource utilization rate and the remaining window release system resource utilization rate is less than the second preset resource utilization rate.

[0053] In some embodiments, for the same remaining window, the resource utilization rate corresponding to the first degradation operation is less than the resource utilization rate corresponding to the second degradation operation, and the resource utilization rate corresponding to the second degradation operation is less than the resource utilization rate corresponding to the third degradation operation.

[0054] Understandably, during any degradation operation, after each degradation operation is performed on a window, the remaining system resource occupancy rate of the windows that have undergone degradation operations will be accumulated. If the difference between the system resource occupancy rate and the remaining system resource occupancy rate of the windows is less than the second preset resource occupancy rate, it means that the current system resource occupancy rate will not cause lag, rendering process unresponsiveness, or even direct crash. Therefore, the degradation operation can be stopped.

[0055] In some embodiments, for the same remaining window, the resource utilization rate corresponding to the first degradation operation is less than that corresponding to the second degradation operation, and the resource utilization rate corresponding to the second degradation operation is less than that corresponding to the third degradation operation. Therefore, the first degradation operation is executed first, followed by the second degradation operation, and finally the third degradation operation. This can ensure that there will be no long-term lag, rendering process unresponsiveness, or even direct crashes while releasing the minimum system resources.

[0056] The first degradation operation can be to reduce the rendering frame rate of the document window; the second degradation operation can be to pause the background data processing tasks of the document window; and the third degradation operation can be to destroy the graphics rendering context of the document window while retaining its serializable state data. Therefore, the third degradation operation involves a significant release of system resources. Thus, after performing the third degradation operation on the remaining inactive windows after sorting, it is certain that the system resource utilization rate will reach the second preset resource utilization rate. In some embodiments, the method further includes: detecting a user's creation operation on a first document window and allocating first system resources to the first document window; or detecting an activation operation on a second document window and allocating second system resources to the second document window, wherein the first document window and the second document window are either document windows within each document window.

[0057] In some embodiments, the system resource occupancy rate exceeds a first preset resource occupancy rate, including: the resource occupancy rate corresponding to the first original system resources and the sum of the first system resources before the user's creation operation on the first document window is detected exceeds the first preset resource occupancy rate; or, the resource occupancy rate corresponding to the second original system resources and the sum of the second system resources before the activation operation on the second document window is detected exceeds the first preset resource occupancy rate.

[0058] In some embodiments, when a document window is created or activated, system resources are allocated to the document window based on the static data in the document window and the data required for user interaction.

[0059] Correspondingly, the system resource utilization rate can exceed the first preset resource utilization rate if: the resource utilization rate of the first original system resources and the total first system resources before the user's creation operation on the first document window is detected exceeds the first preset resource utilization rate; or, the resource utilization rate of the second original system resources and the total second system resources before the activation operation on the second document window is detected exceeds the first preset resource utilization rate.

[0060] Furthermore, during the process of performing resource degradation operations based on the preset window retention strategy and the weight coefficients corresponding to multiple inactive windows until the system resource utilization rate reaches the second preset resource utilization rate, rendering will be stopped or the document window will be rendered at low power to avoid stuttering, unresponsive rendering process, or even direct crash during the above process. After the system resource utilization rate reaches the second preset resource utilization rate, the document window will be rendered at normal power.

[0061] In some embodiments, to illustrate the above resource scheduling method, this application provides a flowchart of the resource scheduling method, such as... Figure 2 As shown, the method includes the following steps: S201. A user's creation operation for the first document window is detected, and the first system resource is allocated to the first document window.

[0062] S202. Determine whether the resource occupancy rate corresponding to the first original system resources and the sum of the first system resources before the user's creation operation on the first document window exceeds the first preset resource occupancy rate.

[0063] If the condition exceeds the limit, execute S203 and stop rendering.

[0064] S204. Identify multiple inactive windows that are inactive.

[0065] S205. Determine the most recent operation time for each of the multiple inactive windows.

[0066] S206. Determine at least one deactivated window whose most recent operation time is earlier than a preset time as the target window.

[0067] S207. Sort the remaining windows, excluding the target window, in ascending order of their weight coefficients.

[0068] S208. Perform resource degradation operations on the sorted remaining windows in sequence until the system resource utilization rate reaches the second preset resource utilization rate.

[0069] If the time limit is not exceeded, execute S209 to determine the document type corresponding to each document window.

[0070] S210. Determine the weight coefficient for each document window based on the document type corresponding to each document window.

[0071] S211. Activation of the second document window is detected, and second system resources are allocated to the second document window.

[0072] S212. Determine whether the resource occupancy rate of the second original system resources and the sum of the second system resources before the activation operation of the second document window exceeds the first preset resource occupancy rate. If the condition exceeds the limit, execute S203.

[0073] If the time limit is not exceeded, execute S213 and render the second document window.

[0074] This application also provides a resource scheduling apparatus for executing the resource scheduling method provided in any of the above embodiments. For example... Figure 3 As shown, the device includes: a determination module 301 and a resource degradation module 302.

[0075] The determination module 301 is used to determine the document type corresponding to each document window when each document window is created; The determining module 301 is further configured to determine the weight coefficient corresponding to each document window based on the document type corresponding to each document window; The determining module 301 is further configured to determine multiple inactive windows that are in an inactive state when the system resource occupancy rate is detected to exceed the first preset resource occupancy rate. The resource degradation module 302 is used to perform resource degradation operations based on a preset window retention strategy and the weight coefficients corresponding to the multiple inactive windows, until the system resource utilization rate reaches a second preset resource utilization rate.

[0076] This application proposes a resource scheduling device, comprising: determining the document type corresponding to each document window when each document window is created; determining a weight coefficient corresponding to each document window based on the document type; identifying multiple inactive windows in a deactivated state when the system resource utilization rate exceeds a first preset resource utilization rate; and performing resource degradation operations based on a preset window retention policy and the weight coefficients corresponding to the multiple inactive windows until the system resource utilization rate reaches a second preset resource utilization rate. This application's embodiment assigns a corresponding weight coefficient to each document window based on its document type, thereby enabling resource degradation operations to be performed on inactive windows according to the weight coefficients when system resource consumption exceeds a safety threshold, thus reducing system resource consumption without the user's awareness.

[0077] In some embodiments, the resource degradation module 302 is specifically used for: Determine the most recent operation time corresponding to each of the plurality of inactive windows; The target window is determined by identifying at least one deactivated window whose most recent operation time is earlier than the preset time. The remaining windows, excluding the target window, are sorted in ascending order of their weight coefficients. The remaining windows after sorting are sequentially subjected to resource degradation operations until the system resource utilization rate reaches the second preset resource utilization rate.

[0078] In some embodiments, the resource degradation module 302 is further specifically used for: The first degradation operation is performed sequentially on the sorted remaining windows, and it is determined whether the system resource utilization rate reaches the second preset resource utilization rate during the first degradation operation. If not, perform a second downgrade operation on the sorted remaining windows in sequence, and determine whether the system resource utilization rate reaches the second preset resource utilization rate during the second downgrade operation. If not, a third degradation operation is performed on the sorted remaining windows in sequence, and it is determined whether the system resource utilization rate reaches the second preset resource utilization rate during the third degradation operation. If the system resource utilization rate reaches the second preset resource utilization rate during any downgrade operation, the downgrade operation will be stopped.

[0079] In some embodiments, the resource degradation module 302 is further specifically used for: During any downgrade operation, the remaining windows that have already undergone downgrade operations can release system resource usage. If the difference between the system resource occupancy rate and the remaining window releaseable system resource occupancy rate is less than the second preset resource occupancy rate, the downgrade operation is stopped.

[0080] In some embodiments, for the same remaining window, the resource utilization rate corresponding to the first degradation operation is less than the resource utilization rate corresponding to the second degradation operation, and the resource utilization rate corresponding to the second degradation operation is less than the resource utilization rate corresponding to the third degradation operation.

[0081] In some embodiments, the above-described apparatus further includes: a detection module, used for: Upon detecting a user's creation operation on the first document window, allocate the first system resources to the first document window; or, Upon detecting the activation of the second document window, second system resources are allocated to the second document window, wherein the first document window and the second document window are either of the document windows.

[0082] In some embodiments, the system resource utilization rate exceeds a first preset resource utilization rate, including: The resource occupancy rate of the first original system resources and the sum of the first system resources before the user's creation operation on the first document window is detected exceeds the first preset resource occupancy rate; or, The resource occupancy rate of the second original system resources and the total resource occupancy rate of the second system before the activation operation of the second document window is detected exceeds the first preset resource occupancy rate.

[0083] This application also provides an electronic device for performing the resource scheduling method described above. Please refer to... Figure 4 It illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 4 As shown, the electronic device 7 includes: a processor 700, a memory 701, a bus 702 and a communication interface 703. The processor 700, the communication interface 703 and the memory 701 are connected through the bus 702. The memory 701 stores a computer program that can run on the processor 700. When the processor 700 runs the computer program, it executes the resource scheduling method provided in any of the foregoing embodiments of this application.

[0084] The memory 701 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between the device network element and at least one other network element is achieved through at least one communication interface 703 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0085] Bus 702 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. The memory 701 is used to store programs. After receiving execution instructions, the processor 700 executes the program. The resource scheduling method disclosed in any of the aforementioned embodiments of this application can be applied to the processor 700, or implemented by the processor 700.

[0086] The processor 700 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 700 or by instructions in software form. The processor 700 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 701. Processor 700 reads the information in memory 701 and, in conjunction with its hardware, completes the steps of the above method.

[0087] The electronic device provided in this application embodiment and the resource scheduling method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.

[0088] This application also provides a computer-readable storage medium corresponding to the resource scheduling method provided in the foregoing embodiments. Please refer to... Figure 5The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the resource scheduling method provided in any of the aforementioned embodiments.

[0089] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0090] The computer-readable storage medium provided in the above embodiments of this application and the resource scheduling method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0091] It should be noted that: Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0092] Similarly, it should be understood that, for the sake of brevity and to aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting a schematic diagram in which the claimed application requires more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.

[0093] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0094] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A resource scheduling method, characterized in that, The method includes: When each document window is created, the document type corresponding to each document window is determined; The weight coefficient for each document window is determined based on the document type corresponding to each document window. If the system resource utilization rate is detected to exceed the first preset resource utilization rate, multiple inactive windows that are inactive are identified. Based on the preset window retention strategy and the weight coefficients corresponding to the multiple inactive windows, resource degradation operations are performed until the system resource utilization rate reaches the second preset resource utilization rate.

2. The method according to claim 1, characterized in that, The resource degradation operation based on the preset window retention strategy and the weight coefficients corresponding to the multiple inactive windows, until the system resource utilization rate reaches the second preset resource utilization rate, includes: Determine the most recent operation time corresponding to each of the plurality of inactive windows; The target window is determined by identifying at least one deactivated window whose most recent operation time is earlier than the preset time. The remaining windows, excluding the target window, are sorted in ascending order of their weight coefficients. The remaining windows after sorting are sequentially subjected to resource degradation operations until the system resource utilization rate reaches the second preset resource utilization rate.

3. The method according to claim 2, characterized in that, The step of sequentially performing resource degradation operations on the sorted remaining windows until the system resource utilization rate reaches a second preset resource utilization rate includes: The first degradation operation is performed sequentially on the sorted remaining windows, and it is determined whether the system resource utilization rate reaches the second preset resource utilization rate during the first degradation operation. If not, perform a second downgrade operation on the sorted remaining windows in sequence, and determine whether the system resource utilization rate reaches the second preset resource utilization rate during the second downgrade operation. If not, a third degradation operation is performed on the sorted remaining windows in sequence, and it is determined whether the system resource utilization rate reaches the second preset resource utilization rate during the third degradation operation. If the system resource utilization rate reaches the second preset resource utilization rate during any downgrade operation, the downgrade operation will be stopped.

4. The method according to claim 3, characterized in that, The step of stopping the downgrade operation when the system resource utilization rate reaches the second preset resource utilization rate during any downgrade operation includes: During any downgrade operation, the remaining windows that have already undergone downgrade operations can release system resource usage. If the difference between the system resource occupancy rate and the remaining window releaseable system resource occupancy rate is less than the second preset resource occupancy rate, the downgrade operation is stopped.

5. The method according to claim 4, characterized in that, For the same remaining window, the resource utilization rate corresponding to the first degradation operation is less than the resource utilization rate corresponding to the second degradation operation, and the resource utilization rate corresponding to the second degradation operation is less than the resource utilization rate corresponding to the third degradation operation.

6. The method according to claim 1, characterized in that, The method further includes: Upon detecting a user's creation operation on the first document window, allocate the first system resources to the first document window; or, Upon detecting the activation of the second document window, second system resources are allocated to the second document window, wherein the first document window and the second document window are either of the document windows.

7. The method according to claim 6, characterized in that, The system resource utilization rate exceeding the first preset resource utilization rate includes: The resource occupancy rate of the first original system resources and the sum of the first system resources before the user's creation operation on the first document window is detected exceeds the first preset resource occupancy rate; or, The resource occupancy rate of the second original system resources and the total resource occupancy rate of the second system before the activation operation of the second document window is detected exceeds the first preset resource occupancy rate.

8. A resource scheduling device, characterized in that, include: The determination module is used to determine the document type corresponding to each document window when each document window is created; The determining module is further configured to determine the weight coefficient corresponding to each document window based on the document type corresponding to each document window; The determining module is further configured to determine multiple inactive windows that are in an inactive state when the system resource utilization rate is detected to exceed the first preset resource utilization rate. The resource degradation module is used to perform resource degradation operations based on a preset window retention strategy and the weight coefficients corresponding to the multiple inactive windows, until the system resource utilization rate reaches a second preset resource utilization rate.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-7.