A fog computing system, method, electronic device, and storage medium

By automatically sending a computing request to a second device when the server determines that the first fog computing device is unavailable, and using the second device to obtain the algorithm from the server to execute the task, the problem of resource waste in the fog computing system is solved, and efficient resource utilization and automatic task deployment are achieved.

CN115168031BActive Publication Date: 2026-08-04HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU EZVIZ SOFTWARE CO LTD
Filing Date
2022-06-29
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

During the deployment of fog computing tasks, multiple intelligent and non-intelligent devices exist in a single user environment, resulting in surplus resources that are not effectively utilized, leading to resource waste.

Method used

When the server determines that the first fog computing device is not a deployable device, it automatically sends a computing request to it and uses the second fog computing device to obtain and execute the target algorithm analysis task from the server, thereby realizing the automatic selection of fog computing devices and task deployment.

Benefits of technology

It improves the resource utilization efficiency of the fog computing system and enables automatic selection of fog computing devices and automatic task deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115168031B_ABST
    Figure CN115168031B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of fog computing system, method, electronic equipment and storage medium, applied to fog computing technical field, server, receives the computing instruction sent by user;First computing request for executing target algorithm analysis task is sent to first fog computing device;First fog computing device, for receiving first computing request;According to the algorithm identification and the computing resource information required for executing target algorithm analysis task, it is judged whether itself can execute target algorithm analysis task, and the second computing request of fog computing task is generated and sent to second fog computing device;Second fog computing device, receives second computing request;According to the algorithm identification required for executing target algorithm analysis task, the algorithm required for executing target algorithm analysis task is obtained from server, and target algorithm analysis task is executed.The application can realize the automatic selection of fog computing device and the automatic deployment of fog computing task, and improve the utilization efficiency of resources in fog computing system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fog computing technology, and in particular to a fog computing system, method, electronic device and storage medium. Background Technology

[0002] Fog computing, as an extension of the cloud computing concept, adds another layer of "fog"—the network edge layer—between terminal devices and servers. This distributes computation at the network edge, sending the computation results, rather than the raw data itself, to the server for further processing. Fog computing not only significantly reduces the amount of data interacting with the cloud, alleviating computational latency and bandwidth pressure, but also reduces the security risks associated with sending data to the cloud.

[0003] However, current fog computing deployments often involve multiple devices, including both smart and non-smart devices, within a single user environment. These devices are typically physically dispersed across different small environments, each performing its own function. Furthermore, different smart devices, due to variations in their hardware and the algorithms they run, possess varying degrees of surplus computing power and other resources, resulting in unused and wasted resources. Summary of the Invention

[0004] The purpose of this application is to provide a fog computing system, method, electronic device, and storage medium to improve the resource utilization efficiency of the fog computing system. The specific technical solution is as follows:

[0005] A first aspect of the present application provides a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including a first fog computing device and a second fog computing device;

[0006] The server is configured to receive computing instructions sent by a user, wherein the computing instructions include specifying the first fog computing device to perform a target algorithm analysis task; when the first fog computing device is a non-deployable device, a first computing request to be sent to the first fog computing device to perform the target algorithm analysis task is sent, wherein the first computing request includes an algorithm identifier and computing resource information required to perform the target algorithm analysis task;

[0007] The first fog computing device is configured to receive the first computing request; determine whether it can execute the target algorithm analysis task based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task; if not, generate and send a second computing request for the fog computing task to the second fog computing device, wherein the second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task;

[0008] The second fog computing device is configured to receive the second computing request; obtain the algorithm required to execute the target algorithm analysis task from the server according to the algorithm identifier required to execute the target algorithm analysis task, and execute the target algorithm analysis task.

[0009] Optionally, the second computation request may also include computational resource information required to perform the target algorithm analysis task;

[0010] The first fog computing device is specifically used to generate a second computing request for a fog computing task; and sequentially send the second computing request to all fog computing devices other than itself among the multiple fog computing devices in the same local area network;

[0011] The second fog computing device is specifically used to receive the second computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether its pre-stored algorithm and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task. If they meet the requirements, it sends deployment success information to the first fog computing device and executes the target algorithm analysis task. If they do not meet the requirements, it sends first deployment failure information to the first fog computing device.

[0012] Optionally, the second fog computing device is specifically used to receive the second computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether its pre-stored algorithm meets the algorithm required to execute the target algorithm analysis task; if not, it feeds back the second deployment failure information of the algorithm reason to the first fog computing device.

[0013] The first fog computing device is specifically used to receive the second deployment failure information; and to send the second computing request to the remaining fog computing devices among the multiple fog computing devices in the same local area network that have not sent the second computing request.

[0014] Optionally, the first fog computing device is further configured to, upon receiving first deployment failure information or second deployment failure information from multiple fog computing devices within the same local area network, identify the fog computing device corresponding to the second deployment failure information; send the algorithm required to execute the target algorithm analysis task to the identified fog computing device; and sequentially send a third calculation request for the fog computing task to all fog computing devices other than itself among the multiple fog computing devices within the same local area network.

[0015] Optionally, the first fog computing device is specifically used to send a download request to the server for the algorithm required by the identified fog computing device to perform the target algorithm analysis task;

[0016] The server is further configured to receive the download request; and send the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device downloads the algorithm required to perform the target algorithm analysis task according to the download address.

[0017] Optionally, the second fog computing device is specifically configured to determine whether its pre-stored algorithms meet the algorithm requirements for executing the target algorithm analysis task based on the algorithm identifier required for executing the target algorithm analysis task; if they meet the requirements, it determines whether its current remaining computing resources meet the computing resources required for executing the target algorithm analysis task based on the computing resource information required for executing the target algorithm analysis task; if they meet the requirements, it sends deployment success information to the first fog computing device and executes the target algorithm analysis task; if they do not meet the requirements, it sends the first deployment failure information to the first fog computing device.

[0018] Optionally, the first fog computing device is further configured to send deployment failure information back to the server after receiving deployment failure information from multiple fog computing devices within the same local area network corresponding to the third computing request.

[0019] Optionally, the server is specifically used to receive computing instructions sent by the user; determine whether the first fog computing device is an intelligent device based on its pre-stored device information; if not, determine that the first fog computing device is a non-deployable device; if so, send a first computing request to the first fog computing device to execute the target algorithm analysis task.

[0020] The first fog computing device is further configured to receive the first computing request; and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determine whether its pre-stored algorithms and its current remaining computing resources meet the requirements for executing the target algorithm analysis task. If so, the target algorithm analysis task is executed.

[0021] A second aspect of this application provides a fog computing method applied to a server in a fog computing system. The system includes a server and multiple fog computing devices within the same local area network. The multiple fog computing devices include a first fog computing device and a second fog computing device.

[0022] The method includes:

[0023] Receive a calculation instruction sent by a user, wherein the calculation instruction includes specifying the first fog computing device to perform a target algorithm analysis task;

[0024] When the first fog computing device is a non-deployable device, a first computing request to execute the target algorithm analysis task is sent to the first fog computing device, so that the first fog computing device generates and sends a second computing request for the fog computing task to the second fog computing device. The second fog computing device obtains the algorithm required to execute the target algorithm analysis task from the server and executes the target algorithm analysis task.

[0025] Optionally, the second computation request may also include computational resource information required to perform the target algorithm analysis task;

[0026] The method further includes:

[0027] Receive a download request, wherein the download request is a request from the first fog computing device to the server to download the algorithm required by the identified fog computing device to perform the target algorithm analysis task;

[0028] Send the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required to perform the target algorithm analysis task according to the download address.

[0029] Optionally, the method further includes:

[0030] Receive calculation instructions sent by the user;

[0031] Based on its pre-stored device information, the system determines whether the first fog computing device is an intelligent device. If not, it determines that the first fog computing device is a non-deployable device. If so, it sends a first computing request to the first fog computing device to execute the target algorithm analysis task, so that the first fog computing device receives the first computing request. Based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, the system determines whether its pre-stored algorithm and its current remaining computing resources meet the requirements for executing the target algorithm analysis task. If they do, the system executes the target algorithm analysis task.

[0032] A third aspect of the present application provides a fog computing method, applied to a first fog computing device in a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including a first fog computing device and a second fog computing device;

[0033] The method includes:

[0034] The server receives the first computing request, wherein the first computing request is a computing instruction sent by the user. When the first fog computing device is a non-deployable device, the server sends a first computing request to the first fog computing device to execute the target algorithm analysis task. The first computing request includes the algorithm identifier and computing resource information required to execute the target algorithm analysis task.

[0035] Based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, the system determines whether it can execute the target algorithm analysis task. If not, it generates and sends a second computing request for the fog computing task to the second fog computing device, so that the second fog computing device can obtain the algorithm required to execute the target algorithm analysis task from the server based on the algorithm identifier required to execute the target algorithm analysis task, and execute the target algorithm analysis task. The second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task.

[0036] Optionally, the second computation request further includes computational resource information required to perform the target algorithm analysis task, and the method includes:

[0037] Generate a second computation request for the fog computation task;

[0038] The second computing request is sent sequentially to all fog computing devices other than itself within the same local area network. This allows the second fog computing device to receive the second computing request and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determine whether its pre-stored algorithm and its current remaining computing resources meet the requirements for executing the target algorithm analysis task. If they do, it sends a deployment success message to the first fog computing device and executes the target algorithm analysis task. If they do not meet the requirements, it sends a first deployment failure message to the first fog computing device.

[0039] Optionally, the method includes:

[0040] Receive second deployment failure information, wherein the second deployment failure information is the second deployment failure information that the second fog computing device receives the second computing request and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determines whether its pre-stored algorithm meets the algorithm required to execute the target algorithm analysis task. If it does not meet the algorithm requirement, it sends the second deployment failure information to the first fog computing device to indicate the algorithm reason.

[0041] Send the second calculation request to the remaining fog computing devices among the multiple fog computing devices in the same local area network that have not sent the second calculation request.

[0042] Optionally, the method includes:

[0043] After receiving first or second deployment failure information from multiple fog computing devices within the same local area network, identify the fog computing device corresponding to the second deployment failure information;

[0044] Send the algorithm required to perform the target algorithm analysis task to the identified fog computing device;

[0045] The third calculation request for the fog computing task is sent sequentially to all fog computing devices other than itself among the multiple fog computing devices in the same local area network.

[0046] Optionally, the method includes:

[0047] The server sends a download request to the identified fog computing device for the algorithm required to perform the target algorithm analysis task. The server receives the download request and sends the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device downloads the algorithm required to perform the target algorithm analysis task according to the download address.

[0048] Optionally, the method includes:

[0049] After receiving deployment failure information from multiple fog computing devices within the same local area network corresponding to the third computing request, the system sends deployment failure information back to the server.

[0050] Optionally, the method includes:

[0051] The server receives the first calculation request, wherein the first calculation request is a calculation instruction sent by the user and determines whether the first fog computing device is a smart device based on its pre-stored device information. If not, the server determines that the first fog computing device is a non-deployable device. If so, the server sends a first calculation request to the first fog computing device to execute the target algorithm analysis task.

[0052] Based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determine whether the pre-stored algorithm and the current remaining computing resources meet the requirements for executing the target algorithm analysis task. If they do, then execute the target algorithm analysis task.

[0053] A fourth aspect of the embodiments of this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0054] Memory, used to store computer programs;

[0055] A processor, used to execute programs stored in memory, implements fog computing methods for servers in fog computing systems.

[0056] A fifth aspect of the embodiments of this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0057] Memory, used to store computer programs;

[0058] The processor, when executing a program stored in memory, implements a fog computing method for a first fog computing device applied in a fog computing system.

[0059] A sixth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a fog computing method applied to a server in a fog computing system.

[0060] A seventh aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a fog calculation method applied to a first fog calculation device in a fog calculation system.

[0061] Beneficial effects of the embodiments in this application:

[0062] This application provides a fog computing system, method, electronic device, and storage medium. The system includes a server and multiple fog computing devices within the same local area network. The multiple fog computing devices include a first fog computing device and a second fog computing device. The server is used to receive computing instructions sent by a user, wherein the computing instructions specify the first fog computing device to execute a target algorithm analysis task. When the first fog computing device is a non-deployable device, a first computing request to execute the target algorithm analysis task is sent to the first fog computing device, wherein the first computing request includes an algorithm identifier and computing resource information required to execute the target algorithm analysis task. The first fog computing device is used to receive the first computing request; determine whether it can execute the target algorithm analysis task based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task; if not, it generates and sends a second computing request for the fog computing task to the second fog computing device, wherein the second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes an algorithm identifier required to execute the target algorithm analysis task. The second fog computing device is used to receive the second computing request; obtain the algorithm required to execute the target algorithm analysis task from the server based on the algorithm identifier required to execute the target algorithm analysis task, and execute the target algorithm analysis task. As can be seen, the solution of this application embodiment can automatically send a computing request to the first fog computing device to execute the target task when the server determines that the first fog computing device is a non-deployable device, so that the first fog computing device receives the computing request and obtains the algorithm required to execute the target algorithm analysis task from the server through the second fog computing device, and executes the target algorithm analysis task. This not only realizes the automatic selection of fog computing devices and the automatic deployment of fog computing tasks, but also improves the resource utilization efficiency of the fog computing system.

[0063] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0064] 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, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0065] Figure 1 This is a schematic diagram of the structure of a fog computing system provided in an embodiment of this application;

[0066] Figure 2 This is a schematic diagram of an example of a fog computing system provided in an embodiment of this application;

[0067] Figure 3A schematic diagram of the structure of a smart device provided in an embodiment of this application;

[0068] Figure 4 A schematic diagram of the structure of a non-smart device provided in an embodiment of this application;

[0069] Figure 5 This is a schematic diagram of the structure of a fog computing module provided in an embodiment of this application;

[0070] Figure 6 A flowchart illustrating the intelligent algorithm task provided in this application embodiment;

[0071] Figure 7 This is a schematic flowchart of a fog calculation method provided in an embodiment of this application;

[0072] Figure 8 Another flowchart illustrating the fog calculation method provided in this application embodiment;

[0073] Figure 9 This is a schematic diagram of a fog computing device provided in an embodiment of this application;

[0074] Figure 10 This is another schematic diagram of the fog computing device provided in the embodiments of this application;

[0075] Figure 11 A schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0076] Figure 12 This is another structural schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0077] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0078] First, the technical terms that may be used in the embodiments of this application will be explained:

[0079] Dynamic algorithm deployment: When an algorithm is enabled, the algorithm package is downloaded to the target device via the server. After the target device loads the algorithm package, it performs the corresponding algorithm analysis. Users can flexibly enable or disable algorithms as needed through dynamic deployment.

[0080] Fog computing: Fog computing is an extension of the cloud computing concept. It adds another layer of "fog" between terminal devices and the cloud, namely the network edge layer. It distributes computing at the network edge layer and sends the computing results, rather than the original data itself, to the cloud for computing. Fog computing can greatly reduce the amount of data interacting with the cloud, reduce computing latency and bandwidth pressure, and at the same time reduce the security risks caused by sending data to the cloud.

[0081] A first aspect of this application provides a fog computing system, see [link to relevant documentation]. Figure 1 The system includes a server 101 and multiple fog computing devices within the same local area network. The multiple fog computing devices include a first fog computing device 102 and a second fog computing device 103.

[0082] Server 101 is used to receive computing instructions sent by users, wherein the computing instructions include specifying a first fog computing device to perform a target algorithm analysis task; when the first fog computing device is a non-deployable device, a first computing request to be sent to the first fog computing device to perform the target algorithm analysis task is sent, wherein the first computing request includes the algorithm identifier and computing resource information required to perform the target algorithm analysis task;

[0083] The first fog computing device 102 is used to receive a first computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether it can execute the target algorithm analysis task; if not, it generates and sends a second computing request for the fog computing task to the second fog computing device, wherein the second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task.

[0084] The second fog computing device 103 is used to receive a second computing request; obtain the algorithm required to perform the target algorithm analysis task from the server according to the algorithm identifier required to perform the target algorithm analysis task, and execute the target algorithm analysis task.

[0085] In this embodiment, a user can publish a target algorithm analysis task and specify a fog computing device to execute it. The target task can be of various types, such as object detection or audio recognition. Specifically, when publishing a task, the user can publish the algorithm and required computing resources to the server. The computing resources information can refer to the computing power or configuration required to execute the target algorithm analysis task, such as the required memory size. During fog computing, after execution, the calculation results, rather than the original data itself, can be sent to the cloud. For example, when performing object detection, the user can send the image to be detected and the corresponding detection algorithm to the server. The server then specifies a fog computing device to process the image according to the user's instructions, and then sends the processed image, rather than the user's original image, to the cloud. The cloud performs detection based on the processed image to obtain the detection results, thereby reducing the amount of data interacting with the cloud, reducing computational latency and bandwidth pressure, and mitigating the security risks associated with sending data to the cloud. See [link to specific documentation]. Figure 2 The system may also include a user side, which is a medium for interaction with the user, such as software clients on various platforms. Through the user side, devices in the user's local area network environment can be managed, user operations can be issued, and messages generated by the devices can be received. Users can pre-create accounts and add or delete devices within their accounts. When publishing a computing task, they can specify a device added to their account to execute the task.

[0086] In this system, when the first fog computing device is not a deployable device, the server sends a first computing request to the first fog computing device to execute the target algorithm analysis task. The server can first determine whether the first fog computing device is not a deployable device. In actual use, the server can determine whether the first fog computing device is not a deployable device based on pre-stored information about the first fog computing device. For example, the device addition process in a fog computing system based on algorithm dynamic deployment includes: the user registers / logs in to the server; the user adds a device under their account, and after successful addition, the device sends its information to the server (e.g., its IP address (Internet Protocol) within the local area network, whether it is a smart device, etc.); the server records the information of the newly added device in its device management module; the server distributes all updated device information from its device management module to all devices currently in the user's local area network; each device in the user's local area network, after receiving the device information from the server, records the information and updates its device management module, returning a message indicating whether the update was successful to the server. The device information received by the server or each device within the user's local area network can be used to determine whether the first fog computing device is a non-deployable device. For example, in the device deletion process, the device deletion process in a dynamically deployed fog computing system based on algorithms is as follows: The user registers / logs in to the server; the user deletes the device under their account; after successful deletion, the server removes the relevant device information recorded in the server's device management module; the server distributes all updated device information from its device management module to all current devices within the user's local area network; each device within the user's local area network, upon receiving the device information from the server, records the information and updates its own device management module, returning a message indicating whether the update was successful to the server.

[0087] In practical use, the server in this embodiment may include a message and instruction processing module, a device management module, an algorithm management module, and other necessary functional modules. The message and instruction processing module receives user instructions and executes corresponding actions, and receives and processes messages reported by devices and pushes them to the user. The device management module records all device information in the current user's local area network environment (e.g., whether the device is a smart device, the device's IP address in the user's local area network environment, etc.). When device information changes in the user's local area network environment (e.g., devices are added, removed, or IP addresses change), the device management module will synchronize the changed device information to all devices in the user's local area network. The algorithm management module stores the device resources necessary for each algorithm package to run and for each algorithm fog computing task to run.

[0088] In practical use, multiple fog computing devices within the same local area network in this application embodiment may include: routers, smart devices, and non-smart devices; routers, smart devices, and non-smart devices can be connected via wired or wireless means. Multiple fog computing devices require at least two devices, with at least one being a smart device; the router can be a common router, and the smart device can be a device with certain computing power and other resources, capable of dynamically loading algorithms, and able to receive and analyze data transmitted from non-smart devices or other smart devices while simultaneously using locally collected data for algorithm analysis, and return algorithm analysis results, such as the second fog computing device in this application embodiment. Non-smart devices can, in addition to fulfilling their own functions, send fog computing task requests to smart devices, collect and process data required for fog computing, and send data required for fog computing; for example, the first fog computing device generates and sends a second fog computing task request to the second fog computing device.

[0089] In existing technologies, when a user-specified device is unable to perform a fog computing task, a task execution failure is often reported. However, using the method of this application embodiment, when the user-specified first fog computing device is a non-deployable device, a second computing request can be automatically sent to a second fog computing device. This allows the second fog computing device to receive the computing request, obtain the algorithm required for the target algorithm analysis task from the server based on the algorithm identifier, and then execute the target algorithm analysis task. The algorithm obtained by the second fog computing device from the server for executing the target algorithm analysis task can be the algorithm uploaded to the server when the user publishes the target algorithm analysis task.

[0090] As can be seen, the system of this application embodiment can automatically send a computing request to the first fog computing device to execute the target task when the server determines that the first fog computing device is a non-deployable device, so that the first fog computing device receives the computing request and obtains the algorithm required to execute the target algorithm analysis task from the server through the second fog computing device, and executes the target algorithm analysis task. This not only realizes the automatic selection of fog computing devices and the automatic deployment of fog computing tasks, but also improves the resource utilization efficiency of the fog computing system.

[0091] Optionally, the second computation request may also include information on the computational resources required to perform the target algorithm analysis task;

[0092] The first fog computing device 102 is specifically used to generate a second computing request for a fog computing task; and sequentially send the second computing request to all fog computing devices other than itself among multiple fog computing devices in the same local area network.

[0093] The second fog computing device 103 is specifically used to receive the second computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether its pre-stored algorithm and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task. If they meet the requirements, it sends a deployment success message to the first fog computing device and executes the target algorithm analysis task. If they do not meet the requirements, it sends a first deployment failure message to the first fog computing device.

[0094] In this embodiment of the application, the second fog computing device determines whether its pre-stored algorithms and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task. It can identify its pre-stored algorithms and its current remaining computing resources. When its pre-stored algorithms include the algorithm required by the target task corresponding to the computing request, and its current remaining computing resources are greater than the resources required to execute the target task, the second fog computing device determines that its pre-stored algorithms and its current remaining computing resources meet the algorithm and resources required to execute the target task. Otherwise, if either the algorithm or the resources are not met, it is determined that the task is not met.

[0095] In practical use, the second fog computing device in this application embodiment is an intelligent device, see [link to relevant documentation]. Figure 3 The intelligent device can be divided into two parts: device firmware and algorithm process. The device firmware consists of a message module, a fog computing module, and a basic function module. The message module interacts with the server and algorithm process (e.g., receiving server instructions, receiving algorithm analysis results, and reporting device-generated messages and results to the server). The fog computing module records information about all devices within the local area network where the device resides, handles inter-device communication when establishing fog computing tasks, and collects and processes data required for fog computing tasks. The basic function module supports the operation of the device's non-intelligent functions and provides the necessary data for algorithm analysis. The algorithm process consists of a message module, a task management module, and an algorithm scheduling module. The message module interacts with the device firmware. The task management module creates, starts, configures, and stops algorithm analysis tasks (including regular algorithm analysis tasks and fog computing analysis tasks). The algorithm scheduling module uses designed scheduling logic and strategies to uniformly schedule the local tasks and fog computing tasks of multiple algorithms within the device, ensuring the performance of each task.

[0096] Optionally, the second fog computing device 103 is specifically used to receive the second computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether the algorithm it has pre-stored meets the algorithm required to execute the target algorithm analysis task; if not, it sends the second deployment failure information of the algorithm reason to the first fog computing device.

[0097] The first fog computing device 102 is specifically used to receive the second deployment failure information and send the second computing request to the remaining fog computing devices that have not sent the second computing request among the multiple fog computing devices in the same local area network.

[0098] In this embodiment, the first fog computing device can pre-acquire information about each device in the local area network and establish a list. When it receives deployment failure information from the second fog computing device, it can sequentially select each device according to the list and send a second computing request to that device. For example, when it receives deployment failure information from a device (which could be either a first or second deployment failure message), it selects the next device according to the list and sends a computing request to that device. The list is sorted based on various information, such as computing resource information (placing devices with more remaining or initial computing resources at the top), the stored algorithms (placing devices with more stored algorithms at the top), or the order in which the devices were added. In this embodiment, the second deployment failure information is merely to indicate that the deployment failure was due to an algorithmic issue.

[0099] Optionally, the first fog computing device 102 is further configured to, upon receiving first deployment failure information or second deployment failure information from multiple fog computing devices within the same local area network, identify the fog computing device corresponding to the second deployment failure information; send the algorithm required to execute the target algorithm analysis task to the identified fog computing device; and sequentially send a third calculation request for the fog computing task to all fog computing devices other than itself among the multiple fog computing devices within the same local area network.

[0100] Optionally, the first fog computing device 102 is specifically used to send a download request to the server for the algorithm required to perform the target algorithm analysis task corresponding to the identified fog computing device;

[0101] Server 101 is also used to receive download requests; and to send the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required to perform the target algorithm analysis task according to the download address.

[0102] After receiving first or second deployment failure information from multiple fog computing devices within the same local area network, the first fog computing device can continue to send the same fog computing task computation request sequentially to the remaining fog computing devices. In this embodiment, the third computation request is merely to indicate that it is sent to all fog computing devices within the same local area network except for itself. The third computation request is sent until a fog computing device returns a successful deployment.

[0103] If, after all remaining fog computing devices have sent their requests, no fog computing device returns a successful deployment, the fog computing device corresponding to the second deployment failure message is identified. The algorithm required to execute the target algorithm analysis task is sent to the identified fog computing device, and then a second round of querying begins. The first fog computing device resends computing requests to multiple fog computing devices within the same local area network. This continues until a fog computing device returns a successful deployment. If, after all fog computing devices have sent their requests, no fog computing device returns a successful deployment, the creation of the user-selected intelligent algorithm task fails, a failure result is returned to the user, and the process ends.

[0104] In this process, the first fog computing device sends a request to the server to download the algorithm required for the target algorithm analysis task corresponding to the identified fog computing device. The server then sends the download address of the algorithm required for the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required for the target algorithm analysis task according to the download address. After receiving the request from the fog computing device to download the algorithm package corresponding to the algorithm, the server sends the download address of the algorithm package corresponding to the algorithm to the fog computing device. The fog computing device downloads the algorithm package according to the received download address and stores the algorithm package in a specified path on the fog computing device.

[0105] Optionally, the second fog computing device 103 is specifically used to determine whether its pre-stored algorithms meet the algorithm requirements for executing the target algorithm analysis task based on the algorithm identifier required for executing the target algorithm analysis task; if they meet the requirements, it determines whether its current remaining computing resources meet the requirements for executing the target algorithm analysis task based on the computing resource information required for executing the target algorithm analysis task; if they meet the requirements, it sends deployment success information to the first fog computing device and executes the target algorithm analysis task; if they do not meet the requirements, it sends first deployment failure information to the first fog computing device.

[0106] Optionally, the first fog computing device 102 is also used to send deployment failure information back to the server after receiving deployment failure information from multiple fog computing devices corresponding to third computing requests within the same local area network.

[0107] In this embodiment of the application, the server may include multiple intelligent algorithms. The server can count the usage frequency of each intelligent algorithm and create an algorithm package based on one or more intelligent algorithms with high usage frequency. This algorithm package is then periodically sent to each fog computing device. In actual use, the server can pre-obtain and store the algorithm information and current remaining computing resource information pre-stored by each fog computing device. Specifically, the server can periodically obtain the current remaining computing resource information of the first fog computing device and update its own stored information. When determining whether the first fog computing device can execute the target task, it can make this determination based on its own stored information.

[0108] Optionally, server 101 is specifically used to receive computing instructions sent by users; determine whether the first fog computing device is an intelligent device based on its own pre-stored device information; if not, determine that the first fog computing device is a non-deployable device; if so, send a first computing request to the first fog computing device to execute the target algorithm analysis task.

[0109] The first fog computing device 102 is also used to receive a first computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether its pre-stored algorithm and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task; if they do, it executes the target algorithm analysis task.

[0110] In actual use, when the server determines whether the first fog computing device is a deployable device based on its own pre-stored device information, it can determine whether the first fog computing device is an intelligent device based solely on its own pre-stored device information. If it is an intelligent device, it is determined to be deployable; otherwise, it is determined to be non-deployable, thereby improving the efficiency of the determination.

[0111] Once the server determines that the first fog computing device is an intelligent device, it can send a computing request to it. The first fog computing device then determines whether its pre-stored algorithms and remaining computing resources are sufficient to execute the target task. The process by which the first fog computing device determines whether the second fog computing device can execute the target task is similar to how the second fog computing device determines whether its pre-stored algorithms and remaining computing resources meet the requirements for executing the target task. Only when both the pre-stored algorithm information and the remaining computing resources of the second fog computing device meet the requirements of the target task is the task considered satisfied.

[0112] In this embodiment, the first fog computing device can be a non-intelligent device, see [link to relevant documentation]. Figure 4This non-intelligent device lacks intelligent analysis capabilities and may include device firmware. The device firmware consists of a messaging module, a fog computing module, and a basic function module. The messaging module interacts with the server (e.g., receiving server commands, reporting device-generated messages to the server); the fog computing module records information about all devices within the local area network where the device resides, handles inter-device communication when establishing fog computing tasks, and collects and processes data required for fog computing tasks; the basic function module supports the operation of the non-intelligent device's own functions. See also... Figure 5 The fog computing module comprises three parts: a device information management module, a communication module, and a data processing module. The device information management module records and synchronizes information about all devices within the local area network (LAN), including receiving information from the server and recording it on the device itself, and proactively sending device information change messages to the server when device information changes. The communication module handles fog computing-related communication with other devices during task creation and execution (e.g., sending and processing requests to attempt to create or stop fog computing tasks). The data processing module collects data according to user, algorithm requirements, or usage scenarios (e.g., collecting 1 second of video after a certain trigger, or 5 seconds of audio every minute) and processes fog computing task data sent from other devices.

[0113] To illustrate the methods of the embodiments of this application, the following description is provided in conjunction with specific examples. (See attached examples.) Figure 6 The following is the process for creating intelligent algorithm tasks in a fog computing system based on dynamic algorithm deployment:

[0114] 1. Publish the algorithm to the server and record the resource information required for the algorithm to run and the resource information required for each fog computing task of the algorithm in the algorithm management module of the server;

[0115] 2. Users register / log in to their accounts on the server;

[0116] 3. The user selects device A and starts the desired algorithm 1;

[0117] 4. The server determines whether device A is a smart device based on the information recorded in the server device management module. If device A is a smart device, proceed to step 5; if device A is a non-smart device, start the fog computing task creation process and proceed to step 6.

[0118] 5. If device A is a smart device, continue with the conventional smart device algorithm dynamic deployment process. If the algorithm is deployed successfully, it means that the resources in device A meet the requirements of algorithm 1 to run on device A, the smart algorithm task is created successfully, and the process ends. If the algorithm is deployed unsuccessfully, it means that the resources in device A do not meet the requirements of algorithm 1 to run on device A, the smart algorithm task creation fails, and the fog computing task creation process begins. Proceed to step 6.

[0119] 6. After determining that device A is a non-intelligent device or receiving the result that device A failed to start algorithm 1, the server sends an instruction to device A to create a fog computing task of algorithm 1 (including the type of algorithm 1, the resources required for the fog computing task of algorithm 1, etc.);

[0120] 7. After receiving the instruction from the server to create a fog computing task for Algorithm 1, Device A, based on the device information of all devices in the local area network where Device A is located, according to the device management module, sends requests to all smart devices (smart device 1, smart device 2, ..., smart device N) in sequence to attempt to create a fog computing task for Algorithm 1 (including the type of Algorithm 1, the resources required for the fog computing task for Algorithm 1, etc.).

[0121] 8. After receiving a request from device A to create a fog computing task using algorithm 1, the smart device determines whether there is an algorithm that is consistent with algorithm 1 among the algorithms it is currently running. If not, the request is rejected, a failure is returned to device A, and the process proceeds to step 9. If there is an algorithm that is consistent with algorithm 1 among the algorithms it is currently running, the process proceeds to step 10.

[0122] 9. After receiving a request that returns a failure, device A continues to send the same request to the remaining smart devices in turn to attempt to create a fog computing task of Algorithm 1, and waits for the return result until a smart device returns a success. Then proceed to step 10. If no smart device returns a success after all the remaining smart devices have sent their requests, then proceed to step 13.

[0123] 10. If there is an algorithm in the algorithm that is running on the smart device K that is the same as the algorithm 1, the smart device K continues to obtain the remaining resources of the device and compares them with the resources required for the fog computing task of the algorithm 1. If the remaining resources of the device do not meet the resources required for the fog computing task of the algorithm 1, it returns failure and re-enters step 9. If the remaining resources of the device meet the resources required for the fog computing task of the algorithm 1, it returns success and sends an instruction to the algorithm process in the smart device K to create the fog computing task of the algorithm 1.

[0124] 11. After receiving the instruction to create a fog computing task for Algorithm 1, the algorithm process of smart device K creates the fog computing task for Algorithm 1 and adds the fog computing task to the algorithm scheduling module. The algorithm scheduling module performs unified scheduling of the algorithm tasks and fog computing tasks running in this device.

[0125] 12. User Algorithm 1 task creation successful;

[0126] 13. Start the second round of query. Based on the device information of all devices in the local area network where device A is located, recorded by its own device management module, device A sends requests to all smart devices (smart device 1, smart device 2, ..., smart device N) in sequence to attempt to create a fog computing task of algorithm 1 (including the type of algorithm 1, the resources required for the algorithm 1 task, etc.).

[0127] 14. After receiving the request from device A in step 13 to attempt to create a fog computing task of Algorithm 1, smart device J obtains the remaining resources of its device and compares them with the resources required for Algorithm 1 task. If the remaining resources of the device do not meet the resources required for Algorithm 1 task, it returns failure and proceeds to step 15. If the remaining resources of the device meet the resources required for Algorithm 1 task, it sends a request to the server to download the algorithm package of Algorithm 1 and proceeds to step 16.

[0128] 15. After receiving a request that returns a failure, device A continues to send the same request to the remaining smart devices in sequence to attempt to create a fog computing task of Algorithm 1, and waits for the return result until a smart device returns a success. Then proceed to step 16. If no smart device returns a success even after all the remaining smart devices have sent their requests, then the creation of the smart algorithm task selected by the user has failed, and the user is returned a failure result. The process ends.

[0129] 16. After receiving the request from smart device J to download the algorithm package of algorithm 1, the server sends the download address of the algorithm package of algorithm 1 to smart device J. Smart device J downloads the algorithm package according to the received download address of the algorithm package of algorithm 1, and stores the algorithm package in the specified path of smart device J after downloading.

[0130] 17. Intelligent device J creates an Algorithm 1 task and marks it as an Algorithm 1 fog computing task for device A, and adds the task to the algorithm scheduling module;

[0131] 18. User Algorithm 1 task creation successful.

[0132] A second aspect of this application provides a fog calculation method, see [link to relevant documentation]. Figure 7 A server used in a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including a first fog computing device and a second fog computing device;

[0133] The above methods include:

[0134] Step S71: Receive a calculation instruction sent by the user, wherein the calculation instruction includes specifying the first fog computing device to perform a target algorithm analysis task;

[0135] Step S72: When the first fog computing device is a non-deployable device, a first computing request to execute the target algorithm analysis task is sent to the first fog computing device, so that the first fog computing device generates and sends a second computing request for the fog computing task to the second fog computing device. The second fog computing device obtains the algorithm required to execute the target algorithm analysis task from the server and executes the target algorithm analysis task.

[0136] Optionally, the second computation request may also include information on the computational resources required to perform the target algorithm analysis task;

[0137] The above methods also include:

[0138] Receive download requests, wherein the download request is a download request from the first fog computing device to the server for the algorithm required by the fog computing device to perform the target algorithm analysis task.

[0139] Send the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required to perform the target algorithm analysis task according to the download address.

[0140] Optionally, the above methods also include:

[0141] Receive calculation instructions sent by the user;

[0142] Based on its pre-stored device information, the system determines whether the first fog computing device is an intelligent device. If not, it determines that the first fog computing device is a non-deployable device. If so, it sends a first computing request to the first fog computing device to execute the target algorithm analysis task, so that the first fog computing device receives the first computing request. Based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, the system determines whether its pre-stored algorithm and its current remaining computing resources meet the requirements of the algorithm and computing resources required to execute the target algorithm analysis task. If they do, the system executes the target algorithm analysis task.

[0143] As can be seen, the method of this application embodiment can automatically send a computing request to the first fog computing device to execute the target task when the server determines that the first fog computing device is a non-deployable device, so that the first fog computing device receives the computing request and obtains the algorithm required to execute the target algorithm analysis task from the server through the second fog computing device, and executes the target algorithm analysis task. This not only realizes the automatic selection of fog computing devices and the automatic deployment of fog computing tasks, but also improves the resource utilization efficiency of the fog computing system.

[0144] A third aspect of this application provides a fog calculation method, see [link to relevant documentation]. Figure 8A first fog computing device applied in a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including the first fog computing device and the second fog computing device;

[0145] The above methods include:

[0146] Step S81: Receive a first computing request, wherein the first computing request is a computing instruction sent by the user to the server. When the first fog computing device is a non-deployable device, a first computing request to execute the target algorithm analysis task is sent to the first fog computing device. The first computing request includes the algorithm identifier and computing resource information required to execute the target algorithm analysis task.

[0147] Step S82: Based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determine whether the device can execute the target algorithm analysis task. If not, generate and send a second computing request for the fog computing task to the second fog computing device, so that the second fog computing device can obtain the algorithm required to execute the target algorithm analysis task from the server based on the algorithm identifier required to execute the target algorithm analysis task, and execute the target algorithm analysis task. The second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task.

[0148] Optionally, the second computation request may also include information on computational resources required to perform the target algorithm analysis task, including:

[0149] Generate a second computation request for the fog computation task;

[0150] The system sequentially sends a second computing request to all fog computing devices other than itself within the same local area network. This allows the second fog computing device to receive the second computing request and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determine whether its pre-stored algorithm and its current remaining computing resources meet the requirements for executing the target algorithm analysis task. If they do, it sends a deployment success message to the first fog computing device and executes the target algorithm analysis task. If they do not meet the requirements, it sends a first deployment failure message to the first fog computing device.

[0151] Optionally, the above methods include:

[0152] Receive second deployment failure information, wherein the second deployment failure information is the second deployment failure information that the second fog computing device receives the second computing request and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determines whether its pre-stored algorithm meets the algorithm required to execute the target algorithm analysis task. If it does not meet the algorithm requirement, it sends the second deployment failure information to the first fog computing device to report the algorithm reason.

[0153] Send a second calculation request to the remaining fog computing devices among the multiple fog computing devices in the same local area network that have not sent a second calculation request.

[0154] Optionally, the above methods include:

[0155] After receiving first or second deployment failure information from multiple fog computing devices within the same local area network, identify the fog computing device corresponding to the second deployment failure information.

[0156] Send the algorithm required to perform the target algorithm analysis task to the identified fog computing device;

[0157] The third calculation request for the fog computing task is sent sequentially to all fog computing devices other than itself within the same local area network.

[0158] Optionally, the above methods include:

[0159] The system sends a download request to the server for the algorithm required by the identified fog computing device to perform the target algorithm analysis task. The server then receives the download request and sends the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required to perform the target algorithm analysis task according to the download address.

[0160] Optionally, the above methods include:

[0161] After receiving deployment failure information from multiple fog computing devices within the same local area network corresponding to third computing requests, the system sends deployment failure information back to the server.

[0162] Optionally, the above methods include:

[0163] The server receives a first computing request, which is a computing instruction sent by the user and determines whether the first fog computing device is a smart device based on its pre-stored device information. If not, the server determines that the first fog computing device is a non-deployable device. If so, the server sends a first computing request to the first fog computing device to execute the target algorithm analysis task.

[0164] Based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determine whether the algorithm stored in advance and the current remaining computing resources meet the requirements of the algorithm and computing resources required to execute the target algorithm analysis task. If they do, then execute the target algorithm analysis task.

[0165] As can be seen, the method of this application embodiment can automatically send a computing request to the first fog computing device to execute the target task when the server determines that the first fog computing device is a non-deployable device, so that the first fog computing device receives the computing request and obtains the algorithm required to execute the target algorithm analysis task from the server through the second fog computing device, and executes the target algorithm analysis task. This not only realizes the automatic selection of fog computing devices and the automatic deployment of fog computing tasks, but also improves the resource utilization efficiency of the fog computing system.

[0166] A fourth aspect of this application provides a fog computing device, see [link to previous document]. Figure 9 A server used in a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including a first fog computing device and a second fog computing device;

[0167] The instruction receiving module 901 is used to receive calculation instructions sent by the user, wherein the calculation instructions include specifying the first fog computing device to perform a target algorithm analysis task;

[0168] The task deployment module 902 is used to send a first computing request to the first fog computing device to execute the target algorithm analysis task when the first fog computing device is a non-deployable device, so that the first fog computing device generates and sends a second computing request for the fog computing task to the second fog computing device, and obtains the algorithm required to execute the target algorithm analysis task from the server through the second fog computing device, and executes the target algorithm analysis task.

[0169] Optionally, the second computation request may also include computational resource information required to perform the target algorithm analysis task, and the aforementioned apparatus may further include:

[0170] The request receiving module is used to receive download requests, wherein the download request is a download request from the first fog computing device to the server for the algorithm required by the fog computing device to perform the target algorithm analysis task.

[0171] The address sending module is used to send the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required to perform the target algorithm analysis task according to the download address.

[0172] Optionally, the above-mentioned device further includes:

[0173] The user instruction module is used to receive calculation instructions sent by the user.

[0174] The device judgment module is used to determine whether the first fog computing device is an intelligent device based on its pre-stored device information. If not, the first fog computing device is determined to be a non-deployable device. If it is, the module sends a first computing request to the first fog computing device to execute the target algorithm analysis task, so that the first fog computing device receives the first computing request and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determines whether its pre-stored algorithm and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task. If they do, the module executes the target algorithm analysis task.

[0175] As can be seen, the apparatus of this application embodiment can automatically send a computation request to the first fog computing device to execute the target task when the server determines that the first fog computing device is a non-deployable device, so that the first fog computing device receives the computation request and obtains the algorithm required to execute the target algorithm analysis task from the server through the second fog computing device, and executes the target algorithm analysis task. This not only realizes the automatic selection of fog computing devices and the automatic deployment of fog computing tasks, but also improves the resource utilization efficiency of the fog computing system.

[0176] A fifth aspect of this application provides a fog computing device, see [link to previous document]. Figure 10 A first fog computing device applied in a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including the first fog computing device and the second fog computing device;

[0177] The request receiving module 1001 is used to receive a first computing request, wherein the first computing request is a computing instruction sent by the user to the server. When the first fog computing device is a non-deployable device, the first computing request is sent to the first fog computing device to execute the target algorithm analysis task. The first computing request includes the algorithm identifier and computing resource information required to execute the target algorithm analysis task.

[0178] The task execution module 1002 is used to determine whether it can execute the target algorithm analysis task based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task. If not, it generates and sends a second computing request for the fog computing task to the second fog computing device, so that the second fog computing device can obtain the algorithm required to execute the target algorithm analysis task from the server based on the algorithm identifier required to execute the target algorithm analysis task, and execute the target algorithm analysis task. The second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task.

[0179] Optionally, the second computation request may also include computational resource information required to perform the target algorithm analysis task, and the aforementioned apparatus may further include:

[0180] The second request generation module is used to generate the second computation request for the fog computing task.

[0181] The second request sending module is used to sequentially send a second computing request to all fog computing devices other than itself among multiple fog computing devices in the same local area network, so that the second fog computing device receives the second computing request and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determines whether its pre-stored algorithm and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task. If they meet the requirements, it sends a deployment success message to the first fog computing device and executes the target algorithm analysis task; if they do not meet the requirements, it sends a first deployment failure message to the first fog computing device.

[0182] Optionally, the above-mentioned device further includes:

[0183] The failure information receiving module is used to receive the second deployment failure information. The second deployment failure information is the second deployment failure information that the second fog computing device receives the second computing request and, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determines whether its pre-stored algorithm meets the algorithm required to execute the target algorithm analysis task. If it does not meet the algorithm requirement, it sends the second deployment failure information to the first fog computing device to explain the algorithm failure.

[0184] The remaining request sending module is used to send the second calculation request to the remaining fog computing devices that have not sent the second calculation request among multiple fog computing devices in the same local area network.

[0185] Optionally, the above-mentioned device further includes:

[0186] The feedback receiving module is used to identify the fog computing device corresponding to the second deployment failure information after receiving the first deployment failure information or the second deployment failure information from multiple fog computing devices in the same local area network.

[0187] The identification device sending module is used to send the algorithm required to perform the target algorithm analysis task to the identified fog computing device;

[0188] The third request sending module is used to send the third calculation request for fog computing tasks to all fog computing devices other than itself in a series of fog computing devices within the same local area network.

[0189] Optionally, the above-mentioned device further includes:

[0190] The download request sending module is used to send a download request to the server for the algorithm required by the identified fog computing device to perform the target algorithm analysis task. This allows the server to receive the download request and send the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required to perform the target algorithm analysis task according to the download address.

[0191] Optionally, the above-mentioned device further includes:

[0192] The deployment failure information receiving module is used to receive deployment failure information from multiple fog computing devices corresponding to third computing requests within the same local area network and then send the deployment failure information back to the server.

[0193] Optionally, the above-mentioned device further includes:

[0194] The first computing request receiving module is used to receive the first computing request, wherein the first computing request is the server receiving the computing instruction sent by the user and determining whether the first fog computing device is a smart device based on its own pre-stored device information. If not, the first fog computing device is determined to be a non-deployable device. If so, the first computing request to execute the target algorithm analysis task is sent to the first fog computing device.

[0195] The self-algorithm judgment module is used to determine whether the pre-stored algorithms and the current remaining computing resources of the self meet the requirements of the algorithm identifier and computing resources required to execute the target algorithm analysis task, based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task. If they meet the requirements, the target algorithm analysis task is executed.

[0196] As can be seen, the apparatus of this application embodiment can automatically send a computation request to the first fog computing device to execute the target task when the server determines that the first fog computing device is a non-deployable device, so that the first fog computing device receives the computation request and obtains the algorithm required to execute the target algorithm analysis task from the server through the second fog computing device, and executes the target algorithm analysis task. This not only realizes the automatic selection of fog computing devices and the automatic deployment of fog computing tasks, but also improves the resource utilization efficiency of the fog computing system.

[0197] This application also provides an electronic device, such as... Figure 11 As shown, it includes a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104. The processor 1101, communication interface 1102, and memory 1103 communicate with each other via the communication bus 1104.

[0198] Memory 1103 is used to store computer programs;

[0199] When processor 1101 executes the program stored in memory 1103, it performs the following steps:

[0200] Receive calculation instructions sent by the user, wherein the calculation instructions include specifying a first fog computing device to perform a target algorithm analysis task;

[0201] When the first fog computing device is a non-deployable device, a first computing request to execute the target algorithm analysis task is sent to the first fog computing device, so that the first fog computing device generates and sends a second computing request for the fog computing task to the second fog computing device. The second fog computing device obtains the algorithm required to execute the target algorithm analysis task from the server and executes the target algorithm analysis task.

[0202] This application also provides an electronic device, such as... Figure 12 As shown, it includes a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204. The processor 1201, the communication interface 1202, and the memory 1203 communicate with each other through the communication bus 1204.

[0203] Memory 1203 is used to store computer programs;

[0204] When processor 1201 executes the program stored in memory 1203, it performs the following steps:

[0205] Receive a first computing request, wherein the first computing request is a computing instruction sent by the user to the server. When the first fog computing device is a non-deployable device, send a first computing request to the first fog computing device to execute the target algorithm analysis task. The first computing request includes the algorithm identifier and computing resource information required to execute the target algorithm analysis task.

[0206] Based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, the system determines whether it can execute the target algorithm analysis task. If not, it generates and sends a second computing request for the fog computing task to the second fog computing device, so that the second fog computing device can obtain the algorithm required to execute the target algorithm analysis task from the server based on the algorithm identifier required to execute the target algorithm analysis task, and execute the target algorithm analysis task. The second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task.

[0207] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0208] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0209] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0210] The processors mentioned above can be general-purpose processors or graphics processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0211] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the fog computing methods applied to a server in a fog computing system described above.

[0212] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the fog calculation method of the first fog calculation device applied to any of the fog calculation systems described above.

[0213] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the fog computing methods applied to a server in a fog computing system as described above.

[0214] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute a fog calculation method of a first fog calculation device applied to a fog calculation system in any of the above embodiments.

[0215] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

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

[0217] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of methods, apparatus, electronic devices, storage media, and computer program products are basically similar to the system embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the system embodiments.

[0218] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A fog computing system, characterized in that, The system includes a server and multiple fog computing devices within the same local area network. The multiple fog computing devices include a first fog computing device and a second fog computing device. The first fog computing device can be a smart device or a non-smart device. The server is configured to receive computation instructions sent by the user, determine whether the first fog computing device is a smart device based on its pre-stored device information, and if not, determine that the first fog computing device is a non-deployable device and automatically send a first computation request to the first fog computing device to execute a target algorithm analysis task, so that the first fog computing device generates and sends a second computation request for a fog computing task to the second fog computing device; if yes, send a first computation request to the first fog computing device to execute a target algorithm analysis task; wherein, the computation instructions include specifying the first fog computing device to execute a target algorithm analysis task; the first computation request includes the algorithm identifier and computing resource information required to execute the target algorithm analysis task; The first fog computing device is configured to receive the first computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, determine whether its pre-stored algorithms and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task; if they do, execute the target algorithm analysis task; if not, generate and send a second computing request for the fog computing task to the second fog computing device, wherein the second computing request is to execute the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task; The second fog computing device is configured to receive the second computing request; obtain the algorithm required to execute the target algorithm analysis task from the server according to the algorithm identifier required to execute the target algorithm analysis task, and execute the target algorithm analysis task.

2. The system according to claim 1, characterized in that, The second computation request also includes information on the computational resources required to perform the target algorithm analysis task; The first fog computing device is specifically used to generate a second computing request for a fog computing task; and sequentially send the second computing request to all fog computing devices other than itself among the multiple fog computing devices in the same local area network; The second fog computing device is specifically used to receive the second computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether its pre-stored algorithm and its current remaining computing resources meet the algorithm and computing resources required to execute the target algorithm analysis task. If they meet the requirements, it sends deployment success information to the first fog computing device and executes the target algorithm analysis task. If they do not meet the requirements, it sends first deployment failure information to the first fog computing device.

3. The system according to claim 2, characterized in that, The second fog computing device is specifically used to receive the second computing request; based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task, it determines whether the algorithm it has pre-stored meets the algorithm required to execute the target algorithm analysis task; if not, it sends a second deployment failure message to the first fog computing device to report the algorithm reason. The first fog computing device is specifically used to receive the second deployment failure information; and to send the second computing request to the remaining fog computing devices among the multiple fog computing devices in the same local area network that have not sent the second computing request.

4. The system according to claim 3, characterized in that, The first fog computing device is further configured to, upon receiving first deployment failure information or second deployment failure information from multiple fog computing devices within the same local area network, identify the fog computing device corresponding to the second deployment failure information; send the algorithm required to execute the target algorithm analysis task to the identified fog computing device; and sequentially send a third calculation request for the fog computing task to all fog computing devices other than itself among the multiple fog computing devices within the same local area network.

5. The system according to claim 4, characterized in that, The first fog computing device is specifically used to send a download request to the server for the algorithm required by the identified fog computing device to perform the target algorithm analysis task; The server is also used to receive the download request; Send the download address of the algorithm required to perform the target algorithm analysis task to the identified fog computing device, so that the identified fog computing device can download the algorithm required to perform the target algorithm analysis task according to the download address.

6. The system according to claim 3, characterized in that, The second fog computing device is specifically used to determine whether its pre-stored algorithms meet the algorithm requirements for executing the target algorithm analysis task based on the algorithm identifier required for executing the target algorithm analysis task; if they meet the requirements, it determines whether its current remaining computing resources meet the requirements for executing the target algorithm analysis task based on the computing resource information required for executing the target algorithm analysis task; if they meet the requirements, it sends deployment success information to the first fog computing device and executes the target algorithm analysis task; if it does not meet the requirements, it sends the first deployment failure information to the first fog computing device.

7. The system according to claim 3, characterized in that, The first fog computing device is further configured to send deployment failure information back to the server after receiving deployment failure information from the third computing requests corresponding to multiple fog computing devices within the same local area network.

8. A fog calculation method, characterized in that, A server used in a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including a first fog computing device and a second fog computing device, the first fog computing device being a smart device or a non-smart device; The method includes: The system receives a computation instruction sent by a user, determines whether the first fog computing device is a smart device based on its pre-stored device information, and if not, determines that the first fog computing device is a non-deployable device, automatically sends a first computation request to the first fog computing device to execute a target algorithm analysis task, so that the first fog computing device generates and sends a second computation request for a fog computing task to the second fog computing device; if yes, it sends a first computation request to the first fog computing device to execute a target algorithm analysis task; wherein, the computation instruction includes specifying that the first fog computing device execute a target algorithm analysis task; the first computation request includes the algorithm identifier and computing resource information required to execute the target algorithm analysis task; and causes the first fog computing device to receive the first computation request and, according to the execution of the target algorithm analysis task, execute the second computation request. The system identifies the algorithm identifier and computing resource information required for the target algorithm analysis task, determines whether its pre-stored algorithms and current remaining computing resources meet the requirements for executing the target algorithm analysis task, and executes the target algorithm analysis task if they meet the requirements. If not, it automatically generates and sends a second computing request for the fog computing task to the second fog computing device, so that the second fog computing device receives the second computing request, obtains the algorithm required for executing the target algorithm analysis task from the server according to the algorithm identifier required for executing the target algorithm analysis task, and executes the target algorithm analysis task. The second computing request is for executing the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required for executing the target algorithm analysis task.

9. A fog calculation method, characterized in that, A first fog computing device applied to a fog computing system, the system including a server and multiple fog computing devices within the same local area network, the multiple fog computing devices including a first fog computing device and a second fog computing device, the first fog computing device being a smart device or a non-smart device; The method includes: The server receives a first computation request, wherein the first computation request is a computation instruction sent by the user. Based on its pre-stored device information, the server determines whether the first fog computing device is a smart device. If not, the server determines that the first fog computing device is a non-deployable device and automatically sends a first computation request to the first fog computing device to execute a target algorithm analysis task, so that the first fog computing device generates and sends a second computation request for a fog computing task to the second fog computing device. If the first computation request is a smart device, the server sends a first computation request to the first fog computing device to execute a target algorithm analysis task. The first computation request includes the algorithm identifier and computing resource information required to execute the target algorithm analysis task. The first fog computing device determines whether its pre-stored algorithms and current remaining computing resources meet the requirements for executing the target algorithm analysis task based on the algorithm identifier and computing resource information required to execute the target algorithm analysis task. If they do, the first fog computing device executes the target algorithm analysis task. If not, it generates and sends a second computing request for the fog computing task to the second fog computing device, so that the second fog computing device receives the second computing request, obtains the algorithm required for executing the target algorithm analysis task from the server based on the algorithm identifier required to execute the target algorithm analysis task, and executes the target algorithm analysis task. The second computing request is for executing the target algorithm analysis task through the second fog computing device, and the second computing request includes the algorithm identifier required to execute the target algorithm analysis task.

10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method of claim 8 or 9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in claim 8 or 9.