Resource processing method and device, equipment, storage medium and program product

By using the power space handle to manage kernel resources in a unified manner, the complexity caused by the independent creation and release of kernel resources is solved, thereby improving the efficiency of kernel resource operations and system reliability.

CN121560552APending Publication Date: 2026-02-24CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511755762.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Different kernel resources use their own independent creation and release mechanisms, which leads to complex resource management logic, reduces the efficiency of kernel resource operations, and increases system instability.

Method used

By introducing power space handles, the creation and release of kernel resources are managed in a unified manner, providing unified kernel resource services, reducing the complexity of resource operations, and improving system reliability.

Benefits of technology

It improves the efficiency of kernel resource operations and system reliability, simplifies the resource creation and release process, and avoids omissions in resource reclamation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560552A_ABST
    Figure CN121560552A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource processing method and device, equipment, a storage medium and a program product, and the method specifically comprises the steps that a first resource processing request sent by an application is received, and the first resource processing request comprises a power space handle of a power space of the application, a request type of the first resource processing request and resource information; determining an energy space of the application based on the energy space handle; determining a resource processing method based on the request type and the resource information; and executing a processing operation corresponding to the first resource processing request in the capability space by adopting a resource processing method. According to the embodiment of the invention, a unified kernel resource service can be provided for the application, so that the kernel resource operation efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of Internet of Things (IoT) technology, and in particular relates to a method, apparatus, device, computer-readable storage medium, and computer program product for resource processing. Background Technology

[0002] In an operating system, the kernel, as a core component, is responsible for the allocation and reclamation of system resources. Therefore, applications frequently rely on the kernel throughout their lifecycle to dynamically create and release various kernel resources. However, because different kernel resources typically employ their own independent creation and release mechanisms, resource management logic becomes complex and inconsistent, significantly reducing the efficiency of kernel resource operations. Summary of the Invention

[0003] This application provides a method, apparatus, device, computer-readable storage medium, and computer program product for resource processing, which can provide unified kernel resource services for applications, thereby significantly improving the efficiency of kernel resource operations.

[0004] In a first aspect, embodiments of this application provide a resource processing method applied to a kernel component, the method comprising: Receive a first resource processing request sent by the application. The first resource processing request includes the application's power space handle, the request type of the first resource processing request, and resource information. The power space of the application is determined based on the power space handle; Determine the resource processing method based on the request type and resource information; Using a resource processing method, the processing operation corresponding to the first resource processing request is executed in the power space.

[0005] Secondly, embodiments of this application provide a resource processing apparatus applied to a kernel component, the apparatus comprising: The receiving module is used to receive a first resource processing request sent by the application. The first resource processing request includes the power space handle of the application's power space, the request type of the first resource processing request, and resource information. The determination module is used to determine the application's capability space based on the capability space handle; The determination module is also used to determine the resource processing method based on the request type and resource information; The execution module is used to perform the processing operation corresponding to the first resource processing request in the power space using resource processing methods.

[0006] Thirdly, an electronic device is provided, comprising: a memory for storing computer program instructions; and a processor for reading and executing the computer program instructions stored in the memory to perform the resource processing method provided in the first aspect.

[0007] Fourthly, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the resource processing method provided in the first aspect is implemented.

[0008] Fifthly, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, it implements the resource processing method provided in the first aspect.

[0009] In this embodiment, a first resource processing request sent by an application can be received. This first resource processing request includes a handle to the application's authority space, a request type, and resource information. Since the authority space handle identifies the corresponding application's authority space, the application's authority space can be determined based on this handle. The request type of the first resource processing request represents the type of resource service requested by the application, and the resource information represents the kernel resources requested by the application. Therefore, a corresponding resource processing method can be determined based on the request type and resource information of the first resource processing request. This allows the resource processing method to be used to execute the processing operation corresponding to the first resource processing request within the application's authority space. In this way, a unified kernel resource service can be provided to the application through the application's authority space, reducing the complexity of kernel resource services such as resource creation and release. This not only improves the efficiency of kernel resource operations but also enhances system reliability. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is one of the flowcharts illustrating a resource processing method provided in an embodiment of this application; Figure 2 This is a second schematic flowchart of a resource processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a resource creation process provided in an embodiment of this application; Figure 4 This is a third flowchart illustrating a resource processing method provided in an embodiment of this application; Figure 5 This is a schematic diagram illustrating a resource release process provided in an embodiment of this application; Figure 6 This is a fourth flowchart illustrating a resource processing method provided in an embodiment of this application; Figure 7 This is the fifth flowchart illustrating a resource processing method provided in this application embodiment; Figure 8 This is a schematic diagram illustrating the process of creating a capability space for a target application, as provided in an embodiment of this application. Figure 9 This is a schematic diagram of the structure of a resource processing apparatus provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0013] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0014] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0015] Currently, different kernel resources typically employ their own independent creation and release mechanisms. After a kernel resource is created, it needs to be associated with the application using that resource through different mechanisms such as linked lists. Applications cannot request kernel resources from the kernel through a unified mechanism. Furthermore, during resource reclamation, different release procedures need to be executed for different kernel resources. This not only significantly increases the complexity of kernel resource creation and release and reduces the efficiency of kernel resource operations, but also easily leads to resource reclamation omissions, reducing system reliability.

[0016] To address the aforementioned problems, embodiments of this application provide a method, apparatus, device, computer-readable storage medium, and computer program product for resource processing. This method can receive a first resource processing request sent by an application. The first resource processing request includes a handle to the application's authority space, a request type for the first resource processing request, and resource information. Since the authority space handle identifies the corresponding application's authority space, the application's authority space can be determined based on the handle. The request type of the first resource processing request represents the type of resource service requested by the application, and the resource information represents the kernel resources requested by the application. Therefore, a corresponding resource processing method can be determined based on the request type and resource information of the first resource processing request. This allows the resource processing method to be used to execute the processing operation corresponding to the first resource processing request within the application's authority space. In this way, a unified kernel resource service can be provided to the application through the application's authority space, reducing the complexity of kernel resource services such as resource creation and release. This not only improves the efficiency of kernel resource operations but also enhances system reliability.

[0017] The resource processing method provided in this application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] Figure 1 This is one of the flowcharts illustrating a resource processing method provided in an embodiment of this application.

[0019] like Figure 1 As shown, the execution entity of this resource processing method can be a kernel component. Based on this, the resource processing method can specifically include the following steps: S110, Receive the first resource processing request sent by the application.

[0020] In some embodiments, the first resource processing request may include a handle to the application's authority space, a request type for the first resource processing request, and resource information. The authority space handle identifies the application's authority space, which provides unified resource services such as resource creation and resource release services. Therefore, the application can request resource services such as resource creation and resource release services provided by the authority space through the handle to its authority space. The request type of the first resource processing request characterizes the type of resource service requested by the application; correspondingly, the request type may include resource service types such as creation or release, without specific limitations. Furthermore, the resource information may be information about the resources related to the resource service requested by the application, without specific limitations.

[0021] Specifically, during runtime, an application can send a first resource processing request to the kernel component to request resource services such as resource creation or release. In this way, the kernel component can receive the first resource processing request from the application, facilitating subsequent operations based on that request and thus providing resource services to the application. It should be noted that the application can send the first resource processing request to the kernel component by calling a unified service interface.

[0022] S120, Determine the application's capability space based on the capability space handle.

[0023] Since the power space handle in this embodiment can be used to identify the power space of the corresponding application, the kernel component can determine the power space of the corresponding application based on the power space handle in the first resource processing request after receiving the first resource processing request sent by the application, thereby providing resource services such as resource creation or resource release to the application based on the power space of the application.

[0024] S130, determine the resource processing method based on the request type and resource information.

[0025] Specifically, since the request type of the first resource processing request can be used to characterize the resource service type requested by the application, and resource information refers to the relevant information of the resource for which the application requests the resource service, the kernel component can, upon receiving the first resource processing request, determine the resource processing method that matches the request type based on the request type in the first resource processing request and the resource information.

[0026] S140, using the resource processing method, execute the processing operation corresponding to the first resource processing request in the power space.

[0027] After determining the application's authority space and resource processing method, the kernel component can use that resource processing method to execute the processing operation corresponding to the first resource processing request in the application's authority space, thereby providing the application with unified kernel resource services.

[0028] In this embodiment, a first resource processing request sent by an application can be received. This first resource processing request includes a handle to the application's authority space, a request type, and resource information. Since the authority space handle identifies the corresponding application's authority space, the application's authority space can be determined based on this handle. The request type of the first resource processing request represents the type of resource service requested by the application, and the resource information represents the kernel resources requested by the application. Therefore, a corresponding resource processing method can be determined based on the request type and resource information of the first resource processing request. This allows the resource processing method to be used to execute the processing operation corresponding to the first resource processing request within the application's authority space. In this way, a unified kernel resource service can be provided to the application through the application's authority space, reducing the complexity of kernel resource services such as resource creation and release. This not only improves the efficiency of kernel resource operations but also enhances system reliability.

[0029] Since the request type of the first resource processing request in this embodiment can be used to characterize the resource service type of the application request, and the resource service type can include, for example, resource creation, resource release, etc., in order to accurately and comprehensively describe the resource processing method provided in this application embodiment, in one embodiment, the above request type can include a creation type, that is, indicating that the first resource processing request is used to request the creation service of the resource corresponding to the resource information. Correspondingly, the resource processing method determined based on the request type and resource information can include a resource creation method. Based on this, as follows Figure 2 As shown, the above S140 may specifically include the following steps: S1401, using the resource creation method, creates resources corresponding to resource information in the power space.

[0030] Specifically, if the request type of the first resource processing request includes a creation type, indicating that the first resource processing request sent by the application is for requesting the creation service of the resource corresponding to the resource information, then the resource processing method determined based on the request type and the resource information is the resource creation method. In this way, the kernel component can use this resource creation method to create the resource corresponding to the resource information within this capability space.

[0031] In this embodiment, if the request type of the first resource processing request is a creation type, then the determined resource processing method is a resource creation method. Based on this, the kernel component can use this resource creation method to create the relevant resources in the capability space. In this way, a unified resource creation service can be provided to the application through the application's capability space, reducing the complexity of resource creation, and centralized management of all kernel resources created by the application can be achieved through the application's capability space.

[0032] Therefore, in order to comprehensively and thoroughly describe the resource processing method provided in the embodiments of this application, in one embodiment, the method is further described as follows: Figure 2 As shown, the resource processing method provided in this embodiment may further include the following steps: S210, the first resource handle for generating resources; S220, send the first resource handle to the application.

[0033] The first resource handle mentioned above is used to identify the resource, and no specific limitation is made here.

[0034] Specifically, after the kernel component creates the resource corresponding to the resource information in the application's authority space using the resource creation method, it generates a first resource handle that can identify the resource and sends the first resource handle to the corresponding application, so that the application can access the resource based on the first resource handle.

[0035] In this embodiment, after creating the corresponding resource in the power space, a first resource handle for uniquely identifying the resource is generated, and the first resource handle is sent to the application for storage. This allows the application to access the resource and its provided resource services based on the first resource handle, effectively preventing unauthorized access to kernel resources and services by the application.

[0036] To describe the resource creation process involved in the foregoing embodiments in detail, in one example, if the request type of the first resource processing request is a creation type, and the corresponding resource processing method includes a resource creation method, then the resource creation process can be specifically described as follows: Figure 3 As shown: S301, the application sends the first resource processing request to the kernel component.

[0037] S302, the kernel component determines the application's capability space based on the capability space handle.

[0038] S303, the kernel component determines the resource creation method based on the creation type and resource information.

[0039] S304, the kernel component uses a resource creation method to create resources corresponding to resource information in the power space.

[0040] S305 is the first resource handle for resources generated by kernel components.

[0041] S306, the kernel component sends the first resource handle to the application.

[0042] Specifically, during runtime, an application can send a first resource processing request to a kernel component. Upon receiving this request, the kernel component can determine the application's capability space based on the capability space handle within the request, and determine the resource creation method based on the creation type and resource information. It can then use this method to generate the resource corresponding to the specified resource information within the capability space. Furthermore, the kernel component can generate a first resource handle for this resource and send it to the application.

[0043] In this embodiment, the kernel component can determine the application's capability space and resource creation method based on the received first resource processing request, and can use the resource creation method to create relevant resources in the capability space. In this way, a unified resource creation service can be provided to the application through the application's capability space, reducing the complexity of resource creation and thus improving the efficiency of kernel resource operations.

[0044] In another embodiment, if the request type includes a release type, it indicates that the first resource processing request is used to request the release service of the resource corresponding to the resource information. Correspondingly, the resource processing method may include a resource release method. In this case, the resource information may include a second resource handle, which may be a resource handle that identifies the resource corresponding to the resource information after the resource corresponding to the resource information is created in the power space.

[0045] Based on this, such as Figure 4 As shown, the above S140 may specifically include the following steps: S1402, using the resource release method, release the resource corresponding to the second resource handle in the power space, and release the second resource handle.

[0046] Specifically, if the request type includes a release type, the corresponding determined resource processing method may include a resource release method. In this case, the resource information in the first resource processing request may include a second resource handle. Thus, the kernel component can use the resource release method to release the resource corresponding to the second resource handle in the application's capability space and release the second resource handle.

[0047] In this embodiment, if the request type is a release type, the corresponding resource processing method is a resource release method. In this case, the resource information may include a second resource handle. Based on this, the kernel component can use the resource release method to release the resource corresponding to the second resource handle in the capability space and release the second resource handle. Thus, a unified resource release service can be provided to the application through the application's capability space, which not only reduces the complexity of resource creation and improves the efficiency of kernel resource operations, but also avoids resource reclamation omissions during resource recycling, thereby improving system reliability.

[0048] To describe the resource release process involved in the foregoing embodiments in detail, in one example, if the request type of the first resource processing request is a release type, and correspondingly, the resource processing method includes a resource release method, then the resource release process can be as follows: Figure 5 As shown: S501, the application sends the first resource processing request to the kernel component.

[0049] S502, the kernel component determines the application's capability space based on the capability space handle.

[0050] S503, the kernel component determines the resource release method based on the release type and resource information.

[0051] S504, the kernel component uses a resource release method to release the resource corresponding to the second resource handle in the power space, and release the second resource handle.

[0052] Specifically, during operation, the application can send a first resource processing request to the kernel component. The kernel component can then determine the application's capability space based on the capability space handle in the first resource processing request, and determine the resource release method based on the release type and resource information in the first resource processing request. It then uses the resource release method to release the resource corresponding to the second resource handle in the capability space, and releases the second resource handle.

[0053] In this embodiment, a unified resource release service can be provided to the application through the application's authority space, ensuring that the resources it manages are released normally. This not only reduces the complexity of resource creation and improves the efficiency of kernel resource operation, but also avoids resource reclamation omissions during resource reclamation, thereby improving the reliability of the system.

[0054] In order to provide a comprehensive and detailed description of the resource processing method provided in the embodiments of this application, in one embodiment, such as Figure 6 As shown, the resource processing method provided in this embodiment may specifically include the following steps: S610 receives resource acquisition requests sent by the application.

[0055] In some embodiments, the resource acquisition request may include a capability space handle of the application's capability space and a third resource handle. The third resource handle can be used to identify resources in the capability space corresponding to the capability space handle. It should be noted that the third resource handle may be the same as or different from the aforementioned first resource handle; no specific limitation is made here.

[0056] S620, based on the third resource handle, obtains the resources of the third resource handle from the power space corresponding to the power space handle.

[0057] S630 sends a resource with a third resource handle to the application.

[0058] Specifically, the kernel component can receive resource acquisition requests sent by the application. Since the resource acquisition request may include the application's capability space handle and the third resource handle, the kernel component can acquire the resources of the third resource handle from the capability space corresponding to the capability space handle based on the third resource handle.

[0059] In this embodiment, since the application can generate a resource handle to identify the resource after creating the resource in the power space, the kernel component can obtain a resource acquisition request containing the power space handle and the third resource handle, and based on the resource acquisition request, obtain the resource corresponding to the third resource handle in the power space corresponding to the power space handle, thereby realizing the application's acquisition or access to the resource and effectively preventing the application from illegally accessing kernel resources and services.

[0060] Furthermore, when an application needs to launch another application (i.e., the target application hereinafter), that application needs to create a corresponding capability space for the target application based on its own capability space, so that the target application can subsequently fulfill resource service requests based on its own capability space. Therefore, in order to comprehensively and thoroughly describe the resource processing method provided in the embodiments of this application, in one embodiment, as follows... Figure 7 As shown, the resource processing method provided in this application embodiment may include the following steps: S710 receives a second resource processing request sent by the application.

[0061] In some embodiments, the second resource processing request may include a power space handle of the application's power space and resource information of the target application.

[0062] S720 determines the application's capability space based on the capability space handle.

[0063] S730 creates the target application's authority space within the application's authority space based on the target application's resource information.

[0064] Specifically, the kernel component can receive a second resource processing request from an application. Since the second resource processing request may include the power space handle of the application's power space and the resource information of the target application, the kernel component can determine the application's power space based on the power space handle and create the target application's power space in the application's power space by calling the power space creation method provided by the application's power space based on the resource information of the target application.

[0065] In this embodiment, when an application needs to launch a target application, it can receive a second resource processing request sent by the application, and based on the second resource processing request, enable the application to create the target application's authority space within its own authority space. Thus, the creation of the target application's authority space is achieved.

[0066] Based on this, in one embodiment, the resource processing method provided by this application may further include the following steps: Generate a handle to the power space of the target application; Send the capability space handle of the target application to both the application and the target application.

[0067] Specifically, after the kernel component completes the creation of the target application's capability space within the capability space, it can generate a capability space handle for that target application and send this handle to the application. This allows the application to access the target application based on the capability space handle. Furthermore, sending the capability space handle to the target application enables the application to subsequently request resource services provided by that target application's capability space based on this handle.

[0068] In a complete example, the process of creating the capability space of the target application provided in this application embodiment can be as follows: Figure 8 As shown: S801, the application sends a second resource processing request to the kernel component.

[0069] S802, the kernel component determines the application's capability space based on the capability space handle.

[0070] S803, the kernel component creates the target application's permission space in the application's permission space based on the target application's resource information.

[0071] S804, the kernel component generates a handle to the capability space of the target application.

[0072] S805, the kernel component sends the capability space handle of the target application to the application.

[0073] S806, the kernel component sends the target application's capability space handle to the target application.

[0074] It should be noted that the specific details can be found in the aforementioned embodiments, and will not be elaborated upon here.

[0075] It should also be noted that after generating a handle to the power space of the target application and feeding it back to the target application, the target application can request resource services such as resource creation or resource release provided by the power space of the target application. For details on the process, please refer to the content of the application requesting resource services provided by the application's power space in the foregoing embodiments; further details are not provided here.

[0076] In this embodiment, after the creation of the target application's authority space in the application's authority space is completed, an authority space handle of the target application's authority space can be generated and sent to the application and the target application, so that the application can access the target application and the target application can request related resource services.

[0077] Since the foregoing embodiments require the application's power space to provide services such as resource creation, resource release, and resource acquisition, in order to comprehensively and thoroughly describe the resource processing method provided by the embodiments of this disclosure, in one embodiment, the resource processing method provided by the embodiments of this application may include the following steps: When the application starts, create the application's power space and generate a power space handle for the power space; Send the authority space handle to the application.

[0078] Specifically, when an application starts, the kernel component can create the application's power space, generate a power space handle to uniquely identify the power space, and send the power space handle to the application so that subsequent applications can access the power space based on the power space handle.

[0079] In this embodiment, the kernel component can create the application's power space when the application starts, generate a power space handle that can uniquely identify the power space, and send the power space handle to the application. This allows the kernel component to provide unified kernel resource creation and release services to user-mode programs through the power space. The creation and destruction of all kernel resources can only be processed through the unified service interface provided by the power space.

[0080] Based on this, in one embodiment, the resource processing method provided by this application may further include the following steps: Configure the resource handling methods corresponding to kernel resources after the kernel components have started up.

[0081] The aforementioned resource processing methods may include resource creation methods and resource release methods.

[0082] Specifically, when the kernel components have finished starting up, the resource processing methods for each kernel resource can be configured, so that when a user application requests a related resource service, the corresponding resource processing method can be called to provide the resource service.

[0083] In this embodiment, the resource processing methods for kernel resources are pre-configured after the kernel components have started. This pre-configuration mechanism ensures that when an application initiates a resource processing request during subsequent operation, it can directly call the corresponding processing method, thereby obtaining resource services efficiently and reliably.

[0084] Furthermore, since all kernel resources owned by an application need to be reclaimed upon termination, in order to efficiently reclaim the kernel resources owned by a process, in one embodiment, the resource processing method provided in this application may further include the following steps: When the application finishes running, receive a permission space release request sent by the application. The permission space release request includes the permission space handle of the application's permission space. Release the power space corresponding to the power space handle, and release the power space handle.

[0085] The power space release request is used to request the kernel component to release the power space owned by the application. In some embodiments, the power space release request may include the power space handle of the application's power space.

[0086] Specifically, the kernel component can receive a permission space release request sent by the application when the application finishes running. Since the permission space release request includes the permission space handle of the application's permission space, the kernel component can release the permission space corresponding to the permission space handle and release the permission space handle.

[0087] In this embodiment, upon application termination, a permission space release request sent by the application can be received. Based on the permission space handle of the application's permission space included in the permission space release request, the corresponding permission space is released, and the permission space handle is also released. This effectively reclaims all kernel resources owned by the application, preventing excessive occupation of kernel resources.

[0088] Based on the same inventive concept, embodiments of this application provide a resource processing apparatus, specifically combined with... Figure 9 The resource processing apparatus provided in the embodiments of this application will be described in detail.

[0089] Figure 9This is a schematic diagram of the structure of a resource processing device provided in an embodiment of this application.

[0090] like Figure 9 As shown, the resource processing apparatus 900 may include: The receiving module 910 is used to receive a first resource processing request sent by the application. The first resource processing request includes a handle to the application's power space, a request type for the first resource processing request, and resource information. The determination module 920 is used to determine the application's capability space based on the capability space handle; The determination module 920 is also used to determine the resource processing method based on the request type and resource information; The execution module 930 is used to perform the processing operation corresponding to the first resource processing request in the power space using the resource processing method.

[0091] In one embodiment, the request type includes a creation type, and the resource processing method includes a resource creation method; based on this, the resource processing apparatus provided in this application embodiment may include: The creation module is used to create resources corresponding to resource information in the authority space using resource creation methods.

[0092] In one embodiment, the resource processing apparatus provided in this application may further include: The generation module is used to generate the first resource handle for resources; The sending module is used to send the first resource handle to the application.

[0093] In one embodiment, the request type includes a release type, the resource processing method includes a resource release method, and the resource information includes a second resource handle; based on this, the resource processing apparatus provided in this application embodiment may further include: The release module is used to release the resource corresponding to the second resource handle in the power space using the resource release method, and to release the second resource handle.

[0094] In one embodiment, the resource processing apparatus provided in this application may further include: The receiving module is also used to receive resource acquisition requests sent by the application; the resource acquisition request includes the application's capability space handle and the third resource handle; The acquisition module is used to acquire resources from the power space corresponding to the power space handle based on the third resource handle; The sending module is used to send resources with third-party resource handles to the application.

[0095] In one embodiment, the resource processing apparatus provided in this application may further include: The receiving module is also used to receive a second resource processing request sent by the application. The second resource processing request includes the power space handle of the application's power space and the resource information of the target application. The determination module is also used to determine the application's capability space based on the capability space handle; The creation module is used to create the target application's authority space within the application's authority space based on the target application's resource information.

[0096] In one embodiment, the resource processing apparatus provided in this application may further include: The creation module is also used to create the application's capability space and generate a capability space handle when the application starts. The sending module is also used to send the authority space handle to the application.

[0097] In one embodiment, the resource processing apparatus provided in this disclosure may include: The configuration module is used to configure the resource handling methods corresponding to kernel resources after the kernel components have started up. The resource handling methods include resource creation methods and resource release methods.

[0098] In one embodiment, the resource processing apparatus provided in this disclosure may include: The receiving module is further configured to receive a power space release request sent by the application when the application finishes running, wherein the power space release request includes a power space handle of the application's power space. The release module is used to release the power space corresponding to the power space handle and release the power space handle.

[0099] In this embodiment, a first resource processing request sent by an application can be received. This first resource processing request includes a handle to the application's authority space, a request type, and resource information. Since the authority space handle identifies the corresponding application's authority space, the application's authority space can be determined based on this handle. The request type of the first resource processing request represents the type of resource service requested by the application, and the resource information represents the kernel resources requested by the application. Therefore, a corresponding resource processing method can be determined based on the request type and resource information of the first resource processing request. This allows the resource processing method to be used to execute the processing operation corresponding to the first resource processing request within the application's authority space. In this way, a unified kernel resource service can be provided to the application through the application's authority space, reducing the complexity of kernel resource services such as resource creation and release. This not only improves the efficiency of kernel resource operations but also enhances system reliability.

[0100] The various modules in the resource processing apparatus provided in the embodiments of this application can achieve... Figures 1 to 8 The method steps of any of the embodiments shown herein, and the corresponding technical effects thereof, will not be described in detail here for the sake of brevity.

[0101] Figure 10 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.

[0102] An electronic device may include a processor 1001 and a memory 1002 storing computer program instructions.

[0103] Specifically, the processor 1001 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0104] Memory 1002 may include mass storage for data or instructions. For example, and not limitingly, memory 1002 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 1002 may include removable or non-removable (or fixed) media. Where appropriate, memory 1002 may be internal or external to an electronic device. In a particular embodiment, memory 1002 is a non-volatile solid-state memory.

[0105] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.

[0106] The processor 1001 implements any of the resource processing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 1002.

[0107] In one example, the electronic device may also include a communication interface 1003 and a bus 1010. For example, Figure 10As shown, the processor 1001, memory 1002, and communication interface 1003 are connected through bus 1010 and complete communication with each other.

[0108] The communication interface 1003 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0109] Bus 1010 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 1010 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0110] Furthermore, in conjunction with the resource processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement the resource processing method provided in this application embodiment.

[0111] This application also provides a computer program product, which includes a computer program that is executed by a processor to implement the resource processing method provided in this application.

[0112] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0113] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0114] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for resource processing, characterized in that, Applied to kernel components, the method includes: Receive a first resource processing request sent by the application, the first resource processing request including the power space handle of the application's power space, the request type of the first resource processing request, and resource information; The power space of the application is determined based on the power space handle; The resource processing method is determined based on the request type and the resource information; Using the resource processing method, the processing operation corresponding to the first resource processing request is executed in the power space.

2. The method according to claim 1, characterized in that, The request type includes a creation type, and the resource processing method includes a resource creation method; The step of using the resource processing method to perform the processing operation corresponding to the first resource processing request in the power space includes: Using the resource creation method described above, resources corresponding to the resource information are created in the power space.

3. The method according to claim 2, characterized in that, Also includes: Generate a first resource handle for the resource; Send the first resource handle to the application.

4. The method according to claim 1, characterized in that, The request type includes a release type, the resource processing method includes a resource release method, and the resource information includes a second resource handle. The step of using the resource processing method to perform the processing operation corresponding to the first resource processing request in the power space includes: Using the resource release method, the resource corresponding to the second resource handle in the power space is released, and the second resource handle is released.

5. The method according to claim 1, characterized in that, Also includes: Receive a resource acquisition request sent by the application; the resource acquisition request includes a handle to the application's power space and a third resource handle; Based on the third resource handle, the resources of the third resource handle are obtained from the power space corresponding to the power space handle; Send the resource of the third resource handle to the application.

6. The method according to claim 1, characterized in that, Also includes: Receive a second resource processing request sent by the application, the second resource processing request including the power space handle of the application's power space and the resource information of the target application; The power space of the application is determined based on the power space handle; Based on the resource information of the target application, a power space for the target application is created in the power space of the application.

7. The method according to any one of claims 1 to 6, characterized in that, Also includes: When the application is launched, a power space for the application is created, and a power space handle for the power space is generated. Send the power space handle to the application.

8. The method according to claim 7, characterized in that, Also includes: Once the kernel component has finished booting, configure the resource processing methods corresponding to the kernel resources. These resource processing methods include resource creation methods and resource release methods.

9. The method according to any one of claims 1 to 6, characterized in that, Also includes: When the application finishes running, a power space release request sent by the application is received, the power space release request including the power space handle of the application's power space; Release the power space corresponding to the power space handle, and release the power space handle.

10. A resource processing apparatus, characterized in that, Applied to kernel components, the device includes: The receiving module is used to receive a first resource processing request sent by the application. The first resource processing request includes a power space handle of the application's power space, a request type of the first resource processing request, and resource information. A determination module is used to determine the power space of the application based on the power space handle; The determining module is also used to determine a resource processing method based on the request type and the resource information; An execution module is used to perform the processing operation corresponding to the first resource processing request in the power space using the resource processing method described above.

11. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the resource processing method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer storage medium stores computer program instructions, which, when executed by a processor, implement the resource processing method as described in any one of claims 1-9.

13. A computer program product, characterized in that, Includes a computer program, which, when executed, implements the resource processing method as described in any one of claims 1-9.