Device resource regulation method and apparatus, electronic device, and readable storage medium
By identifying resource-supplying devices and utilizing their idle resources in the Internet of Things (IoT), and by coordinating or expanding the functions of resource-requesting devices, the problem of unused idle resources caused by differences between devices is solved, and more efficient resource regulation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
- Filing Date
- 2022-10-11
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, the regulation of idle device resources in the Internet of Things (IoT) is poor, resulting in users' functional needs not being met. In particular, due to the differences in software execution environments and communication protocols between devices, interconnected devices cannot effectively utilize idle resources.
By receiving control requests from resource requesting devices, the system identifies resource supply devices and controls the resource requesting devices to perform target functions based on their idle resources, thereby achieving resource coordination or expansion to meet user needs.
It improves the regulation of idle device resources in the Internet of Things, meets users' needs for target functions, and overcomes the limitations caused by differences between devices.
Smart Images

Figure CN115643283B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a device resource regulation method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] With the continuous development of technology, smart devices are playing an increasingly important role in people's lives. Currently, different devices operate independently, and users typically need to use different devices to achieve different functional requirements. For example, televisions usually lack cameras, so video calls require a mobile phone or computer. Similarly, displaying images from a mobile phone or computer on a television screen requires communication between the two devices. Therefore, the Internet of Things (IoT) has emerged. However, due to the limited computing power of different devices, when a user's demand for a certain function exceeds the computing power limit of a single interconnected device, the system's allocation of device resources for that interconnected device cannot fully meet the user's functional needs. Furthermore, due to the differences in software execution environments and communication protocols between devices, even if an interconnected device exists in the IoT system capable of performing the function, it is impossible to meet the user's needs by allocating its idle device resources for that function. Therefore, some idle device resources in the IoT cannot be effectively utilized, meaning that the current allocation of idle device resources in the IoT is ineffective. Summary of the Invention
[0003] The main objective of this application is to provide a method, apparatus, electronic device, and readable storage medium for regulating device resources, aiming to solve the technical problem of poor regulation effect of idle device resources in the Internet of Things in the prior art.
[0004] To achieve the above objectives, this application provides a device resource regulation method applied to the Internet of Things (IoT) of devices, the device resource regulation method comprising:
[0005] If a resource request is received from a resource requesting device for a target function, then the resource supply device corresponding to the resource requesting device is determined.
[0006] Based on the idle equipment resources of the resource supply equipment, the resource requesting equipment is controlled to perform the target function in order to achieve resource regulation of the resource supply equipment.
[0007] To achieve the above objectives, this application also provides a device for regulating equipment resources, applied to the Internet of Things (IoT) for equipment, the device for regulating equipment resources comprising:
[0008] The determination module is used to determine the resource supply device corresponding to the resource requesting device if it receives a resource adjustment request sent by the resource requesting device for the target function.
[0009] The control module is used to control the resource requesting device to perform the target function based on the idle equipment resources of the resource supply device, so as to realize the resource regulation of the resource supply device.
[0010] This application also provides an electronic device, the electronic device comprising: a memory, a processor, and a program of the device resource regulation method stored in the memory and executable on the processor, wherein when the program of the device resource regulation method is executed by the processor, it can implement the steps of the device resource regulation method as described above.
[0011] This application also provides a computer-readable storage medium storing a program implementing a device resource regulation method, wherein when the program is executed by a processor, it implements the steps of the device resource regulation method as described above.
[0012] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the device resource control method described above.
[0013] This application provides a device resource regulation method, apparatus, electronic device, and readable storage medium, which are applied to the Internet of Things (IoT). Specifically, if a resource regulation request is received from a resource requesting device for a target function, the resource supply device corresponding to the resource requesting device is determined; based on the idle device resources of the resource supply device, the resource requesting device is controlled to execute the target function, thereby realizing resource regulation of the resource supply device. Because upon receiving a resource adjustment request from a resource requesting device for a target function, the device resources of the resource supplying device can be adjusted to control the resource requesting device to execute the target function. That is, when the device resources of the resource requesting device cannot meet the user's needs for the target function, the device resources of the resource supplying device in the device IoT can be adjusted to meet the user's needs for the target function. In contrast, interconnected devices in the non-device IoT can only meet the user's needs for functions below the upper limit of their own device resources. Therefore, this overcomes the technical defect in the prior art where the differences in software execution environments and communication protocols between devices prevent home interconnected devices in the device IoT from meeting the user's needs by adjusting their idle device resources for the target function. Thus, the effect of idle device resource regulation in the device IoT is improved. Attached Figure Description
[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the first embodiment of the equipment resource regulation method of this application;
[0017] Figure 2 This is a flowchart illustrating the second embodiment of the equipment resource regulation method of this application;
[0018] Figure 3 This is a schematic diagram of an embodiment of the equipment resource regulation device of this application;
[0019] Figure 4 This is a schematic diagram of the hardware operating environment involved in the device resource regulation method in this application embodiment.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1
[0023] First, it should be understood that the Internet of Things (IoT) for devices, with its high resource utilization and efficiency, is widely used in many industries. For example, the home internet in the smart home industry is one such application. Currently, the home internet typically uses devices such as televisions, air conditioners, and refrigerators as its main carriers, focusing on the home environment to achieve widespread interconnection and intelligent collaboration among various terminal devices, aiming to improve the user experience. However, in existing home internet systems, the limited idle resources of interconnected devices lead to an upper limit on their computing power. Therefore, when a user needs to use the device resources of a particular interconnected device to achieve a specific function, and the required device resources exceed the idle resources of that interconnected device, the home internet cannot meet the user's needs. For example, suppose a user wants the television to perform a video call, but the television's device resources are limited... Video calls often rely on other connected devices such as mobile phones and computers within the home internet. Assuming the connected device is a mobile phone, when it provides the video call function, it determines whether its own device resources are sufficient to execute the function. If the mobile phone lacks sufficient idle device resources for video calls, it cannot perform the call. Furthermore, due to differences in software execution environments and communication protocols between devices, the mobile phone cannot utilize the corresponding device resources of other connected devices in the home internet to perform video calls. In other words, the home internet system needs to reselect an connected device for video calls. Therefore, some idle device resources in the home internet cannot be effectively utilized. This indicates that the current management of idle device resources in the Internet of Things (IoT) is ineffective. Therefore, a method to improve the management of device resources in the IoT is urgently needed.
[0024] This application provides a device resource regulation method applied to the Internet of Things (IoT). In the first embodiment of the device resource regulation method of this application, refer to... Figure 1 The equipment resource regulation method includes:
[0025] Step S10: If a resource adjustment request is received from a resource requesting device for a target function, then the resource supply device corresponding to the resource requesting device is determined.
[0026] Step S20: Based on the idle equipment resources of the resource supply equipment, control the resource requesting equipment to perform the target function in order to realize resource regulation of the resource supply equipment;
[0027] In this embodiment, it should be noted that any interconnected device in the existing Internet of Things (IoT) can call the device resources of any other interconnected device in the IoT to meet the user's needs. For example, suppose a certain IoT includes device A, device B, and device C. Device A's device resources can implement functions a, b, and c; device B's device resources can implement functions a, d, and e; and device C can implement functions f and g. Here, a, b, c, d, e, f, and g are different functions that the IoT can execute. When a user executes function a through device A, if device A has sufficient idle device resources to execute function a, then function a is executed through device A. If device A does not have sufficient idle device resources to execute function a, but device B has sufficient idle device resources to execute function a, then the IoT can execute function a through device B. When a user executes function f through device A, since device A does not have the device resources to execute function f, and device C has sufficient idle device resources to execute function f, the IoT can execute function f through device C.
[0028] Additionally, it should be noted that, for any interconnected device in the existing Internet of Things (IoT), due to differences in software execution environments and communication protocols, different interconnected devices in the IoT cannot coordinate their idle device resources to perform the same function. Therefore, the device resource regulation method is applied to the IoT, and is used to regulate the idle device resources of interconnected devices in the IoT. The resource requesting device represents a device requesting the IoT system to regulate the idle device resources in the IoT. The target function represents a function executed through the idle device resources of the IoT, which can be a function that the resource requesting device cannot execute using its own idle device resources, or a function executed by coordinating the device resources of the resource requesting device and the device resources of the resource supplying device. The function of the device, for example, in one feasible manner, is a video call function. The resource requesting device can be a television set that does not have a video call function or a television set that does have a video call function. For example, in a specific scenario, after a user receives a video call invitation on their mobile phone, the user wants to make a video call on the television set. If the television set has a video call function, then when the idle device resources of the television set are insufficient to perform the video call function, the television set, as a resource requesting device, sends a resource adjustment request to the Internet of Things (IoT). The insufficient idle device resources may be due to the video call function being occupied or the video call data stream being too large. If the television set does not have a video call function, then the television set directly sends a resource adjustment request to the IoT as a resource requesting device.
[0029] Additionally, it should be noted that the resource requesting device is used to request the device IoT to adjust idle device resources, specifically a mobile phone, television, or air conditioner, etc. The resource supplying device is used to provide device resources corresponding to the execution of the target function, specifically one or more. For example, in one feasible approach, assuming the resource requesting device is a television and the target function is a video download function, in a specific scenario, when a user downloads a video using the television's video download function, if the television's idle device resources for performing the video download function are insufficient, the television, as the resource requesting device, sends a resource adjustment request to the device IoT. The device IoT can use a mobile phone or computer, etc. The insufficient idle device resources may be due to the video stream data of the downloaded video being too large or the download speed of the downloaded video being too slow.
[0030] Additionally, it should be noted that the resource regulation request is used to trigger the device IoT to regulate the idle resources of devices in the IoT device. The regulation method can be coordination or expansion, etc. The idle device resources are used to represent the idle resources of devices in the device IoT that perform corresponding functions. The idle device resources can be the idle device resources of the resource requesting device, the idle device resources of the resource supplying device, or the idle device resources of the resource idle device, etc., specifically including network interfaces, disks, memory, or CPUs, etc. The idle device resources are used to represent the devices in the device IoT that have the idle device resources.
[0031] As an example, steps S10 to S20 include: obtaining a target function execution request input by the user; determining a corresponding resource requesting device based on the target function execution request; if a resource regulation request sent by the resource requesting device for the target function is received, determining a resource supplying device corresponding to the resource requesting device; wherein the target function execution request is used to request the execution of the target function; and controlling the resource requesting device to execute the target function based on the idle device resources of the resource supplying device, so as to realize resource regulation of the resource supplying device, wherein the idle device resources can be invoked by the function plug-in of the resource supplying device for the target function.
[0032] The step of determining the corresponding resource request device based on the target function execution request includes:
[0033] Based on the device identifier carried in the target function execution request, the corresponding interconnected device in the Internet of Things (IoT) is queried, and the interconnected device is used as the resource request device. The device identifier is used to identify the uniqueness of the interconnected device and can be the device's factory model, device number in the IoT, or device anti-counterfeiting number, etc.
[0034] In one feasible approach, if no resource adjustment request for the target function is received from the resource requesting device, the resource requesting device is controlled to execute the target function based on the idle device resources of the resource requesting device.
[0035] The resource supply equipment includes resource coordination equipment and resource expansion equipment. The step of determining the resource supply equipment corresponding to the resource requesting device if a resource adjustment request for a target function is received includes:
[0036] Step A10: If a resource collaboration request is received from the resource requesting device for the first target function, the resource collaboration device corresponding to the resource collaboration request is determined based on the resource collaboration information carried in the resource collaboration request.
[0037] Step A20: If a resource extension request is received from the resource requesting device for the second target function, then the extension device that extends the functional plug-in corresponding to the second target function is designated as the resource extension device.
[0038] In this embodiment, it should be noted that the resource supply device includes a resource coordination device and a resource expansion device. The resource coordination device represents a device that coordinates with the resource requesting device to perform the target function. The resource expansion device represents a device that expands the functional plug-in corresponding to the target function. The first target function represents a function performed by coordinating idle device resources between the resource requesting device and the resource supply device. The second target function represents a function performed by expanding the functional plug-in corresponding to the idle device resources of the resource requesting device. The resource coordination device possesses the device resources to perform the target function. For example, in one implementable manner, it is assumed that the resource supply device is a resource coordination device. The resource requesting device is a television set, and the resource coordinating devices include a computer and a mobile phone. In a specific scenario, the television set does not have a camera function, the mobile phone does not have a plug-in extension function, and the computer has a plug-in extension function. The target function is for the television set to use the mobile phone's camera function. The computer generates a function plug-in for the television set to use the mobile phone's camera function and sends the plug-in to the mobile phone. It also generates a function plug-in for the television display function and sends the plug-in to the television set. Based on the device resources of the television set performing the display function, the mobile phone performing the camera function, and the computer performing the plug-in extension function, the user's need to display the mobile phone's camera function on the television set is jointly achieved, that is, the user's need to make video calls through the television set is met.
[0039] Additionally, it should be noted that the resource expansion device has a plug-in expansion function. For example, in one feasible embodiment, assuming the resource supply device is a resource expansion device and the resource request device is a television, wherein the television has a display function, the resource expansion device is a computer, and the target function is for the television to display images stored on the computer, in a specific scenario, the computer generates a display window plug-in for displaying images stored on the computer, the Internet of Things device sends this plug-in to the television, and the television displays the images stored on the computer according to the plug-in, that is, it meets the user's need to display images stored on the computer through the television.
[0040] As an example, steps A10 to A20 include: if a resource collaboration request for a first target function is received from the resource requesting device, then the resource collaboration device corresponding to the resource collaboration request is determined based on the resource collaboration information carried in the resource collaboration request; if a resource extension request for a second target function is received from the resource requesting device, then the extension device that extends the functional plug-in corresponding to the second target function is taken as the resource extension device. Since regulating the idle device resources of the IoT resource collaboration device can achieve the goal of the resource collaboration device and the resource requesting device working together to complete the first target function, and regulating the idle device resources of the IoT resource extension device can achieve the goal of the resource extension device extending the resource requesting device to complete the second target function, thus achieving effective utilization of the idle device resources of the IoT based on the type of target function, the regulation effect of IoT device resources is improved.
[0041] The resource collaboration information includes first resource collaboration information and second resource collaboration information. The step of determining the resource collaboration device corresponding to the resource requesting device based on the resource collaboration information carried in the resource collaboration request includes:
[0042] Step B10: Based on the first resource coordination information, obtain the first resource-to-coordinate device corresponding to the resource requesting device; based on the idle resources of the first resource-to-coordinate device for the first target function, determine the resource-coordinating device; or
[0043] Step B20: Based on the second resource collaboration information, detect whether there is a device to be collaborated with corresponding to the functional resource that collaborates with the first target function; if so, determine the resource collaboration device corresponding to the resource requesting device based on the operating status of the device to be collaborated with.
[0044] In this embodiment, it should be noted that the idle resource refers to the idle device resource that the first resource-to-be-coordinated device can use to coordinate with the resource-requesting device to complete the first target function. The resource coordination information is used to characterize the idle device resources in the device IoT that coordinate the target function, including first resource coordination information and second resource coordination information. The first resource coordination information is used to characterize the existence of idle device resources in the device IoT that coordinate the target function, specifically it can be a coordinating device identifier such as device model and device serial number. The second resource coordination information is used to characterize the absence of idle device resources in the device IoT that coordinate the target function. For example, in one feasible approach, assuming the target function is for a user to play the timer function of a washing machine via a mobile phone, the resource requesting device is the washing machine, and the resource coordinating device is the mobile phone, that is, the device IoT generates a cleaning plugin to control the washing machine to wash clothes, and a timer plugin to generate the washing machine washing time. The cleaning plugin is sent to the washing machine to wash clothes, and the timer plugin is sent to the mobile phone to time the washing time. Thus, when the washing time is reached, even if the user cannot hear the washing time reminder generated by the washing machine, they can still know through the mobile phone. That is, the function of allowing the user to play the washing machine washing time reminder via the mobile phone's playback function is satisfied.
[0045] As an example, steps B10 to B20 include: obtaining the collaborative device identifier carried by the resource requesting device; using the collaborative device identifier as an index, querying the corresponding first resource-to-collaborate device in a preset device collaboration relationship table; wherein the preset device collaboration relationship table is used to store the mapping relationship between the resource requesting device and the first resource-to-collaborate device; the first resource-to-collaborate device is used to represent a device with idle device resources that collaborate with the resource requesting device to complete the target function; if there is only one first resource-to-collaborate device, then when the resource-to-collaborate resource of the resource requesting device is less than the idle resource of the function, the first resource-to-collaborate device is used as the resource collaboration device; if the first resource-to-collaborate device is one .... If there are multiple devices requesting resource collaboration, then a first device whose requested resource is less than its idle functional resource is selected as the resource collaboration device. The selection can be based on the amount of idle functional resource or the computing power of the first device requesting resource collaboration. For example, in one feasible implementation, if the resource requesting device is a television, and the first device requesting resource collaboration can be a mobile phone and a computer, then the idle functional resources of the mobile phone and the computer for the first target function are obtained respectively. If the idle functional resource of the mobile phone is greater than that of the computer, then the mobile phone is selected as the first resource collaboration device; or
[0046] Based on the second resource coordination information, it is detected whether there is a device to be coordinated corresponding to the resource of the first target function. The second resource coordination information is used to characterize the idle device resources required to execute the first target function. If there is a device to be coordinated corresponding to the resource of the first target function, the resource coordination device corresponding to the resource requesting device is determined based on the operating status of the device to be coordinated. If there is no device to be coordinated corresponding to the resource of the first target function, a control prompt message is generated to prompt the user that the device IoT does not have idle device resources corresponding to the execution of the target function.
[0047] The step of determining the resource coordinating device corresponding to the resource requesting device based on the operating status of the device to be coordinated includes:
[0048] Step C10: Determine the collaboration relationship between the device to be collaborated and the resource requesting device based on the resource type corresponding to the functional resources of the first target function;
[0049] Step C20: If the collaboration relationship is a single-device collaboration relationship, then based on the operating status of the device to be collaborated with, obtain the second resource device to be collaborated with corresponding to the single-device collaboration relationship, and use the second resource device to be collaborated with as the resource collaboration device;
[0050] Step C30: If the device to be coordinated is a multi-device coordination relationship, then obtain the group of devices to be coordinated corresponding to the multi-device coordination relationship;
[0051] Step C40: Based on the operating status of the third resource device to be coordinated in the group of devices to be coordinated, determine the resource coordination device corresponding to the resource requesting device.
[0052] In this embodiment, it should be noted that for a resource requesting device, the target function corresponding to its resource collaboration request may need to be completed by one device or by multiple devices. Therefore, the device collaboration relationship between the resource requesting device and the resource collaboration device for the target function can be determined by the resource type of the functional resource. Thus, the device collaboration relationship includes single-device collaboration relationship and multi-device collaboration relationship. The single-device collaboration relationship is used to represent a single resource collaboration device collaborating with the resource requesting device to complete the target function, and the multi-device collaboration relationship is used to represent multiple resource collaboration devices collaborating with the resource requesting device to complete the target function.
[0053] As an example, steps C10 to C40 include: if the functional resource of the first target function is a single-device type functional resource, then the collaboration relationship between the device to be collaborated and the resource requesting device is determined to be a single-device collaboration relationship; if the functional resource of the first target function is a multi-device type functional resource, then the collaboration relationship between the device to be collaborated and the resource requesting device is determined to be a multi-device collaboration relationship; if the collaboration relationship is a single-device collaboration relationship, then based on the operating state of the device to be collaborated, the second resource device to be collaborated corresponding to the single-device collaboration relationship is obtained, and the second resource device to be collaborated is used as the resource collaboration device; if the device to be collaborated... If a multi-device collaboration relationship is established, then the group of devices to be collaborated corresponding to the multi-device collaboration relationship is obtained. The group of devices to be collaborated represents multiple devices that can collaboratively execute the first target function. For example, in one feasible approach, assuming that executing the first target function requires functions x, y, z, and t, where devices X and Y can both execute function x, device I can execute function y, device Z can execute function z, and devices O and P can execute, then devices X, Y, Z, I, O, and P together form the group of devices to be collaborated. Based on the operating status of the third resource device to be collaborated in the group of devices to be collaborated, the resource collaboration device corresponding to the resource requesting device is determined.
[0054] The step of determining the resource coordinating device corresponding to the resource requesting device based on the operating status of the third resource device in the group of devices to be coordinated includes:
[0055] Step D10: Obtain the number of collaborative devices corresponding to the multi-collaborative device relationship;
[0056] Step D20: Based on the idle status level corresponding to the operating status of each of the third resource devices to be coordinated, select the third resource device to be coordinated corresponding to the number of coordinated devices in the group of devices to be coordinated as the resource coordination device.
[0057] In this embodiment, it should be noted that the third resource device to be coordinated is used to represent any resource device to be coordinated in the device group, and the number of coordinated devices is used to represent the number of resource coordination devices required to perform the target function. For example, assuming that the device group to be coordinated includes devices M, N, J and K, where devices M and N are both used to perform sub-functions of the first target function, then the number of coordinated devices is 3, and these 3 resource coordination devices can complete the target function. That is, the resource coordination devices can be M, J and K, or the resource coordination devices can be N, J and K.
[0058] As an example, steps D10 to D20 include: obtaining the number of collaborative devices corresponding to the multi-collaborative device relationship; if the third collaborative resource device is the only collaborative resource device corresponding to the sub-function that executes the first target function, then the collaborative resource device is designated as the first collaborative resource device; if the third collaborative resource device is not the only collaborative resource device corresponding to the sub-function that executes the first target function, then the third collaborative resource device with the highest idle level is designated as the second collaborative resource device, and the first and second collaborative devices are combined as the collaborative resource device, wherein the sum of the number of the first and second collaborative devices is the number of collaborative devices, and the first target function is composed of multiple sub-functions of the first target function. For example, assuming the first target function is to download mobile phone videos through a TV, then the display function of the TV and the download function of the mobile phone can both be sub-functions of the first target function.
[0059] In one feasible approach, assuming the device IoT is a home internet, the home internet system and the corresponding devices within it possess plug-in extension capabilities. That is, the home internet can unify plug-in generation logic and functional description capabilities. Plug-ins generated using the same set of functional pseudocode can support execution in different software operating environments, such as Windows, Linux, Python, or C++, to enable the regulation of idle device resources across different home internet devices. The device resources of home internet devices may include processors, memory, storage, networks, and sensors, all of which can communicate between the devices and the home internet system in JSON file format. The real-time operating status of the home internet devices can also be transmitted via JSON files. The plug-in functions of different device execution environments (sub-functions corresponding to the target function when multiple devices collaborate or extend) can also be described using JSON files. Furthermore, each device in the home internet network possesses a unique configuration file. The system has the capabilities to register with the network, query interconnected devices within the system, query the device operating status of interconnected devices within the system, load device function plugins, and execute device function plugins. Furthermore, each device supports hot-swapping. The function plugins are used to access idle device resources provided by the resource supply device. For example, when a mobile phone registers with the home internet, and the phone's software environment is Android or Java, its camera capabilities can be used to open and close the device and output video streams to resource requesting devices. Similarly, a television's camera can open and close display windows and play remote network streams. To ensure device availability, each device needs to send a multicast online notification message at fixed intervals. If a device actively exits the system, it also needs to send an exit broadcast message to notify the device of its departure. In both of these situations, each device needs to update its online status promptly.
[0060] The equipment resource regulation method further includes:
[0061] Step E10: If a connection request is received from the device to be connected, then obtain the device resource set of the device to be connected.
[0062] Step E20: Detect the target device capability of the device to be connected;
[0063] Step E30: If it is detected that the device to be connected has the target device capability, a network connection is established between the device to be connected and the interconnected device group, and the device information carried in the connection request is sent to the interconnected device group so that the interconnected devices in the interconnected device group can confirm that the device to be connected has successfully connected.
[0064] In this embodiment, it should be noted that when a new device wants to register with the Device Internet of Things (IoT), the new device needs to declare its own device capabilities and send multicast data to the Device IoT system so that the system can broadcast it to other interconnected devices in the Device IoT system. The device resource set is used to characterize the device resources declared by the device to be connected, and the target device capability is used to characterize the capability that any interconnected device in the Device IoT must have. The Device IoT calls the device resources declared by the connected device based on the target device capability.
[0065] As an example, steps E10 to E30 include: if a connection request is received from a device to be connected, then the device resources possessed by the device to be connected are obtained; whether the device to be connected has the target device capability is detected; if the device to be connected is found to have the target device capability, then a network connection is established between the device to be connected and the interconnected device group, and the device information carried in the connection request is sent to the interconnected device group so that the interconnected devices in the interconnected device group can confirm that the device to be connected has successfully connected; if the device to be connected is found not to have the target device capability, then an access failure prompt message is sent to indicate that the device to be connected has failed to access the device IoT, wherein the interconnected device group represents any interconnected device in the device IoT.
[0066] This application provides a device resource regulation method applied to the Internet of Things (IoT). Specifically, if a resource regulation request is received from a resource requesting device for a target function, the resource supply device corresponding to the resource requesting device is determined. Based on the idle device resources of the resource supply device, the resource requesting device is controlled to execute the target function, thereby realizing resource regulation of the resource supply device. Because upon receiving a resource adjustment request from a resource requesting device for a target function, the device resources of the resource supplying device can be adjusted to control the resource requesting device to execute the target function. That is, when the device resources of the resource requesting device cannot meet the user's needs for the target function, the device resources of the resource supplying device in the device IoT can be adjusted to meet the user's needs for the target function. In contrast, interconnected devices in the non-device IoT can only meet the user's needs for functions below the upper limit of their own device resources. Therefore, this overcomes the technical defect in the prior art where the differences in software execution environments and communication protocols between devices prevent home interconnected devices in the device IoT from meeting the user's needs by adjusting their idle device resources for the target function. Thus, the effect of idle device resource regulation in the device IoT is improved.
[0067] Example 2
[0068] Furthermore, referring to Figure 2 In another embodiment of this application, content that is the same as or similar to that in Embodiment 1 described above can be referred to the above description and will not be repeated hereafter. Based on this, the step of using the extension device for the functional plug-in corresponding to the extended second target function as the resource extension device includes:
[0069] Step F10: Detect whether the resource requesting device has plug-in extension capability, wherein the plug-in extension capability includes the ability to extend the functional plug-in corresponding to the second target function;
[0070] Step F20: If yes, then the resource requesting device is designated as the resource extension device;
[0071] Step F30: If not, select the target extension device as the resource extension device in the plug-in extension device group.
[0072] In this embodiment, it should be noted that the plug-in extension capability is used to characterize the ability of the device in the Internet of Things to load and execute device plug-ins. The plug-in extension capability includes the ability to extend the functional plug-in corresponding to the second target function. The second target function is used to characterize the resource requesting device's inability to complete the target function by calling idle device resources based on its own device plug-in. The resource extension device is used to characterize the device that has the ability to load and execute device plug-ins.
[0073] As an example, steps F10 to F30 include: detecting whether the resource requesting device has plug-in extension capability, wherein the plug-in extension capability includes the ability to extend the functional plug-in corresponding to the second target function; if the resource requesting device is detected to have the plug-in extension capability, then the resource requesting device is selected as the resource extension device; if the resource requesting device is detected not to have the plug-in extension capability, then a target extension device is selected as the resource extension device from the plug-in extension device group, wherein the target extension device is selected by the device IoT based on the device processing capability from the plug-in extension group, and the plug-in extension group consists of devices in the device IoT that have the ability to load and execute device plug-ins.
[0074] This application provides a method for selecting resource expansion devices. Specifically, it detects whether the resource requesting device possesses plug-in expansion capabilities, where these capabilities include the ability to expand functional plug-ins corresponding to the second target function. If so, the resource requesting device is selected as the resource expansion device; otherwise, a target expansion device is selected from the plug-in expansion device group as the resource expansion device. Compared to selecting resource expansion devices only within the Internet of Things (IoT), this application prioritizes considering whether the resource requesting device has the ability to load and execute device plug-ins. When the resource requesting device possesses these capabilities, it is selected as a resource expansion device. This means that by expanding functional plug-ins to complete the execution of the target function, the idle device resources of the resource requesting device can be directly utilized. Conversely, when the resource requesting device lacks the ability to load and execute device plug-ins, selecting a device with strong computing power from the plug-in expansion group as the resource expansion device indirectly utilizes its idle device resources. Therefore, this lays the foundation for improving the regulation of idle device resources in the IoT.
[0075] Example 3
[0076] This application also provides a device for regulating device resources, applied to the Internet of Things (IoT) for devices, see reference. Figure 3 The equipment resource regulation device includes:
[0077] The determining module 101 is used to determine the resource supply device corresponding to the resource requesting device if it receives a resource adjustment request sent by the resource requesting device for the target function.
[0078] The control module 102 is used to control the resource requesting device to perform the target function based on the idle equipment resources of the resource supply device, so as to realize the resource regulation of the resource supply device.
[0079] Optionally, the resource supply equipment includes resource coordination equipment and resource expansion equipment, and the determining module 101 is further configured to:
[0080] If a resource collaboration request is received from the resource requesting device for the first target function, the resource collaboration device corresponding to the resource collaboration request is determined based on the resource collaboration information carried in the resource collaboration request.
[0081] If a resource extension request is received from the resource requesting device for the second target function, then the extension device that extends the functional plug-in corresponding to the second target function is designated as the resource extension device.
[0082] Optionally, the determining module 101 is further configured to:
[0083] Detect whether the resource requesting device has plug-in extension capability, wherein the plug-in extension capability includes the ability to extend the functional plug-in corresponding to the second target function;
[0084] If so, the resource requesting device shall be designated as the resource extension device;
[0085] If not, then select the target extension device as the resource extension device in the plug-in extension device group.
[0086] Optionally, the resource coordination information includes first resource coordination information and second resource coordination information, and the determining module 101 is further configured to:
[0087] Based on the first resource coordination information, obtain the first resource-to-coordinate device corresponding to the resource requesting device; based on the idle resources of the first resource-to-coordinate device for the first target function, determine the resource coordination device; or
[0088] Based on the second resource collaboration information, detect whether there is a device to be collaborated with corresponding to the functional resource that collaborates with the first target function; if so, determine the resource collaboration device corresponding to the resource requesting device based on the operating status of the device to be collaborated with.
[0089] Optionally, the determining module 101 is further configured to:
[0090] Based on the resource type corresponding to the functional resources of the first target function, the collaboration relationship between the device to be collaborated and the resource requesting device is determined;
[0091] If the collaboration relationship is a single-device collaboration relationship, then based on the operating status of the device to be collaborated with, the second resource device to be collaborated with corresponding to the single-device collaboration relationship is obtained, and the second resource device to be collaborated with is used as the resource collaboration device;
[0092] If the devices to be coordinated are in a multi-device coordination relationship, then obtain the group of devices to be coordinated corresponding to the multi-device coordination relationship;
[0093] Based on the operating status of the third resource device in the group of devices to be coordinated, the resource coordination device corresponding to the resource requesting device is determined.
[0094] Optionally, the determining module 101 is further configured to:
[0095] Obtain the number of collaborative devices corresponding to the multi-collaborative device relationship;
[0096] Based on the idle level corresponding to the operating status of each of the third resource devices to be coordinated, the third resource device to be coordinated corresponding to the number of coordinated devices is selected from the group of devices to be coordinated as the resource coordination device.
[0097] Optionally, the equipment resource control device is further used for:
[0098] If a connection request is received from the device to be connected, then the device resource set of the device to be connected is obtained;
[0099] The capability of the target device to be connected is detected;
[0100] If the device to be connected is detected to have the target device capability, a network connection is established between the device to be connected and the interconnected device group, and the device information carried in the connection request is sent to the interconnected device group so that the interconnected devices in the interconnected device group can confirm that the device to be connected has successfully connected.
[0101] The device resource regulation apparatus provided by this invention, employing the device resource regulation method described in the above embodiments, solves the technical problem of poor regulation effect for idle device resources in the Internet of Things (IoT). Compared with the prior art, the beneficial effects of the device resource regulation apparatus provided by this invention are the same as those of the device resource regulation method described in the above embodiments, and other technical features of this device resource regulation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0102] Example 4
[0103] This invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the device resource control method described in Embodiment 1 above.
[0104] The following is for reference. Figure 4 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0105] like Figure 4As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0106] Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0107] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of embodiments of this disclosure.
[0108] The electronic device provided by this invention, employing the device resource regulation method described in the above embodiments, solves the technical problem of poor regulation effect on idle device resources in the Internet of Things (IoT). Compared with the prior art, the beneficial effects of the electronic device provided by this invention are the same as those of the device resource regulation method described in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0109] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0110] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0111] Example 5
[0112] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, which are used to execute the device resource control method described in the above embodiment.
[0113] The computer-readable storage medium provided in this embodiment of the invention may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0114] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0115] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device causes the electronic device to: acquire a frame to be optimized and a corresponding reference frame; if it receives a resource regulation request sent by a resource requesting device for a target function, determine the resource supplying device corresponding to the resource requesting device; and, based on the idle device resources of the resource supplying device, control the resource requesting device to execute the target function, so as to realize resource regulation of the resource supplying device.
[0116] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0118] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0119] The computer-readable storage medium provided by this invention stores computer-readable program instructions for executing the above-described device resource regulation method, thus solving the technical problem of poor regulation effect of idle device resources in the Internet of Things (IoT). Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiments of this invention are the same as the beneficial effects of the device resource regulation method provided in the above embodiments, and will not be repeated here.
[0120] Example 6
[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the device resource control method described above.
[0122] The computer program product provided in this application solves the technical problem of poor regulation of idle device resources in the Internet of Things (IoT). Compared with the prior art, the beneficial effects of the computer program product provided in this embodiment are the same as the beneficial effects of the device resource regulation method provided in the above embodiments, and will not be repeated here.
[0123] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. A method for regulating equipment resources, characterized in that, Applied to the Internet of Things (IoT) for devices, the device resource regulation method includes: If a resource collaboration request is received from a resource requesting device for a first target function, the resource collaboration device corresponding to the resource collaboration request is determined based on the resource collaboration information carried in the resource collaboration request. The first target function is used to characterize the function executed by collaborating idle device resources between the resource requesting device and the resource collaboration device. If a resource extension request is received from a resource requesting device for a second target function, then the extension device that extends the functional plug-in corresponding to the second target function is taken as the resource extension device. The second target function is used to characterize the function executed by extending the functional plug-in corresponding to the idle device resources of the resource requesting device. Based on the idle equipment resources of the resource supply equipment, the resource requesting equipment is controlled to execute a target function to achieve resource regulation of the resource supply equipment. The target function includes a first target function and a second target function. The resource supply equipment includes the resource coordination equipment and the resource expansion equipment. The target function is a function that the resource requesting equipment cannot execute using its own idle equipment resources.
2. The device resource regulation method as described in claim 1, wherein the step of using the extended device of the functional plug-in corresponding to the extended second target function as the resource extended device includes: Detect whether the resource requesting device has plug-in extension capability, wherein the plug-in extension capability includes the ability to extend the functional plug-in corresponding to the second target function; If so, the resource requesting device shall be designated as the resource extension device; If not, then select the target extension device as the resource extension device in the plug-in extension device group.
3. The equipment resource regulation method as described in claim 1, characterized in that, The resource collaboration information includes first resource collaboration information and second resource collaboration information. The step of determining the resource collaboration device corresponding to the resource collaboration request based on the resource collaboration information carried in the resource collaboration request includes: Based on the first resource coordination information, obtain the first resource-to-coordinate device corresponding to the resource requesting device; based on the idle resources of the first resource-to-coordinate device for the first target function, determine the resource coordination device; or Based on the second resource collaboration information, detect whether there is a device to be collaborated with corresponding to the functional resource that collaborates with the first target function; if so, determine the resource collaboration device corresponding to the resource requesting device based on the operating status of the device to be collaborated with.
4. The equipment resource regulation method as described in claim 3, characterized in that, The step of determining the resource coordinating device corresponding to the resource requesting device based on the operating status of the device to be coordinated includes: Based on the resource type corresponding to the functional resources of the first target function, the collaboration relationship between the device to be collaborated and the resource requesting device is determined; If the collaboration relationship is a single-device collaboration relationship, then based on the operating status of the device to be collaborated with, the second resource device to be collaborated with corresponding to the single-device collaboration relationship is obtained, and the second resource device to be collaborated with is used as the resource collaboration device; If the devices to be coordinated are in a multi-device coordination relationship, then obtain the group of devices to be coordinated corresponding to the multi-device coordination relationship; Based on the operating status of the third resource device in the group of devices to be coordinated, the resource coordination device corresponding to the resource requesting device is determined.
5. The equipment resource regulation method as described in claim 4, wherein the step of determining the resource coordinating device corresponding to the resource requesting device based on the operating status of the third resource device in the group of devices to be coordinated includes: Obtain the number of collaborative devices corresponding to the multi-device collaboration relationship; Based on the idle level corresponding to the operating status of each of the third resource devices to be coordinated, the third resource device to be coordinated corresponding to the number of coordinated devices is selected from the group of devices to be coordinated as the resource coordination device.
6. The equipment resource regulation method as described in any one of claims 1-5, characterized in that, The equipment resource regulation method also includes: If a connection request is received from the device to be connected, then the device resource set of the device to be connected is obtained; The capability of the target device to be connected is detected; If the device to be connected is detected to have the target device capability, a network connection is established between the device to be connected and the interconnected device group, and the device information carried in the connection request is sent to the interconnected device group so that the interconnected devices in the interconnected device group can confirm that the device to be connected has successfully connected.
7. A device for regulating equipment resources, characterized in that, The equipment resource regulation device includes: The determining module is used to determine the resource coordinating device corresponding to the resource coordinating request based on the resource coordinating information carried in the resource coordinating request if a resource coordinating request is received from the resource requesting device for the first target function. The first target function is used to characterize the function executed by coordinating idle device resources between the resource requesting device and the resource coordinating device. If a resource extension request is received from a resource requesting device for a second target function, then the extension device that extends the functional plug-in corresponding to the second target function is taken as the resource extension device. The second target function is used to characterize the function executed by extending the functional plug-in corresponding to the idle device resources of the resource requesting device. The control module is used to control the resource requesting device to execute a target function based on the idle equipment resources of the resource supply device, so as to realize resource regulation of the resource supply device. The target function includes a first target function and a second target function. The resource supply device includes the resource coordination device and the resource expansion device. The target function is a function that the resource requesting device cannot execute with its own idle equipment resources.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the steps of the device resource control method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for implementing a device resource regulation method, which is executed by a processor to implement the steps of the device resource regulation method as described in any one of claims 1 to 6.