Response method and system, electronic equipment and storage medium

By dividing the business logic into two parts, local and remote execution on the CDN edge node, using SaaS services to achieve the customization of complex business logic, the problem that existing CDN service customization cannot meet complex needs is solved, and more complex business logic customization and resource utilization efficiency are achieved.

CN119520321APending Publication Date: 2025-02-25CHINANETCENT TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411489927.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

Existing CDN service customization cannot effectively meet the complex needs of content providers. Due to CDN edge node resources, it cannot support complex business logic customization.

Method used

On the CDN edge node, the business logic is divided into the first business sub-logical local execution and the second business sub-logical remote execution, and the SaaS service is used to achieve high-complex business logic development and remote execution.

Benefits of technology

By separating the execution of business logic, we reduce dependence on CDN edge node resources, support more complex business logic customization, reduce development difficulty, and meet the complex needs of content providers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520321A_ABST
    Figure CN119520321A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of communication, and discloses a response method and system, electronic equipment and a storage medium. The method is applied to a CDN edge node, and comprises the following steps: receiving a sent first request; triggering local execution of at least one first service sub-logic according to a first event in the process of responding to the first request; and remotely executing at least one second service sub-logic according to the execution of the at least one first service sub-logic, the second service sub-logic being SaaS service logic. At least more complex CDN service customization based on non-service calculation can be supported on the CDN edge node, so that the CDN service customization requirement can be better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a response method, system, electronic device and storage medium. Background Art

[0002] Content Delivery Network (CDN) service customization can provide more sophisticated CDN services that better meet personalized needs for different content providers. In order to shorten the development cycle of customized services, CDN suppliers usually provide content providers with a set of standardized interfaces. Customers can combine various functions pre-developed by CDN suppliers, including authentication, caching, speed limiting, and request header addition and subtraction, to form their own customized services by operating on the standardized interfaces. And with the development of serverless computing technology, a service customization solution based on serverless computing technology has emerged, which can exceed the functional limitations of standardized interfaces and support more diversified customized service solutions.

[0003] However, current CDN service customization still cannot meet the needs of content providers well. Summary of the invention

[0004] The embodiments of the present application provide a response method, system, electronic device and storage medium, which are at least conducive to supporting more complex CDN service customization based on serverless computing on CDN edge nodes, thereby better meeting CDN service customization needs.

[0005] According to some embodiments of the present application, a first aspect of the embodiments of the present application provides a response method, which is applied to a CDN edge node, and the method includes: receiving a first request sent; triggering local execution of at least one of the first business sub-logics based on a first event in the process of responding to the first request; and remotely executing at least one second business sub-logic based on the execution of at least one of the first business sub-logics, wherein the second business sub-logic is a SaaS service logic.

[0006] In some embodiments, the remote execution of at least one second business sub-logic based on the execution of at least one first business sub-logic includes: triggering local execution of at least one second business sub-logic associated with the second event based on a second event in the execution process of at least one first business sub-logic; or, after the execution of at least one first business sub-logic is completed, remotely executing at least one second business sub-logic that is located after the at least one first business sub-logic that has been executed in a preset order; wherein the preset order is the order of mutual dependence between the first business sub-logic and the second business sub-logic in a complete business logic; the dependency relationship between the first business sub-logic and the second business sub-logic associated with the same second event is consistent with the preset order.

[0007] In some embodiments, after remotely executing at least one second business sub-logic based on the execution of at least one first business sub-logic, the method further includes: locally executing at least one corresponding first business sub-logic again based on the execution of at least one second business sub-logic, until the first business sub-logic and the second business sub-logic associated with the first request are both executed in a preset order; wherein the preset order is the order of mutual dependence between the first business sub-logic and the second business sub-logic in a complete business logic.

[0008] In some embodiments, based on the execution of at least one of the second business sub-logics, locally executing the corresponding at least one of the first business sub-logics again includes: after the execution of at least one of the second business sub-logics is completed, locally executing at least one of the first business sub-logics that is located after the at least one second business sub-logic that has been executed in the preset order; or, based on a third event during the execution of at least one of the second business sub-logics, triggering the execution of at least one of the first business sub-logics associated with the third event again; wherein the dependency relationship between the second business sub-logic and the first business sub-logic associated with the same third event is consistent with the preset order.

[0009] In some embodiments, when the second business sub-logic includes a third-party SaaS service logic deployed on a third-party node, the remote execution of at least one second business sub-logic includes: sending a second request to the third-party node to trigger the execution of at least one corresponding third-party SaaS service logic on the third-party node; and receiving response data returned by the third-party node based on the second request.

[0010] In some embodiments, when the second business sub-logic includes a local SaaS service logic, the remote execution of at least one second business sub-logic includes: controlling the execution of at least one of the local SaaS service logics on the upper-level CDN node; and / or, through a locally deployed container engine, executing at least one of the local SaaS service logics in the form of a container image on a corresponding container server.

[0011] According to some embodiments of the present application, the second aspect of the embodiments of the present application further provides a system, comprising a number of CDN edge nodes, and each of the CDN edge nodes comprises: an edge function computing module, configured to locally execute a first business sub-logic; a SaaS service module, connected to the edge function computing module, configured to remotely execute a second business sub-logic, wherein the second business sub-logic is a SaaS service logic; a trigger module, together with the edge function computing module and the SaaS service module, configured to trigger the edge function computing module to execute the corresponding first business sub-logic when a corresponding event trigger is triggered, and / or trigger the SaaS service module to execute the corresponding second business sub-logic.

[0012] In some embodiments, a container subsystem is further included, wherein the container subsystem is connected to the SaaS service module to support the SaaS service module to remotely execute the second business sub-logic in the container subsystem, and the container subsystem includes a plurality of container nodes, each of the container nodes is associated with a container engine deployed on at least two of the CDN edge nodes, and at least two of the container engines deployed on the CDN edge nodes are associated with different container servers.

[0013] In some embodiments, a third-party SaaS service subsystem is also included, and the third-party SaaS service subsystem is connected to the SaaS service module to support the SaaS service module to remotely execute the second business sub-logic in the third-party SaaS service subsystem.

[0014] According to some embodiments of the present application, a third aspect of the embodiments of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a response method as described in any one of the first aspects.

[0015] According to some embodiments of the present application, a fourth aspect of the embodiments of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the response method as described in any one of the first aspects.

[0016] The technical solution provided in the embodiment of the present application has at least the following advantages:

[0017] On the CDN edge node, the complete business logic corresponding to the first request is divided into a first business sub-logic and a second business sub-logic, and the first business sub-logic is set as a SaaS service logic for local execution and the second business sub-logic is set as a remote execution. In this way, the development and remote execution of the business logic part with high complexity and / or computationally intensive processing can be realized in the form of a general service through the SaaS service, without having to rely on the limited resources on the CDN edge node to bear all the business logic execution pressure. Therefore, the CDN edge node can better support more complex business logic in combination with remote resources, while reducing the difficulty of business logic development. In addition, in addition to the general services supported by the SaaS service, the CDN edge node can also support the customization of personalized business logic through the first business sub-logic, combining complex business logic with customization, and realizing the customization function of complex business logic on the CDN edge node, so as to better meet the customization needs of CDN services. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0019] Figure 1 It is a simplified schematic diagram of the existing CDN network back-to-source process provided in the embodiments of the present application;

[0020] Figure 2 This is the process of the response method provided in the embodiment of this application Figure 1 ;

[0021] Figure 3 It is a schematic diagram of the request response phase of the existing CDN node provided in the embodiment of the present application;

[0022] Figure 4 This is the process of the response method provided in the embodiment of this application Figure 2 ;

[0023] Figure 5 This is a data flow diagram of the response method provided in the embodiment of the present application applied to a CDN edge node;

[0024] Figure 6 This is the process of the response method provided in the embodiment of this application Figure 3 ;

[0025] Figure 7This is the process of the response method provided in the embodiment of this application Figure 4 ;

[0026] Figure 8 It is a schematic diagram of the structure of the CDN edge node in the system provided in the embodiment of the present application;

[0027] Fig. 9 This is a schematic diagram of the structure of the system provided in the embodiment of the present application. Figure 1 ;

[0028] Fig.10 This is a schematic diagram of the structure of the system provided in the embodiment of the present application. Figure 2 ;

[0029] Fig.11 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] As can be seen from the background technology, CDN service customization still cannot well meet the needs of content providers.

[0031] After analysis, the reasons for the above problems are at least that: in the service customization solution based on serverless computing technology, the customized business logic uploaded by the customer is deployed and executed as a whole, which is restricted by the limited resources of CDN edge nodes. In order to ensure the integrity and reliability of the service, the service customization solution based on serverless computing technology can usually only provide simple services such as authentication, caching, speed limiting, and request header addition and reduction, or their superposition, but cannot support more complex service customization such as streaming media transcoding, that is, it cannot support the complex needs of content providers.

[0032] Based on this, the embodiments of the present application provide a response method, system, electronic device and storage medium, which overcome the general idea limitation of deploying and executing the customized business logic uploaded by the customer as a whole, and propose a new customized business logic response method. Specifically, the business logic is converted into a first business sub-logic executed locally and a second business sub-logic executed remotely, which are executed separately and in a preset order, so that while completing a complete response to the first request based on the first business sub-logic and the second business sub-logic, the second business sub-logic can also be executed using remote resources, so that it is no longer necessary to completely rely on the limited resources on the CDN edge node to implement the business logic, thereby reducing the restrictions on the business logic brought by resources. The CDN edge node can better support more complex business logic, and through the first business logic, it can also support personalized and customized business logic, and finally can support more complex CDN service customization based on serverless computing on the CDN edge node, which can better meet the CDN service customization needs.

[0033] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present application, many technical details are provided in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.

[0034] The division of the following embodiments is for the convenience of description and shall not constitute any limitation on the specific implementation of the present application. The embodiments may be combined with each other and referenced to each other without contradiction.

[0035] In one aspect, an embodiment of the present application provides a response method, which is applied to a CDN edge node, wherein the CDN edge node is a network node with fewer intermediate links from the end user access. It is understandable that, if Figure 1 As shown (it should be noted that Figure 1 Only the CDN nodes in a CDN network that a request passes through during the return to the source are shown, rather than all the nodes in the complete CDN network). For a request that needs to be returned to the source and is transmitted through the CDN network, the request will pass through the first-level CDN node (the first CDN node to which the user request is sent), the second-level CDN node, and finally be sent to the source station. In this case, the CDN edge node used by the response method provided in the embodiment of the present application is the first-level CDN node. The following will be combined with Figure 2-Figure 6 The process shown in the figure illustrates the response method provided by this application. Figure 2 , 5 , 6 are different flow charts of response methods, Figure 3 This is a schematic diagram of the request response phase of an existing CDN node. Figure 4 The diagram is a data flow diagram of the response method applied on the CDN edge node.

[0036] In some embodiments, Figure 2 As shown, the response method includes the following steps:

[0037] Step 101: Receive a first request.

[0038] Step 102: triggering local execution of at least one first service sub-logic according to a first event in a process of responding to a first request.

[0039] Step 103: remotely execute at least one second business sub-logic according to the execution of at least one first business sub-logic, wherein the second business sub-logic is a SaaS service logic.

[0040] In this way, on the CDN edge node, the complete business logic corresponding to the first request is divided into a first business sub-logic and a second business sub-logic, and the first business sub-logic is set as a SaaS service logic for local execution and the second business sub-logic is set as a remote execution. In this way, the development and remote execution of the business logic part with high complexity and / or computationally intensive processing can be realized in the form of a general service through the SaaS service, and it is no longer necessary to rely on the limited resources on the CDN edge node to bear all the business logic execution pressure. Therefore, the CDN edge node can better support more complex business logic in combination with remote resources, while reducing the difficulty of business logic development. In addition, in addition to the general services supported by the SaaS service, the CDN edge node can also support the customization of personalized business logic through the first business sub-logic, combining complex business logic with customization, and realizing the customization function of complex business logic on the CDN edge node, so as to better meet the customization needs of CDN services.

[0041] To facilitate better understanding of those skilled in the art Figure 2 The embodiment shown, the steps of which will be explained below.

[0042] In step 101, a first request is received. The embodiment of the present application does not limit the first request and the sending and receiving method thereof.

[0043] As for the first request itself, it can be any existing request that can initiate access to the CDN node, such as an existing Hyper Text Transfer Protocol (HTTP) request, etc., so that the user can be unaware, especially the difference between the business logics used in request processing. The first request can also be obtained by extending the existing access request, such as a request carrying an extended identifier or information, etc., so that the corresponding business logic processing can be better triggered by the first request itself, making the processing easier.

[0044] It should be noted that the above is only an example description of the content related to the first request, and it does not mean that the first request must be limited as in the above example. The specific implementation can be selected and configured according to the needs, and will not be described here one by one.

[0045] In step 102, local execution of at least one first service sub-logic is triggered according to the first event in the process of responding to the first request. The embodiment of the present application does not limit the content of the first service sub-logic, nor does it limit the meaning, occurrence time, and local execution method of the first event.

[0046] For the first business sub-logic triggered by the first event, it can be the entry in the business logic corresponding to any customized service. For example, the first business sub-logic can be a rewrite of the content of the requested page only. For example, the first business sub-logic can also be a remote call to the image processing service based on the parameters carried in the user request message, and respond to the user with the processed image. Of course, the above is only an example of the first business sub-logic. In some examples, the first business sub-logic can also be other logics set according to customized service requirements, etc., which will not be repeated here.

[0047] For the first event, the existing CDN node's response process to the request includes the following: Figure 3 The four stages shown are: request access stage, back-to-source forwarding stage, back-to-source response stage, and request response stage. It is understandable that, due to different needs and considerations, the differentiated processing between customized services and general CDN acceleration services may be achieved by introducing specific logic in any of the above stages. Therefore, the event that may occur in any of the above stages can be defined as the first event, thereby triggering the first business sub-logic at a specific time. Of course, the above is only an explanation of the first event provided by taking the existing request response stage of the CDN edge node as an example. In some examples, the first event can be set as any event that occurs when the CDN edge node receives a user request, etc., which will not be repeated here.

[0048] Regarding the local execution of the first business sub-logic, it should be noted that the execution of the first business sub-logic needs to ensure that the services customized by different customers do not affect each other. For example, the first business sub-logic of customer A will not access the memory of the first business sub-logic of customer B, etc., so as to ensure the isolation between customized business logics.

[0049] It should be noted that different business logics may be generated for different business needs, and different business logics may initially rely on a first business sub-logic, or may rely on multiple business sub-logics to be executed in parallel. Therefore, the execution of at least one first business sub-logic triggered by the first event is not limited to the first event triggering only the local execution of one first business sub-logic. The subsequent execution of the second business sub-logic or the first business sub-logic triggered in a loop is similar to this and will not be elaborated one by one.

[0050] In step 103, at least one second business sub-logic is remotely executed according to the execution of at least one first business sub-logic, wherein the second business sub-logic is a SaaS service logic. In this embodiment of the application, the association method between the remote execution of the second business sub-logic and the execution of the first business sub-logic is not limited, nor is the remote execution method of the second business sub-logic limited.

[0051] As for the association between the remote execution of the second business sub-logic and the execution of the first business sub-logic, it can be understood that the first business sub-logic and the second business sub-logic involved in the complete customized service have the restriction of being executed in a preset order, but considering the differences between synchronous execution and asynchronous execution, etc., the association between the first business sub-logic and the second business sub-logic that are executed successively may be different. For example, in the case of synchronous execution, the second business sub-logic needs to wait on the same timeline for the first business sub-logic to be executed, and then continue to execute the second business sub-logic. In the case of asynchronous execution, it no longer depends on the same timeline, but is implemented by allocating queues and processing the first business sub-logic and the second business sub-logic on different timelines through a polling system, which will not be described one by one here.

[0052] That is to say, according to the execution of at least one first business sub-logic, remotely executing at least one second business sub-logic can be implemented in an asynchronous manner in the following manner: according to the second event in the execution process of at least one first business sub-logic, triggering the local execution of at least one second business sub-logic associated with the second event. Alternatively, according to the execution of at least one first business sub-logic, remotely executing at least one second business sub-logic can also be implemented in a synchronous manner in the following manner: after the execution of at least one first business sub-logic is completed, remotely executing at least one second business sub-logic located after the currently executed at least one first business sub-logic in the preset order. Among them, the preset order is the order of mutual dependence between the first business sub-logic and the second business sub-logic in a complete business logic; the dependency relationship between the first business sub-logic and the second business sub-logic associated with the same second event is consistent with the preset order. For ease of understanding, an example description of a complete business logic, a first business sub-logic and a second business sub-logic and a preset order is provided. Assume that a certain business logic is to transcode the video content requested by the user and upload it to a specified location. At this time, the first business sub-logic and the second business sub-logic included in it may include: the first business sub-logic 1 for obtaining the video content from the corresponding server based on the Uniform Resource Locator (URL) carried in the request, the second business sub-logic 1 for video transcoding processing, and the first business sub-logic 2 for uploading the content to the specified location. Correspondingly, the preset order is the first sub-logic 1-the second business sub-logic 1-the first business sub-logic 2. In this order, the latter needs to depend on the execution result of the former. It should be noted that the above is only an example. There may be a situation where a first business sub-logic depends on multiple second business sub-logics, and / or a second business sub-logic depends on multiple first business sub-logics, and / or there are multiple parallel first business sub-logics and / or second business sub-logics, etc., which will not be repeated here.

[0053] As for the remote execution mode of the second business sub-logic, it can be understood that the second business sub-logic is a SaaS (Software as a Service) service, which is provided as a general service (or function). The second business sub-logic can be a series of edge-oriented serviceless computing such as edge KV, edge relational database, edge queue, etc., to cooperate with the first business sub-logic to provide integrated services. In particular, it can provide computing-intensive services to achieve more powerful application customization capabilities. However, the second business sub-logic will be subject to the development restrictions of the SaaS service provider and cannot be fully used. At this time, third-party SaaS services can be considered on the basis of the SaaS services provided by the CDN edge node to provide a more comprehensive SaaS service. Of course, third-party SaaS services can also be considered from the perspective of security and other aspects, and third-party SaaS services are not introduced. In other words, the remote execution of the second business sub-logic may involve at least one of the remote execution of local SaaS services and the remote execution of third-party SaaS services.

[0054] Wherein, in the case where the second business sub-logic includes a third-party SaaS service logic deployed on a third-party node, remote execution of at least one second business sub-logic can be achieved in the following manner: sending a second request to the third-party node to trigger the execution of at least one corresponding third-party SaaS service logic on the third-party node; receiving response data returned by the third-party node according to the second request. In other words, the third-party SaaS service is directly delivered to the third-party node through a request, and the resources used for remote execution are the resources of the third-party node. At the same time, the services that can be provided through the SaaS service are also expanded.

[0055] In the case where the second business sub-logic includes a local SaaS service logic, remote execution of at least one second business sub-logic can be achieved in the following ways: controlling the execution of at least one local SaaS service logic on the upper-level CDN node; and / or, through a locally deployed container engine, executing at least one local SaaS service logic in the form of a container image on the corresponding container server. In other words, the remote execution of the local SaaS service can utilize the resources of the CDN network itself, and it is also possible to consider providing the resources of additional container servers to assist in the remote execution of the local SaaS service. In this way, it is possible to utilize external diverse resources to help the CDN edge nodes better and more securely execute the corresponding business logic.

[0056] It should be noted that for different customized services, it may involve one second business sub-logic, but it may also involve multiple second business sub-logics. In the case of multiple second business sub-logics, it is understandable that these second business sub-logics may be executed in parallel, or linearly, or a combination of the above two methods, remotely executing one or more second business sub-logics, and the execution association between the remotely executed second business sub-logics is mainly determined by the customized business logic uploaded by the customer, and will not be repeated here.

[0057] Of course, the above is only an example of the remote execution method of the second business sub-logic. In some examples, other methods can be used to implement it, which will not be described here one by one.

[0058] It should be noted that Figure 2 The embodiment shown is only an example of a response method. In some embodiments, based on different customized business logics, customized business logic that does not involve general services may appear, that is, the response process of the corresponding first request only involves the execution of the first business sub-logic, and no longer needs to execute the second business sub-logic. This will not be described in detail here.

[0059] Furthermore, considering that some customized business sub-logics may still have some personalized and customized processing after calling the second business sub-logic, therefore, in some embodiments, such as Figure 4 As shown, the response method may further include the following steps:

[0060] Step 201: Receive a first request.

[0061] Step 202: triggering local execution of at least one first service sub-logic according to a first event in a process of responding to a first request.

[0062] Step 203: remotely execute at least one second business sub-logic according to the execution of at least one first business sub-logic, wherein the second business sub-logic is a SaaS service logic.

[0063] Step 204: Based on the execution of the at least one second service sub-logic, locally execute the corresponding at least one first service sub-logic again until the first service sub-logic and the second service sub-logic associated with the first request are both executed in a preset order.

[0064] Among them, the preset order is the order of mutual dependence between the first business sub-logic and the second business sub-logic in a complete business logic. The relevant content has been explained before and will not be repeated here.

[0065] That is to say, based on the foregoing embodiment, it further supports jumping to and continuing to execute the first business sub-logic that allows personalization and customization during the execution of the second business sub-logic, so that the CDN edge node can more flexibly support richer customized business requirements.

[0066] To facilitate better understanding of those skilled in the art Figure 4 The steps of the embodiment shown are explained below. Among them, steps 201 to 203 are substantially the same as steps 101 to 103 in the above embodiment, and the main difference is that step 204 is continued after step 203, and the same parts will not be described here.

[0067] In step 204, according to the execution of at least one second business sub-logic, the corresponding at least one first business sub-logic is executed again locally until the first business sub-logic and the second business sub-logic associated with the first request are both executed in a preset order. In other words, the business sub-logic involved in the complete customized service corresponding to the first request may involve multiple first business sub-logics and second business sub-logics, and the first business sub-logic and the second business sub-logic are implemented alternately until the entire customized service is completed and a complete response to the first request is achieved.

[0068] It should be noted that step 204 is substantially the same as the aforementioned step 103, the difference being that the executed business sub-logic is different from the business sub-logic serving as the execution basis. For example, the second business sub-logic jumps to the execution of the first business sub-logic, which also involves two implementation modes: synchronous and asynchronous. That is, in the case of synchronous execution, according to the execution of at least one second business sub-logic, the corresponding at least one first business sub-logic is executed again locally, which can be implemented in the following manner: after the execution of at least one second business sub-logic is completed, at least one first business sub-logic located after the currently executed at least one second business sub-logic in the preset order is locally executed. Alternatively, in the case of asynchronous execution, according to the execution of at least one second business sub-logic, the corresponding at least one first business sub-logic is executed again locally, which can also be implemented in the following manner: according to a third event in the execution process of at least one second business sub-logic, the execution of at least one first business sub-logic associated with the third event is triggered again; wherein, the dependency relationship between the second business sub-logic and the first business sub-logic associated with the same third event is consistent with the aforementioned preset order. At this time, correspondingly, until the first business sub-logic and the second business sub-logic associated with the first request are both executed in the preset order, it can be converted into: the second event no longer appears in the executed first business sub-logic (at this time, in the business logic branch where the first business sub-logic is located, the second business sub-logic triggered by the second event no longer appears, that is, after the current first business sub-logic is executed, there is no next second business sub-logic to be executed, and the branch ends), and the third event no longer appears in the executed second business sub-logic (at this time, in the business logic branch where the second business sub-logic is located, the first business sub-logic triggered by the third event no longer appears, that is, after the current second business sub-logic is executed, there is no next first business sub-logic to be executed, and the branch ends). I will not go into details here.

[0069] Therefore, based on Figure 4 In the embodiment shown, the following will be generated on the CDN edge node: Figure 5 That is, after the CDN edge node receives the first request, a first event will occur in the general request response process, thereby jumping to execute the first business sub-logic associated with the first event, and then, in the execution process of the first business sub-logic, it will jump to execute the second business sub-logic again, and then in the execution process of the second business sub-logic, it will jump to execute the first business sub-logic again... and so on, until the first business sub-logic and the second business sub-logic that need to be executed are completed, and the complete response to the first request through the customized business logic is completed.

[0070] It should be noted that Figure 5Only the execution examples of a single first business sub-logic and a single second business sub-logic are shown. In the application process, the execution of a first business sub-logic may actually trigger the execution of two or more second business sub-logics. These triggered second business sub-logics may be executed in parallel, or linearly, or partially in parallel, partially linearly, etc. In addition, the execution of a second business sub-logic does not necessarily follow the execution of another first business sub-logic, and the execution of the business logic may be stopped directly. Moreover, for multiple executed second business sub-logics, some of them may subsequently execute at least one corresponding first business sub-logic, and some may no longer trigger new first business sub-logics, etc., which will not be described one by one here.

[0071] It is understandable that the customized service associated with the first request may require content other than the first request as input. For example, when the customized service involves specified processing of the content requested by the first request, the content data requested by the first request is required as input. Of course, the customized service associated with the first request may also only require the information contained in the first request as input, such as the customized service only involves processing of users, clients, etc. Therefore, in the first business sub-logic (and / or second business sub-logic) contained in the customized service or before executing the first business sub-logic (and / or second business sub-logic), it may be necessary to obtain corresponding data from the local cache of the CDN edge node or externally to cooperate with the corresponding first business sub-logic (and / or second business sub-logic) for execution. Taking the case where the first event is the reception event of the first request and the customized logic involves the processing of data returned to the client as an example, before the local execution of the first business sub-logic is triggered according to the first event in step 102 (or step 202), it may also involve performing a cache hit detection in the local cache. If a hit occurs, the hit data is obtained. If a hit does not occur, the data is obtained by returning to the source or directly accessing the source station, and then the subsequent execution of the first business sub-logic (and / or the second business sub-logic) is coordinated based on the obtained data. Of course, the above-mentioned process of obtaining data may also be in the first business sub-logic (and / or the second business sub-logic), in which case it is not necessary to perform the above-mentioned process in the first business sub-logic. Figure 2 or Figure 4 The process shown adds additional steps, which will not be described here one by one.

[0072] To facilitate better understanding of those skilled in the art Figure 2 and Figure 4 The embodiment shown in the following will be Figure 4 Based on the embodiment shown, two examples are given for synchronous execution and asynchronous execution on CDN edge nodes. Figure 2The implementation of the illustrated embodiment, that is, the execution of the first business sub-logic after removing the second business sub-logic based on the following example, will not be further explained here.

[0073] In some embodiments, the first service sub-logic and the second service sub-logic are implemented in an asynchronous execution mode. In this case, the process of the response method is as follows: Figure 6 As shown, the following steps are included:

[0074] Step 301: Receive a first request.

[0075] Step 302: triggering local execution of at least one first service sub-logic according to a first event in a process of responding to a first request.

[0076] Step 303: According to a second event in the execution process of at least one first business sub-logic, trigger the local execution of at least one second business sub-logic associated with the second event.

[0077] Step 304: based on a third event in the execution process of at least one second business sub-logic, trigger the execution of at least one first business sub-logic associated with the third event again, until both the first business sub-logic and the second business sub-logic in a complete business logic are executed.

[0078] Among them, step 303 is to associate the first business sub-logic with the second business sub-logic that depends on the first business sub-logic through the second event; step 304 is to associate the second business sub-logic with the first business sub-logic that depends on the second business sub-logic through the third event. The above dependency relationship is consistent with the aforementioned preset order.

[0079] It should be noted that Figure 6 Steps 301 to 304 of the embodiment shown are similar to Figure 4 Steps 201 to 204 of the illustrated embodiment are substantially the same, the main difference being that, in the corresponding steps, the jump between the first business sub-logic and the second business sub-logic is triggered by an event, which will not be described one by one here.

[0080] It should also be noted that customized services can generally be regarded as general function parts and customized function parts, among which the general function parts can be pre-developed in the form of SaaS services and provided as existing services to customers who need customized services, that is, the second business sub-logic, and the parts that are different for customers can be implemented through the first business sub-logic part, that is, the first business sub-logic is a business logic with specific functions customized and developed for customers, so that the CDN edge node can support complex business logic customization in combination with external resources. As for the CDN node, after receiving the business logic corresponding to the customized service, it converts the complete business logic uploaded by the customer into the corresponding first business sub-logic and second business sub-logic, and associates the first business sub-logic and second business sub-logic with the corresponding triggers by setting triggers, and automatically provides the corresponding customized service after receiving the user request in the future, realizing service-free computing, thereby overcoming the management and operation of the CDN edge node server.

[0081] In some embodiments, the first service sub-logic and the second service sub-logic are implemented in an asynchronous execution mode. In this case, the process of the response method is as follows: Figure 7 As shown, the following steps are included:

[0082] Step 401: Receive a first request.

[0083] Step 402: triggering local execution of at least one first service sub-logic according to a first event in a process of responding to a first request.

[0084] Step 403: after at least one first service sub-logic is executed, remotely execute at least one second service sub-logic that is located after the at least one first service sub-logic that has been executed in a preset sequence.

[0085] Step 404: After at least one second service sub-logic is executed, locally execute at least one first service sub-logic that is located after the at least one second service sub-logic that has been executed in a preset sequence.

[0086] It should be noted that Figure 7 Steps 401 to 404 of the embodiment shown are similar to Figure 4 Steps 201 to 204 of the illustrated embodiment are substantially the same, with the main difference being that, in the corresponding steps, the jump between the first business sub-logic and the second business sub-logic is based on the same timeline, and after one is completed, the other continues to be executed on the same timeline, which will not be described one by one here.

[0087] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0088] Another aspect of the present application embodiment further provides a system, comprising: a plurality of CDN edge nodes, and each CDN edge node is as follows Figure 8 As shown, it includes the following modules:

[0089] The edge function calculation module 501 is configured to locally execute the first service sub-logic;

[0090] The SaaS service module 502 is connected to the edge function computing module 501 and is configured to remotely execute the second business sub-logic, wherein the second business sub-logic is the SaaS service logic;

[0091] The trigger module 503, the edge function computing module 501 and the SaaS service module 502 are configured to trigger the edge function computing module 501 to execute the corresponding first business sub-logic and / or trigger the SaaS service module 402 to execute the corresponding second business sub-logic when the corresponding event occurs.

[0092] Among them, the trigger module 503 is Figure 8 The corresponding dotted box is mainly to illustrate that the trigger module 503 is composed of a trigger that triggers the second business sub-logic associated with an event that occurs when the first business sub-logic is executed on the edge function computing module 501, and a trigger that triggers the first business sub-logic associated with an event that occurs when the second business sub-logic is executed on the SaaS service module 502, while the edge function computing module 501 and the SaaS service module 502 in the non-dotted box also participate in the formation of the trigger module 403. Figure 8 The dashed box of the trigger module in the subsequent figures has the same meaning, and will not be elaborated here or in the subsequent figures.

[0093] It is not difficult to find that this embodiment is a system embodiment corresponding to the method embodiment, and this embodiment can be implemented in conjunction with the method embodiment. The relevant technical details mentioned in the method embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the method embodiment.

[0094] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.

[0095] Based on the above embodiments, in order to remotely execute the second service sub-logic more safely and efficiently, in some embodiments, such as Fig. 9 As shown, the system further includes a container subsystem based on several CDN edge nodes, wherein the container subsystem is connected to the SaaS service module to support the SaaS service module to remotely execute the second business sub-logic in the container subsystem, and the container subsystem includes several container nodes, each container node is associated with a container engine deployed on at least two CDN edge nodes, and the container engines deployed on at least two CDN edge nodes are associated with different container servers.

[0096] That is to say, based on the CDN edge node, the system also deploys a distributed container subsystem, so that the container subsystem can better support the CDN edge node to remotely execute the second sub-business logic without causing execution failure or requiring a long time to complete execution due to transmission and other problems.

[0097] Based on the above embodiments, in order to more comprehensively support business logic, in some embodiments, such as Fig.10 As shown, the system, based on several CDN edge nodes, also includes a third-party SaaS service subsystem, which is connected to the SaaS service module to support the SaaS service module to remotely execute the second business sub-logic in the third-party SaaS service subsystem.

[0098] It should be noted that Fig. 9 The container subsystem shown and Fig.10 The third-party SaaS service subsystem shown can also be implemented simultaneously in the same system.

[0099] Among them, in the above-mentioned system embodiment, the edge function calculation module provides edge-oriented serviceless function computing capabilities, and CDN customers use functions to obtain the ability to customize their needs. The edge function is deployed on the CDN edge node resources, which can make full use of the distributed resource advantages of CDN and provide nearby access. The SaaS service module provides a generalized SaaS service for the edge. CDN customers are allowed to integrate SaaS services through edge functions to expand the capabilities of the edge functions themselves. At the same time, the SaaS service module allows customization through edge functions. The SaaS service module can combine CDN resources or external resources to remotely execute the second business sub-logic. The trigger module provides an event-driven mechanism that automatically triggers specific business logic when a specific event occurs. Among them, the trigger set by the trigger module can be an external component such as CDN, or an edge function calculation module and a SaaS service module.

[0100] In this way, taking image processing as an example, after the client uploads the complete business logic corresponding to the customized service, the CDN edge node can configure the trigger related to the first event so that after the first event is sent, the first business sub-logic associated with the first event will be automatically triggered. Therefore, after receiving the first request, the CDN edge node will automatically trigger the edge function execution module to execute the associated first business sub-logic based on the first event, such as: the function is responsible for parsing the image processing parameters of the request URL, and calling the corresponding second sub-business logic through the SaaS service module, such as: SaaS service for image processing. Then, the SaaS service simulates the process of remotely executing the second business sub-logic, generating a specific trigger event, and triggering a specific business logic function in the edge function calculation module. For example: after the image processing service processes the image, it generates a processing completion event and calls a specific edge function to store the processed image in the cloud storage. Finally, the response to the first request is completed.

[0101] In this process, the edge node resources of CDN are reused, and service-free computing is deployed at the edge. And because of the use of edge nearby computing similar to CDN, the computing latency is greatly reduced. Compared with the existing general centralized service-free computing solutions, the embodiments of the present application provide a distributed service-free computing solution in the form of triggers using distributed CDN edge nodes, which is superior to the centralized (or centralized) service-free computing solution in terms of security, scalability, reliability, and fault tolerance. And the service-free computing based on container technology and function computing technology allows the business logic of CDN customers to be safely executed at the edge of CDN, which greatly satisfies the diverse customization of CDN customers. At the same time, by cooperating with the corresponding SaaS service module and the third-party SaaS service subsystem, it allows the integration of various SaaS services, greatly expanding the ability to customize applications.

[0102] Another aspect of the present application embodiment further provides an electronic device, such as Fig.11 As shown, it includes: at least one processor 1101; and a memory 1102 that is communicatively connected to the at least one processor 1101; wherein the memory 1102 stores instructions that can be executed by the at least one processor 1101, and the instructions are executed by the at least one processor 1101 so that the at least one processor 1101 can execute the response method described in any of the above method embodiments.

[0103] Among them, the memory 1102 and the processor 1101 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 1101 and the memory 1102 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art, and therefore, are not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 1101 is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor 1101.

[0104] The processor 1101 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 1102 can be used to store data used by the processor 1101 when performing operations.

[0105] Another aspect of the present application embodiment further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiment is implemented.

[0106] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0107] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A response method, characterized in that: Applied to CDN edge nodes, the method includes: receiving a first request sent; triggering local execution of at least one of the first business sub-logics according to a first event in a process of responding to the first request; According to the execution of at least one of the first business sub-logics, at least one second business sub-logic is remotely executed, wherein the second business sub-logic is a SaaS service logic.

2. The response method according to claim 1, characterized in that: The remotely executing at least one second service sub-logic according to the execution of at least one of the first service sub-logic comprises: According to a second event in the execution process of at least one of the first business sub-logics, triggering local execution of at least one of the second business sub-logics associated with the second event; or, After at least one of the first service sub-logics is executed, remotely executing at least one of the second service sub-logics that is located after at least one of the first service sub-logics that has been executed in a preset sequence; Among them, the preset order is the order of mutual dependence between the first business sub-logic and the second business sub-logic in a complete business logic; the dependency relationship between the first business sub-logic and the second business sub-logic associated with the same second event is consistent with the preset order.

3. The response method according to claim 1, characterized in that: After remotely executing at least one second service sub-logic according to the execution of at least one of the first service sub-logic, the method further includes: According to the execution of at least one of the second business sub-logics, locally execute again the corresponding at least one of the first business sub-logics until both the first business sub-logics and the second business sub-logics associated with the first request are executed in a preset order; The preset order is the order of mutual dependence between the first business sub-logic and the second business sub-logic in a complete business logic.

4. The response method according to claim 3, characterized in that: The locally executing again the corresponding at least one of the first business sub-logics according to the execution of at least one of the second business sub-logics includes: After at least one of the second service sub-logics is executed, locally executing at least one of the first service sub-logics that is located after at least one of the second service sub-logics that has been executed in the preset sequence; or, According to a third event in the execution process of at least one of the second business sub-logics, triggering again the execution of at least one of the first business sub-logics associated with the third event; Among them, the dependency relationship between the second business sub-logic and the first business sub-logic associated with the same third event is consistent with the preset order.

5. The response method according to any one of claims 1 to 4, characterized in that: In the case where the second business sub-logic includes a third-party SaaS service logic deployed on a third-party node, the remotely executing at least one second business sub-logic includes: Sending a second request to the third-party node to trigger execution of at least one corresponding third-party SaaS service logic on the third-party node; Receive response data returned by the third-party node according to the second request.

6. The response method according to any one of claims 1 to 4, characterized in that: In the case where the second business sub-logic includes a local SaaS service logic, the remotely executing at least one second business sub-logic includes: Controlling execution of at least one of the local SaaS service logics on the upper-level CDN node; and / or, At least one of the local SaaS service logics is executed in the form of a container image on a corresponding container server through a locally deployed container engine.

7. A system, characterized in that: It includes several CDN edge nodes, and each of the CDN edge nodes includes: An edge function computing module, configured to locally execute a first business sub-logic; A SaaS service module, connected to the edge function computing module, and configured to remotely execute a second business sub-logic, wherein the second business sub-logic is a SaaS service logic; The trigger module, the edge function computing module and the SaaS service module are configured to trigger the edge function computing module to execute the corresponding first business sub-logic and / or trigger the SaaS service module to execute the corresponding second business sub-logic when a corresponding event occurs.

8. The system according to claim 7, characterized in that It also includes a container subsystem, which is connected to the SaaS service module to support the SaaS service module to remotely execute the second business sub-logic in the container subsystem, and the container subsystem includes a plurality of container nodes, each of which is associated with a container engine deployed on at least two of the CDN edge nodes, and at least two of the container engines deployed on the CDN edge nodes are associated with different container servers.

9. The system according to claim 7 or 8, characterized in that: It also includes a third-party SaaS service subsystem, which is connected to the SaaS service module to support the SaaS service module to remotely execute the second business sub-logic in the third-party SaaS service subsystem.

10. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the response method according to any one of claims 1 to 6.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the response method according to any one of claims 1 to 6 is implemented.