Fog node resource allocation

By identifying the requests and locations of client nodes, dynamically clustering fog nodes to form collaborative clusters, optimizing resource allocation, it solves the challenges of resource allocation and task scheduling in fog computing environments, achieving low waiting time and efficient task execution.

CN113906716BActive Publication Date: 2024-09-24TELEFONAKTIEBOLAGET LM ERICSSON (PUBL)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980097181.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-07
Publication Date
2024-09-24
Estimated Expiration
2039-06-07

AI Technical Summary

Technical Problem

Resource allocation and task scheduling are challenging in fog computing environments, especially in dynamic and heterogeneous fog node environments, where it is difficult to effectively allocate resources to achieve low waiting time and efficient task execution.

Method used

By identifying the requests and locations of client nodes, dynamically clustering fog nodes to form collaborative clusters, optimizing resource allocation to minimize the number of clusters and request response times, and leveraging message queuing telemetry transport protocols for communication.

Benefits of technology

It achieves efficient allocation of resources and task scheduling in a fog computing environment, reduces waiting time and improves task execution efficiency, and is suitable for application scenarios such as smart cities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113906716B
    Figure CN113906716B
Patent Text Reader

Abstract

A method (300) for allocating resources of fog nodes is disclosed, wherein the fog nodes are organized into at least one fog network. The method includes: receiving a request from a client node (332); identifying requirements for fulfilling the request (334); determining a location of the client node for fulfilling the request (336); and identifying a cluster of fog nodes operable to fulfill the request based on the identified requirements and the determined location (338). The method also includes selecting a fog node whose resources are to be allocated to fulfill the request from the identified clusters by minimizing at least one of the number of clusters required to fulfill the request, the total time to fulfill requests received by the fog node, and / or the number of requests received by the fog node that are not fulfilled (340). A controller and a computer program product are also disclosed, which are configured to perform the method for allocating resources of fog nodes when executed on a computer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a method for allocating resources of fog nodes, wherein the fog nodes are organized into at least one fog network. The present disclosure also relates to a controller and a computer program and a computer program product, which are configured to perform the method for allocating resources of fog nodes when executed on a computer. Background Art

[0002] Fog computing refers to the extension of cloud computing to the edge of the network, which facilitates the operation of computing, storage, and networking services between terminal devices and cloud computing data centers. Therefore, fog computing can be considered a complement to cloud computing and is predicted to be beneficial to different fields including mobile / wearable computing, Internet of Things (IoT), and big data analysis. Some advantages provided by fog computing include reduced waiting time, increased throughput, integration of resources, energy saving, and enhanced security and privacy. For example, in big data analysis, a large amount of data is generated at the edge of the network. Fog computing supports edge analysis, which can reduce the latency of big data analysis and reduce the cost of data transmission and storage.

[0003] Fog computing could be a key component in developing the smart city paradigm, which envisions using information and communication technologies (ICT) to develop, deploy, and promote sustainable practices in order to address the growing challenges of urbanization. At the core of this ICT framework is an intelligent network of connected objects and machines that use wireless technology and the cloud to transmit data. Cloud-based IoT applications receive, analyze, and manage data in real time to help municipalities, businesses, and citizens make better decisions. Traditional cloud computing architectures are unable to meet the requirements of large IoT deployments at this scale, so fog computing is envisioned to address issues including latency, network bandwidth conservation, security issues, and operational reliability, adaptability to varying environmental conditions, and the ability to store data and take decisions closer to the location of interest. In some cases, the ability to analyze data close to the device that collects it can make the difference between time-to-resolution issues and cascading system failures. Rising transportation costs and processing speeds have also driven the adoption of fog computing, in which computing power is distributed across edge networks, data centers, and public clouds. Fog computing is beginning to be deployed in smart cities, connected cars, drones, and other applications. The key challenges in running IoT applications in a fog computing environment are resource allocation and task scheduling. Fog computing research is still in its infancy, and a taxonomy-based survey of the requirements of fog infrastructure, platforms, and applications mapped to current research is still needed.

[0004] It should be understood that analyzing IoT sensor data close to where it is collected has the following advantages: minimizing latency; offloading a large amount of network traffic from the core network; and maintaining potentially sensitive data within the network where it is generated. Due to the diversity of IoT devices and their available resources, resources are most dynamic and heterogeneous in a fog environment. All devices, referred to as fog devices, are responsible for performing computations for their own applications. Fog computing aims to use available idle resources on any fog device so that fog computing is always second priority to the device's own applications. In general, the amount of resources available for fog computing is dynamic, but can be predicted by analyzing the long-term activity of fog node resources. This prediction is useful because during the execution of a fog task, the resource state of the fog node executing the task may change, for example, due to a request received from the application that the fog node is responsible for. This is different from the case of the cloud, where it is known which resources are currently available and whether they are dedicated to cloud-based application requests. Therefore, resource allocation and scheduling as part of dynamic collaboration within fog nodes is more challenging than resource allocation and scheduling in the cloud.

[0005] Important characteristics of fog computing are, for example, low latency and location awareness, wide geographic distribution, mobility, multiple nodes in close proximity, dominant role of wireless access, significant presence of streaming and real-time applications, and heterogeneity. An example use case that embodies some of these characteristics is the case of a smart city involving the following four fog networks: smart buildings, smart transportation, connected cars, and smart parking. These networks are Figure 1 Available in the smart city environment shown. Resource allocation involves selecting and connecting different fog nodes from different networks and using their knowledge and resources to perform tasks. Such tasks may include deciding where to park an appointment by considering various factors including traffic, available parking, the building and floor of the appointment.

[0006] The fog computing architecture is a hierarchical architecture, where data from lower layers cascades to upper layers and finally to the topmost cloud layer, e.g. Figure 2 As shown. Data transmission is possible in both north-south and east-west directions. In the smart city paradigm, there can be multiple clouds that can be connected to unique or public fog nodes to collect data for different purposes. Fog nodes are connected to IoT devices including sensors, actuators, etc. There can be IoT devices and fog nodes developed by different manufacturers in the fog network, and no standard annotations are provided for the data they collect. The variations in syntax, markup, and operations between fog nodes provided by different vendors may additionally complicate the task of resource allocation in the network. Summary of the invention

[0007] The present disclosure aims to provide a method, apparatus and computer-readable medium that at least partially solve one or more of the above challenges.

[0008] According to a first aspect of the present disclosure, a method for allocating resources of fog nodes is provided, wherein the fog nodes are organized into at least one fog network. The method comprises: receiving a request from a client node; identifying requirements for implementing the request; and determining a location of the client node for implementing the request. The method further comprises: identifying a cluster of fog nodes operable to implement the request based on the identified requirements and the determined location; and selecting a fog node whose resources are to be allocated to implement the request from the identified cluster in a manner that minimizes at least one of the number of clusters required to implement the request, the total time to implement requests received by the fog node, and / or the number of requests received by the fog node that are not implemented.

[0009] According to an example of the present disclosure, a fog node may include a node defined in a glossary of terms related to fog computing provided by the Open Fog Consortium: "A physical and logical network element that implements fog computing services allowing it to interoperate with other fog nodes. A fog node may be a physical, logical, or virtual fog node, and may be nested (e.g., a virtual fog node on a physical fog node)". The Open Fog Reference Architecture published by the Open Fog Consortium is included in IEEE Standard 1934-2018. According to an example of the present disclosure, a fog node may be part of a communication network including a cloud layer and a fog layer. The cloud layer may include one or more separate clouds, and the fog layer may include one or more separate fog networks. The fog layer and one, some, or all of the fog networks therein may include one or more hierarchical layers, including, for example, regional, area, local, and endpoint layers. According to an example of the present disclosure, communication between fog nodes may be based on the Message Queuing Telemetry Transport (MQTT) protocol.

[0010] According to an example of the present disclosure, a request received from a client node may be received at a fog node in communication with the client node. The client node may be connected to a communication network of which the fog node is a part. The request may specify a task requiring provision of one or more services.

[0011] According to an example of the present disclosure, identifying requirements for implementing a request may include: identifying a primary service of the request, wherein the primary service includes a service provided by at least one fog node that is necessary for implementing the request; and identifying a fog node operable to provide the primary service of the request.

[0012] According to an example of the present disclosure, the step of identifying the requirements may include identifying a plurality of primary services necessary to fulfill the request.

[0013] According to an example of the present disclosure, identifying requirements for implementing the request may further include: identifying a fog node operable to provide a secondary service of the request, wherein the secondary service includes a service provided by at least one fog node that is associated with the primary service of the request.

[0014] According to an example of the present disclosure, identifying a fog node operable to provide a requested secondary service may include: identifying a fog node contained within the same matching neighborhood as the identified fog node operable to provide the requested primary service. According to such an example, the matching neighborhood may include a plurality of fog nodes that are correlated based on at least one of: a service request pattern for the service they provide and / or a trend change pattern for the service they provide.

[0015] According to an example of the present disclosure, determining a location of a client node for implementing a request may include estimating a trajectory of the client node based on historical location data of the client node within the environment.

[0016] According to an example of the present disclosure, determining a location of a client node for implementing a request may include modeling an environment as a location graph including vertices representing waypoints within the environment and edges representing legal paths between the waypoints.

[0017] According to an example of the present disclosure, identifying a cluster of fog nodes operable to implement the request based on the identified requirement and the determined location may include: generating at least one cluster including fog nodes operable to at least partially implement the request, within a threshold distance of each other at a specific point in time, and operable to cooperate with each other.

[0018] According to an example of the present disclosure, a fog node operable to at least partially implement a request may include a fog node identified as operable to provide a primary or secondary service of the request.

[0019] According to an example of the present disclosure, identifying a fog node cluster operable to implement the request based on the identified requirements and the determined location may also include: identifying a generation cluster within a threshold distance of the client node; and determining whether the identified generation cluster can implement the request based on the determined location and the time period for implementing the request.

[0020] According to examples of the present disclosure, the threshold may be absolute or relative, ie, it may specify that the reference location of the cluster is within a threshold distance of the client node, or it may require that the closest resulting cluster be selected.

[0021] According to an example of the present disclosure, identifying a fog node cluster operable to implement the request according to the identified requirements and the determined location may further include: if the identified generation cluster cannot implement the request, generating a new cluster to implement the request.

[0022] According to an example of the present disclosure, identifying a fog node cluster operable to implement the request according to the identified requirements and the determined location may also include: establishing a cluster group, wherein the cluster group includes a plurality of clusters operable to collaborate such that they form a service provision chain.

[0023] According to examples of the present disclosure, due to the dynamic nature of the cluster and the possible mobility of the fog nodes therein, the chain can ensure that the service is provided across a specific geographic area and within a specific time period.

[0024] According to an example of the present disclosure, identifying a fog node cluster operable to implement the request according to the identified requirements and the determined location may also include: performing density measurement on the cluster; and deregistering clusters below a density threshold.

[0025] According to an example of the present disclosure, identifying a fog node cluster operable to implement the request according to the identified requirements and the determined location may also include: updating one or more generation clusters.

[0026] According to examples of the present disclosure, the establishment of the group may also be updated after the cluster is updated. The summary section will also indicate that a cluster distribution copy at a specific time may be stored and associated with a timestamp.

[0027] According to an example of the present disclosure, selecting a fog node from the identified clusters whose resources are to be allocated to fulfill a request may include: calculating an objective function that minimizes a weighted sum of terms representing at least one of: a number of clusters required to fulfill the request, a total time to fulfill requests received by the fog node, and / or a number of requests received by the fog node that were not fulfilled.

[0028] According to an example of the present disclosure, the objective function may include:

[0029] min w1∑ k∈K ∑ e∈E d xy c xy +w2∑ k∈K (T k∈K -a k -τ k )+w3∑ r∈R d r

[0030] in:

[0031] K is the set of service providers including fog nodes;

[0032] E is the set of edges representing legal paths between waypoints in the environment;

[0033] d xy is the distance along the edge between the client node x and the fog node y;

[0034] c xy is the probability that client node x and fog node y meet within N hops;

[0035] T is a non-negative integer indicating the amount of time it takes for the client node x to reach the fog node k;

[0036] a k is the start time of the time window in which fog node k provides services;

[0037] τ k is the waiting time between the client node reaching fog node k and receiving service from fog node k;

[0038] R is a non-negative integer representing the minimum number of services provided by a fog node; and

[0039] d r is a binary decision variable indicating whether the resources serving the request have been successfully allocated.

[0040] According to an example of the present disclosure, the service provider set K may also include service providers other than fog nodes, such as cloud service providers.

[0041] According to an example of the present disclosure, the method may further include: initiating allocation of resources of the selected fog node to implement the received request.

[0042] According to an example of the present disclosure, the method may further include: initiating caching of relevant information of the selected fog node. According to such an example, the caching of information may enable rapid execution of a service for implementing the received request.

[0043] According to an example of the present disclosure, the method may further include: implementing the received request by the selected fog node.

[0044] According to an example of the present disclosure, the method may further include: registering a new fog node; and associating a service provided by the fog node with corresponding services provided by other fog nodes.

[0045] According to an example of the present disclosure, associating a service provided by a fog node with corresponding services provided by other fog nodes may include: extracting relevant information of the service from service metadata; calculating a similarity measure between the extracted information and information extracted from service metadata provided by other fog nodes; and associating the service with services provided by other fog nodes having the highest similarity score to the service.

[0046] According to an example of the present disclosure, examples of similarity scores may include attribute-based similarity, structural similarity, and the like.

[0047] According to an example of the present disclosure, the method may further include: assigning keys to associated services and generating a hash map mapping the assigned keys to associated services provided by the fog nodes.

[0048] According to an example of the present disclosure, the method may further include: generating a registered fog node graph, wherein the vertices represent fog nodes and wherein the vertices are connected by at least one of the following: a location edge representing a physical topological connection between fog nodes; a service edge connecting fog nodes providing the same service; and / or a service alliance edge connecting fog nodes providing related services.

[0049] According to an example of the present disclosure, a service edge connecting fog nodes providing the same service may be an edge connecting fog nodes whose services are assigned with the same key.

[0050] According to an example of the present disclosure, the method may further include: detecting a service request pattern between services provided by the fog nodes; detecting a trend change pattern between the services provided by the fog nodes; and generating a service alliance edge in a registered fog node graph based on the detected service request pattern and trend change pattern.

[0051] According to an example of the present disclosure, the method may further include: weighting the generated service alliance edge according to the detected service request pattern and trend change pattern.

[0052] Examples of service request patterns may include services frequently requested together, services frequently requested in sequence, etc. Examples of trend change patterns may include relevant location-specific changes in service request trends.

[0053] According to an example of the present disclosure, the method may further include associating the fog nodes into a matching neighborhood based on weights applied to the service federation edges between the fog nodes.

[0054] According to such an example, associating fog nodes into matching neighborhoods based on weights applied to service alliance edges between fog nodes may include: creating an adjacency matrix of service alliance edge weights in a registered fog node graph; normalizing the columns of the matrix; squaring the matrix; squaring and normalizing the columns of the matrix; setting matrix entries below a threshold to zero; and repeating the process of squaring the columns of the matrix and setting matrix entries below a threshold to zero until the matrix is ​​transformed into a near-idempotent matrix. Associating fog nodes into matching neighborhoods based on weights applied to service alliance edges between fog nodes may also include: extracting clusters row by row from the final weights of the transformed matrix.

[0055] According to an example of the present disclosure, the method may further include: registering a new client node; monitoring a location of the registered client node; and obtaining at least one trajectory associated with the registered client node within the environment from the monitored location.

[0056] According to an example of the present disclosure, the locations of registered fog nodes may also be monitored to learn frequently traveled trajectories.

[0057] According to an example of the present disclosure, the method may further include: modeling the environment in which the fog node is located as a location graph including vertices representing waypoints within the environment and edges representing legal paths between the waypoints.

[0058] According to an example of the present disclosure, the method may further include: generating a connectivity matrix of the modeled environment, the connectivity matrix representing connectivity between legal paths of the environment.

[0059] According to an example of the present disclosure, the method may further include: generating a path type matrix of the modeled environment, the path type matrix indicating distribution types of legal paths in the environment.

[0060] According to an example of the present disclosure, the type of a path may be associated with a maximum or average speed on the path. According to an example of the present disclosure, a single path may have different types at different times of the day.

[0061] According to an example of the present disclosure, the method may further include: generating a waypoint dimension matrix of the modeled environment, the waypoint dimension matrix representing the number of legal paths through the environment that meet at each waypoint.

[0062] According to an example of the present disclosure, the method may further include: dividing the modeling environment into a plurality of areas; and allocating an area of ​​the modeling environment to a fog node within the area.

[0063] According to examples of the present disclosure, each region of the modeled environment may be downloaded to a “region” fog node within that region.

[0064] According to examples of the present disclosure, certain method steps may be performed in a cloud layer of a communication network, and certain method steps may be performed in a fog layer of the communication network. Examples of steps that may be performed in the cloud layer of the communication network include: registering fog nodes and client nodes; generating hash maps, fog node graphs, modeling environments, and estimating trajectories; and forming clusters. Examples of method steps that may be performed in the fog layer of the communication network include receiving a request and selecting a fog node from a cluster for fulfilling the request.

[0065] According to another aspect of the present disclosure, a computer program comprising instructions is provided. When the instructions are executed on at least one processor, the at least one processor performs the method according to any one of the aforementioned aspects or examples of the present disclosure.

[0066] According to another aspect of the present disclosure, there is provided a carrier containing the computer program according to the aforementioned aspect of the present disclosure, wherein the carrier comprises one of an electronic signal, an optical signal, a radio signal or a computer-readable storage medium.

[0067] According to another aspect of the present disclosure, a computer program product is provided, comprising a non-transitory computer-readable medium on which a computer program according to the aforementioned aspect of the present disclosure is stored.

[0068] According to another aspect of the present disclosure, a controller for allocating resources of fog nodes is provided, wherein the fog nodes are organized into at least one fog network. The controller includes a processor and a memory, the memory containing instructions executable by the processor, so that the controller is operable to: receive a request from a client node; identify requirements for implementing the request; determine the location of the client node for implementing the request; and identify a cluster of fog nodes operable to implement the request based on the identified requirements and the determined location. The controller is also operable to select a fog node whose resources are to be allocated to implement the request from the identified clusters in the following manner: minimize at least one of the number of clusters required to implement the request, the total time to implement the request received by the fog node, and / or the number of requests received by the fog node that are not implemented.

[0069] According to an example of the present disclosure, the controller may also be operable to execute a method according to any of the aforementioned aspects or examples of the present disclosure.

[0070] According to another aspect of the present disclosure, a controller for allocating resources of fog nodes is provided, wherein the fog nodes are organized into at least one fog network. The controller is adapted to: receive a request from a client node; identify requirements for implementing the request; determine a location of the client node for implementing the request; and identify a cluster of fog nodes operable to implement the request based on the identified requirements and the determined location. The controller is also adapted to select a fog node whose resources are to be allocated to implement the request from the identified clusters in the following manner: minimize at least one of the number of clusters required to implement the request, the total time to implement the request received by the fog node, and / or the number of requests received by the fog node that are not implemented.

[0071] According to an example of the present disclosure, the controller is further adapted to execute the method according to any of the aforementioned aspects or examples of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] For a better understanding of the present disclosure, and to more clearly show how the present disclosure may be implemented, reference will now be made by way of example to the following drawings, in which:

[0073] Figure 1 A smart city environment is shown;

[0074] Figure 2 shows the fog computing architecture;

[0075] Figure 3 is a flow chart illustrating process steps in a method for allocating resources of fog nodes;

[0076] Figures 4a to 4d is a flow chart illustrating process steps in another example of a method for allocating resources of a fog node;

[0077] Figure 5 is a block diagram showing functional modules in a controller;

[0078] Figure 6 is a block diagram showing functional modules in another example of a controller;

[0079] Figure 7 The allocation of the street network from region to region fog nodes is shown;

[0080] Figure 8 is a message exchange diagram illustrating the interaction between the fog and cloud layers of a deployment; and

[0081] Fig. 9 is a message exchange diagram illustrating the interactions between client nodes and the fog and cloud layers of the deployment. DETAILED DESCRIPTION

[0082] Fog computing promotes the transformation from processing computing and data storage in the core of cloud computing to processing computing and data storage at the edge of the network. Instead of sending all collected data to the cloud, fog computing proposes processing data at the leaf node or edge. This idea is also called 'edge analysis'. Local data processing helps to alleviate some weaknesses of cloud computing and also provides new advantages, such as stronger context awareness, real-time processing, lower bandwidth requirements, etc. Many of these advantages depend on the location awareness of fog nodes and the allocation of appropriate resources. Therefore, such a fog network architecture can be expected, that is, it uses one or multiple collaborative end-user fog clients or near-user edge devices to perform a large amount of storage, communication and control, configuration, measurement and management when assisting interconnected systems such as vehicles, artificial agents, drones, etc. The fog radio access network (RAN) can also play a role in meaningful communication through context-aware recovery and through dynamic collaboration between fog RAN nodes. As described above for other example fog applications, the resource allocation challenge is to identify and combine (RAN) fog nodes to perform the requested tasks based on the location, capabilities and specific needs of the interconnected system. The examples of the present disclosure seek to solve this challenge.

[0083] Different fog nodes or systems can collaborate with each other to jointly support applications. For example, multiple fog systems can share data storage and computation tasks for one or more users or applications. Different fog nodes or systems can also collaborate to act as backups for each other. Addressing oscillations in fog networks complicates the task of resource allocation, given the divergence during local action interactions and global configuration consistency. Understanding the dynamic context in which fog nodes perform resource actions required to fulfill requests can help with resource allocation.

[0084] The examples of the present disclosure propose a method that first understands the required nodes from the fog network by considering the inherent characteristics of the fog nodes and the requirements of the interconnected system. This understanding stems from determining the context based on the requirements of implementing the request, and from clustering different fog nodes that can represent different environments in the fog network to trigger collaborative actions within the selected fog node cluster. Therefore, resource allocation and task scheduling are performed within the selected fog node group to take local actions to implement the interconnected system request. The examples of the present disclosure provide an end-to-end solution that can be implemented by a cohesive module that is configured to represent the environment and perform dynamic clustering in the fog network to initiate collaborative actions and respond to requests from the interconnected system. The cohesive module can include service registration, graph representation, understanding contextual knowledge, and localization and formation of distributed network prototypes. Dynamic clustering and cache prefetching for finding relevant fog nodes that can be implemented using such a module can ensure that context-aware dynamic collaboration between fog nodes is performed to complete local actions in response to requests from the interconnected system.

[0085] Examples of the present disclosure enable fog nodes to work collaboratively in a dynamic environment. Resource allocation and task scheduling can be done dynamically by selected fog nodes with context awareness to perform local actions requested by the interconnected system. Understanding the order of execution steps (explicit context) allows the fog layer of the communication network to perform the required tasks requested by the interconnected system. Examples of the present disclosure can be summarized in three steps:

[0086] Dynamic clustering can be performed to include only specific fog nodes from the fog network when processing context-aware dynamic collaboration for specific decisions (performing local actions required by the interconnected system).

[0087] The tasks are executed in a sequential order by a selected group of fog nodes that have been identified through an understanding of the required local context.

[0088] The end-to-end model performs context-aware resource allocation and task scheduling to execute local actions that dynamically fulfill requests from interconnected systems.

[0089] The example of the proposed approach exploits the understanding of semantics and context in fog networking and generates a solution that can be extended to be used in any new contexts of Industrial IoT, Smart Cities and Smart Homes, Manufacturing 4.0, etc.

[0090] Figure 3 is a flow chart illustrating process steps in a method 300 for allocating resources of fog nodes, wherein the fog nodes are organized into at least one fog network. The fog nodes may be part of a communication network including a cloud layer and a fog layer. The cloud layer may include one or more individual clouds, and the fog layer may include one or more individual fog networks. The fog layer and one, some, or all of the fog networks therein may include one or more hierarchical layers, including, for example, regional, regional, local, and endpoint layers. The method may be performed at the cloud layer, the fog layer, or may be shared between the cloud layer and the fog layer. Reference Figure 3 In a first step 332, the method includes receiving a request from a client node. In step 334, the method includes identifying requirements for implementing the request, and in step 336, the method includes determining a location of the client node for implementing the request. In step 338, the method includes identifying a cluster of fog nodes operable to implement the request based on the identified requirements and the determined location. Finally, in step 340, the method includes selecting a fog node whose resources are to be allocated to implement the request from the identified clusters in a manner that minimizes at least one of the number of clusters required to implement the request, the total time to implement requests received by the fog node, and / or the number of requests received by the fog node that are not implemented. The request received from the client node may be received at a fog node in communication with the client node. The client node may be connected to a communication network of which the fog node is a part. The request may specify a task that requires one or more services to be provided.

[0091] Figures 4a to 4d A flow chart illustrating process steps in another example of a method 400 for allocating resources of fog nodes, wherein the fog nodes are organized into at least one fog network. The steps of method 400 illustrate one way in which the steps of method 300 may be implemented and supplemented to achieve the above and additional functionality. Figure 3 In the method, the fog node can be part of a communication network including a cloud layer and a fog layer. The cloud layer can include one or more individual clouds, and the fog layer can include one or more individual fog networks. The fog layer and one, some or all of the fog networks therein can include one or more hierarchical layers, which include, for example, regional, local, and endpoint layers. The method can be performed at the cloud layer, the fog layer, or can be shared between the cloud layer and the fog layer. The following description provides an overview of the method 400, and is followed by a more detailed discussion of certain steps and functional modules by which these steps can be implemented.

[0092] First reference Figure 4a , method 400 includes registering a new fog node in step 402, and associating a service provided by the fog node with corresponding services provided by other fog nodes in step 404. A fog node may be associated with an IoT device such as a sensor, an actuator, etc. A fog node may be associated with one or more resources through which the fog node may provide services. Associating a service provided by a fog node with corresponding services provided by other fog nodes includes: extracting relevant information about the service from service metadata in step 404a; calculating a similarity measure between the extracted information and information extracted from service metadata provided by other fog nodes in step 404b; and associating the service with a service provided by other fog nodes having the highest similarity score to the service in step 404c. Example similarity scores include attribute-based similarity, structural similarity, etc., as discussed in further detail below.

[0093] The method 400 also includes assigning keys to associated services in step 406, and generating a hash map mapping the assigned keys to associated services provided by the fog nodes in step 408. In step 410, the method 400 includes detecting service request patterns between services provided by the fog nodes, and in step 412, the method includes detecting trend change patterns between services provided by the fog nodes. The service request and trend change patterns are discussed in more detail below.

[0094] The method 400 further includes generating a service alliance edge of the registered fog node graph based on the detected service request pattern and trend change pattern and weighting the service alliance edge in step 414 .

[0095] refer to Figure 4b , the method 400 further includes generating, in step 416, a registered fog node graph, wherein the vertices represent fog nodes and wherein the vertices are connected by at least one of: location edges representing physical topological connections between fog nodes; service edges connecting fog nodes that provide the same service; and / or service federation edges connecting fog nodes that provide related services (as generated and weighted in step 414). In some examples, the edge connecting fog nodes that provide the same service may be an edge connecting fog nodes whose services are assigned with the same key.

[0096] The method 400 also includes associating fog nodes into matching neighborhoods based on weights applied to service alliance edges between fog nodes. This may include: creating an adjacency matrix of service alliance edge weights in the registered fog node graph; normalizing the columns of the matrix; squaring the matrix; squaring and normalizing the columns of the matrix; setting matrix entries below a threshold to zero; and repeating the process of squaring the columns of the matrix and setting matrix entries below a threshold to zero until the matrix is ​​transformed into a nearly idempotent matrix. Associating fog nodes into matching neighborhoods based on weights applied to service alliance edges between fog nodes may also include: extracting clusters row by row from the final weights of the transformed matrix, each cluster including a matching neighborhood.

[0097] The method 400 further includes: registering a new client node (which may include, for example, an interconnected system such as a vehicle, an artificial agent, a drone, etc.) in step 420; monitoring the location of the registered client node in step 422; and learning at least one trajectory associated with the registered client node within the environment from the monitored location. In some examples of the method 400, the location of the registered fog node may also be monitored to learn frequently traveled trajectories.

[0098] The method 400 also includes modeling the environment in which the fog node is located as a position graph including vertices representing waypoints within the environment and edges representing legal paths between waypoints in step 426. The method 400 also includes generating matrices of the environment in step 428. These matrices include: a connectivity matrix of the modeled environment, which represents the connectivity between legal paths of the environment; a path type matrix of the modeled environment, which represents the distribution type of legal paths in the environment; and a waypoint dimension matrix of the modeled environment, which represents the number of legal paths that meet at each waypoint through the environment. The path type of the path type matrix can be associated with the maximum or average speed on the path. The path type can change over time: a single path can have different types at different times of the day. Matrix generation is discussed in more detail below.

[0099] The method 400 also includes dividing the modeling environment into a plurality of regions and assigning the regions of the modeling environment to fog nodes within the regions in step 430. Each region of the modeling environment may be downloaded to a "region" fog node within the region.

[0100] Method 400 also includes receiving a request from a client node at step 432, and Figure 4c As shown, requirements for fulfilling the request are identified. The request received from the client node may be received at a fog node in communication with the client node. The client node may be connected to a communication network of which the fog node is a part. The request may specify a task that requires one or more services to be provided.

[0101] The step 434 of identifying requirements for implementing the request may include, in step 434a: identifying one or more primary services of the request, wherein the primary services include services provided by at least one fog node that are necessary to implement the request; and identifying fog nodes that are operable to provide the primary services of the request. Identifying the requirements may also include, in step 434b, identifying fog nodes that are operable to provide secondary services of the request, wherein the secondary services include services provided by at least one fog node that are associated with the primary services of the request. As shown in step 434b, identifying fog nodes that are operable to provide the secondary services of the request includes identifying fog nodes contained within the same matching neighborhood as the identified fog nodes that are operable to provide the primary services of the request. As described above, the matching neighborhood includes a plurality of fog nodes that are associated based on at least one of: service request patterns for the services they provide and / or trend change patterns for the services they provide.

[0102] The method 400 also includes determining a location of the client node for fulfilling the request in step 436. This may include estimating a trajectory of the client node based on historical location data of the client node within an environment (which may be the modeled environment of step 436) in step 436a.

[0103] At step 438, method 400 includes identifying a cluster of fog nodes operable to fulfill the request based on the identified requirements and the determined location. Figure 4d The sub-steps that may be involved in this process step are shown in FIG.

[0104] refer to Figure 4d , in a first sub-step 438a, step 438 includes generating at least one cluster including fog nodes operable to at least partially fulfill the request, being within a threshold distance of each other at a particular point in time, and operable to cooperate with each other. The fog nodes operable to at least partially fulfill the request may include fog nodes identified as being operable to provide a primary or secondary service for the request. Step 438 also includes identifying, in sub-step 438b, a generating cluster within a threshold distance of the client node, and determining, in sub-step 438c, whether the identified generating cluster can fulfill the request based on the determined location and a time period for fulfilling the request. The threshold distance may be absolute or relative, i.e., it may specify that a reference location of the cluster is within a threshold distance of the client node, or it may require selecting the closest generating cluster.

[0105] If the identified generation cluster cannot fulfill the request, step 438 includes generating a new cluster in sub-step 438d to fulfill the request. Step 438 also includes establishing a cluster group in sub-step 438e, wherein the cluster group includes multiple clusters operable to collaborate so that they form a service provision chain. Due to the dynamic nature of the cluster and the possible mobility of the fog nodes therein, the chain can ensure that services are provided across a specific geographic area and within a specific time period. Step 438 then includes: performing density measurement on the cluster in sub-step 438f; releasing clusters below a density threshold in sub-step 438g; and updating one or more generation clusters in sub-step 438h. The establishment of the group can also be updated after the cluster is updated. In some examples, a copy of the cluster distribution at a specific time can be stored and associated with a timestamp.

[0106] Reference again Figure 4c After identifying a cluster of fog nodes operable to fulfill a request, the method 400 includes selecting a fog node whose resources are to be allocated to fulfill the request from the identified clusters by minimizing at least one of the number of clusters required to fulfill the request, the total time to fulfill requests received by the fog node, and / or the number of requests received by the fog node that are not fulfilled. The selecting step may include calculating an objective function that minimizes a weighted sum of terms representing at least one of the number of clusters required to fulfill the request, the total time to fulfill requests received by the fog node, and / or the number of requests received by the fog node that are not fulfilled.

[0107] The objective function may include:

[0108] min w1∑ k∈K ∑ e∈E d xy c xy +w2∑ k∈K (T k∈K -a k -τ k )+w3∑ r∈R d r

[0109] in:

[0110] K is the set of service providers including fog nodes;

[0111] E is the set of edges representing legal paths between waypoints in the environment;

[0112] d xy is the distance along the edge between the client node x and the fog node y;

[0113] c xy is the probability that client node x and fog node y meet within N hops;

[0114] T is a non-negative integer indicating the amount of time it takes for the client node x to reach the fog node k;

[0115] a k is the start time of the time window in which fog node k provides services;

[0116] τ k is the waiting time between the client node reaching fog node k and receiving service from fog node k;

[0117] R is a non-negative integer representing the minimum number of services provided by a fog node; and

[0118] d r is a binary decision variable indicating whether the resources serving the request have been successfully allocated.

[0119] The service provider set K may also include service providers other than fog nodes, such as cloud service providers.

[0120] The method 400 further includes: initiating allocation of resources of the selected fog node to implement the received request in step 442; initiating caching of relevant information of the selected fog node in step 444; and implementing the received request by the selected fog node in step 446.

[0121] It should be understood that the example method 400 illustrates one way in which the features of the present disclosure may be combined. In other examples, details such as the order of certain steps may be changed.

[0122] As described above, methods 300 and 400 are performed in a communication network including a plurality of fog nodes. The steps of these methods may be performed in the cloud layer, the fog layer, or shared between the cloud layer and the fog layer of the communication network. The present disclosure provides a controller adapted to perform any or all steps of the above methods. The controller may be a logical function whose elements are divided between the cloud layer and the fog layer of the communication network.

[0123] Figure 5 is a block diagram illustrating an example controller 500 that may implement the methods 300 and / or 400 according to examples of the present disclosure, for example, upon receiving appropriate instructions from a computer program 550. Figure 5 , the controller 500 includes a processor or processing circuit 502, and may include a memory 504 and an interface 506. The processing circuit 502 is operable to perform some or all of the steps of the method 300 and / or 400, as described above with reference to Figure 3 and Figures 4a to 4d And the following references Figures 7 to 9The memory 504 may contain instructions executable by the processing circuit 502 so that the controller 500 is operable to perform some or all of the steps of the method 300 and / or 400. The instructions may also include instructions for executing one or more telecommunications and / or data communication protocols. The instructions may be stored in the form of a computer program 550. In some examples, the processor or processing circuit 502 may include one or more microprocessors or microcontrollers and other digital hardware (which may include a digital signal processor (DSP), dedicated digital logic, etc.). The processor or processing circuit 502 may be implemented by any type of integrated circuit, such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), etc. The memory 504 may include one or more types of memory suitable for the processor, such as a read-only memory (ROM), a random access memory, a cache memory, a flash memory device, an optical storage device, a solid state disk, a hard disk drive, etc.

[0124] Figure 6 1 shows functional units in another example of a controller 600 that can execute the method 300 and / or 400 of the present disclosure, for example, according to computer-readable instructions received from a computer program. It should be understood that Figure 6 The units shown are functional units and may be implemented in any suitable combination of hardware and / or software. These units may include one or more processors and may be integrated to any degree.

[0125] refer to Figure 6 , the controller 600 includes: a receiving module 602 for receiving a request from a client node; a requirement module 604 for identifying requirements for implementing the request; a location module 606 for determining the location of the client node for implementing the request; a cluster module 608 for identifying a cluster of fog nodes operable to implement the request based on the identified requirements and the determined location; and a selection module 610 for selecting a fog node whose resources are to be allocated to implement the request from the identified clusters in the following manner: minimizing at least one of the number of clusters required to implement the request, the total time to implement the requests received by the fog node, and / or the number of requests received by the fog node that are not implemented. The controller 600 may also include an interface 612. According to different examples of the controller 600, the controller 600 may also include a module for performing the above Figures 4a to 4d Such a module or its output may be used to Figure 6 The modules shown are referenced in order to perform their functions. Examples of such units are discussed in more detail below.

[0126] Reference again Figure 4a, registering new fog nodes, associating the provided services with other services, assigning keys, and generating hash maps (steps 402 to 408) can be performed by the hash map generator module. In a smart city model or other fog computing use cases, there may be multiple manufacturers developing IoT devices and fog nodes. Different syntaxes may be used to describe the same information between these manufacturers, resulting in inconsistencies. To address this issue, when a fog node and its associated IoT device are registered in the cloud, keywords for its services are extracted from the device metadata and data tables. The cloud application within the hash map generator module hash maps all similar types of services and generates unique keys. For example, the OBU (on-board unit) of a smart vehicle can provide location data that can be labeled as 'location' or 'coordinates' or 'position' or 'point', 'XY values', 'GPSlocation', etc. by different manufacturers. Similarly, a temperature sensor can represent values ​​as 'temp' or 'temperature' or 'tmp' depending on the manufacturer. Cloud-based applications should group similar types of tags into the same group. Hence, 'temp', 'temperature' and 'tmp' should be grouped into the same category. For example, all fog nodes processing 'environment' related data can be grouped into the same category and the category is given a unique key, say 248000, in the hash map. In the environmental fog, IoT devices or lowest level fog nodes processing 'temperature' data can be given a unique key 248001, nodes processing CO2 data can be given key 248002, and so on. The above service keyword forms are grouped and considered in the context of the following algorithms. This can be achieved through attribute-based, structure-based, and instance-based similarity measures.

[0127] Service matching algorithm

[0128]

[0129]

[0130] The new service is merged with the existing service that obtains the maximum matching score with the new service when grouping items of a particular category. The result of this module is a hash map where the services provided by the fog nodes are grouped together and assigned a unique key.

[0131] Reference now Figure 4b,The steps of generating a registered fog node graph and associating the fog nodes into matching neighborhoods can be ,performed by a hybrid graph generator block.,In the cloud, the fog network hierarchy is stored as a graph with fog nodes and ,related IoT devices as vertices represented by their unique keys according to their services.

[0132] There are three types of edges in this hybrid graph:

[0133] - Type 1 edges are unweighted edges and connect hierarchical fog nodes (vertices) to represent their physical topology.

[0134] - Type 2 edges connect vertices with the same unique key.

[0135] - Type 3 edges (ie, coalition edges) are weighted edges, where the weight represents the joint score between two vertices (fog nodes).

[0136] In a real situation, when a service request occurs, if two fog nodes provide data / services together, their joint score increases. For example, a weather fog node and a traffic fog node may have a high joint score because they may often provide services together; the traffic conditions depend on the current weather conditions (rainy, foggy, hazy, etc.). Smart vehicles can obtain weather information and traffic information together to decide the expected commute time to the destination. With this representation, simpler correlations between different sets of fog nodes can be achieved to understand the related fog nodes to solve certain location-related problems.

[0137] The result of this module is a graph of the fog network hierarchy with the 3 types of edges mentioned above, which can help identify relevant fog nodes, as discussed in further detail below. This can be done without context but with earlier knowledge.

[0138] The Union Edge Finder block can be implemented by forming union edges in the hybrid graph Figure 4a Steps 410 to 414 of FIG. 4. This module can enable dynamic context discovery within the federation score in the hybrid graph. The federation edges and their scores are formed in two different ways: by finding a) service request patterns and b) change patterns.

[0139] a. Service Request Mode : During the training phase, this block detects the arrival pattern of service requests from clients. There will be some fog services that are usually called together or sequentially. For example: on a rainy day, traffic condition service request and weather condition service request may arrive at about the same time. Alliance edges between vertices can be created based on this association.

[0140] b. Change Mode:The cloud server-side application automatically discovers the association of services through trend analysis without explicit service requests from the client. From the different types of unique fog services registered, it detects relevant, location-specific changes in trends and thus discovers associated services that change together. Alliance edges between vertices can also be created based on this association.

[0141] Within the hybrid graph generator block, there can be a neighborhood selection block that runs the algorithm presented below to group neighbors into matching neighborhoods, which can help generate context-aware dynamic clustering, resource allocation, and ultimately task scheduling ( Figure 4a Step 418).

[0142]

[0143]

[0144] Register a new fog node ( Figure 4b Step 420 of the above procedure can be performed by the registration module. In order to access fog networking services in smart cities or other examples, the client device (smart vehicle, smart home, IoT device, etc.) should first be registered and issued a unique registration key. In order to solve the positioning problem, it is helpful to know the location and mobility pattern of the client. There can be mobile clients and static clients. The trajectory estimator module can be used to estimate the movement of the mobile client ( Figure 4b Step 424). The module considers the location of the mobile client based on certain parameters. In the present disclosure, a mobility vector consisting of three parameters is considered: the location latitude, location longitude and speed of the mobile client.

[0145]

[0146] Route estimation is based on the location traces of the visited segments. Over time, the visited segments are fixed into a pattern and are regularly followed by IoT devices. These patterns can be learned from historical data and the maximum speed limits assigned to the environment (here, a specific street at a certain location). There are also some random factors that may cause exceptions to the established patterns, for example, the traffic flow on a highway may change due to an accident or emergency. Such exceptions can still be learned or adapted after some time or from the average speed pattern of previous nodes. These random factors may not help predict the location of the node, but can be taken into account in the adaptive location data transmission. The result of this module is a set of frequently traveled trajectories of registered clients.

[0147] Model the environment and generate a matrix representing the environment ( Figure 4bSteps 426 and 428 of can be implemented by the Street Network Creator (SNC) and the Street Network Prototype. The mobility of clients in the urban network is not completely random. It has been shown that human trajectories exhibit a high degree of temporal and spatial regularity, with each trajectory characterized by a unique travel distance that is independent of time and a significant probability of returning to some highly frequent locations. Studies have shown that despite the diversity of drivers' travel histories, drivers still follow simple repeatable patterns.

[0148] The SNC module considers the mobility framework of mobile clients to perform local actions that will realize the requests of client nodes, even though the client's position and velocity may change over time. The random waypoint (RWP) model is widely used to simulate protocols designed for mobile ad hoc networks. Each mobile client uniformly randomly selects a random direction from (0, 2π] in the relevant spherical space (the surface of the earth) and moves to a random destination d uniformly, and travels at a speed v whose value is uniformly selected from the interval (0, Vmax). After each move, each client pauses for a random period of time. The destination d is an exponentially distributed random variable with mean μ. At time t, the positions of the mobile clients are independent of each other.

[0149] However, for the movement of real mobile clients in smart city street networks, client devices are not traveling in an open field with arbitrary pause times, arbitrary speed distributions and directions. There are mobility constraints that limit their mobility based on local congestion and control mechanisms. The SNC module is suitable for any interconnected system for new and extended mobility modeling, especially for street networks with real constraints.

[0150] A city street network can be represented as a set of V vertices and E edges. The graph G(V, E) is developed from the city map data with corresponding location data and traffic information. Each edge is assigned a non-negative weight to represent its length. The length of a curved street with multiple edges is calculated as the sum of the straight edges. The path from source node n1 to destination node nd is actually represented as a sequence of vertices (n1, n2, n3, ..., n d ,) edge sequence (n1, n2), (n3, n4), ..., (n d-1 , n d ). If the street is a straight line and vertex v i ∈V is the endpoint of a street, then a single edge e i ∈E represents a single street. Therefore, a straight street has two endpoints. If a street consists of one or more curves, it can be represented as multiple edges with their corresponding vertices.

[0151] In the SNC prototype, the mobile client performs some basic steps to reach the destination:

[0152] 1. Determine your destination.

[0153] 2. Select the vertex closest to your destination.

[0154] 3. Select the average speed for the street segment.

[0155] 4. Pause at endpoints whenever necessary.

[0156] 5. Once the endpoint is reached, the next vertex is selected and the next move towards the destination is initiated.

[0157] 6. Repeat 2 to 5 until you reach your destination.

[0158] The system addresses the trade-off between network traffic and positioning performance in mobile sensor network applications. Location-based wireless mobile tracking applications can tolerate fixed uncertainty in client locations. Location uncertainty varies based on street endpoints. The results of this module identify connected systems and their dynamics, thereby helping the entire system understand the current location of connected systems and help address connected system requirements with the support of street network prototypes and distributed street networks.

[0159] The street network prototype extracts information from the street network. The street graph metadata can be used to assemble a street matrix S = [s1, s2, ..., s n ] T (Here, T denotes the transpose of the matrix.) A relatively sparse matrix C of dimension n×n holds information about the connections between streets. If c ij ∈C holds the value 1, which means that street s i and j Connect with each other.

[0160] There may be different types of streets in the environment, including highways, commercial streets, residential streets, alleys, etc., all of which may be more or less congested at any given time. The average speed of clients on each type of street is different from each other. Therefore, the streets are classified according to the maximum average speed of the street. A matrix of dimension m×1 holds the type of street. A specific type is dynamically assigned to streets and street segments based on the maximum average speed. The type is not a fixed value, but is assigned 'dynamically' because a single street may experience different average speeds at different time periods. For example, a city street may be congested in the morning and evening, but relatively unblocked in the afternoon and night. These patterns can be learned from historical data and the maximum speed limits assigned to the streets. Random events such as accidents and emergencies may also change the traffic conditions on the streets. These can still be learned after a period of time or from the average speed patterns of previous clients. These random factors can be considered in the adaptive location data transmission.

[0161] Each vertex of G is one of the endpoints of a street segment. Therefore, each vertex can be considered as an intersection. The dimension d of each vertex describes the number of streets that meet at that intersection. Therefore, a matrix D = [d1, d2, ..., d v ] T If d i = 2, then the vertex is the junction of the curved street segment. i >2, it may be a road intersection with traffic signals.

[0162] The movement of each client is characterized by non-overlapping time periods T1, T2, ..., T n In each period T i During this period, the client is at a certain average speed V i At a length of L i In general, the values ​​of Ls and Vs can be considered independent of each other. Therefore, T i =L i / V i are also independent of each other. Here, the destination of the mobile client is not randomly selected, but is identified from the interconnected streets with different probabilities at the end point of the last street.

[0163] The average speed of the client can be set to the maximum speed limit or, depending on the street type of the current street, summed with a Gaussian distribution value with zero mean and a predefined standard deviation. It can be assumed that a client can change its speed if it reaches an intersection and the next street to be traveled is full, or if there is another client in front of it moving at a lower speed (e.g. due to traffic congestion), or if there is a traffic signal (uniform delay). When reaching an intersection, the client pauses with some probability to move from the interval [0, t pmax ] uniformly selected in a finite time t p This probability depends linearly on the degree d of the street segment. As mentioned before, if d i = 2, then the vertex is a junction of curved street segments, and the probability of stopping or significantly reducing the client speed at this vertex should be low. i >2, it may be a road intersection with a traffic signal. The larger the value of d, the higher the probability of stopping at the vertex with a limited stop time.

[0164] Reference again Figure 4b , the step 430 of dividing the modeled environment into a plurality of regions and assigning the regions of the modeled environment to the fog nodes within the regions may be implemented in the distributed street network module.

[0165] In addition to centralized cloud storage that can store street matrices, street networks can be distributed for faster updates and calculations. Therefore, the entire city street map can be divided into multiple fog areas based on street map clients, edges, and average traffic volume. Each area is controlled by a regional fog, which contains a subset of the street map and handles location data and services for clients roaming in the area. The vertices and edges of the street map have unique IDs and names in the main street network at the cloud level. The same ID and name are used in the regional subsets to facilitate handshaking between regions. The benefits of using distributed maps and location aggregation can be as follows: reduced waiting time; easy inclusion of new areas into the system when the city expands; communications in the node hierarchy can apply blockchain or similar technologies to ensure security. Regions are assigned to regional fog nodes in Figure 7 Shown in.

[0166] The communication between fog nodes can follow any suitable communication protocol. In one example of the present disclosure, the communication between fog nodes uses the Message Queuing Telemetry Transport (MQTT) protocol. MQTT is a lightweight, open source publish / subscribe messaging protocol designed for power-constrained devices and low-bandwidth, high-latency networks. MQTT is data-independent and provides bandwidth efficiency and continuous session awareness, thus helping to minimize resource requirements for IoT devices. MQTT also ensures the reliability and integrity of delivery and is ideal for large networks of small devices that need to be monitored or controlled from a backend server on the Internet. The MQTT module can establish effective communication between fog nodes to perform local actions that implement requests from interconnected systems.

[0167] The following process flow illustrates how the above functional modules may cooperate to implement examples of methods 300 , 400 .

[0168] 1. Convert available street map data into a street network graph G(V, E).

[0169] 2. The learning phase of the street network diagram.

[0170] - Development matrix - street matrix, connectivity matrix, type matrix, dimension matrix

[0171] 3. Learning phase of mobile node trajectories. The node’s travel patterns are learned from data over a period of time (training phase). The training data is used to extract patterns from each client’s travel history. Patterns include frequently followed trajectories (sets of streets).

[0172] 4. Once a client application running on the interconnected system issues a request for one or more services, the request travels through the fog to the cloud, where the unique ID of the requested service is discovered from the hybrid graph and the corresponding fog node is notified.

[0173] This disclosure proposes a novel dynamic clustering method to group related fog nodes to perform local actions required to fulfill requests of interconnected systems. The clustering method considers the inherent characteristics of fog, including low latency and location awareness, wide geographical distribution, mobility, a very large number of nodes in close proximity, the dominant role of wireless access, the strong presence of streaming and real-time applications, and heterogeneity.

[0174] 5. Context-aware dynamic clustering: Services requested by clients (connected systems) are grouped together with associated services. This context discovery is performed based on joint scores in the hybrid graph. The cloud device receives location data from connected clients and uses machine learning heuristics to extract trajectory patterns. Using the extracted patterns and recent data, it predicts the next location of the client. If the client is mobile, the fog nodes that provide the requested and associated services along its known trajectory are dynamically clustered.

[0175] Step 5.1: The clustering module operates at the rate of the data stream and creates clusters that merge data samples that are close in terms of Euclidian distance at a certain spatiotemporal point.

[0176] Step 5.2: Whenever a new service request arrives, the algorithm searches for the nearest cluster. Once found, the maximum distance criterion is evaluated to decide whether the request is suitable for fulfillment within the cluster.

[0177] Step 5.3: If it is suitable enough, update the cluster to be responsible for the service to be provided when implementing the received request; if it is not suitable, create a new cluster using the service request information and use its timestamp as the cluster creation time.

[0178] Step 5.4: This stage analyzes the distribution of clusters. The density of the clusters is considered from the current number of objects in it and is used to create the final clusters through density-based fusion.

[0179] Step 5.5: Perform a density measure on the clusters, which allows the algorithm to find clusters of arbitrary shapes. Clusters can be of three different types: dense clusters, semi-dense clusters, and low-density clusters. The difference between each type is established based on a dynamic threshold found locally.

[0180] Step 5.6: A cluster is connected to another cluster if there is a chain of clusters between them, so that each cluster in the chain can cooperate with the adjacent clusters in the chain. A collection of interconnected clusters is called a group.

[0181] Step 5.7: Recursively analyze the cluster groups. Once a cluster is created, the remaining clusters in the group are analyzed in turn.

[0182] Step 5.8: Once the cluster distribution is ascertained, a copy of the cluster distribution is stored as a snapshot, which may be checked in the future to extract more information about the evolution of the system. The storage of snapshots follows a pyramid time scheme that stacks past snapshots according to several sampling times.

[0183] Step 5.9: In order to maintain the latest model, new incoming data should be given more weight. In the proposed algorithm, the clusters are weighted using a decay function that depends on the current time t and the last allocation time tk. Function Can be used to simulate aging processes on damping windows.

[0184] Step 5.10: This phase analyzes the changes in cluster density checks. Clusters are evaluated to find out if their density is below a low density threshold. If this is the case, the cluster is dissolved and is no longer considered. Once filtered in this way, the remaining valid clusters are analyzed to find groups. For each group, a local density analysis is recursively performed to find all possible clusters.

[0185] Step 5.11: Locally, the proposed algorithm checks each cluster to determine if its density has dropped below a semi-dense threshold. If this is the case, the cluster is dissolved and its statistics are used to create a low-density cluster. This update can create new low-density areas within the cluster, thus changing the form of the cluster or even causing it to split into two or more clusters as the data evolves.

[0186] Step 5.12: If within a group, some low-density clusters have grown into semi-dense clusters, you can use the fusion action to combine the two originally separated clusters.

[0187] 6. Cache prefetching: Information from this dynamic clustering can be used to help prefetch local fog caches that can be used to perform local actions required by the interconnected system more quickly.

[0188] The above process flow can adapt to the appearance of new clients or dynamic trajectories. For example, if a service request is received from a new client, a context-aware search can be performed to associate the request with existing annotated services. If the client moves along a new trajectory, the current fog can communicate with its neighbor fogs to generate dynamic clusters and cache prefetching.

[0189] Figure 8 is a message exchange diagram illustrating the interaction between the fog layer and the cloud layer of a deployment according to an example of the present disclosure. Figure 8 Message exchanges for performing steps 402 to 430 of method 400 are shown, which involve registering new fog nodes, location monitoring and trajectory extraction, environment modeling, generating hash maps, generating federation edges, and generating a hybrid graph of fog nodes.

[0190] Fig. 9 is a message exchange diagram illustrating the interaction between a client node and the deployed fog and cloud layers according to an example of the present disclosure. Fig. 9Message exchanges are shown for performing steps 432 to 446 of method 400, which involve receiving a request from a client node, identifying fog nodes that provide the requested primary and secondary services, determining a location for fulfilling the request, dynamic clustering, cache prefetching, and providing the requested service by the selected fog node.

[0191] The following discussion considers step 440 of method 400 in greater detail, in which a fog node is selected for assignment to a received request.

[0192] The optimization problem involves a set of fog service providers and a set of clients. Fulfilling a client request involves two phases: service discovery and provisioning of the discovered services through the fog. The requested services are enriched with knowledge from associated services identified during service discovery and solving the localization problem. Two time windows are assigned to each request: a service discovery time window that specifies when service discovery can begin; and a service delivery time window that indicates when the service can be delivered to the client. A service time or duration is also associated with each request and delivery. The service duration indicates how long it will take to perform the service delivery. Each request is assigned a set of feasible fog service providers within the identified cluster.

[0193] The optimization task is to optimally deliver the requested service to the requesting client. The task is valid if the time window and capacity constraints are respected along the route and each request is served with the corresponding delivery time. The goal is to minimize the following cost function.

[0194] Since the number of fog service provider nodes is limited, it may happen that some requests cannot be assigned to the fog. These requests are placed in the virtual request pool.

[0195] The goal of this problem is to minimize the weighted sum of the following three components:

[0196] 1) The number of cluster services explored across the client trajectory (i.e., the number of cooperating clusters required to deliver services along the client trajectory);

[0197] 2) The total time spent by the client and service provider to service the request;

[0198] 3) The total number of unfulfilled fog service requests.

[0199] These three terms are weighted by coefficients w1, w2, and w3, respectively. Typically, a high value is assigned to w3 to serve as many requests as possible.

[0200] There are n requests from clients and m fog service providers. The problem is defined in the city fog network diagram, where:

[0201] R = {1, ..., n} is the set of mobile nodes making requests (and hence the requesting set).

[0202] D = {1, ...m} is the set of service delivery fog nodes.

[0203] K is the set of all service providers (which may include both fog service providers and cloud service providers). In the preset discussion, only fog service providers are considered, so |K|=m.

[0204] i is a request in set R.

[0205] k is a provider in set K (and thus a fog node in set D in this example).

[0206] K i is the set of providers that can service request i (since one provider may not be able to service all requests).

[0207] is the set of request nodes (or requests) that can be served by fog node k.

[0208] is the set of delivery fog nodes that can be served by fog node k.

[0209] For all i and k:

[0210] For each edge e in the mobility graph G(V,E), the distance d between client x and provider y is assigned xy >0 and travel time t xy >0.

[0211] Each provider has a service time s i and time window [a i , b i ]. The service time represents the time required to provide the service to the client, and the time window indicates when the provider will be in the service delivery area (the area of ​​the service delivery fog node). A visit to location i can occur at time a i and b i The client can reach the delivery node before the time window starts, but may need to wait for a delay time τ.

[0212] Four types of decision variables are used in the mathematical model presented below. xyis a continuous variable for the probability of encountering client x and provider y within N hops in the mobile map. R is a non-negative integer representing the minimum number of services present in the fog provider. T is a non-negative integer indicating the amount of time it takes for the client to reach the provider to obtain the service. Finally, d is a binary decision variable indicating whether the service request was successfully placed for the client. The mathematical model is:

[0213] min w1∑ k∈K ∑ b∈E d xy c xy +w2∑ k∈K (T k∈K -a k -τ k )+w3∑ r∈R d r

[0214] The objective function minimizes the weighted sum of the available cluster services, the sum of the time taken to serve requests, and the number of unserved requests. The above description has presented examples of the method in the context of the smart city paradigm. Example fog networking systems in this paradigm may include smart buildings, smart transportation, connected cars, smart parking, etc. The presented examples have shown how different fog nodes from different fog systems can be interconnected and how their resources can be used to solve problems such as which building to park in by considering various aspects including traffic, available parking lots, buildings and floors, and other relevant features. Other use cases of the proposed method can also be envisioned, and some brief examples are given below.

[0215] Smart Healthcare and Disaster Management:

[0216] Real-time health monitoring and diagnosis is an essential part of the healthcare industry. During emergencies or disasters, patients need to be transported from one location to another while providing continuous monitoring and remote diagnosis. Context-aware fog resource allocation and task scheduling can provide uninterrupted and improved quality of service for this purpose as shown below:

[0217] -Registration: Fog devices from all fog networks in the city (including smart home fog, traffic system fog, vehicle fog, weather fog, blood bank fog, hospital fog, etc.) first register in the cloud. The client is assigned a unique registration key. There can be mobile clients and static clients in the system.

[0218] -Trajectory Estimator: This module learns the patterns of trajectories frequently followed by IoT clients. These patterns can be learned from historical data and speed limits assigned to the environment.

[0219] - Street Network Creator: Once the trajectory estimator has learned the client's mobility pattern, the Street Network Creator module develops a street network model in order to track the client's mobility in the city's street network.

[0220] - Distribute the street network into multiple fog zones based on street map clients, edges and average traffic volume. Each zone is controlled by a regional fog that contains a subset of the street map and handles location data and services for clients roaming in the zone.

[0221] - Hash map generator: Generates a hash map of all similar types of fog services and their unique keys in the city paradigm from the service metadata and data tables of fog devices using a service matching algorithm. Similar services are grouped together and assigned unique keys.

[0222] - Alliance Edge Finder: The Alliance Edge Finder module generates alliance edges through service request pattern analysis and change pattern analysis. The alliance edges are provided to the hybrid graph generator.

[0223] - Hybrid Graph Generator: This module generates and stores a fog network hierarchical structure graph with three types of edges. This module runs the Neighborhood_Selection algorithm to group fog nodes into matching neighborhoods.

[0224] - During an emergency, patients need to be moved efficiently from one place to another. When a service request is initiated from a smart ambulance, the associated services are discovered and grouped together.

[0225] -The request first obtains a unique service ID. The clustering module obtains the information of fog nodes that can serve the requested service.

[0226] - The clustering module receives location data from connected clients and extracts trajectory patterns using machine learning heuristics. Using the extracted patterns and recent data, it predicts the client's location.

[0227] -Fog nodes that provide necessary services along the known trajectory of the client are dynamically clustered.

[0228] -Perform context discovery based on the joint score in the hybrid graph to discover related services from different fog networks. For example: an ambulance may need to get the fastest route to the hospital. In this case, the cooperation of the traffic system fog and the weather fog is needed because these fog nodes have a high joint score in the hybrid graph.

[0229] - Traffic system fog provides information about the current traffic situation, street conditions, direction, number of vehicles moving in the same direction, etc. Weather fog provides information about the weather (rain, snow, etc.). The ambulance decides on the best trajectory based on the received weather and traffic information.

[0230] - Once the expected trajectory of the ambulance is determined, the information can be provided back to the traffic system fog. Traffic fog initiates an alert notification to notify other vehicles to give way to the ambulance.

[0231] - If a request is made from an ambulance, the hospital fog system can collaborate to discover the best option of nearby hospitals where the required treatment and beds are available. Accordingly, remote monitoring and diagnosis can be done. The vehicle fog collaborates with the blood bank fog to discover blood availability for a specific group.

[0232] The above use case discussion shows another example of how dynamic fog resource allocation and task scheduling based on context discovered from the hybrid graph can be performed. The transportation of a critically ill patient by ambulance along the fastest possible route to the appropriate hospital is performed through collaboration between local fog systems. Related fog systems are grouped together and positioned to share information instantly. The adaptive fog system learns the context, positions the relevant resources, and schedules tasks accordingly for performing the local actions required to fulfill the request.

[0233] Smart Manufacturing and Maintenance:

[0234] The application of IoT in manufacturing is already common. Due to the very complex processes and inherent fluctuations associated with manufacturing, companies are constantly seeking to improve their yields to reduce costs and increase profit margins. Predictive maintenance prevents unnecessary repairs, maximizes effective asset life, and significantly reduces serious failures and downtime. This saves costs while improving return on investment and customer satisfaction. Predictive maintenance has become a key part of manufacturing maintenance. The industry is deploying processes that maximize the reliability of its equipment by detecting potential failures before major problems occur. Context-aware collaboration between fogs, including production fog, maintenance fog, quality assurance fog, waste management fog, transportation fog, traffic system fog, etc., can help run complex manufacturing processes smoothly. In addition, positioning problems including fault detection, downtime prediction, maintenance planning, cost-saving logistics and supply chain planning can be efficiently solved.

[0235] Smart Mining:

[0236] IoT with fog computing can be used to help significantly increase mining production by tracking miners and vehicles at remote locations and monitoring the status of vehicles using real-time data and analytics. Mining vehicles are equipped with embedded sensors that enable safety and route optimization based on real-time vehicle and terrain data. Asset monitoring information can be collected over time to help with predictive maintenance of critical machines and other assets. Mine workers can also be connected with health monitoring devices, allowing real-time assessment of physical condition and fatigue and sending alerts in the event of an incident or accident.

[0237] Different fog systems in the mining industry (including vehicle fog, traffic system fog, weather fog, mining instrument fog, maintenance system fog, health record fog, etc.) can collaborate to solve the positioning problem. This context-aware collaboration can help mining companies carry out mining operations smoothly while ensuring workers' safety measures and efficient logistics management.

[0238] Therefore, aspects and examples of the present disclosure provide methods for allocating resources of fog nodes that allow efficient implementation of client requests. Fog systems present several challenges in terms of system management; services are divided into multiple micro-level services and distributed across edge devices and clouds. Proper management of fog architectures that execute microservices is an important challenge in the field of fog computing. Service placement and service composition are two major challenges faced in large-scale, micro-service management architectures.

[0239] The present disclosure proposes a scalable system and method for dynamically clustering microservices attached to fog nodes based on relationships. Services provided to end users are grouped according to context-aware fog resource allocation and task scheduling in the fog network. The examples of the present disclosure automatically aggregate fog nodes using knowledge from different existing fog networks. The aggregated clusters are used to quickly and efficiently perform local actions required to implement service requests received from interconnected systems. Therefore, the examples of the present disclosure provide improved accuracy in task allocation, resource scheduling, and decision-making, as well as improved collaboration between fog nodes, which can play a role in a variety of use cases including vehicle movement, drone flight, etc.

[0240] The methods of the present disclosure may be implemented in hardware or as a software module running on one or more processors. These methods may also be performed according to the instructions of a computer program, and the present disclosure further provides a computer-readable medium having a program for performing any method described herein stored thereon. The computer program embodying the present disclosure may be stored on a computer-readable medium, or it may be, for example, in the form of a signal (e.g., a downloadable data signal provided from an Internet website), or it may be in any other form.

[0241] It should be noted that the above examples illustrate rather than limit the present disclosure, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. The word "comprising" does not exclude the presence of elements or steps other than those listed in the claims, "a" or "an" does not exclude a plurality, and a single processor or other unit may perform the functions of several units described in the claims. Any reference signs in the claims should not be construed as limiting their scope.

Claims

1. A method for allocating resources of fog nodes, wherein: The fog nodes are organized into at least one fog network; the method comprises: Receive a request from a client node; identifying requirements for fulfilling the request; determining a location of the client node for fulfilling the request; Based on the identified requirement and the determined location, identifying a cluster of fog nodes operable to fulfill the request; and A fog node whose resources are to be allocated to fulfill the request is selected from the identified cluster by minimizing at least two of the following: the number of clusters required to fulfill the request; the total time to fulfill requests received by the fog node; the number of requests received by the fog node that were not fulfilled; Register new fog nodes; and Associating a service provided by the fog node with corresponding services provided by other fog nodes; Associating the service provided by the fog node with corresponding services provided by other fog nodes includes extracting information about the service from service metadata; Calculate similarity measures between the extracted information and the information extracted from the metadata of services provided by other fog nodes; Associating the service with services provided by other fog nodes that have the highest similarity scores to the service; assigning keys to associated services and generating a hash map mapping the assigned keys to associated services provided by the fog node; A registered fog node graph is generated, wherein vertices represent fog nodes, and wherein the vertices are connected by at least one of the following: Location edges representing the physical topological connections between fog nodes; Service edges connecting fog nodes that provide the same service; Service federation edges connecting fog nodes that provide related services; Detecting service request patterns between services provided by fog nodes; Detecting trending patterns among services provided by fog nodes; and generating a service alliance edge in the registered fog node graph based on the detected service request pattern and trend change pattern; Selecting a fog node from the identified cluster whose resources are to be allocated to fulfill the request includes computing an objective function that minimizes a weighted sum of terms representing at least two of the following: the number of clusters required to fulfill the request; the total time to fulfill requests received by the fog node; the number of requests received by the fog node that were not fulfilled; The objective function includes: min w1∑ k∈K ∑ θ∈E the xy C xy +w2∑ k∈K (T k∈K -a k -τ k )+w3∑ r∈R the r in, K is the set of service providers including the fog node; E is the set of edges representing legal paths between waypoints in the environment; d xy is the distance along the edge between the client node x and the fog node y; c xy is the probability that client node x and fog node y meet within N hops; T is a non-negative integer indicating the amount of time it takes for the client node x to reach the fog node k; a k is the start time of the time window in which fog node k provides services; τ k is the waiting time between the client node reaching fog node k and receiving service from fog node k; R is a non-negative integer representing the minimum number of services provided by a fog node; and d r is a binary decision variable indicating whether the resources serving the request have been successfully allocated; w1 is the weight of the service request pattern association score; w2 is the weight of the trend change pattern association score; w3 is the weight of the number of service request pattern associations.

2. The method according to claim 1, wherein: Identifying requirements for fulfilling the request includes: identifying a primary service of the request, wherein the primary service comprises a service provided by at least one fog node that is necessary to fulfill the request; and A fog node operable to provide the requested primary service is identified.

3. The method according to claim 2, wherein: Identifying requirements for fulfilling the request also includes: A fog node operable to provide the requested secondary service is identified, wherein the secondary service comprises a service provided by at least one fog node that is associated with the requested primary service.

4. The method according to claim 3, wherein: Identifying a fog node operable to provide the requested secondary service comprises: identifying fog nodes contained within the same matching neighborhood as the identified fog node operable to provide the requested primary service; The matching neighborhood includes a plurality of fog nodes that are correlated according to at least one of the following: The service request patterns for the services it provides; The trend changing pattern of the services it provides.

5. The method according to any one of claims 1 to 4, wherein: Determining a location of the client node for fulfilling the request includes: A trajectory of the client node is estimated based on historical position data of the client node within an environment.

6. The method according to any one of claims 1 to 4, wherein: Determining a location of the client node for fulfilling the request includes: The environment is modeled as a location graph including vertices representing waypoints within the environment and edges representing legal paths between the waypoints.

7. The method according to any one of claims 1 to 4, wherein: Identifying a cluster of fog nodes operable to implement the request based on the identified requirements and the determined locations includes: Generate at least one cluster including the following fog nodes: operable to at least partially implement said request; are within a threshold distance of each other at a particular point in time; and Capable of operating in collaboration with each other.

8. The method according to claim 7, wherein: The fog nodes operable to at least partially fulfill the request include fog nodes identified as operable to provide a primary or secondary service for the request.

9. The method according to claim 7, wherein: Identifying a cluster of fog nodes operable to implement the request based on the identified requirement and the determined location further comprises: identifying a generation cluster within a threshold distance of the client node; and Based on the determined location and the time period for fulfilling the request, it is determined whether the identified generation cluster can fulfill the request.

10. The method according to claim 9, wherein: Identifying a cluster of fog nodes operable to implement the request based on the identified requirement and the determined location further comprises: If the identified generation cluster cannot fulfill the request, a new cluster is generated to fulfill the request.

11. The method according to claim 7, wherein: Identifying a cluster of fog nodes operable to implement the request based on the identified requirement and the determined location further comprises: A cluster group is established, wherein the cluster group includes a plurality of clusters operable to collaborate such that they form a service providing chain.

12. The method according to claim 7, wherein: Identifying a cluster of fog nodes operable to implement the request based on the identified requirement and the determined location further comprises: performing a density measurement on the clusters; and Disband clusters that fall below a density threshold.

13. The method according to claim 7, wherein: Identifying a cluster of fog nodes operable to implement the request based on the identified requirement and the determined location further comprises: Updates one or more build clusters.

14. The method according to any one of claims 1 to 4, further comprising: Initiate allocation of resources to the selected fog node to fulfill the received request.

15. The method according to any one of claims 1 to 4, further comprising: Initiate caching of information about the selected fog nodes.

16. The method according to any one of claims 1 to 4, further comprising: The received request is implemented by the selected fog node.

17. The method according to claim 1, further comprising: The generated service alliance edges are weighted according to the detected service request patterns and trend change patterns.

18. The method of claim 1, further comprising: Fog nodes are associated into matching neighborhoods based on the weights applied to the service federation edges between fog nodes.

19. The method according to any one of claims 1 to 4, further comprising: Register a new client node; Monitor the location of registered client nodes; as well as At least one track within the environment associated with a registered client node is learned from the monitored location.

20. The method according to any one of claims 1 to 4, further comprising: The environment in which the fog nodes are located is modeled as a location graph comprising vertices representing waypoints within the environment and edges representing legal paths between the waypoints.

21. The method according to claim 20, further comprising: A connectivity matrix of a modeled environment is generated, the connectivity matrix representing connectivity between legal paths of the environment.

22. The method according to claim 20, further comprising: A path type matrix of a modeled environment is generated, wherein the path type matrix represents the distribution types of the legal paths in the environment.

23. The method of claim 20, further comprising: A waypoint dimension matrix of a modeled environment is generated, the waypoint dimension matrix representing the number of legal paths through the environment that meet at each waypoint.

24. The method of claim 20, further comprising: Divide the modeling environment into multiple areas; as well as Assign regions of the modeled environment to fog nodes within the region.

25. A computer-readable storage medium storing a computer program comprising instructions which, when executed on at least one processor, cause the at least one processor to perform the method according to any one of claims 1-24.

26. A controller for allocating resources of fog nodes, wherein: The controller is operable to perform a method according to any one of claims 1 to 24.