Resource sharing method, and electronic device and storage medium

Through online services, free resources are allocated to offline computing services for use during low peak periods, the problem of low utilization of online services is solved, and the sharing and reuse of resources is achieved and the utilization rate of resources is improved.

WO2025149876A1PCT designated stage expired Publication Date: 2025-07-17CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD

Patent Information

Application Number
PCT/IB2025/050110
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-10
Filing Date
2025-01-06
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

The resource utilization rate of online services is low during the peak period of resource use, resulting in waste of resources, and it is difficult for the existing technology to effectively improve resource utilization.

Method used

By receiving the sharing conditions specified by the user, the idle resources of the online service are allocated to the offline computing service for use, and the resources are released when the sharing end condition is met to achieve shared reuse of resources.

Benefits of technology

Improve resource utilization, ensure the normal operation of online services, and reduce resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025050110_17072025_PF_FP_ABST
    Figure IB2025050110_17072025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present disclosure are a resource sharing method, and an electronic device and a storage medium. The method comprises: receiving a sharing condition specified by a user for resources used by a first service; on the basis of the sharing condition, allocating idle resources of the first service to a second service for use; and when it is detected that a sharing end condition specified by the sharing condition is satisfied, controlling the second service to release the resources of the first service which are occupied by the second service. A cloud platform receives the sharing condition specified by the user for the resources used by the first service, so as to allocate the idle resources of the first service to the second service on the basis of the sharing condition, such that the resources locked by the first service are multiplexed, thereby improving the utilization rate of resources. Since the idle resources of the first service are allocated to the second service for use, the normal operation of the first service is not affected; and when the system time reaches a sharing end time specified by the sharing condition, the resources of the first service which are occupied by the second service are released, such that the operation requirements of the first service are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] A Resource Sharing Method, Electronic Device, and Storage Medium. This disclosure claims priority to a Chinese patent application filed with the Patent Office of China on January 10, 2024, with application number 202410038638.8, entitled "A Resource Sharing Method, Electronic Device, and Storage Medium," the entire contents of which are incorporated herein by reference. Technical Field: This disclosure relates to the field of computer technology, and more specifically to a resource sharing method, electronic device, and storage medium. Background: With the development of cloud technology, an increasing number of user tasks are running on the cloud. For user online services, resource certainty is required to ensure constant operation. Users purchase ECS (Elastic Compute Service) resources of a corresponding capacity on the cloud and lock them through certain means to meet the needs of continuously running online services. However, online services experience low resource usage during certain time periods, such as at night. During these periods, resource utilization is relatively low, resulting in resource waste. SUMMARY OF THE INVENTION The present disclosure addresses the shortcomings of the prior art by providing a resource sharing method, electronic device, and storage medium. This objective is achieved through the following technical solutions. In a first aspect, the present disclosure provides a resource sharing method, applied to a cloud platform, comprising: receiving user-specified sharing conditions for resource use by a first service; allocating idle resources of the first service to a second service based on the sharing conditions; and controlling the second service to release resources occupied by the first service upon detecting that a sharing termination condition specified in the sharing conditions has been met. The resource sharing method described in the first aspect has at least the following beneficial effects or advantages: The cloud platform receives user-specified sharing conditions for resource use by the first service and, based on the sharing conditions, allocates idle resources of the first service to the second service, thereby reusing resources locked by the first service and improving resource utilization. Since the idle resources of the first service are allocated to the second service, the normal operation of the first service is not affected. Furthermore, when the sharing termination condition specified in the sharing conditions is met, the resources occupied by the second service are released from the first service, ensuring the operational needs of the first service. The first service can be a constantly running online service, while the second service can be a cloud service other than the first, such as an offline computing service. By allocating idle resources of the online service during off-peak hours to the offline computing service, online service resources can be shared and reused, improving resource utilization. When the user-specified sharing termination condition is met, the online service resources occupied by the offline computing service are released to ensure the online service's operational needs.A second aspect of the present disclosure provides a resource sharing method, applied to a user device, comprising: obtaining resource utilization of a first service at different times from a cloud platform, displaying the resource utilization of the first service at different times and the total amount of resources used to process the first service; receiving sharing conditions entered by a user for the first service based on the resource utilization and the total amount of resources; and transmitting the sharing conditions to the cloud platform, so that the cloud platform allocates idle resources of the first service to a second service based on the sharing conditions. The resource sharing method described in the second aspect has at least the following beneficial effects or advantages: by displaying the resource utilization of the first service at different times and the total amount of resources used to process the first service to the user, the user is facilitated to specify sharing conditions for the first service's resources based on the first service's resource usage. By transmitting the user-specified sharing conditions to the cloud platform, the cloud platform can allocate idle resources of the first service to the second service based on the sharing conditions, thereby sharing the resources locked by the first service and improving resource utilization. A third aspect of the present disclosure provides a resource sharing method, comprising: a user device obtaining resource utilization of a first service at different times from a cloud platform, displaying the resource utilization of the first service at different times and the total amount of resources used to process the first service; the user device receiving sharing conditions entered by the user for the first service based on the resource utilization and the total amount of resources at different times, and sending the sharing conditions to the cloud platform; the cloud platform allocating idle resources of the first service to a second service based on the sharing conditions; and the cloud platform controlling the second service to release the resources occupied by the first service upon detecting that a sharing termination condition specified in the sharing conditions is satisfied. A fourth aspect of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method according to the first or second aspect. A fifth aspect of the present disclosure provides a computer-readable storage medium storing a computer program, the program being executed by the processor to implement the method according to the first or second aspect. A sixth aspect of the present disclosure provides a computer program product, comprising a computer program, the computer program being executed by the processor to implement the method according to the first or second aspect. The above description is merely an overview of the technical solution of the present disclosure. To provide a clearer understanding of the technical means of the present disclosure, which can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features, and advantages of the present disclosure more readily understood, specific implementation methods of the present disclosure are hereinafter described.BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings described herein are intended to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are intended to explain the present disclosure and are not intended to unduly limit the present disclosure. In the accompanying drawings: FIG1 is a schematic diagram illustrating resource usage of an online service according to an exemplary embodiment; FIG2 is a flow chart illustrating an embodiment of a resource sharing method according to an exemplary embodiment; FIG3 is a schematic diagram illustrating time-sharing resource usage according to an exemplary embodiment; FIG4 is a schematic diagram illustrating resource view management and scheduling according to an exemplary embodiment; FIG5 is a flow chart illustrating an embodiment of another resource sharing method according to an exemplary embodiment; FIG6 is an interactive flow chart illustrating resource sharing according to an exemplary embodiment; FIG7 is a schematic diagram illustrating the hardware structure of an electronic device according to an exemplary embodiment; FIG8 is a schematic diagram illustrating the structure of a storage medium according to an exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS The exemplary embodiments will be described in detail herein, with examples thereof illustrated in the accompanying drawings. In the following description, when referring to the drawings, unless otherwise indicated, identical numerals in different drawings represent identical or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims. The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or," as used herein, refers to and encompasses any and all possible combinations of one or more of the associated listed items. It should be understood that while the present disclosure may employ the terms "first," "second," and "third," etc., to describe various information, such information should not be limited to these terms. These terms are used solely to distinguish information of the same type from one another. For example, first information could be referred to as second information, and similarly, second information could be referred to as first information, without departing from the scope of this disclosure. Depending on the context, the term "if," as used herein, could be interpreted as meaning "when," "when," or "in response to determining."Currently, for users' online services, resource determinism must be guaranteed. Therefore, the resources requested by users for online services on the cloud are locked, meaning that these resources are only available to the user's online services. However, due to off-peak periods for online services, resource utilization is relatively low during these periods. Figure 1 shows daily resource usage for online services. The nighttime hours between 00:00 and 08:00 are off-peak periods with low resource utilization, while the daytime hours are peak periods with high resource utilization. Due to both off-peak and peak periods, the average resource utilization of online services is relatively low, typically only 10%-30%, resulting in resource waste. Based on the above technical issues, the inventors discovered that nighttime is peak resource usage for offline computing services. If offline computing services could utilize idle resources during off-peak periods for online services, overall resource utilization could be improved. For example, Company A is planning its future internal cloud service product usage. Different departments and teams within the company will use different cloud service products. In terms of product coverage, we will use cloud servers, elastic containers and other laaS on the cloud.

[0002] Infrastructure as a Server (I nf rastructure as a Server, Infrastructure as a Service) products, as well as PaaS such as big data and database

[0003] Platform as a Service (Platform as a Service) products. A company currently has a task running on the cloud, which can be considered an online service. The company has purchased corresponding cloud resources through resource reservation as private resources to ensure the task's continuous operation. Daily observations have revealed that resource usage is off-peak at certain times. The company also uses big data services on the cloud for offline computing. The company hopes to have the big data services reuse idle resources during these off-peak periods, thereby improving overall resource utilization and reducing costs. To this end, this disclosure proposes a resource sharing method. Users specify sharing conditions for the first service's resources based on the first service's resource usage. The cloud platform receives the user-specified sharing conditions and, based on these conditions, allocates the first service's idle resources to a second service, reusing the first service's locked resources and improving resource utilization. Because the first service's idle resources are allocated to the second service, the first service's normal operation is not affected. When the sharing termination conditions specified in the sharing conditions are met, the second service releases the first service's resources, ensuring the first service's operational needs. The first service can be a constantly running online service, and the second service can be a cloud service other than the first service, such as an offline computing service. By allocating idle resources of the online service during off-peak hours to the offline computing service, online service resources can be shared and reused, achieving improved resource utilization. When user-specified sharing termination conditions are met, the online service resources occupied by the offline computing service are released to ensure the online service's operational needs. The above examples illustrate applications where the first and second services are different types of services. However, the second service can also be different services of the same type as the first, as long as the first and second services are different cloud services. The following describes in detail the technical solutions of this disclosure and how they solve the aforementioned technical problems using specific embodiments. The specific embodiments listed above may be combined with each other, and identical or similar concepts or processes may not be described in detail in some embodiments. The following describes the embodiments of this disclosure in detail with reference to the accompanying drawings. Example 1: Figure 2 is a flow chart illustrating an embodiment of a resource sharing method according to an exemplary embodiment. This embodiment may be executed by a cloud platform. The resource sharing method includes the following steps: Step 201: Receive sharing conditions specified by a user for resource usage by a first service. In this step, the first service is a cloud platform service product used by the user. The user locks a certain amount of resources on the cloud platform to ensure the continuous operation of the first service and resource certainty.In other words, the first service can be considered an online service that needs to remain operational at all times. However, resource usage by online services varies. In some periods, resource usage is high, known as peak periods, while in other periods, resource usage is relatively low, known as off-peak periods. During off-peak periods, resources used by the first service are somewhat idle. To share these resources with other services, users can specify sharing conditions for the first service's resource usage. These sharing conditions describe the conditions that must be met for the first service to share its resources with other services. Optionally, the sharing conditions may include the time period for the first service to share resources, the quota of sharable resources, and information about the resource pool corresponding to the first service. Resources locked by the first service are typically placed in a private resource pool, so the resource pool information corresponding to the first service must be specified in the sharing conditions. The sharing start and end times of the sharing time period represent the sharing start and end conditions, respectively. The resource quota is the user-specified resource size that the second service can use from the first service. Furthermore, the sharing conditions may also include information about the shared user and the shared service. For example, assume that user A's first service locks resource pool A, which has 1000 vCPUs (virtual processors) and 100 GB of memory. To ensure its use, the sharing conditions specify a sharing time period of 12:00 AM to 8:00 AM daily, meaning the sharing starts at 12:00 AM and ends at 8:00 AM. The resource quota is 600 vCPUs and 60 GB of memory. The resource pool information is Ao. Step 202: Based on the sharing conditions, the idle resources of the first service are allocated to the second service. In this step, the idle resources of the first service refer to the total resources of the first service minus the currently used resources. The second service is also a cloud platform service product used by users for offline computing and does not need to be constantly running. Therefore, the second service can be considered an offline service that does not need to be constantly running, but only needs to be started and run during certain time periods. For example, a big data computing service provided by a cloud platform can be considered an offline service that does not need to be constantly running, but only needs to be started and run during certain time periods. Before executing step 202, it is necessary to control the first service to release the occupied resources to make these resources free for sharing with other services. The implementation process includes: when the current system time reaches the sharing start time specified by the sharing condition, controlling the first service to release the resources of the resource quota specified by the sharing condition.During non-sharing periods, all resources in the resource pool are typically used to process the first service, ensuring peak resource usage. Therefore, when the sharing start time of the sharing period arrives, the first service enters an off-peak period and can release some resources to reduce the resources occupied by the first service. Furthermore, the amount of resources reduced by the first service must be at least the resource quota specified by the sharing conditions to ensure normal sharing. Suppose the first service uses 1000 vCPUs and 100 GB of memory to create 100 instances with 10 vCPUs and 1 GB of memory. During peak periods, all 100 instances execute tasks at full capacity, while during off-peak periods, some instances execute tasks at low capacity, or even execute no tasks at all. Given a resource quota of 600 vCPUs and 60 GB of memory specified in the sharing conditions, releasing 60 of these 100 instances with 10 vCPUs and 1 GB of memory can meet the sharing requirement. It should be noted that this disclosure does not limit the method for controlling resource release by the first service. The user device can authorize the cloud platform to release the instance of the first service based on the sharing time period and resource quota specified in the sharing conditions. Alternatively, the user device can send a resource release notification to the cloud platform, which can then passively release the instance of the first service based on the notification. As can be seen, when the sharing start time of the sharing time period arrives, it indicates that the resource usage of the first service has entered a low-peak period. By releasing some of the resources occupied by the first service for use by the second service, these resources, which are freed up by the first service, can be allocated to the second service, thus achieving time-sharing of resources. For example, as shown in Figure 3, since the first service, which runs an online service, enters an off-peak period between 12:00 AM and 8:00 AM daily, resource utilization is relatively low. Therefore, a user grants sharing authorization to the first service, specifying that a resource quota of 600 vCPUs and 60 GB of memory can be shared with the second service during the period between 12:00 AM and 8:00 AM daily. Consequently, the first service releases 600 vCPUs and 60 GB of memory at 12:00 AM daily. Starting at 12:00 AM daily, the second service adds these 600 vCPUs and 60 GB of memory to its own resource pool and uses them to run its own computing service. At 8:00 AM, the second service releases these resources. As one possible implementation, by detecting instance creation requests from the second service, if the detected instance creation request meets the sharing conditions, an instance for processing the second service is generated based on the instance creation request using the first service's idle resources.In this embodiment, the second service may be a cloud service that does not need to be constantly running, and can be referred to as an offline service, such as a big data service performing offline computing. The instance creation request for the second service is used to create an instance for processing the second service. Based on the sharing conditions described in step 201 above, the process of determining whether the detected instance creation request meets the sharing conditions includes: the detection time of the instance creation request must fall within the sharing time period specified by the sharing conditions, and the resource pool information carried in the instance creation request must indicate the resource pool specified by the sharing conditions. For example, assuming the sharing time period specified by the sharing conditions is 00:00-08:00 daily, the designated resource pool is S01, and the instance creation request is detected at 03:30. Since the detection time falls within the sharing time period and the resource pool information carried in the instance creation request is also S01, the instance creation request is considered to meet the sharing conditions. If the instance creation request meets these conditions, it indicates that the instance creation request is generated by sharing resources to start the second service. By determining that the instance creation request meets the sharing conditions, sharing accuracy can be ensured. Furthermore, if the sharing conditions also include information about the shared user and the shared service, it is possible to further determine whether the user information carried in the instance creation request is the shared user information specified in the sharing conditions, and whether the second service is the shared service information specified in the sharing conditions. Continuing with the above example, assuming the sharing conditions specify that the shared user is User A and the shared service is Service A, if it is detected that the user information carried in the instance creation request is User A and that the second service to which the instance creation request belongs is also Service A, then the instance creation request is considered to meet both the shared user and shared service conditions specified in the sharing conditions. In an optional implementation, in the process of using the idle resources of the first service to generate an instance for processing the second service based on the instance creation request, a resource quota specified in the sharing conditions is obtained. Then, based on the instance creation requirements in the instance creation request, an instance for processing the second service is generated using the idle resources of the first service within the resource quota. The resource quota is the size of the sharable resources specified by the user in the sharing conditions. The idle resources of the first service are the resources released by the control of the first service as described above. Specifically, the released resources may be marked in the resource pool to indicate that they are available idle resources.In one specific embodiment, to generate an instance of the second service using the idle resources of the resource quota of the first service, a virtual physical machine can be created using the idle resources of the resource quota in the resource pool specified by the sharing conditions. Then, within this virtual physical machine, an instance for processing the second service is generated according to the instance creation request. The physical machine's resource view management only allows the idle resources of the resource quota to be fully scheduled for the second service within the reserved idle resources of the resource pool. To achieve resource partitioning, a virtual physical machine is created using the idle resources of the resource quota in the resource pool. This allows for fine-grained resource scheduling for the second service using a resource view management similar to that of a physical machine. The instance creation request can include information such as instance specifications and the number of instances. As shown in Figure 4, in the resource view management of the real physical machine, the reserved idle resources in the resource pool of the first service are of the resource specification of 8vCPUs and 8GB of memory. By using these resources to create a virtual physical machine, the resource view management of the virtual physical machine can schedule resource specifications of 8vCPUs and 8GB of memory or less. This allows the creation of instances of 8vCPUs and 8GB of memory or less for the second service. Assume that the instance creation requirements are to create an instance with 2vCPUs and 1GB of memory and an instance with 4vCPUs and 1GB of memory. In this case, the virtual physical machine allows the creation of instances of these specifications. It should be noted that a virtual physical machine is a hardware entity virtualized using certain resources on a real physical machine. In other words, a virtual physical machine is a hardware system virtualized using a real physical machine. Step 203: Upon detecting that the sharing termination condition specified in the sharing condition is met, control the second service to release the resources occupied by the first service. In this step, the sharing termination condition specified in the sharing condition is satisfied when the current system time reaches the end time of the sharing time period specified in the sharing condition. This indicates that the resource usage of the first service has gradually recovered. To ensure the normal operation of the first service, the resources occupied by the second service need to be released for use by the first service. It should be noted that the released resources are those of the first service occupied by the second service; resources requested by the user for the second service are not processed. In specific implementations, instances generated using shared resources can be marked. When releasing resources, the marked instances are released to release the resources of the first service occupied by the second service.At this point, the resource sharing process shown in FIG. 2 is completed. The cloud platform receives the user-specified sharing conditions for resource usage by the first service and, based on these conditions, allocates the first service's idle resources to the second service, thereby reusing the first service's locked resources and improving resource utilization. Since the first service's idle resources are allocated to the second service, the normal operation of the first service is not affected. When the sharing termination conditions specified in the sharing conditions are met, the resources occupied by the second service from the first service are released to ensure the operation of the first service. Example 2: Based on the example shown in FIG. 2 , FIG. 5 is a flow chart illustrating another example resource sharing method according to an exemplary embodiment. The execution entity of this example may be a user device. The resource sharing method includes the following steps: Step 401: Obtain resource utilization of the first service at different times from the cloud platform, and display the resource utilization of the first service at different times and the total amount of resources used to process the first service. In specific implementations, the cloud platform collects real-time statistics on resource usage across different cloud services. Specifically, the ratio of a cloud service's current resource usage to its total resource usage is calculated at regular intervals to obtain the current resource utilization rate. Therefore, the cloud platform can obtain the resource utilization rate of the first service at different times. In step 401, a request for the first service's resource usage is sent to the cloud platform. Upon receiving the resource utilization rate of the first service at different times from the cloud platform, the resource utilization rate of the first service at different times can be displayed on a timeline. The diagram of resource utilization over time, shown in Figure 1, helps users understand the off-peak hours for resource usage of the first service. Resource quotas can then be determined based on the resource utilization rate and total resource usage during these off-peak hours. Step 402: Detect the sharing conditions entered by the user for the first service based on the resource utilization rate and total resource usage at different times. In this step, the user obtains the off-peak resource usage time periods and average resource usage of the first service during these off-peak periods based on the resource utilization rate and total resource volume of the first service at different times. The off-peak periods are then used as sharing time periods, and the resource quota is calculated by subtracting the average resource usage from the total resource volume. The sharing conditions for the first service are formed by the sharing time periods, resource quotas, and the resource pool information corresponding to the first service. Furthermore, information about the shared user and the shared service can be added to the sharing conditions. Step 403: The sharing conditions are sent to the cloud platform, so that the cloud platform allocates the idle resources of the first service to the second service based on the sharing conditions. In this step, resource sharing authorization for the first service is achieved by sending the sharing conditions to the cloud platform.Based on the above-mentioned second embodiment, by displaying the resource utilization of the first service at different times and the total amount of resources used to process the first service, users can specify sharing conditions for the first service's resources based on the resource usage of the first service. By sending the user-specified sharing conditions to the cloud platform, the cloud platform can allocate the first service's idle resources to the second service based on the sharing conditions, thereby sharing the first service's locked resources and improving resource utilization. Based on the above-mentioned first and second embodiments, the resource sharing implementation process is detailed through the interaction between the various product modules in the cloud platform (i.e., the ECS module, the big data service module, and the resource sharing management module). Figure 6 is an interactive flow chart illustrating a resource sharing implementation process according to an exemplary embodiment. The ECS module is used to provide cloud server ECS resources; the resource sharing management module provides users with a portal for resource sharing; and the big data service module is used to use ECS resources for big data computing services. During the sharing establishment phase, the user device uses the ECS module to lock a certain capacity of the resource pool for use by the continuously running online service, ensuring resource certainty. The user device then sends the sharing conditions entered by the user for the online service to the resource sharing management module. These sharing conditions may include the sharing time period, resource quota, information about the resource pool corresponding to the online service, information about the shared user, and information about the shared service. The sharing time period, resource quota, and information about the resource pool corresponding to the online service are mandatory, while information about the shared user and shared service are optional. Assume that the shared service is a big data service, and the sharing time period is from midnight to 8:00 am daily, which is the low-peak period for online service resource usage. The resource sharing management module sends the sharing conditions to the ECS module and the big data service module, respectively. The ECS module and the big data service module record the sharing conditions. During the resource sharing phase, user devices create instances for online services using the resource pool. When the online service enters a low-use period (i.e., when the system time reaches the start time of the sharing time period specified in the sharing conditions), the user device sends a resource release notification to the ECS module based on the resource quota specified in the sharing conditions. Based on the user device's resource release notification, the ECS module stops some online service instances to free up some resources. Furthermore, when the big data service module detects that the system time reaches the start time of the sharing time period specified in the sharing conditions, it sends an instance creation request to the ECS module based on the resource quota specified in the sharing conditions.

[0004] The ECS module determines whether the instance creation request meets the online service's sharing conditions to ensure accurate resource sharing. If so, it creates a virtual physical machine using the idle resources in the corresponding resource pool's resource quota. Then, based on the instance creation requirements of the instance creation request, it creates an instance for processing the big data service within the virtual physical machine, enabling the big data service to reuse the online service's idle resources. When the big data service module detects that the system time reaches the end time of the sharing period specified in the sharing conditions, it can send a resource release notification to the ECS module based on the instances created using the online service's resources. Based on the resource release notification from the big data service module, the ECS module stops using the online service's resources to create instances, freeing up the online service's resources occupied by the big data service. Simultaneously, when the user device detects that the system time reaches the end time of the sharing period specified in the sharing conditions, it can send an instance creation request to the ECS module based on the resource quota specified in the sharing conditions to process the online service, allowing the previously released resources to continue to be used for processing the online service. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. The collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant region, and corresponding operation portals are provided for users to choose to authorize or reject. Corresponding to the aforementioned resource sharing method embodiment, this disclosure also provides a resource sharing system, which includes a user device and a cloud platform. The user device is configured to execute the method described in the first embodiment, and the cloud platform is configured to execute the method described in the second embodiment. This embodiment also provides an electronic device corresponding to the resource sharing method provided in the aforementioned embodiment, for executing the aforementioned resource sharing method. Figure 7 is a hardware structure diagram of an electronic device according to an exemplary embodiment. The electronic device includes: a communication interface 601, a processor 602, a memory 603, and a bus 604. The communication interface 601, the processor 602, and the memory 603 communicate with each other via the bus 604. The processor 602 can execute the resource sharing method described above by reading and executing machine-executable instructions corresponding to the control logic of the resource sharing method in the memory 603. The details of this method are described in the above embodiments and are not repeated here. The memory 603 mentioned in this disclosure can be any electronic, magnetic, optical, or other physical storage device and can contain stored information, such as executable instructions, data, and the like.Specifically, the memory 603 may be RAM (Random Access Memory), flash memory, a storage drive (such as a hard disk drive), any type of storage disk (such as an optical disk, a DVD (Digital Versatile Disc), etc.), or a similar storage medium, or a combination thereof. Communication between the system network element and at least one other network element is achieved through at least one communication interface 601 (which may be wired or wireless), and the Internet, a wide area network, a local area network, a metropolitan area network, etc. may be used. The bus 604 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. Memory 603 is used to store programs, and processor 602 executes the programs after receiving execution instructions. Processor 602 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method may be completed by hardware integrated logic circuits in processor 602 or by software instructions. Processor 602 may be a general-purpose processor, including a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It may implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of this disclosure may be directly executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The electronic device provided by the embodiment of the present disclosure and the resource sharing method provided by the embodiment of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.The present embodiments also provide a computer-readable storage medium corresponding to the resource sharing method provided in the aforementioned embodiments. Referring to FIG. 8 , the computer-readable storage medium shown is an optical disc 30 storing a computer program (i.e., a program product). When executed by a processor, the computer program executes the resource sharing method provided in any of the aforementioned embodiments. It should be noted that examples of the computer-readable storage medium 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 or magnetic storage media, which are not described in detail here. The computer-readable storage medium provided in the aforementioned embodiments of the present disclosure and the resource sharing method provided in the embodiments of the present disclosure are based on the same inventive concept and have the same beneficial effects as the method employed, executed, or implemented by the application program stored therein. The present embodiments also provide a computer program product corresponding to the resource sharing method provided in the aforementioned embodiments, comprising a computer program. When executed by a processor, the computer program executes the resource sharing method provided in any of the aforementioned embodiments. Those skilled in the art will readily envision other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only; the true scope and spirit of the present disclosure are indicated by the following claims. It should also be noted that the terms "comprise," "comprising," or any other variations thereof are intended to encompass a non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, the phrase "comprising an element..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element. The above description is merely a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

Claims 1. A resource sharing method, wherein Applied to a cloud platform, the method includes: receiving sharing conditions specified by a user for using resources of a first service; allocating idle resources of the first service to a second service for use according to the sharing conditions; and controlling the second service to release the resources of the first service occupied thereby when it is detected that a sharing end condition specified by the sharing conditions is met.

2. The method according to claim 1, wherein The allocating, according to the sharing conditions, idle resources of the first service to a second service for use includes: detecting an instance creation request of the second service; and generating, according to the instance creation request and when the detected instance creation request meets the sharing conditions, an instance for processing the second service by using the idle resources of the first service.

3. The method according to claim 2, wherein The detected instance creation request meeting the sharing conditions includes: the detection time of the instance creation request being within a sharing time period specified by the sharing conditions and the resource pool information carried by the instance creation request indicating a resource pool specified by the sharing conditions; and the detection of the sharing end condition specified by the sharing conditions being met includes: the current system time reaching the sharing end time of the sharing time period specified by the sharing conditions.

4. The method according to claim 2, wherein The generating, according to the instance creation request, an instance for processing the second service by using the idle resources of the first service includes: obtaining a resource quota specified by the sharing conditions; and generating, according to the instance creation requirements in the instance creation request, an instance for processing the second service by using the idle resources of the resource quota of the first service.

5. The method according to claim 4, wherein The generating, according to the instance creation requirements in the instance creation request, an instance for processing the second service by using the idle resources of the resource quota of the first service includes: creating a virtual physical machine by using the idle resources of the resource quota in the resource pool specified by the sharing conditions; and generating, according to the instance creation requirements in the instance creation request, an instance for processing the second service in the virtual physical machine.

6. The method according to any one of claims 1-5, wherein Before allocating, according to the sharing conditions, idle resources of the first service to a second service for use, the method further includes: controlling the first service to release resources of the resource quota specified by the sharing conditions when the current system time reaches the sharing start time of the sharing time period specified by the sharing conditions.

7. A resource sharing method, wherein Applied to a user device, the method includes: obtaining, from a cloud platform, the resource utilization rates of a first service at different times; and displaying the resource utilization rates of the first service at different times and the total amount of resources for processing the first service. Receiving sharing conditions input by the user for the first service according to the resource utilization rates at different times and the total amount of resources; and sending the sharing conditions to the cloud platform so that the cloud platform allocates, according to the sharing conditions, idle resources of the first service to a second service for use.

8. The method according to claim 7, wherein The sharing conditions include a sharing time period, resource pool information used by the first service, and a shareable resource quota.

9. A resource sharing method, wherein The method includes: a user device obtaining, from a cloud platform, the resource utilization rates of a first service at different times, and displaying the resource utilization rates of the first service at different times and the total amount of resources used to process the first service; the user device receiving sharing conditions input by a user for the first service according to the resource utilization rates at different times and the total amount of resources, and sending the sharing conditions to the cloud platform; the cloud platform allocating, according to the sharing conditions, the idle resources of the first service for use by a second service; and when the cloud platform detects that a sharing end condition specified by the sharing conditions is met, controlling the second service to release the resources of the first service that it occupies.

10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor executes the program to implement the method according to any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, wherein, The program is executed by a processor to implement the method according to any one of claims 1-8.

12. A computer program product, wherein, It includes a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Method for monitoring and distributing virtual resources in mixed cloud environment

    CN105468460A

  • Method and device for regulating cloud computing resources

    CN107040479A

  • Resource scheduling method, device and system for server cluster

    CN107968810A

  • Resource scheduling system and method

    CN114138400A

  • Resource management method, device and system and storage medium

    CN115686839A

Cited By

  • Resource sharing device

    CN120849125A