Edge function triggering method and apparatus, electronic device, and storage medium

By combining the configuration center and event triggers, edge functions are automatically triggered to process edge node data, solving the problem of low real-time performance in edge data processing. This achieves an efficient and flexible edge function triggering method, improving the system's real-time performance and scalability.

CN119829159BActive Publication Date: 2026-01-13CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411744406.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2026-01-13
Estimated Expiration
2044-11-30

AI Technical Summary

Technical Problem

Existing technologies suffer from significant time delays in triggering edge functions, resulting in poor real-time performance of edge data processing.

Method used

By configuring the edge functions and event queues through the configuration center, and using event triggers to listen to the event queues, the target edge functions are automatically triggered to process the data on the edge nodes. Event triggers are introduced as a brand-new triggering method to replace the triggering method based on HTTP requests.

Benefits of technology

It significantly reduces the latency of triggering edge functions, improves the real-time performance of edge data processing, enhances the flexibility and scalability of the system, and meets the needs of different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829159B_ABST
    Figure CN119829159B_ABST
Patent Text Reader

Abstract

The application provides an edge function triggering method and device, electronic equipment and a storage medium, comprising: obtaining attribute information of full edge functions from a configuration center, determining whether there is attribute information of a new edge function in the attribute information of the full edge functions according to the attribute information of the full edge functions and attribute information of edge functions sent by the configuration center, if there is attribute information of a new edge function in the attribute information of the full edge functions, listening to an event queue according to event queue meta information, if the event queue is listened to, determining a target edge function according to the event queue and a corresponding relationship between the edge function and the event queue, and triggering the target edge function. In the case that the event trigger listens to the event queue, the execution of the edge function is triggered, which can immediately respond and trigger the edge function when the event occurs, solving the problem of low real-time performance of edge data processing caused by large delay in triggering the edge function.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of edge computing, and in particular to an edge function triggering method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the rapid development of mobile communication and Internet of Things technology, the Internet edge accumulates hundreds of millions of mobile and Internet of Things devices, and generates massive data at the network edge. The growth of these devices and data brings great opportunities and challenges to edge computing. How to efficiently process massive edge data to maximize the value of edge big data has become an urgent task. In this context, edge functions, as a new type of computing technology to support edge data processing, show great potential.

[0003] Related methods for triggering edge functions are mainly based on HTTP (Hypertext Transfer Protocol). HTTP is a widely used network communication protocol suitable for various Web (World Wide Web) services and API (Application Programming Interface) calls. Through HTTP, the client can send a request to the server to trigger the execution of the edge function.

[0004] However, the related method for triggering edge functions has obvious delay in scenarios with high real-time requirements, which may cause the edge function to have low real-time performance when processing edge data. SUMMARY

[0005] Embodiments of the present application provide an edge function triggering method, device, electronic equipment and storage medium to solve the problem of low real-time performance of edge data processing caused by large delay in triggering edge functions in related technologies.

[0006] In a first aspect, the embodiments of the present application provide an edge function triggering method applied to a content distribution network architecture, the content distribution network architecture comprising an edge node, the edge node comprising a configuration center and an event trigger, the configuration center comprising an edge function, attribute information of the edge function, an event queue and event queue meta information corresponding to the event queue, the method comprising:

[0007] associating the edge function and the event queue through the configuration center to obtain a corresponding relationship between the edge function and the event queue;

[0008] When the event trigger receives the attribute information of the edge function and the event queue meta-information sent by the configuration center, it retrieves the attribute information of all edge functions from the configuration center.

[0009] Based on the attribute information of the full edge function and the attribute information of the edge function sent by the configuration center to the event trigger, determine whether there is any newly added attribute information of the edge function in the attribute information of the full edge function;

[0010] If there is new attribute information for the edge function in the attribute information of the full edge function, the event queue is monitored according to the event queue meta-information;

[0011] If the event queue is detected, the target edge function is determined based on the event queue and the correspondence between the edge function and the event queue.

[0012] The target edge function is triggered by the event trigger, wherein the target edge function is used to process the data on the edge node.

[0013] Optionally, before the step of associating the edge function and the event queue through the configuration center to obtain the correspondence between the edge function and the event queue, the method includes:

[0014] Edge functions are created through the configuration center;

[0015] The edge function can be configured to be triggered by the event trigger through the configuration center.

[0016] Optionally, after the step of determining whether there is newly added attribute information for the edge function in the attribute information of the full edge function based on the attribute information of the full edge function and the attribute information of the edge function sent by the configuration center to the event trigger, the method includes:

[0017] If the attribute information for the newly added edge function is not found in the attribute information of the full edge function, stop listening to the event queue based on the event queue metadata.

[0018] Optionally, triggering the target edge function via the event trigger includes:

[0019] The event trigger sends a call request to the target edge function, wherein the call request includes the deployment path of the target edge function on the edge node;

[0020] When the target edge function receives the call request, the call request is verified to obtain the verification result;

[0021] If the verification result is successful, the target edge function is loaded according to the deployment path and then executed.

[0022] Optionally, the invocation request includes a domain name and an authentication request header;

[0023] The verification of the call request and the resulting verification result include:

[0024] Determine whether the domain name is a preset domain name;

[0025] If the domain name is a preset domain name, the validity of the digital signature is verified based on the pre-obtained public key to obtain the validity verification result. The digital signature is obtained by signing the authentication request header based on the pre-obtained private key.

[0026] If the validity verification result is passed, then the verification result is determined to be passed;

[0027] If the validity verification result is unsuccessful, then the verification result is determined to be unsuccessful.

[0028] Optionally, the invocation request includes the identification number of the target edge function, and the edge node includes log and monitoring alarm components;

[0029] After the steps of loading the target edge function according to the deployment path and running the target edge function, the method includes:

[0030] The running data and monitoring data of the target edge function are obtained based on the identification number of the target edge function.

[0031] The running data of the target edge function is stored in the log;

[0032] The monitoring data of the target edge function is sent to the monitoring and alarm component.

[0033] Secondly, embodiments of this application provide an edge function triggering system, which includes a configuration center and an event trigger;

[0034] The configuration center is used to associate the edge function and the event queue to obtain the correspondence between the edge function and the event queue;

[0035] The event trigger is used to, upon receiving the attribute information of the edge function and the event queue metadata sent by the configuration center, obtain the attribute information of all edge functions from the configuration center, determine whether there is any newly added attribute information of the edge function in the attribute information of all edge functions, based on the attribute information of the edge function and the attribute information of the edge function sent by the configuration center to the event trigger, if there is newly added attribute information of the edge function in the attribute information of all edge functions, monitor the event queue according to the event queue metadata, and if the event queue is monitored, determine the target edge function according to the event queue and the correspondence between the edge function and the event queue, and trigger the target edge function through the event trigger, wherein the target edge function is used to process the data on the edge node.

[0036] Thirdly, embodiments of this application provide an edge function triggering device, the device comprising:

[0037] The configuration module is used to associate the edge function and the event queue through the configuration center to obtain the correspondence between the edge function and the event queue;

[0038] The full data acquisition module is used to acquire the full edge function attribute information from the configuration center when the event trigger receives the edge function attribute information and the event queue meta information sent by the configuration center;

[0039] A new edge function judgment module is added, which is used to determine whether there is new edge function attribute information in the attribute information of the full edge function based on the attribute information of the full edge function and the attribute information of the edge function sent by the configuration center to the event trigger;

[0040] The event queue monitoring module is used to monitor the event queue according to the event queue metadata when there is new attribute information of the edge function in the attribute information of the full edge function.

[0041] The target edge function determination module is used to determine the target edge function based on the event queue and the correspondence between the edge function and the event queue when the event queue is detected.

[0042] An edge function triggering module is used to trigger the target edge function through the event trigger, wherein the target edge function is used to process the data on the edge node.

[0043] Optionally, the device includes:

[0044] An edge function creation module is used to create edge functions through the configuration center;

[0045] The edge function triggering mode configuration module is used to configure the triggering mode of the edge function to be triggered by the event trigger through the configuration center.

[0046] Optionally, the device includes:

[0047] The event queue monitoring module is used to stop monitoring the event queue based on the event queue metadata when there is no new attribute information for the edge function in the attribute information of the full edge function.

[0048] Optionally, the edge function triggering module includes:

[0049] The call request sending submodule is used to send a call request to the target edge function through the event trigger, wherein the call request includes the deployment path of the target edge function on the edge node;

[0050] The call request verification submodule is used to verify the call request when the target edge function receives the call request, and obtain the verification result;

[0051] The edge function execution submodule is used to load the target edge function according to the deployment path and run the target edge function if the verification result is passed.

[0052] Optionally, the invocation request includes a domain name and an authentication request header;

[0053] The call request verification submodule includes:

[0054] A domain name determination unit is used to determine whether the domain name is a preset domain name;

[0055] The validity verification unit is used to verify the validity of the digital signature based on a pre-obtained public key if the domain name is a preset domain name, and to obtain a validity verification result, wherein the digital signature is obtained by signing the authentication request header based on a pre-obtained private key;

[0056] The first verification result unit is used to determine that the verification result is passed if the validity verification result is passed.

[0057] The second verification result unit is used to determine that the verification result is unsuccessful if the validity verification result is unsuccessful.

[0058] Optionally, the invocation request includes the identification number of the target edge function, and the edge node includes log and monitoring alarm components;

[0059] The edge function triggering module includes:

[0060] The edge function related data acquisition submodule is used to acquire the running data and monitoring data of the target edge function based on the identification number of the target edge function;

[0061] The runtime data storage submodule is used to store the runtime data of the target edge function in the log.

[0062] The monitoring data sending submodule is used to send the monitoring data of the target edge function to the monitoring alarm component.

[0063] Fourthly, embodiments of this application also provide an electronic device, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement any of the edge function triggering methods described above.

[0064] Fifthly, embodiments of this application also provide a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute any of the edge function triggering methods described above.

[0065] In this embodiment, a configuration center is used to associate edge functions and event queues, establishing a correspondence between them. When an event trigger receives attribute information of the edge functions and event queue metadata from the configuration center, it retrieves the attribute information of all edge functions from the configuration center. Based on this information and the attribute information sent by the configuration center, it determines whether there is attribute information for a new edge function. If so, it listens to the event queue metadata. If an event queue is detected, a target edge function is determined based on the event queue and the correspondence between the edge functions and the event queue. The target edge function is then triggered by the event trigger, where it processes data on edge nodes. This application automatically triggers the execution of edge functions when the event trigger detects an event queue, enabling immediate response and triggering of corresponding edge functions when specific events occur. This significantly reduces the latency of triggering edge functions, thereby improving the real-time performance of edge data processing and solving the problem of low real-time performance in edge data processing caused by significant latency in triggering edge functions in existing technologies. In addition, this application introduces an event trigger to trigger edge functions, which is a brand-new way of triggering edge functions. This makes edge functions no longer limited to HTTP request-based triggering methods, enriches the triggering methods of edge functions, meets the needs of different scenarios, and thus improves the flexibility and scalability of the system.

[0066] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0067] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0068] Figure 1 This is one of the flowcharts of an edge function triggering method provided in an embodiment of this application;

[0069] Figure 2 This is the second step flowchart of an edge function triggering method provided in the embodiments of this application;

[0070] Figure 3This is the third step in the flowchart of an edge function triggering method provided in this application embodiment;

[0071] Figure 4 This is the fourth step in the flowchart of an edge function triggering method provided in this application embodiment;

[0072] Figure 5 This is the fifth step in the flowchart of an edge function triggering method provided in this application embodiment;

[0073] Figure 6 This is a device block diagram of an edge function triggering device provided in an embodiment of this application;

[0074] Figure 7 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0075] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0076] To facilitate understanding, the terminology used in the embodiments of this application will be briefly introduced first.

[0077] 1. Event triggers

[0078] An event trigger is a mechanism that triggers the execution of edge functions. It can detect specific events and automatically trigger the corresponding edge function when the event occurs. Through this mechanism, edge functions can react to various situations in real time, greatly enhancing event handling efficiency and expanding the application scenarios of edge functions.

[0079] 2. Edge functions

[0080] Edge functions are a computing model whose core concept is to migrate computational tasks from central nodes to edge devices or nodes in a network. This model aims to reduce data transmission and response latency, thereby improving computational performance. Edge functions are typically designed as lightweight, short-running tasks that can be quickly started and stopped on demand, enabling flexible and efficient management of computing resources.

[0081] The following detailed description, in conjunction with the accompanying drawings, of an edge function triggering method, apparatus, storage medium, and vehicle provided in this application, through specific embodiments and application scenarios, will be provided in detail.

[0082] Figure 1This is a flowchart illustrating the steps of an edge function triggering method provided in an embodiment of this application, as follows: Figure 1 As shown, this method is applied to a content delivery network architecture, which includes edge nodes, each comprising a configuration center and event triggers. The method includes:

[0083] Step 101: Associate the edge functions and event queues through the configuration center to obtain the correspondence between the edge functions and event queues.

[0084] It should be noted that, in this embodiment of the application, the configuration center includes pre-created edge functions, attribute information of edge functions, event queues, and event queue metadata corresponding to the event queues. The attribute information of the edge functions includes, but is not limited to, edge function ID (IDentity, identity identification number), parameter information of edge functions, and deployment path of edge functions on edge nodes.

[0085] The configuration center also provides a user interface that allows users to associate edge functions with event queues, obtain the correspondence between edge functions and event queues, and ensure that the edge function can be triggered when an event is detected in the event queue associated with the edge function.

[0086] Step 102: When the event trigger receives the attribute information of the edge function and the event queue meta information sent by the configuration center, it retrieves the attribute information of all edge functions from the configuration center.

[0087] It should be noted that, in this embodiment, after completing a series of configurations through the configuration center, the configuration center can send the attribute information of the edge functions and the event queue metadata to the event trigger. Upon receiving the attribute information of the edge functions and the event queue metadata sent by the configuration center, the event trigger can proactively obtain the attribute information of all edge functions from the configuration center at a fixed frequency.

[0088] Step 103: Based on the attribute information of the full edge functions and the attribute information of the edge functions sent by the configuration center to the event trigger, determine whether there is attribute information of the newly added edge functions in the attribute information of the full edge functions.

[0089] Step 104: If the attribute information of the newly added edge function exists in the attribute information of the full edge function, listen to the event queue according to the event queue meta-information.

[0090] It should be noted that, in this embodiment of the application, when the event trigger obtains the attribute information of the full edge functions, the attribute information of the full edge functions is compared with the attribute information of the edge functions sent by the configuration center to the event trigger to determine whether there is attribute information of newly added edge functions in the attribute information of the full edge functions.

[0091] If the attribute information of the full edge function contains the attribute information of the newly added edge function, the event queue can be monitored based on the event queue metadata. This means that the event queue related to the newly added edge function can be discovered in a timely manner. By utilizing the attribute information of the full edge function, the problem of edge function attribute information delivery failure caused by unreliable communication can be avoided.

[0092] Step 105: If the event queue is detected, determine the target edge function based on the event queue and the correspondence between the edge function and the event queue.

[0093] Step 106: Trigger the target edge function through an event trigger, whereby the target edge function is used to process the data on the edge nodes.

[0094] It should be noted that, in the embodiments of this application, if an event queue is detected based on the event queue metadata, the edge function corresponding to the detected event queue can be determined based on the detected event queue and the pre-established correspondence between the edge function and the event queue. The edge function corresponding to the detected event queue is the target edge function.

[0095] Once the target edge function is determined, it can be triggered by an event trigger to execute the logic of the target edge function and process the data on the edge nodes, i.e., the edge data.

[0096] This application achieves immediate response and triggering of edge functions upon the occurrence of specific events by automatically triggering the execution of edge functions when an event trigger detects an event queue. This significantly reduces the latency of triggering edge functions, thereby improving the real-time performance of edge data processing and solving the problem of low real-time performance in edge data processing caused by significant latency in triggering edge functions in existing technologies. Furthermore, this application executes on edge nodes, reducing data transmission volume and improving overall processing efficiency. In addition, by providing an efficient and flexible platform, this application helps promote the application of artificial intelligence algorithms on edge devices, empowering new intelligent services and applications. Moreover, by introducing event triggers to trigger edge functions, this application introduces a novel edge function triggering method, expanding the possibilities beyond HTTP request-based triggering and meeting the needs of different scenarios, thus improving the system's flexibility and scalability.

[0097] Furthermore, in the embodiments of this application, such as Figure 2 As shown, the following steps may be included before step 101:

[0098] Step 201: Create an edge function through the configuration center.

[0099] Step 202: Configure the edge function to be triggered by an event trigger through the configuration center.

[0100] It should be noted that, in this embodiment of the application, the configuration center also provides a user interface, enabling users to create, write and manage edge functions, and configure the triggering method of edge functions. For example, the triggering method of edge functions can be configured as event triggering, and the event queue metadata can be modified and managed when errors occur.

[0101] This application allows users to create edge functions, configure their triggering methods, manage them, and manage event queue metadata through the user interface of the configuration center, giving the system a high degree of configurability and flexibility.

[0102] Furthermore, in this embodiment of the application, the following steps may be included after step 103:

[0103] If the attribute information for the newly added edge function is not found in the attribute information of the full edge function, stop listening to the event queue based on the event queue metadata.

[0104] It should be noted that, in this embodiment of the application, the attribute information of the full range of edge functions refers to the attribute information of all edge functions in the configuration center.

[0105] If the attribute information of the newly added edge function is not present in the attribute information of the full edge function, or if the attribute information of the edge function that exists in the attribute information of the full edge function has been deleted, then the event queue can be monitored based on the event queue metadata.

[0106] This application prevents the failure to send attribute information for edge functions, which could result in some edge functions not actually running, by stopping the monitoring of the event queue based on the event queue metadata when the attribute information of the full set of edge functions does not contain the attribute information of the newly added edge functions.

[0107] Furthermore, in the embodiments of this application, such as Figure 3 As shown, step 106 may also include the following steps:

[0108] Step 301: Send a call request to the target edge function through an event trigger, wherein the call request includes the deployment path of the target edge function on the edge node.

[0109] Step 302: When the target edge function receives a call request, the call request is verified to obtain the verification result.

[0110] Step 303: If the verification result is satisfactory, load the target edge function according to the deployment path and run the target edge function.

[0111] It should be noted that, in this embodiment, the specific implementation process of triggering the target edge function via an event trigger is as follows: the event trigger sends a call request to the target edge function, wherein the call request includes the deployment path of the target edge function on the edge node. Upon receiving the call request from the event trigger, the target edge function verifies the call request and obtains a verification result. If the verification result is successful, the target edge function is loaded according to the deployment path of the target edge function on the edge node included in the call request, and then executed to process the data on the edge node according to the logic of the target edge function.

[0112] This application verifies the call request after the target edge function receives the call request sent by the event trigger. Only when the verification result is passed can the target edge function be loaded and run. This can prevent malicious requests and illegal operations and ensure the legality, security and reliability of the call request.

[0113] Furthermore, in the embodiments of this application, such as Figure 4 As shown, step 302 may also include the following steps:

[0114] Step 401: Determine whether the domain name is the preset domain name.

[0115] Step 402: If the domain name is a preset domain name, the digital signature is validated based on the pre-obtained public key to obtain the validity verification result. The digital signature is obtained by signing the authentication request header based on the pre-obtained private key.

[0116] Step 403: If the validity verification result is passed, then the verification result is determined to be passed.

[0117] Step 404: If the validity verification result is unsuccessful, then the verification result is determined to be unsuccessful.

[0118] It should be noted that, in this embodiment of the application, the preset domain name is an internal special domain name applied for by the event trigger, which is used to call the edge function triggered by the event.

[0119] The specific process for verifying the call request and obtaining the verification result is as follows: When the target edge function receives the call request, it compares the domain name included in the call request with the preset domain name to determine whether the domain name included in the call request is consistent with the preset domain name. If they are consistent, the validity of the authentication request header included in the call request is further verified. Specifically, the validity of the digital signature obtained by signing the authentication request header with the private key using the public key is verified to obtain the validity verification result.

[0120] If the validity verification result is passed, then the verification result of the call request is determined to be passed. The further target edge function allows the event trigger to be triggered according to the call request and to run the target edge function.

[0121] If the validity verification result is unsuccessful, then the verification result of the call request is determined to be unsuccessful. The target edge function blocks the call request, prevents the event trigger from being triggered according to the call request, and runs the target edge function.

[0122] This application verifies the domain name and authentication request header in the call request after the target edge function receives the request, thus ensuring the legality, integrity, and authenticity of the call request and preventing malicious requests and illegal operations. Furthermore, the determination of the verification results ensures that the target edge function is correctly called and executed, further guaranteeing the accuracy and reliability of edge data processing on edge nodes.

[0123] Furthermore, in the embodiments of this application, such as Figure 5 As shown, the following steps may be included after step 303:

[0124] Step 501: Obtain the running data and monitoring data of the target edge function based on the identification number of the target edge function.

[0125] Step 502: Store the running data of the target edge function in the log.

[0126] Step 503: Send the monitoring data of the target edge function to the monitoring and alarm component.

[0127] It should be noted that, in this embodiment of the application, the call request may also include the identification number of the target edge function.

[0128] During the operation of the target edge function, the running data and monitoring data of the target edge function can be obtained based on the target edge function's identification number. The running data may include the amount of memory used, the CPU (Central Processing Unit) resources used, and the execution time, while the monitoring data may include the response time, error rate, and health status.

[0129] Once the runtime and monitoring data of the target edge function are obtained, the runtime data can be stored in logs. This data can then be used for subsequent purposes such as troubleshooting, problem diagnosis, performance optimization, auditing, and compliance. The monitoring data can also be sent to the monitoring and alerting components on the edge nodes, enabling these components to perform real-time monitoring, early warning mechanisms, performance analysis, and resource optimization.

[0130] This application acquires the runtime data of the target edge function and stores it in logs. This helps developers and operations personnel quickly identify the root cause of problems, conduct troubleshooting and problem diagnosis, thereby improving troubleshooting capabilities and problem diagnosis efficiency. Furthermore, this application acquires monitoring data of the target edge function and sends this data to a monitoring and alarm component. This component can monitor the edge function's runtime status in real time, promptly detect anomalies, and generate alarm information based on the monitoring data to notify relevant personnel for handling. This improves the system's real-time monitoring capabilities and early warning mechanism, ensuring the system's efficient and stable operation.

[0131] According to an embodiment of the present invention, an edge function triggering system is also provided, which includes a configuration center and an event trigger.

[0132] The configuration center is used to associate edge functions and event queues, and to obtain the correspondence between edge functions and event queues.

[0133] The event trigger is used to retrieve the attribute information of all edge functions from the configuration center upon receiving the attribute information of the edge functions and the event queue metadata sent by the configuration center. Based on the attribute information of all edge functions and the attribute information of the edge functions sent by the configuration center to the event trigger, it determines whether there is attribute information for a new edge function in the attribute information of all edge functions. If there is attribute information for a new edge function in the attribute information of all edge functions, it listens to the event queue according to the event queue metadata. If the event queue is listened to, the target edge function is determined according to the event queue and the correspondence between the edge function and the event queue. The target edge function is then triggered by the event trigger. The target edge function is used to process the data on the edge node.

[0134] It should be noted that, in this embodiment, the configuration center provides a user interface, through which users can associate edge functions and event queues, obtaining the correspondence between edge functions and event queues, ensuring that the edge function can be triggered when an event in the event queue associated with the edge function is detected. After completing a series of configurations through the configuration center, the configuration center can send the attribute information of the edge functions and the event queue metadata included in the configuration center to the event trigger.

[0135] When the event trigger receives the attribute information of the edge functions and the event queue metadata sent by the configuration center, it can proactively retrieve the attribute information of all edge functions from the configuration center at a fixed frequency. After obtaining the attribute information of all edge functions, the event trigger compares this information with the attribute information of the edge functions sent by the configuration center to determine if any new edge function attributes exist. If new edge function attributes are found, the event queue can be monitored based on the event queue metadata. If an event queue is detected based on the event queue metadata, the edge function corresponding to the detected event queue can be determined according to the pre-established correspondence between edge functions and event queues. This edge function is the target edge function. Once the target edge function is determined, the event trigger can be used to activate it, executing its logic to process the data on the edge nodes, i.e., the edge data.

[0136] This application achieves immediate response and triggering of edge functions upon the occurrence of specific events by automatically triggering the execution of edge functions when an event trigger detects an event queue. This significantly reduces the latency of triggering edge functions, thereby improving the real-time performance of edge data processing and solving the problem of low real-time performance in edge data processing caused by significant latency in triggering edge functions in existing technologies. Furthermore, this application executes on edge nodes, reducing data transmission volume and improving overall processing efficiency. In addition, by providing an efficient and flexible platform, this application helps promote the application of artificial intelligence algorithms on edge devices, empowering new intelligent services and applications. Moreover, by introducing event triggers to trigger edge functions, this application introduces a novel edge function triggering method, expanding the possibilities beyond HTTP request-based triggering and meeting the needs of different scenarios, thus improving the system's flexibility and scalability.

[0137] Corresponding to the method provided in the above-described embodiment of the edge function triggering method of this application, see [link to relevant documentation]. Figure 6 This application also provides a device block diagram of an edge function triggering device. In this embodiment, the device includes:

[0138] Configuration module 601 is used to associate edge functions and event queues through the configuration center to obtain the correspondence between edge functions and event queues;

[0139] The full data acquisition module 602 is used to acquire the full edge function attribute information from the configuration center when the event trigger receives the edge function attribute information and event queue meta information sent by the configuration center;

[0140] A new edge function judgment module 603 is added, which is used to determine whether there is attribute information of a new edge function in the attribute information of the full edge functions based on the attribute information of the full edge functions and the attribute information of the edge functions sent by the configuration center to the event trigger.

[0141] The event queue listening module 604 is used to listen to the event queue based on the event queue metadata when there is attribute information of a newly added edge function in the attribute information of the full edge function.

[0142] The target edge function determination module 605 is used to determine the target edge function based on the event queue and the correspondence between the edge function and the event queue when the event queue is detected.

[0143] The edge function triggering module 606 is used to trigger the target edge function through an event trigger, wherein the target edge function is used to process the data on the edge node.

[0144] Optionally, the device includes:

[0145] The edge function creation module is used to create edge functions through the configuration center;

[0146] The edge function triggering configuration module is used to configure the edge function triggering method as an event trigger through the configuration center.

[0147] Optionally, the device includes:

[0148] The event queue monitoring module is used to stop monitoring the event queue based on the event queue metadata if the attribute information of the newly added edge function is not found in the attribute information of the full edge function.

[0149] Optionally, the edge function triggering module 606 includes:

[0150] The call request sending submodule is used to send call requests to the target edge function through event triggers. The call request includes the deployment path of the target edge function on the edge node.

[0151] The call request verification submodule is used to verify the call request when the target edge function receives the call request and obtain the verification result;

[0152] The edge function execution submodule is used to load and run the target edge function according to the deployment path if the verification result is passed.

[0153] Optionally, the call request includes the domain name and authentication request headers;

[0154] The request verification submodule includes the following:

[0155] The domain name determination unit is used to determine whether a domain name is a preset domain name;

[0156] The validity verification unit is used to verify the validity of the digital signature based on the pre-obtained public key if the domain name is a preset domain name, and obtain the validity verification result. The digital signature is obtained by signing the authentication request header based on the pre-obtained private key.

[0157] The first verification result unit is used to determine that the verification result is passed if the validity verification result is passed.

[0158] The second verification result unit is used to determine that the verification result is not passed if the validity verification result is not passed.

[0159] Optionally, the call request includes the identification number of the target edge function, and the edge node includes log and monitoring alarm components;

[0160] Edge function triggering module 606 includes:

[0161] The edge function related data acquisition submodule is used to obtain the running data and monitoring data of the target edge function based on the target edge function's identification number;

[0162] The runtime data storage submodule is used to store the runtime data of the target edge function in the log.

[0163] The monitoring data sending submodule is used to send the monitoring data of the target edge function to the monitoring alarm component.

[0164] Figure 7 This is a structural diagram of an electronic device M00 provided in an embodiment of this application. In the diagram, the electronic device M00 includes a processor M01 and a memory M02. The memory M02 stores a program or instructions that can run on the processor M01. When the program or instructions are executed by the processor M01, they implement the various steps of the above-described edge function triggering method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0165] In embodiments of this application, the memory M02 can be used to store software programs and various data. The memory M02 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, applications or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory M02 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory M02 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0166] The processor M01 may include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor M01.

[0167] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described edge function triggering method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0168] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0169] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described edge function triggering method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0170] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0171] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An edge function triggering method, characterized in that, The method is applied to a content delivery network architecture, which includes edge nodes. Each edge node includes a configuration center and event triggers. The configuration center includes edge functions, attribute information of the edge functions, event queues, and event queue metadata corresponding to the event queues. The edge function and the event queue are associated through the configuration center to obtain the correspondence between the edge function and the event queue; When the event trigger receives the attribute information of the edge function and the event queue meta-information sent by the configuration center, it retrieves the attribute information of all edge functions from the configuration center. Based on the attribute information of the full edge function and the attribute information of the edge function sent by the configuration center to the event trigger, determine whether there is any newly added attribute information of the edge function in the attribute information of the full edge function; If there is new attribute information for the edge function in the attribute information of the full edge function, the event queue is monitored according to the event queue meta-information; If the event queue is detected, the target edge function is determined based on the event queue and the correspondence between the edge function and the event queue. The target edge function is triggered by the event trigger, wherein the target edge function is used to process the data on the edge node.

2. The method according to claim 1, characterized in that, Before the step of associating the edge function and the event queue through the configuration center to obtain the correspondence between the edge function and the event queue, the method includes: Edge functions are created through the configuration center; The edge function can be configured to be triggered by the event trigger through the configuration center.

3. The method according to claim 1, characterized in that, After the step of determining whether there is newly added attribute information for the edge function in the attribute information of the full edge function based on the attribute information of the full edge function and the attribute information of the edge function sent by the configuration center to the event trigger, the method includes: If the attribute information for the newly added edge function is not found in the attribute information of the full edge function, stop listening to the event queue based on the event queue metadata.

4. The method according to claim 1, characterized in that, The step of triggering the target edge function through the event trigger includes: The event trigger sends a call request to the target edge function, wherein the call request includes the deployment path of the target edge function on the edge node; When the target edge function receives the call request, the call request is verified to obtain the verification result; If the verification result is successful, the target edge function is loaded according to the deployment path and then executed.

5. The method according to claim 4, characterized in that, The call request includes the domain name and authentication request header; The verification of the call request and the resulting verification result include: Determine whether the domain name is a preset domain name; If the domain name is a preset domain name, the validity of the digital signature is verified based on the pre-obtained public key to obtain the validity verification result. The digital signature is obtained by signing the authentication request header based on the pre-obtained private key. If the validity verification result is passed, then the verification result is determined to be passed; If the validity verification result is unsuccessful, then the verification result is determined to be unsuccessful.

6. The method according to claim 4, characterized in that, The invocation request includes the identification number of the target edge function, and the edge node includes log and monitoring alarm components; After the steps of loading the target edge function according to the deployment path and running the target edge function, the method includes: The running data and monitoring data of the target edge function are obtained based on the identification number of the target edge function. The running data of the target edge function is stored in the log; The monitoring data of the target edge function is sent to the monitoring and alarm component.

7. An edge function triggering system, characterized in that, The edge function triggering system includes a configuration center and event triggers; The configuration center is used to associate edge functions and event queues to obtain the correspondence between the edge functions and event queues; The event trigger is used to, upon receiving the attribute information of the edge function and event queue metadata sent by the configuration center, obtain the attribute information of all edge functions from the configuration center, determine whether there is any newly added attribute information of the edge function in the attribute information of all edge functions, based on the attribute information of the edge function and the attribute information of the edge function sent by the configuration center to the event trigger, if there is newly added attribute information of the edge function in the attribute information of all edge functions, listen to the event queue according to the event queue metadata, and if the event queue is listened to, determine the target edge function according to the event queue and the correspondence between the edge function and the event queue, and trigger the target edge function through the event trigger, wherein the target edge function is used to process data on the edge node.

8. An edge function triggering device, characterized in that, The device includes: The configuration module is used to associate edge functions and event queues through the configuration center to obtain the correspondence between the edge functions and the event queues; The full data acquisition module is used to acquire the full attribute information of the edge function from the configuration center when the event trigger receives the attribute information of the edge function and the event queue meta information sent by the configuration center. A new edge function judgment module is added, which is used to determine whether there is new edge function attribute information in the attribute information of the full edge function based on the attribute information of the full edge function and the attribute information of the edge function sent by the configuration center to the event trigger; The event queue monitoring module is used to monitor the event queue according to the event queue metadata when there is new attribute information of the edge function in the attribute information of the full edge function. The target edge function determination module is used to determine the target edge function based on the event queue and the correspondence between the edge function and the event queue when the event queue is detected. An edge function triggering module is used to trigger the target edge function through the event trigger, wherein the target edge function is used to process data on edge nodes.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the edge function triggering method as described in any one of claims 1 to 6.

10. A storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the edge function triggering method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Edge network function execution method and device

    CN110650215A

  • Website static resource hotlinking prevention method

    CN110708328A