Resource pooling method and device, equipment and storage medium

By obtaining and generating object files to realize global calls to software and hardware resources, the problem of single resource types and inconvenient expansion in the existing technology is solved, and flexible combination and call of resources is realized.

CN119536973APending Publication Date: 2025-02-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311114125.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing resource pooling technology can only virtualize hardware resources, and the resource types are single, which is inconvenient to expand.

Method used

By obtaining the attribute information of the target resource in the electronic device, generating the object file corresponding to the target resource, and realizing global calls to the software and hardware resources.

Benefits of technology

The global call of software and hardware resources is realized, allowing any electronic device to use various software and hardware resources on other devices in the system, and can freely combine these resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536973A_ABST
    Figure CN119536973A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a resource pooling method and device, equipment and a storage medium. According to the technical scheme, any electronic device in a resource virtualization system comprising a plurality of electronic devices firstly obtains attribute information of a target resource in the electronic device, the target resource comprises at least one of a hardware resource and a software resource, and then the target resource is obtained according to the attribute information of the target resource. And generating an object file corresponding to the target resource, and calling the target resource by calling the object file. According to the resource pooling method, after any electronic device in the resource virtualization system generates the object file corresponding to the target resource according to the attribute information of the target resource, the object file can be called to achieve calling of the target resource, that is, global calling of software and hardware resources is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and relate to but are not limited to a resource pooling method and apparatus, device, and storage medium. Background Art

[0002] Resource pooling means that the provider's computing resources are pooled and made available to multiple users in the form of services through a multi-tenant model. Different physical and virtual resources are dynamically allocated and reallocated according to user needs.

[0003] In current related technologies, resource pooling can only virtualize hardware resources. Taking Hongmeng system as an example, Hongmeng hardware resource pooling can abstract various hardware resources of multiple devices to form a unified hardware resource pool by enhancing the original distributed device virtualization capabilities. However, the resource pooling method that can only virtualize hardware resources has a relatively single resource type and is not convenient for expanding resources.

[0004] Therefore, how to expand resources when resource pooling is an urgent problem to be solved. Summary of the invention

[0005] In view of this, the resource pooling method, device, equipment, and storage medium provided in the embodiments of the present application can realize the global call of software and hardware resources. The resource pooling method, device, equipment, and storage medium provided in the embodiments of the present application are implemented as follows:

[0006] The resource pooling method provided in an embodiment of the present application is applied to any electronic device in a resource virtualization system including multiple electronic devices, and the method includes: obtaining attribute information of a target resource in the electronic device, the target resource including at least one of a hardware resource and a software resource; generating an object file corresponding to the target resource based on the attribute information of the target resource, and calling the target resource by calling the object file.

[0007] The resource pooling device provided in the embodiment of the present application is applied to any electronic device in a resource virtualization system including multiple electronic devices, and the device includes: an acquisition module, used to obtain attribute information of a target resource in the electronic device, and the target resource includes at least one of a hardware resource and a software resource; a processing module, used to generate an object file corresponding to the target resource according to the attribute information of the target resource, and implement the call to the target resource by calling the object file.

[0008] The computer device provided in the embodiment of the present application includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the method described in the embodiment of the present application is implemented.

[0009] The computer-readable storage medium provided in the embodiment of the present application stores a computer program thereon, and when the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0010] The resource pooling method, apparatus, computer device and computer-readable storage medium provided in the embodiments of the present application enable any electronic device in the resource virtualization system to call the object file to call the target resource after generating the object file corresponding to the target resource according to the attribute information of the target resource. That is to say, any electronic device in the resource virtualization system can use various software and hardware resources on other electronic devices in the system, and can freely combine the software and hardware resources, thereby realizing the global call of software and hardware resources and solving the technical problems raised in the background technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0012] Figure 1 A schematic diagram of a system architecture of an electronic device provided by an embodiment of the present application;

[0013] Figure 2 A schematic diagram of the system architecture of a resource virtualization system provided by one embodiment of the present application;

[0014] Figure 3 A schematic diagram of an implementation flow of a resource pooling method provided in one embodiment of the present application;

[0015] Figure 4 A schematic diagram of the implementation process of a resource pooling method provided in another embodiment of the present application;

[0016] Figure 5 A schematic diagram of a process for synchronizing resources between devices provided in one embodiment of the present application;

[0017] Figure 6 A schematic diagram of an implementation flow of a resource pooling method provided in yet another embodiment of the present application;

[0018] Figure 7 A schematic diagram of the structure of a resource pooling device provided by an embodiment of the present application;

[0019] Figure 8 A structural schematic diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0022] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0023] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0024] In computer science, resource pooling refers to the pooling of computing resources from a provider so that they can be used as a service by multiple consumers through a multi-tenant model, with different physical and virtual resources dynamically allocated and reallocated based on user demand. Resource pooling enables location independence, meaning that the customer typically has no control or knowledge of the exact location of the provided resources, but may be able to specify the location quotient at a higher level of abstraction. For example, storage, processing power, memory, and network bandwidth are all resources.

[0025] In current related technologies, resource pooling can only virtualize hardware resources. Taking Hongmeng system as an example, Hongmeng hardware resource pooling enhances the original distributed device virtualization capability, abstracts various hardware resources of multiple devices, such as screens, cameras, loudspeakers, keyboards, sensors and storage, and forms a unified hardware resource pool in the "super virtual terminal". It also supports on-demand allocation and recombination of hardware resources, and realizes the global call of hardware resources. At the same time, multiple devices that make up the "super virtual terminal" can access a variety of hardware resources in the hardware resource pool.

[0026] However, the above-mentioned Hongmeng hardware resource pooling can only virtualize hardware resources, and the resource types are relatively single, which is not convenient for resource expansion. Therefore, how to expand resources when resource pooling is an urgent problem to be solved.

[0027] In view of this, an embodiment of the present application provides a resource pooling method, which is applied to any electronic device in a resource virtualization system including multiple electronic devices, and the method specifically includes: obtaining attribute information of a target resource in the electronic device, the target resource including at least one of a hardware resource and a software resource, and then generating an object file corresponding to the target resource according to the attribute information of the target resource, and calling the target resource by calling the object file. In the resource pooling method of the present application, after any electronic device in the resource virtualization system generates an object file corresponding to the target resource according to the attribute information of the target resource, the object file can be called to call the target resource, that is, any electronic device in the resource virtualization system can use various software and hardware resources on other electronic devices in the system, and can freely combine the software and hardware resources, that is, the global call of software and hardware resources is realized.

[0028] It should be understood that the electronic devices involved in the embodiments of the present application may be mobile phones, tablet computers, laptop computers, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, smart screens, artificial intelligence (AI) speakers, headphones, terminals in industrial control, terminals in self-driving, terminals in remote medical surgery, terminals in smart grids, terminals in transportation safety, terminals in smart cities, terminals in smart homes, personal digital assistants (PDAs), etc., and the embodiments of the present application are not limited to this.

[0029] For example, Figure 1 A schematic diagram of the system architecture of an electronic device provided in one embodiment of the present application. Figure 1 As shown, the electronic device includes components such as a processor 110, a memory 120, a transceiver 130, a display unit 140, an input unit 150, a sensor 160, an audio circuit 170, and a power module 180.

[0030] The processor 110 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 120, and calling data stored in the memory 120, the processor 110 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 110 may include one or more processing units; optionally, the processor 110 may integrate an application processor, which mainly processes operating devices, user interfaces, and application programs, etc. Of course, other processors may also be included, which are not listed here one by one.

[0031] The memory 120 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 120. The memory 120 mainly includes a program storage area and a data storage area, wherein the program storage area can store operating devices, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0032] The transceiver 130 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The transceiver 130 can be one or more devices integrating at least one communication processing module, for example, an antenna and a baseband processor are integrated into the transceiver 130, or an antenna and a modem processor are integrated into the transceiver 130, etc., which are not limited here.

[0033] The display unit 140 may be used to display information input by a user or information provided to a user and various menus of the electronic device. The display unit 140 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., which is not limited here.

[0034] The input unit 150 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 150 can collect the user's operations on or near it, and drive the corresponding connection device according to a pre-set program. In addition, the input unit 150 may include a touch panel, which can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel, the input unit 150 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys (such as volume control keys, switch keys, etc.), trackballs, joysticks, etc.

[0035] The electronic device may also include at least one sensor 160, such as a gyroscope sensor, a motion sensor, and other sensors. The motion sensor may include an acceleration sensor for detecting the magnitude of acceleration in all directions, and the magnitude and direction of gravity when stationary, which may be used for applications to identify the posture of the electronic device, such as horizontal and vertical screen switching, related games, magnetometer posture calibration, etc. As for other sensors that may be configured in the electronic device, such as a pressure gauge, a barometer, a hygrometer, a thermometer, an infrared sensor, a fingerprint sensor, etc., they will not be described in detail here.

[0036] The audio circuit 170 may include a speaker and a microphone, and may provide an audio interface between a user and an electronic device. The audio circuit 170 may transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 170 and converted into audio data, and then the audio data is output to the processor 110 for processing, and then sent to another electronic device through the video circuit, or the audio data is output to the memory 120 for further processing.

[0037] The electronic device also includes a power module 180 for supplying power to various components. Optionally, the power module 180 can be logically connected to the processor 110 through a power management device, so that the power management device can manage functions such as charging, discharging, and power consumption.

[0038] Although not shown, the electronic device may further include a camera. Optionally, the camera may be located at the front or rear of the electronic device, which is not limited in the embodiments of the present application.

[0039] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0040] In order to make the purpose and technical solution of this application clearer and more intuitive, the resource pooling method and device, equipment, and storage medium provided in the embodiments of this application will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.

[0041] It should be noted that the resource pooling method in the embodiment of the present application can be applied to any electronic device in a resource virtualization system including multiple electronic devices. For example, the system architecture of the resource virtualization system is as follows: Figure 2 As shown, the resource virtualization system includes a resource abstraction module 201 , a resource management module 202 and a resource access module 203 .

[0042] The resource abstraction module 201 is used to abstract the version, type, metadata and specifications of the target resource. The resource management module 202 is used to manage the target resource, such as creating a new target resource, updating a target resource, deleting a target resource and arbitrating a target resource. The resource access module 203 is used to access the target resource, such as resource access service and resource access interface description. In addition, the resource virtualization system can also include many software and hardware resources, such as a central processing unit (CPU), random access memory (RAM), memory, display, microphone, camera, keyboard, mouse, etc.

[0043] Optionally, the resource virtualization system comprehensively describes the resources on the end, edge, and cloud devices, provides unified management and access specifications, integrates all surrounding resources, supports on-demand allocation and recombination of resources, and can realize panoramic calling of resources.

[0044] Please refer to Figure 3 , is a schematic diagram of the implementation process of a resource pooling method provided by an embodiment of the present application. The method can be applied to Figure 1 The electronic device shown in FIG. Figure 2Any electronic device in the resource virtualization system shown, such as Figure 3 As shown, the method may include the following steps 301 and 302:

[0045] Step 301: Acquire attribute information of a target resource in an electronic device, where the target resource includes at least one of a hardware resource and a software resource.

[0046] It should be understood that the target resources include at least one of hardware resources and software resources, wherein the hardware resources may include peripherals and memory devices of electronic devices, such as screens, cameras, loudspeakers, keyboards, sensors, processors, memories, hard disks and storage devices, etc., and the software resources are generally composed of computer programs and related documents, such as applications, databases, network resources, related algorithms and other software, etc., which are not specifically limited in this application.

[0047] Optionally, the target resource also includes at least one of a combined hardware resource, a combined software resource, and a combined software and hardware resource, which is not specifically limited in this application.

[0048] It should also be understood that the attribute information of the target resource generally refers to the attribute information such as version, type, name, service interface and status corresponding to the target resource.

[0049] In some embodiments, any electronic device in the resource virtualization system may obtain the attribute information of the target resource in the electronic device by collecting the attribute information corresponding to the target resource, or receiving the attribute information of the target resource sent by other devices, or other methods, which are not specifically limited in this application.

[0050] Step 302: Generate an object file corresponding to the target resource according to the attribute information of the target resource, and call the target resource by calling the object file.

[0051] In some embodiments, the electronic device can obtain an object file corresponding to the target resource based on the attribute information of the target resource, such as the version, type, name, service interface and status information corresponding to the target resource, combined with the actual situation of the current target resource in the electronic device. The object file includes detailed information about the target resource, such as resource number, data type, specification, sampling rate, service interface name, occupancy status, etc.

[0052] Optionally, the electronic device can call the target resource through the object file. That is, one electronic device can use the target resources in other electronic devices in the resource virtualization system by calling the object file. For example, the first electronic device in the resource virtualization system does not have a camera, and the second electronic device in the resource virtualization system has a camera. The first electronic device can use the camera function of the second electronic device by calling the object file about the camera in the second electronic device.

[0053] In this embodiment, after any electronic device in the resource virtualization system generates an object file corresponding to the target resource based on the attribute information of the target resource, the object file can be called to call the target resource. In other words, any electronic device in the resource virtualization system can use various software and hardware resources on other electronic devices in the system, and can freely combine the software and hardware resources, thereby realizing the global calling of software and hardware resources.

[0054] Based on the above embodiments, Figure 4 A schematic diagram of the implementation flow of a resource pooling method provided in another embodiment of the present application is shown in FIG. Figure 4 As shown, the method may include the following steps 401 to 405:

[0055] Step 401: Acquire attribute information of a target resource in an electronic device, where the target resource includes at least one of a hardware resource and a software resource.

[0056] It should be understood that the target resources include at least one of hardware resources and software resources, wherein the hardware resources may include peripherals and memory devices of electronic devices, such as screens, cameras, loudspeakers, keyboards, sensors, processors, memories, hard disks and storage devices, etc., and the software resources are generally composed of computer programs and related documents, such as applications, databases, network resources, related algorithms and other software, etc., which are not specifically limited in this application.

[0057] Optionally, the target resource also includes at least one of a combined hardware resource, a combined software resource, and a combined software and hardware resource, which is not specifically limited in this application.

[0058] It should also be understood that the attribute information of the target resource generally refers to the attribute information such as version, type, name, service interface and status corresponding to the target resource.

[0059] In some embodiments, any electronic device in the resource virtualization system may obtain the attribute information of the target resource in the electronic device by collecting the attribute information corresponding to the target resource, or receiving the attribute information of the target resource sent by other devices, or other methods, which are not specifically limited in this application.

[0060] Step 402: Obtain a declaration file, which includes target properties required to generate an object file.

[0061] In some embodiments, the target attribute includes multiple attributes, and the multiple attributes are attributes of the same target resource, or the multiple attributes are attributes of different target resources, which is not limited in this application.

[0062] Understandably, the declaration file can be used to describe what the target resource is. For example, for a camera, the declaration file can include the type of camera and the camera's specifications, such as the camera's lens resolution, whether it supports telephoto and flash, etc.

[0063] In some embodiments, the target resource may publish a corresponding declaration file to the resource virtualization system, and the resource virtualization system may then identify what the target resource is, such as a camera resource.

[0064] As an example, the declaration file of the target resource may be in yaml format. A yaml format file generally consists of version, kind, metadata, specification, and status. The example is as follows:

[0065] "Version: 1.0

[0066] Kind: ResourceDefinition

[0067] Metadata:

[0068] Name: pantanal.resource.mic

[0069] Resource ID (resourceId):

[0070] Data type: int

[0071] Specifications:

[0072] Type: camera

[0073] Properties:

[0074] Sampling rate (sampleRates):

[0075] Data type: string

[0076] Service interface:

[0077] type: string

[0078] Status:

[0079] Occupancy:

[0080] type: booleanboolean

[0081] Step 403: Generate an object file corresponding to the target resource according to the declaration file and the attribute information of the target resource.

[0082] In some embodiments, the electronic device generates an object file corresponding to the target resource based on the declaration file of the target resource and the specific values ​​in the attribute information. In other words, the object file fills in the values ​​of the specific attribute information in the declaration file, such as the resource number, service interface, sampling rate, occupancy status, etc. in the declaration file of the above example.

[0083] Step 404: synchronize the object file with other electronic devices in the resource virtualization system, and / or obtain other object files from other electronic devices, so that other electronic devices can call the target resource by calling the object file.

[0084] It should be noted that each type of resource, such as cameras and microphones in hardware resources, corresponds to a resource controller. The corresponding resource controller collects information, monitors the status changes of such resources, and performs cross-end synchronization.

[0085] In a possible implementation, any electronic device in the resource virtualization system synchronizes object files with other electronic devices and / or obtains other object files from other electronic devices through wireless communication connections with other electronic devices in the resource virtualization system.

[0086] Understandably, any electronic device in the resource virtualization system can synchronize object files with electronic devices that are closer to it through wireless communication connection, for example, with electronic devices that are less than a preset distance threshold, which can also be called near-field devices; or any electronic device in the resource virtualization system can also obtain object files from other electronic devices in the resource virtualization system that are closer to it through wireless communication connection, that is, other electronic devices synchronize object files with any electronic device. Among them, wireless communication connection includes Bluetooth connection, local area network connection, etc., which is not limited in this application.

[0087] In another possible implementation, any electronic device in the resource virtualization system uploads the object file to the cloud server, so that other electronic devices in the resource virtualization system obtain the object file from the cloud server, and obtain other object files uploaded by other electronic devices from the cloud server.

[0088] Understandably, any electronic device in the resource virtualization system can upload the object file of its own target resource to the cloud server or other intermediate electronic device, and then other electronic devices in the resource virtualization system can directly obtain the corresponding object file from the cloud server or other intermediate electronic device when needed. Alternatively, any electronic device can also obtain the object file of other electronic devices from the cloud server or other intermediate electronic device. Among them, the method of synchronizing the object file through the cloud server does not limit the distance between electronic devices. For example, the distance between the synchronized electronic devices can be greater than the preset distance threshold.

[0089] For example, Figure 5 As shown in the resource synchronization flow chart in, it is assumed that the first electronic device 501 and the second electronic device 502 are two electronic devices in the resource virtualization system, and the first electronic device 501 includes resources such as a camera, a display and a microphone. The second electronic device 502 needs to call the camera and microphone resources in the first electronic device 501. When the first electronic device 501 and the second electronic device 502 are close to each other, that is, near field, and can be connected through wireless communication, the camera and microphone resources are exported from the first electronic device 501 through the wireless communication connection, and then imported into the second electronic device 502; when the first electronic device 501 and the second electronic device 502 are not close to each other and are not near field devices, the first electronic device 501 can obtain its own local exportable resources, and then the user selects the camera and microphone resources to be exported and publishes them to the cloud server 503. The second electronic device obtains local importable resources from the cloud server 503, and the user can select the camera and microphone resources to be imported and then import them. Correspondingly, the first electronic device 501 and the second electronic device 502 both include a camera resource controller and a microphone resource controller, and the resource status is synchronized from the camera resource controller of the first electronic device 501 to the camera resource controller of the second electronic device 502, and the resource status is synchronized from the microphone resource controller of the first electronic device 501 to the microphone resource controller of the second electronic device 502.

[0090] Step 405: store the object file and / or other object files corresponding to the target resource.

[0091] In some embodiments, for local resources, after collecting resource information, the electronic device will uniformly store it in the database of the local electronic device for permanent preservation. For cross-end resources, the electronic devices will store them in their respective databases after synchronizing the resources.

[0092] In some embodiments, after the electronic device has synchronized the resources of the surrounding connected devices, the resource virtualization system provides a unified access interface, and the upper-layer business, that is, the third-party application, can select the corresponding resources according to its own needs.

[0093] For example, when a video is played on a mobile phone, the video image information can be transmitted to the TV for display and the sound information can be transmitted to the audio equipment for playback through the resource virtualization system. For another example, a computer can also package the graphics processing unit (GPU) and data algorithms into a resource for external use. After the mobile phone or watch is connected, the GPU on the computer can be used to implement complex algorithm calculations.

[0094] In this embodiment, any electronic device in the resource virtualization system obtains the attribute information and declaration file of the target resource in the electronic device, and then generates an object file corresponding to the target resource based on the declaration file and the attribute information of the target resource, and finally synchronizes the object file to other electronic devices in the resource virtualization system, and / or obtains other object files from other electronic devices, so that other electronic devices can call the target resource by calling the object file. After the electronic devices in the resource virtualization system synchronize resources, any electronic device in the resource virtualization system can use various software and hardware resources on other electronic devices in the system, and can freely combine the software and hardware resources, that is, realize the global call of software and hardware resources.

[0095] Based on the above embodiments, Figure 6 A schematic diagram of the implementation process of a resource pooling method provided in another embodiment of the present application is shown in FIG. Figure 6 As shown, the method may include the following steps 601 to 606:

[0096] Step 601: Acquire attribute information of a target resource in an electronic device, where the target resource includes at least one of a hardware resource and a software resource.

[0097] It should be understood that hardware resources may include peripherals and memory devices of electronic devices, such as screens, cameras, speakers, keyboards, sensors, processors, memory, hard disks and storage, etc. Software resources are generally composed of computer programs and related documents, such as applications, databases, network resources, related algorithms and other software, etc. This application does not specifically limit this.

[0098] In some embodiments, any electronic device in the resource virtualization system may obtain the attribute information of the target resource in the electronic device by collecting the attribute information corresponding to the target resource, or receiving the attribute information of the target resource sent by other devices, or other methods, which are not specifically limited in this application.

[0099] Step 602: Obtain the operating status of the electronic device.

[0100] In some embodiments, the electronic device can obtain the operating status of the electronic device during operation through a system interface, such as a system interface of an Android system or a system interface of a Windows system. The operating status includes operating data of target resources in the electronic device, such as the resource number of the target resource, the value of the sampling rate, etc.

[0101] Optionally, any electronic device in the resource virtualization system may obtain the operating status of the electronic device by collecting operating data of target resources in the electronic device through sensors and other devices, or by receiving operating data about target resources sent by other devices, or by other methods, which are not specifically limited in this application.

[0102] Step 603: Generate an object file corresponding to the target resource according to the attribute information and operation status of the target resource.

[0103] In some embodiments, the attribute information of the target resource generally refers to the attribute information such as version, type, name, service interface and status corresponding to the target resource. The electronic device generates an object file corresponding to the target resource based on the attribute information and operating status.

[0104] It should be understood that the object file includes identification information for indicating whether the target resource is occupied, for example, whether the camera resource is occupied, whether the microphone resource is occupied, whether the display resource is occupied, and so on.

[0105] Step 604: synchronize object files with other electronic devices in the resource virtualization system, and / or obtain other object files from other electronic devices.

[0106] It should be noted that each type of resource, such as cameras and microphones in hardware resources, corresponds to a resource controller. The corresponding resource controller collects information, monitors the status changes of such resources, and performs cross-end synchronization.

[0107] In a possible implementation, any electronic device in the resource virtualization system synchronizes object files with other electronic devices and / or obtains other object files from other electronic devices through wireless communication connections with other electronic devices in the resource virtualization system.

[0108] In another possible implementation, any electronic device in the resource virtualization system uploads the object file to the cloud server, so that other electronic devices in the resource virtualization system obtain the object file from the cloud server, and obtain other object files uploaded by other electronic devices from the cloud server.

[0109] Step 605: receiving an object calling request, where the object calling request is used to call a target object file.

[0110] In some embodiments, after synchronizing object files to other electronic devices in the resource virtualization system and / or obtaining other object files from other electronic devices, the electronic device can receive an object call request sent by other electronic devices, that is, a request to call the object file corresponding to the target resource, that is, other electronic devices in the resource management system request to call the target resources of the corresponding electronic device.

[0111] Step 606: In response to the object calling request, calling the resources included in the target object file.

[0112] In some embodiments, when the identification information in the target object file indicates that the resources included in the target object file are not occupied, in response to the object call request, the resources included in the target object file are called. Of course, when the identification information in the target object file indicates that the resources included in the target object file are occupied, the call fails.

[0113] For example, when the subscriber identification module (SIM) card of a mobile phone is not occupied, devices without SIM cards, such as tablets and watches, under the same resource virtualization system can call the SIM card on the mobile phone to realize the telephone function; at the same time, mobile devices such as mobile phones and watches can also use the software and hardware resources on the computer to realize data calculation and processing, thereby reducing the load on the mobile device, reducing the power consumption of the mobile device, and improving the mobile device experience.

[0114] In this embodiment, any electronic device in the resource virtualization system obtains the attribute information of the target resource in the electronic device and the operation status of the electronic device, and then generates an object file corresponding to the target resource according to the attribute information and the operation status of the target resource, and then receives an object call request, the object call request is used to call the target object file, and then responds to the object call request to call the resources included in the target object file. In other words, after the electronic device generates the object file corresponding to the target resource, it can be called by other electronic devices in the resource virtualization system, and accordingly, the electronic device can also call the resources of other electronic devices in the resource virtualization system, realizing the global call of software and hardware resources.

[0115] It should be noted that each resource in the electronic device is managed by the corresponding resource controller, thereby achieving decoupling and facilitating resource expansion, thereby achieving global call of software and hardware resources. In addition, the resource pooling method in the embodiment of the present application does not limit the operating system of the electronic device. For example, the electronic device can be an Android system or a Windows system, etc., enriching the single-machine resource ecology.

[0116] It should be understood that, although the steps in the above-mentioned flowcharts are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0117] Based on the foregoing embodiments, an embodiment of the present application provides a resource pooling device, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0118] Figure 7 A schematic diagram of the structure of a resource pooling device provided in one embodiment of the present application is shown in FIG. Figure 7 As shown, the device 700 includes an acquisition module 701 and a processing module 702, wherein:

[0119] The acquisition module 701 is used to obtain the attribute information of the target resource in the electronic device, and the target resource includes at least one of a hardware resource and a software resource; the processing module 702 is used to generate an object file corresponding to the target resource according to the attribute information of the target resource, and implement the call to the target resource by calling the object file.

[0120] In some embodiments, the processing module 702 is specifically used to: obtain a declaration file, wherein the declaration file includes target properties required to generate the object file; and generate an object file corresponding to the target resource according to the declaration file and property information of the target resource.

[0121] In some embodiments, the target attribute includes multiple attributes, and the multiple attributes are attributes of the same target resource, or the multiple attributes are attributes of different target resources.

[0122] In some embodiments, the device further includes: a synchronization module. The synchronization module is used to synchronize the object file to other electronic devices in the resource virtualization system, so that the other electronic devices can call the target resource by calling the object file; and / or obtain other object files from the other electronic devices.

[0123] In some embodiments, the synchronization module is specifically used to: synchronize the object file to the other electronic device through a wireless communication connection with the other electronic device, and / or obtain other object files from the other electronic device; or, upload the object file to a cloud server so that the other electronic device obtains the object file from the cloud server, and obtain the other object files uploaded by the other electronic device from the cloud server.

[0124] In some embodiments, the device further comprises: a storage module. The storage module is configured to store the object file corresponding to the target resource and / or the other object files.

[0125] In some embodiments, the device further comprises: a receiving module and a calling module. The receiving module is used to receive an object calling request, the object calling request is used to call a target object file; the calling module is used to call resources included in the target object file in response to the object calling request.

[0126] In some embodiments, the object file includes identification information for indicating whether the target resource is occupied, and the processing module 702 is specifically used to: obtain the operating status of the electronic device; and generate an object file corresponding to the target resource based on the attribute information of the target resource and the operating status.

[0127] In some embodiments, the calling module is specifically used to: when the identification information in the target object file indicates that the resources included in the target object file are not occupied, in response to the object calling request, call the resources included in the target object file.

[0128] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0129] It should be noted that in the embodiments of this application Figure 7 The division of modules in the resource pooling device shown is schematic and is only a logical functional division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.

[0130] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0131] The embodiment of the present application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0132] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.

[0133] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.

[0134] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0135] In one embodiment, the resource pooling device provided in the present application can be implemented in the form of a computer program. The computer program can be Figure 8 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the above-mentioned device. The computer program composed of various program modules enables the processor to execute the steps in the method of each embodiment of the present application described in this specification.

[0136] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0137] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.

[0138] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0139] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0140] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.

[0141] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0142] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0143] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0144] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0145] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0146] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0147] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0148] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A resource pooling method, characterized in that: Applied to any electronic device in a resource virtualization system including a plurality of electronic devices, the method comprises: Acquire attribute information of a target resource in the electronic device, wherein the target resource includes at least one of a hardware resource and a software resource; An object file corresponding to the target resource is generated according to the attribute information of the target resource, and the target resource is called by calling the object file.

2. The method according to claim 1, characterized in that: The step of generating an object file corresponding to the target resource according to the attribute information of the target resource comprises: Obtaining a declaration file, wherein the declaration file includes target properties required to generate the object file; An object file corresponding to the target resource is generated according to the declaration file and the attribute information of the target resource.

3. The method according to claim 2, characterized in that The target attribute includes multiple attributes, and the multiple attributes are attributes of the same target resource, or the multiple attributes are attributes of different target resources.

4. The method according to claim 1, characterized in that After generating an object file corresponding to the target resource according to the attribute information of the target resource, the method further includes: Synchronizing the object file to other electronic devices in the resource virtualization system, so that the other electronic devices can call the target resource by calling the object file; and / or, Acquire other object files from the other electronic devices.

5. The method according to claim 4, characterized in that The synchronizing the object file to other electronic devices in the resource virtualization system includes: Synchronizing the object file to the other electronic device through a wireless communication connection with the other electronic device, and / or acquiring other object files from the other electronic device; or, The object file is uploaded to the cloud server so that the other electronic devices obtain the object file from the cloud server, and the other object files uploaded by the other electronic devices are obtained from the cloud server.

6. The method according to claim 5, characterized in that The method further comprises: The object file corresponding to the target resource and / or the other object files are stored.

7. The method according to claim 1, characterized in that The method further comprises: receiving an object calling request, wherein the object calling request is used to call a target object file; In response to the object calling request, resources included in the target object file are called.

8. The method according to claim 7, characterized in that The object file includes identification information for indicating whether the target resource is occupied, and generating the object file corresponding to the target resource according to the attribute information of the target resource includes: Obtaining the operating status of the electronic device; An object file corresponding to the target resource is generated according to the attribute information of the target resource and the operation status.

9. The method according to claim 8, characterized in that The step of calling the resource included in the target object file in response to the object calling request includes: In a case where the identification information in the target object file indicates that the resources included in the target object file are not occupied, in response to the object calling request, the resources included in the target object file are called.

10. A resource pooling device, characterized in that: Applied to any electronic device in a resource virtualization system including multiple electronic devices, the device comprises: An acquisition module, used to acquire attribute information of a target resource in the electronic device, wherein the target resource includes at least one of a hardware resource and a software resource; The processing module is used to generate an object file corresponding to the target resource according to the attribute information of the target resource, and to call the target resource by calling the object file.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.