A method for implementing edge functions of timing trigger type

Through the implementation method of the edge function of the timing trigger type, the problem of low triggering efficiency of traditional edge function is solved, efficient, secure, automated data processing and task scheduling in the edge computing environment is realized, and resource utilization and data consistency of edge devices are ensured.

CN117873660BActive Publication Date: 2025-09-05CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311712684.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-09-05
Estimated Expiration
2043-12-13

AI Technical Summary

Technical Problem

The traditional method of triggering edge functions by http cannot meet the data processing needs of IoT devices, especially in different scenarios, the efficiency of triggering edge functions at different frequencies is insufficient, resulting in poor processing speed.

Method used

The edge function implementation method of the timing trigger type is adopted. The script is deployed through CDN and the trigger frequency is set. The timing task center is used to generate and update timing tasks to realize script triggering and data collection without domain names, and a security mechanism is configured to prevent malicious attacks. Combined with load balancing and authentication mechanisms, we ensure the security and efficiency of edge functions.

Benefits of technology

It realizes the automated triggering of edge functions and efficient data processing, reduces the complexity of domain name configuration, saves computing resources, improves the degree of automation and security of the system, ensures the timeliness and consistency of data, and optimizes task scheduling and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117873660B_ABST
    Figure CN117873660B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for implementing a timed trigger-type edge function, which relates to the field of edge function computing technology and aims to solve the problem that the traditional method of triggering edge functions by HTTP can no longer meet the data processing needs of some IoT devices. The key points of the technical solution are S1: setting the edge function, relying on the CDN for the trigger-type edge function, setting the corresponding script and trigger frequency, and deploying and sending the script to the edge environment; S2: triggering and updating the scheduled task; S3: implementing the response of the timed trigger-type function when the script is not bound to a domain name; S4: responding to the scheduled task at runtime and access authentication; S5: data collection, collecting and monitoring logs in the absence of a domain name to implement data collection. This achieves the effect of making task scheduling and data processing in the edge computing environment more efficient and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge function calculation technology, and in particular to a method for realizing an edge function of a timing trigger type. Background Art

[0002] Thanks to advances in mobile computing and the Internet of Things, billions of mobile and IoT devices are connected to the Internet, generating hundreds of millions of bytes of data at the edge of the network. Driven by artificial intelligence and the Internet of Things, it is imperative to push the frontier of artificial intelligence to the edge of the network and fully tap the potential of edge big data.

[0003] To achieve this trend, edge function computing is a promising artificial intelligence technology that supports the application of edge computing technology to edge devices. This technology can provide various forms of business services such as authentication, encryption and decryption, data storage, and data cleaning.

[0004] The above-mentioned existing technical solutions have the following defects: the traditional method of triggering edge functions by HTTP can no longer meet the data processing needs of some IoT devices. The demand for edge function calculations triggered at different frequencies for different scenarios is also increasing. There is currently no technology that can increase the efficiency of edge function calculations, resulting in poor data processing speed of IoT devices. Summary of the Invention

[0005] The purpose of the present invention is to provide an edge function that provides a consistent trigger frequency based on the particularity of the business scenario, so that the function on the edge device or edge node can be automatically triggered and executed according to a predetermined schedule.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for implementing an edge function of a timing trigger type is as follows:

[0008] S1: Set up edge functions. Deploy trigger-type edge functions to the CDN, set the corresponding script and trigger frequency, and deploy the script to the edge environment.

[0009] Create a scheduled task script and deploy it as follows:

[0010] A1: Compile the script to generate the corresponding artifact file;

[0011] A2: Send the artifact file to the global resource pool;

[0012] S2: Triggering and updating scheduled tasks. The task center obtains the successfully issued scripts that need to be executed on a scheduled basis within ten minutes and generates scheduled tasks with the same frequency. Scheduled tasks trigger the script content in a specific way to meet customer needs.

[0013] S3: Implements the response of a timed trigger type function when the script is not bound to a domain name;

[0014] S4: Runtime response to scheduled tasks and access authentication;

[0015] S5: Data collection, collect and monitor logs without domain name to achieve data collection.

[0016] Furthermore, the triggering and updating of the scheduled task in S2 is specifically as follows:

[0017] B1: Every ten minutes, retrieve the task scripts that meet the requirements and put them into the cronMap;

[0018] B2: Traverse the cronMap and start each scheduled task;

[0019] B3: After ten minutes, retrieve the new data and compare it with the old data. Mark the newly added content and add it to the scheduled task. Mark the content to be deleted and stop the scheduled task.

[0020] Furthermore, in B3, the changed scheduled tasks are accurately identified and the scheduled tasks are updated after being marked.

[0021] Furthermore, the specific steps of S3 are as follows:

[0022] C1: Set a special domain name specifically for processing timer trigger type functions;

[0023] C2: Configure a special header to store the address of the wasm file generated after the function is compiled;

[0024] C3: Configure a special header for authentication to prevent external malicious attacks from imitating this function trigger;

[0025] C4: Configure load balancing.

[0026] Furthermore, the load balancing configuration in C4 is specifically to randomly obtain an IP address corresponding to a special domain name for responding to script access, and perform load balancing through a random method.

[0027] Furthermore, the specific steps of S4 are:

[0028] D1: When accessing a special domain name, check whether it has a token.

[0029] D2: Access the corresponding artifact according to the wasm file address stored in the special header;

[0030] D3: Returns the response content of the script corresponding to the product file.

[0031] Furthermore, in order to collect and monitor logs in S5, a special header must be configured to store the function ID, and the subsequent function logs are bound to the ID.

[0032] Furthermore, after the function log in S5 is bound to the id, the response, traffic and other information of the function are bound to the user id and script id, and reported to the monitoring system for data collection.

[0033] Furthermore, the edge function in S1 is used to regularly back up and synchronize data to edge devices or cloud storage, extract data from data sources and generate reports, and then send the reports to relevant users or systems. The edge function is used to distribute computing tasks to edge devices or edge nodes for execution to reduce data transmission and delay.

[0034] Furthermore, the edge function in S1 is used to periodically trigger edge functions to check sensor status, execute device control operations or perform device status monitoring, and is used to periodically trigger edge functions to read data from sensors, and then perform real-time analysis and processing to promptly detect abnormal situations or optimize system performance. At the same time, it is used to periodically trigger edge functions to monitor device load conditions, and dynamically adjust task allocation and resource allocation according to load conditions to achieve optimal resource utilization. A trigger is a mechanism used to trigger an operation or event at a specific time point or time interval.

[0035] In summary, the beneficial technical effects of the present invention are:

[0036] 1. The present invention monitors changes in scheduled tasks and updates scheduled tasks in a timely manner, including the addition and deletion of scheduled tasks, changes in the scheduled frequency, changes in the task content, etc., and can trigger scripts on a scheduled basis without a domain name, reducing the complexity of domain name configuration and the workload of deployment. When implementing edge functions of the timed trigger type, unauthorized access and operation are avoided, and security measures such as token verification mechanisms are adopted to protect the security of edge functions. At the same time, when executing scheduled tasks, information such as the script ID and user ID is brought in, logs and indicators are obtained and reported to the monitoring center to help diagnose problems, optimize performance, and provide a visual report on the execution of edge functions;

[0037] 2. The timing trigger of the present invention can avoid continuous consumption of computing resources. The computing resources of edge devices are usually limited. By timing the triggering of edge functions, the function can be started when the task needs to be executed, and the resources can be released after the task is completed. This method can effectively save computing resources and improve the resource utilization of edge devices, and timing triggers can be used to regularly collect, process and synchronize data. For example, in the Internet of Things scenario, edge functions can be triggered regularly to collect sensor data and perform real-time processing and analysis, which helps to ensure the timeliness and consistency of the data so that subsequent decisions and operations can be based on the latest data. These advantages of the timing trigger type edge function make task scheduling and data processing in the edge computing environment more efficient and reliable;

[0038] 3. The timing trigger of the present invention can be used to schedule edge functions to perform different tasks. Different tasks can be arranged to be executed at appropriate times through predetermined time intervals or time points, which helps to optimize the execution order and timing of tasks to maximize the efficiency and performance of the overall system. The timing trigger makes the execution of edge functions automatic without manual intervention. The edge function can be automatically triggered for execution according to a predetermined schedule, which reduces the need for manual operation, improves the degree of automation of the system, and reduces the risk of human error. The created timed edge function can also be automatically triggered according to a predetermined schedule without configuring a domain name, simplifying the domain name registration, DNS resolution and other steps, reducing the complexity of domain name configuration and the workload of deployment. For end users or other systems, they do not need to care about how the edge function is triggered, they only need to use the provided interfaces and services, which can improve the security and maintainability of the system, while simplifying the integration of external systems and adjustments to the internal architecture. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the overall process structure of the present invention. DETAILED DESCRIPTION

[0040] The method of the present invention is further described in detail below with reference to the accompanying drawings.

[0041] Example 1

[0042] Reference Figure 1 , a method for implementing an edge function of a timing trigger type is as follows:

[0043] S1: Set up edge functions. Deploy trigger-type edge functions to the CDN, set the corresponding script and trigger frequency, and deploy the script to the edge environment.

[0044] Create a scheduled task script and deploy it as follows:

[0045] A1: Compile the script to generate the corresponding artifact file;

[0046] A2: Send the artifact file to the global resource pool;

[0047] A timed trigger edge function is a function that is triggered by a timed trigger to execute at the edge in an edge computing environment. The following is an explanation of the relevant terms:

[0048] Scheduled trigger: A scheduled trigger is a mechanism used to trigger an action or event at a specific time point or time interval. In edge computing, a scheduled trigger can be used to periodically execute edge functions, for example, at intervals or at specific time points.

[0049] Edge functions: Edge functions are a computing model that distributes computing tasks to edge devices or edge nodes to reduce data transmission and latency. Edge functions are typically lightweight, short-running tasks that can be quickly started and stopped as needed.

[0050] S2: Triggering and updating scheduled tasks. The task center obtains the successfully issued scripts that need to be executed on a scheduled basis within ten minutes and generates scheduled tasks with the same frequency. Scheduled tasks trigger the script content in a specific way to meet customer needs.

[0051] B1: Every ten minutes, retrieve the task scripts that meet the requirements and put them into the cronMap;

[0052] B2: Traverse the cronMap and start each scheduled task;

[0053] B3: After ten minutes, retrieve the new data and compare it with the old data. Mark the newly added content and add it to the scheduled task. Mark the content to be deleted and stop the scheduled task. After the scheduled task is successfully stopped, delete the content in the cronMap.

[0054] S3: Implements the response of a timed trigger type function when the script is not bound to a domain name;

[0055] C1: Set a special domain name specifically for processing timer trigger type functions;

[0056] C2: Configure a special header to store the address of the wasm file generated after the function is compiled;

[0057] C3: Configure a special header for authentication to prevent external malicious attacks from imitating this function trigger;

[0058] C4: Configure load balancing, randomly obtain the IP address corresponding to a special domain name to respond to script access, and perform load balancing through random methods;

[0059] S4: Runtime response to scheduled tasks and access authentication;

[0060] D1: When accessing a special domain name, check whether it has a token.

[0061] D2: Access the corresponding artifact according to the wasm file address stored in the special header;

[0062] D3: Returns the response content of the script corresponding to the product file;

[0063] S5: Data collection: collect and monitor logs without domain names to achieve data collection;

[0064] Configure a special header to store the function ID, and subsequent function logs are bound to the ID;

[0065] After the function log is bound to the ID, the function's response, traffic, and other information are bound to the user ID and script ID and reported to the monitoring system for data collection.

[0066] Edge functions are used to regularly back up and synchronize data to edge devices or cloud storage, extract data from data sources and generate reports, and then send the reports to relevant users or systems. Edge functions are used to distribute computing tasks to edge devices or edge nodes for execution to reduce data transmission and latency. Edge functions are used to regularly trigger edge functions to check sensor status, perform device control operations, or perform device status monitoring. They are also used to regularly trigger edge functions to read data from sensors and then perform real-time analysis and processing to promptly detect abnormal situations or optimize system performance. At the same time, they are used to periodically trigger edge functions to monitor device load conditions, dynamically adjust task allocation and resource allocation according to load conditions, and achieve optimal resource utilization. A trigger is a mechanism used to trigger an operation or event at a specific time point or time interval.

[0067] Example 2

[0068] Thanks to advances in mobile computing and the Internet of Things (IoT), billions of mobile and IoT devices are connected to the internet, generating hundreds of millions of bytes of data at the edge of the network. Driven by AI and the IoT, it's imperative to push the frontiers of AI to the edge of the network and fully leverage the potential of edge big data. To achieve this trend, edge function computing is a promising AI technology that supports the application of edge computing to edge devices. This technology can provide various business services, such as authentication, encryption and decryption, data storage, and data cleansing. However, the traditional method of triggering edge functions via HTTP no longer meets the data processing needs of some IoT devices. The demand for edge function computing triggered at different frequencies for different scenarios is also increasing. This has led to the emergence of timed trigger-based edge function technology. In edge computing environments, timed triggers can trigger an operation or event at a predetermined time interval or at a specific point in time, such as collecting, processing, analyzing, or sending data at a specific time.

[0069] The purpose of the present invention is to provide an edge function that can be triggered on a timer basis, whose trigger frequency can be modified centrally, and which takes effect within a certain time period. This function is used to provide edge computing for various scenarios while providing edge functions with trigger frequencies tailored to the particularities of business scenarios. This allows functions on edge devices or edge nodes to be automatically triggered and executed according to a predetermined schedule. This technology can be used in various edge computing application scenarios, such as data processing, real-time monitoring and analysis of IoT devices, and edge artificial intelligence. Through timed triggers, edge computing can respond to and process data more intelligently, providing more efficient computing capabilities and faster response times.

[0070] Overall architecture: Trigger-type edge functions rely on CDN. Customers set the corresponding script and trigger frequency, deploy the script to the edge environment, and the task center obtains the relevant scripts that need to be executed on a scheduled basis within 10 minutes. It generates a scheduled task with the same frequency. The scheduled task triggers the script content in a specific way to meet customer needs. Trigger-type edge functions are composed of the following five points:

[0071] 1. Create a scheduled task script and deploy it

[0072] a) Compile the script to generate the corresponding product file;

[0073] b) Send the product files to the global resource pool;

[0074] 2. Triggering and updating of scheduled tasks;

[0075] a) Every ten minutes (modifiable), take out the task script that meets the conditions and put it into cronMap (to prevent the function with the timed trigger from changing, and refresh the scheduled task every ten minutes);

[0076] b) Traverse the cronMap and start each scheduled task (for the first time);

[0077] c) After ten minutes, take out the new data and compare it with the old data. Mark the newly added content and add it to the scheduled task. Mark the content to be deleted and stop the scheduled task. After the scheduled task is successfully stopped, delete the content in the cronMap.

[0078] 3. When the function script is not bound to a domain name, the response of the timer trigger type function is realized

[0079] a) Set up a special domain name specifically for processing timer trigger type functions;

[0080] b) Configure a special header to store the address of the wasm file generated after the function is compiled;

[0081] c) Configure a special header for authentication to prevent external malicious attacks from imitating the function trigger;

[0082] d) Randomly obtain the IP address corresponding to a special domain name to respond to script access and perform load balancing through random methods;

[0083] 4. Response to scheduled tasks at runtime

[0084] a) When accessing a special domain name, check whether it contains a token;

[0085] b) Access the corresponding artifact according to the wasm file address stored in the special header;

[0086] c) Return the response content of the script corresponding to the product file;

[0087] 5. Log collection and monitoring without domain name

[0088] a) Configure a special header to store the function ID, and bind subsequent function logs to the ID;

[0089] b) The function's response, traffic, and other information are bound to the user ID and script ID and reported to the monitoring system for data collection;

[0090] Through the method provided by the present invention, with the help of CDN and the deployment and distribution method of traditional edge functions, a fixed-frequency function response is achieved, helping customers to realize customized function requirements and trigger frequencies.

[0091] Applications in the field of function computing are as follows:

[0092] 1. Regularly back up and synchronize data to edge devices or cloud storage;

[0093] 2. Extract data from data sources and generate reports, then send the reports to relevant users or systems;

[0094] 3. Periodically trigger edge functions to check sensor status, perform device control operations, or perform device status monitoring;

[0095] 4. Regularly trigger edge functions to read data from sensors, and then perform real-time analysis and processing to promptly detect abnormal situations or optimize system performance;

[0096] 5. Edge functions can be triggered regularly to monitor device load conditions, and task allocation and resource allocation can be dynamically adjusted according to load conditions to achieve optimal resource utilization;

[0097] Application of this design

[0098] 1. Monitor the changes of scheduled tasks and update them in time, including the addition, deletion, frequency change, and task content change of scheduled tasks;

[0099] 2. Timed triggering of scripts without domain names reduces the complexity of domain name configuration and the workload of deployment;

[0100] 3. Ensure security when implementing timed trigger-type edge functions to prevent unauthorized access and operation. Use security measures such as token verification mechanisms to protect the security of edge functions.

[0101] 4. When executing scheduled tasks, include information such as the script ID and user ID, obtain logs and metrics, and report them to the monitoring center to help diagnose problems, optimize performance, and provide visualization and reporting of edge function execution;

[0102] Compared with the existing technology, this application has the following advantages and effects:

[0103] Precise control: Scheduled triggers allow edge functions to be triggered at specific intervals or at specific points in time. This allows for precise control over the execution time of functions, ensuring that tasks are executed within the scheduled time. This is very useful for scenarios where tasks need to be executed on a schedule, such as scheduled data collection and report generation.

[0104] Resource Saving: Timed triggers can avoid continuous consumption of computing resources. Edge devices typically have limited computing resources. By timing edge functions, functions can be started when tasks are needed and resources released after the tasks are completed. This approach can effectively save computing resources and improve resource utilization of edge devices.

[0105] Data synchronization: Scheduled triggers can be used to periodically collect, process, and synchronize data. For example, in IoT scenarios, edge functions can be periodically triggered to collect sensor data and perform real-time processing and analysis. This helps ensure the timeliness and consistency of data so that subsequent decisions and actions are based on the latest data.

[0106] Scheduled task scheduling: Scheduled triggers can be used to schedule edge functions to execute different tasks. By pre-determined time intervals or time points, different tasks can be scheduled to execute at appropriate times. This helps optimize the execution order and timing of tasks to maximize the efficiency and performance of the overall system.

[0107] Automated operation: Timed triggers automate the execution of edge functions without manual intervention. Edge functions can be automatically triggered and executed according to a predetermined schedule, which reduces the need for manual operation, improves the system's automation level, and reduces the risk of human error.

[0108] Domain-free triggering: Scheduled edge functions can be automatically triggered according to a predetermined schedule even without a domain name configuration. This simplifies domain name registration and DNS resolution, reduces the complexity of domain name configuration and deployment workload. End users or other systems do not need to worry about how edge functions are triggered; they only need to use the provided interfaces and services. This improves system security and maintainability, while simplifying external system integration and internal architecture adjustments.

[0109] In summary, these advantages of the timer trigger type edge function make task scheduling and data processing in the edge computing environment more efficient and reliable.

[0110] It is important to note that the construction and arrangement of the present application shown in a number of different exemplary embodiments are merely illustrative. Although only a few embodiments are described in detail in this disclosure, it should be readily understood by those reading this disclosure that many modifications are possible (e.g., the size, scale, structure, shape, and proportion of various elements, as well as parameter values ​​(e.g., temperature, pressure, etc.), mounting arrangements, use of materials, color, orientation, etc.) without materially departing from the novel teachings and advantages of the subject matter described in this application. For example, elements shown as integrally formed may be composed of multiple parts or elements, the positions of elements may be inverted or otherwise changed, and the nature, number, or position of discrete elements may be altered or changed, and therefore, all such modifications are intended to be included within the scope of the present invention. The order or sequence of any process or method steps may be changed or reordered according to alternative embodiments. In the claims, any "means-plus-function" clause is intended to cover structures described herein that perform the function, and not only structural equivalence but also equivalent structures. Other substitutions, modifications, changes, and omissions may be made in the design, operating conditions, and arrangement of the exemplary embodiments without departing from the scope of the present invention. Therefore, the invention is not limited to the specific embodiments, but extends to various modifications that still fall within the scope of the appended claims.

[0111] Additionally, in order to provide a concise description of exemplary embodiments, all features of an actual embodiment (i.e., those features that are not relevant to the best mode presently contemplated for carrying out the invention or those that are not relevant to implementing the invention) may not be described.

[0112] It will be appreciated that in the development of any actual implementation, as in any engineering or design project, numerous implementation-specific decisions may be made. Such a development effort may be complex and time-consuming, but will be a routine task of design, fabrication, and production for those of ordinary skill having the benefit of this disclosure without undue experimentation.

[0113] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for implementing an edge function of a timing trigger type, characterized in that: The method is as follows: S1: Set up edge functions. Edge functions are used to distribute computing tasks to edge devices or edge nodes to reduce data transmission and latency. Trigger-type edge functions rely on CDN, set the corresponding script and trigger frequency, and deploy the script to the edge environment. Create a scheduled task script and deploy it as follows: A1: Compile the script to generate the corresponding artifact file; A2: Send the artifact file to the global resource pool; S2: Triggering and updating scheduled tasks. The task center obtains the successfully issued scripts that need to be executed on a scheduled basis within ten minutes and generates scheduled tasks with the same frequency. Scheduled tasks trigger the script content in a specific way to meet customer needs. S3: Implements the response of a timed trigger type function when the script is not bound to a domain name; The specific steps are as follows: C1: Set a special domain name specifically for processing timer trigger type functions; C2: Configure a special header to store the address of the wasm file generated after the function is compiled; C3: Configure a special header for authentication to prevent external malicious attacks from imitating this function trigger; C4: Configure load balancing; Configuring load balancing involves randomly obtaining an IP address corresponding to a specific domain name to respond to script access, and performing load balancing in a random manner. S4: Runtime response to scheduled tasks and access authentication; The specific steps are: D1: When accessing a special domain name, check whether it has a token. D2: Access the corresponding artifact according to the wasm file address stored in the special header; D3: Returns the response content of the script corresponding to the product file; S5: Data collection: collect and monitor logs without domain names to achieve data collection; To collect and monitor logs, you must first configure a special header to store the function ID, and then bind the subsequent function logs to the ID. After the function log is bound to the ID, the function's response and traffic information are bound to the user ID and script ID and reported to the monitoring system for data collection.

2. The method for implementing a timed trigger type edge function according to claim 1, wherein: The triggering and updating of the scheduled task in S2 are specifically as follows: B1: Every ten minutes, retrieve the task scripts that meet the requirements and put them into the cronMap; B2: Traverse the cronMap and start each scheduled task; B3: After ten minutes, retrieve the new data and compare it with the old data. Mark the newly added content and add it to the scheduled task. Mark the content to be deleted and stop the scheduled task.

3. The method for implementing a timed trigger type edge function according to claim 2, wherein: In B3, the changed scheduled tasks are accurately identified and the scheduled tasks are updated after marking.

4. The method for implementing a timed trigger type edge function according to claim 3, wherein: The edge function in S1 is used to regularly back up and synchronize data to edge devices or cloud storage, extract data from data sources and generate reports, and then send the reports to relevant users or systems.

5. The method for implementing a timed trigger type edge function according to claim 4, wherein: Edge functions are triggered regularly to check sensor status, perform device control operations, or monitor device status. Edge functions are triggered regularly to read data from sensors and then perform real-time analysis and processing to detect abnormal situations or optimize system performance. At the same time, edge functions are triggered regularly to monitor device load conditions, and task allocation and resource allocation are dynamically adjusted according to the load conditions to achieve optimal resource utilization. A trigger is a mechanism used to trigger an operation or event at a specific time point or time interval.