CN115080063A - Service processing method based on edge calculation, edge device and readable storage medium - Google Patents

Service processing method based on edge calculation, edge device and readable storage medium Download PDF

Info

Publication number
CN115080063A
CN115080063A CN202210693371.7A CN202210693371A CN115080063A CN 115080063 A CN115080063 A CN 115080063A CN 202210693371 A CN202210693371 A CN 202210693371A CN 115080063 A CN115080063 A CN 115080063A
Authority
CN
China
Prior art keywords
service
content
target service
faas
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210693371.7A
Other languages
Chinese (zh)
Inventor
邹亚
侯鹏
孙景欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210693371.7A priority Critical patent/CN115080063A/en
Publication of CN115080063A publication Critical patent/CN115080063A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure relates to a service processing method based on edge computing, an edge device and a readable storage medium, the method is implemented by an edge device deployed on a node of a content distribution network, the method includes: receiving a service request for a target service sent by a user terminal; acquiring the service content of the target service from the cache of the content distribution network node according to the service request; the service content is obtained by the edge equipment requesting a FaaS source station and stored in the cache; and returning the service content to the user terminal for response.

Description

基于边缘计算的业务处理方法、边缘设备及可读存储介质Edge computing-based business processing method, edge device and readable storage medium

技术领域technical field

本公开实施例涉及计算机技术领域,更具体地,涉及基于边缘计算的业务处理方法、边缘设备及计算机可读存储介质。The embodiments of the present disclosure relate to the field of computer technologies, and more particularly, to a business processing method based on edge computing, an edge device, and a computer-readable storage medium.

背景技术Background technique

函数即服务(Function as a Service,FaaS),也被称之为功能即服务,FaaS是包含代码片段及代码片段所依赖配置的函数包,采用以函数(Function)为中心组织代码的云上部署方式,属于一种无服务器(Serverless)的解决方案。由于FaaS在无事件时可以缩容到零,可以降低成本,而且研发人员在进行业务开发时,只需关注业务代码逻辑,无需关注服务器资源等基础设施,因此,越来越多的业务都开始基于FaaS实现。FaaS虽然具有很多优势,但却存在不稳定性因素,然而,不稳定就意味着业务可能处于不可用状态,影响用户使用,因此,有必要提供一种能够提高FaaS业务(FaaS业务也即基于FaaS运行的业务)的稳定性的技术方案。Function as a Service (FaaS), also known as function as a service, FaaS is a function package that contains code snippets and the configuration that the code snippets depend on. It belongs to a serverless solution. Since FaaS can be scaled down to zero in the absence of incidents, costs can be reduced, and R&D personnel only need to focus on business code logic when conducting business development, and do not need to pay attention to infrastructure such as server resources. Therefore, more and more businesses are starting to Based on FaaS implementation. Although FaaS has many advantages, it has unstable factors. However, instability means that the business may be in an unavailable state and affect the use of users. Therefore, it is necessary to provide a service that can improve the FaaS business (FaaS business is also based on FaaS). A technical solution for the stability of the running business).

发明内容SUMMARY OF THE INVENTION

本公开实施例的一个目的是提供一种能够提高FaaS业务的稳定性的技术方案。An object of the embodiments of the present disclosure is to provide a technical solution capable of improving the stability of a FaaS service.

根据本公开的第一方面,提供了一种基于边缘计算的业务处理方法,其特征在于,由部署在内容分发网络节点上的边缘设备实施,所述方法包括:According to a first aspect of the present disclosure, there is provided a service processing method based on edge computing, characterized in that it is implemented by an edge device deployed on a content distribution network node, and the method includes:

接收用户终端发送的对于目标业务的业务请求;Receive the service request for the target service sent by the user terminal;

根据所述业务请求,从所述内容分发网络节点的缓存中获取所述目标业务的业务内容;其中,所述业务内容由所述边缘设备请求FaaS源站获得并保存在所述缓存中;According to the service request, the service content of the target service is obtained from the cache of the content distribution network node; wherein, the service content is obtained by the edge device requesting a FaaS origin station and stored in the cache;

将所述业务内容返回至所述用户终端进行响应。The service content is returned to the user terminal for response.

可选地,在所述根据所述业务请求,从所述内容分发网络节点的缓存中获取所述目标业务的业务内容之前,所述方法还包括:Optionally, before acquiring the service content of the target service from the cache of the content distribution network node according to the service request, the method further includes:

根据设定事件中的任一事件,从所述FaaS源站获取所述目标业务的业务内容;Acquire the service content of the target service from the FaaS source site according to any event in the set events;

根据获取到的所述目标业务的业务内容更新所述缓存。The cache is updated according to the acquired service content of the target service.

可选地,所述设定事件包括接收到业务平台的对于所述目标业务的模拟请求,所述根据设定事件中的任一事件,从所述Faas源站获取所述目标业务的业务内容,包括:Optionally, the set event includes receiving a simulation request for the target service from the business platform, and according to any event in the set event, obtain the service content of the target service from the Faas source station ,include:

在接收到所述模拟请求的情况下,确定所述缓存中是否存在所述目标业务的业务内容;In the case of receiving the simulation request, determining whether the service content of the target service exists in the cache;

在所述缓存中不存在所述目标业务的业务内容的情况下,从所述FaaS源站获取所述目标业务的业务内容。If the service content of the target service does not exist in the cache, obtain the service content of the target service from the FaaS origin site.

可选地,所述设定事件包括当前时间到达设定的更新时间,所述根据设定事件中的任一事件,从所述Faas源站获取所述目标业务的业务内容,包括:Optionally, the set event includes that the current time reaches the set update time, and according to any event in the set event, the business content of the target service is obtained from the Faas source station, including:

获取所述目标业务的更新周期;obtaining the update cycle of the target service;

根据所述更新周期,检测当前时间是否到达更新时间;According to the update period, detect whether the current time reaches the update time;

在当前时间到达更新时间的情况下,从所述Faas源站获取所述目标业务的业务内容。When the current time reaches the update time, the service content of the target service is acquired from the Faas source station.

可选地,所述获取对应于所述目标业务的更新周期之前,所述包括:Optionally, before the acquiring the update period corresponding to the target service, the step includes:

从业务平台拉取所述目标业务的配置数据;其中,所述配置数据包括所述目标业务的更新周期;Pull the configuration data of the target service from the service platform; wherein, the configuration data includes the update period of the target service;

将所述配置数据保存在本地。Save the configuration data locally.

可选地,在所述接收用户终端发送的业务请求之后,所述方法还包括:Optionally, after receiving the service request sent by the user terminal, the method further includes:

获取所述边缘设备的工作状态;Obtain the working status of the edge device;

在所述工作状态为正常状态的情况下,执行所述根据所述目标业务请求,从边缘设备的缓存中获取所述目标业务的业务内容的步骤;In the case that the working state is a normal state, executing the step of obtaining the service content of the target service from the cache of the edge device according to the target service request;

在所述工作状态为异常状态的情况下,配置所述Faas源站对所述业务请求进行响应。When the working state is an abnormal state, configure the Faas origin station to respond to the service request.

可选地,在接收用户终端发送的业务请求之后,所述方法还包括:Optionally, after receiving the service request sent by the user terminal, the method further includes:

根据所述业务请求,更新所述目标业务的状态数据;According to the service request, update the status data of the target service;

将所述状态数据发送至业务平台进行目标业务的状态监测。The state data is sent to the service platform for state monitoring of the target service.

可选地,所述边缘设备为基于JavaScript代码运行环境或者基于WebAssembly代码运行环境的设备。Optionally, the edge device is a device based on a JavaScript code running environment or a WebAssembly code running environment.

根据本公开的第二方面,还提供了一种边缘设备,该边缘设备包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于在所述计算机程序的控制下,执行根据本公开的第一方面所述的业务处理方法。According to a second aspect of the present disclosure, there is also provided an edge device, the edge device includes a memory and a processor, the memory is used for storing a computer program, and the processor is used for executing a computer program according to the control of the computer program. The service processing method described in the first aspect of the present disclosure.

根据本公开的第三方面,还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序在被处理器执行时实现根据本公开的第一方面所述的业务处理方法。According to a third aspect of the present disclosure, there is also provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implements the method according to the first aspect of the present disclosure. The business processing method described above.

本公开实施例提供的业务处理方法,其在FaaS函数服务之前增加了通过部署在内容分发网络(Content Delivery Network,CDN)节点上的边缘设备进行的业务处理,边缘设备可以缓存FaaS函数服务的业务内容,并基于缓存的业务内容对用户发出的业务请求进行响应,这样,即使在FaaS函数服务异常或者FaaS环境异常的情况下,用户的业务请求也能得以响应,提高了业务稳定性。The service processing method provided by the embodiments of the present disclosure adds service processing performed by edge devices deployed on content delivery network (Content Delivery Network, CDN) nodes before the FaaS function service, and the edge device can cache the service of the FaaS function service content, and respond to service requests sent by users based on the cached service content. In this way, even in the case of abnormal FaaS function services or abnormal FaaS environments, users' service requests can be responded to, which improves service stability.

通过以下参照附图对本说明书的示例性实施例的详细描述,本说明书的实施例的特征及其优点将会变得清楚。Features and advantages of the embodiments of the present specification will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings.

附图说明Description of drawings

被结合在说明书中并构成说明书的一部分的附图示出了本说明书的实施例,并且连同其说明一起用于解释本说明书实施例的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the principles of the embodiments of the specification.

图1示出了可以应用根据本公开实施例的业务处理方法的一种业务系统的组成结构示意图;FIG. 1 shows a schematic diagram of the composition and structure of a business system to which the business processing method according to an embodiment of the present disclosure can be applied;

图2示出了根据一些实施例的边缘设备的硬件结构示意图;FIG. 2 shows a schematic diagram of a hardware structure of an edge device according to some embodiments;

图3示出了根据一些实施例的业务处理方法的流程示意图;FIG. 3 shows a schematic flowchart of a service processing method according to some embodiments;

图4示出了根据一些实施例的业务处理交互流程示意图;FIG. 4 shows a schematic diagram of a business processing interaction flow according to some embodiments;

图5示出了根据一些实施例的缓存更新的流程示意图。FIG. 5 shows a schematic flowchart of cache update according to some embodiments.

具体实施方式Detailed ways

现在将参照附图来详细描述本说明书的各种示例性实施例。Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.

以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本说明书实施例及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments of the specification and its application or use.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further discussion in subsequent figures.

需要说明的是,本公开中所有获取信号、信息或数据的动作都是在遵照所在地国家相应的数据保护法规政策的前提下,并获得由相应设备所有者给予授权的情况下进行的。It should be noted that all the actions of obtaining signals, information or data in this disclosure are carried out under the premise of complying with the corresponding data protection regulations and policies of the local country and authorized by the corresponding device owner.

本公开实施例涉及基于FaaS运行的业务,在本文中称之为FaaS业务,基于FaaS运行的业务可以是任意的通过用户终端为用户提供服务、并与用户交互的业务,例如,该业务可以是出行应用的业务,也可以是商城应用的业务等等,在此不做限定。The embodiments of the present disclosure relate to services running based on FaaS, which are referred to as FaaS services herein. The services running based on FaaS can be any services that provide services to users and interact with users through user terminals. For example, the services can be The business of the travel application can also be the business of the mall application, etc., which is not limited here.

FaaS架构虽然存在很多的优势,包括开发成本低和运行成本低等,但却存在不稳定因素,这会导致FaaS业务也会不稳定,进而使得FaaS业务会出现不可用状态,影响用户体验。Although the FaaS architecture has many advantages, including low development cost and low operating cost, there are unstable factors, which will lead to unstable FaaS business, which will make the FaaS business unavailable and affect the user experience.

为了解决FaaS业务不稳定的问题,可以在FaaS业务服务前单独部署、并维护一套前置服务,进行提高稳定性的兜底服务。这种方案由于需要单独部署服务器来实现该前置服务,因此,仍然存在无法预期的不稳定性因素,而且这种方案还存在运维成本高、会造成资源浪费等问题,这从整个业务系统的角度看,FaaS架构的优势反而无法得以体现。In order to solve the problem of unstable FaaS business, you can deploy and maintain a set of front-end services before the FaaS business service to provide a bottom-up service that improves stability. Since this solution needs to deploy a separate server to realize the pre-service, there are still unpredictable instability factors, and this solution also has problems such as high operation and maintenance costs, waste of resources, etc., which affects the entire business system. From this perspective, the advantages of the FaaS architecture cannot be reflected.

为了有效提高FaaS业务的稳定性,又使得FaaS架构的优势能够在整个业务系统上得以体现,发明人在本公开中提出了基于边缘计算进行业务处理,以提高FaaS业务稳定性的技术方案。In order to effectively improve the stability of the FaaS business and enable the advantages of the FaaS architecture to be reflected in the entire business system, the inventor proposes a technical solution for business processing based on edge computing to improve the stability of the FaaS business in this disclosure.

图1为可以应用根据本公开实施例的业务处理方法的业务系统的组成结构示意图。FIG. 1 is a schematic diagram showing the composition and structure of a service system to which a service processing method according to an embodiment of the present disclosure can be applied.

如图1所示,本公开实施例的业务系统100包括用户终端110、内容分发网络(Content Delivery Network,CDN)节点120、FaaS源站130、业务平台140,用于实施本公开实施例的业务处理方法的边缘设备121就部署在CDN节点120上,由于CDN节点120具有全球部署的特点,因此,用于实现该业务处理方法的程序一经上传至CDN节点120的边缘设备121,便可完成全球部署,在全球执行。As shown in FIG. 1 , the service system 100 according to the embodiment of the present disclosure includes a user terminal 110 , a content delivery network (CDN) node 120 , a FaaS origin site 130 , and a service platform 140 , which are used to implement the service of the embodiment of the present disclosure. The edge device 121 of the processing method is deployed on the CDN node 120. Since the CDN node 120 has the characteristics of global deployment, once the program for implementing the service processing method is uploaded to the edge device 121 of the CDN node 120, the global deployment can be completed. Deploy, execute globally.

在业务系统100中,用户终端110上安装并运行有目标应用的客户端,业务平台140通过目标应用的客户端将目标应用的各项业务呈现给用户,以为用户提供服务。对于目标应用的客户端,每个客户端页面都可以看作是一个业务,不同客户端页面对应不同的业务,以目标应用为出行应用为例,租车页面是进行租车的业务,而结算页面则是另外的结算业务。用户终端100可以根据需要,通过客户端页面提供的控件发出业务请求,也可以称之为页面请求。In the service system 100, a client of the target application is installed and running on the user terminal 110, and the service platform 140 presents various services of the target application to the user through the client of the target application to provide services for the user. For the client of the target application, each client page can be regarded as a service, and different client pages correspond to different services. Taking the target application as a travel application as an example, the car rental page is the business of car rental, and the settlement page is the business of car rental. It is another settlement business. The user terminal 100 may issue a service request through the controls provided on the client page as required, which may also be referred to as a page request.

FaaS源站130用于调用并执行实现业务功能的FaaS函数,以响应于用户发出的业务请求,返回相应的业务内容。The FaaS source station 130 is configured to invoke and execute the FaaS function implementing the service function, so as to return the corresponding service content in response to the service request sent by the user.

CDN节点120也可以理解为是边缘服务器,具有全球部署的特点,因此,通过部署在CDN节点120上的边缘设备121实施本实施例的业务处理方法,能够基于用户位置就近提供服务,提升业务性能。The CDN node 120 can also be understood as an edge server, which has the characteristics of global deployment. Therefore, implementing the service processing method of this embodiment through the edge device 121 deployed on the CDN node 120 can provide services based on the user's location and improve service performance. .

边缘设备121即为用于运行实现本公开实施例的业务处理方法的边缘程序的设备,可以认为是一种网关设备。The edge device 121 is a device for running an edge program for implementing the service processing method of the embodiment of the present disclosure, and may be regarded as a gateway device.

业务平台140是业务人员进行系统维护的平台,可以包括业务人员的终端设备和进行业务管理的服务器,该服务器例如是数据库服务器等。The business platform 140 is a platform for business personnel to maintain the system, and may include terminal equipment of the business personnel and a server for business management, such as a database server and the like.

用户终端110和业务平台140均可以与CDN节点120和FaaS源站130通信连接,CDN节点120还可以与FaaS源站130通信连接。用户终端110可以向CDN节点120的边缘设备121发出业务请求,边缘设备121基于缓存在CDN节点120的业务内容进行响应。CDN节点120可以访问FaaS源站获取业务内容,以进行业务内容的缓存及缓存更新。业务人员可以通过业务平台140进行运行配置,以供边缘设备121拉取。Both the user terminal 110 and the service platform 140 may be in communication connection with the CDN node 120 and the FaaS origin site 130 , and the CDN node 120 may also be in communication connection with the FaaS origin site 130 . The user terminal 110 may send a service request to the edge device 121 of the CDN node 120 , and the edge device 121 responds based on the service content cached in the CDN node 120 . The CDN node 120 can access the FaaS origin site to obtain service content, so as to cache and update the service content. The business personnel can configure the operation through the business platform 140 for the edge device 121 to pull.

用户终端110例如是手机、电脑、可穿戴设备等终端设备,在此不做限定。The user terminal 110 is, for example, a terminal device such as a mobile phone, a computer, and a wearable device, which is not limited herein.

如图1所示,用户终端110可以包括处理器1101、存储器1102、接口装置1103、通信装置1104、输出装置1105、输入装置1106等等。As shown in FIG. 1, the user terminal 110 may include a processor 1101, a memory 1102, an interface device 1103, a communication device 1104, an output device 1105, an input device 1106, and the like.

处理器1101用于执行计算机程序,该计算机程序可以采用比如x86、Arm、RISC、MIPS、SSE等架构的指令集编写。存储器1102例如包括ROM(只读存储器)、RAM(随机存取存储器)、诸如硬盘的非易失性存储器等。接口装置1103例如包括USB接口、耳机接口等。通信装置1104例如能够进行有线或无线通信,通信装置1105可以包括至少一种短距离通信模块,例如是基于Hilink协议、WiFi(IEEE 802.11协议)、Mesh、蓝牙、ZigBee、Thread、Z-Wave、NFC、UWB、LiFi等短距离无线通信协议进行短距离无线通信的任意模块,通信装置1104也可以包括远程通信模块,例如是进行WLAN、GPRS、2G/3G/4G/5G远程通信的任意模块。输出装置1105例如可以包括液晶显示屏、触摸显示屏、扬声器等。输入装置1106例如可以包括触摸屏、键盘、麦克风等。The processor 1101 is used to execute a computer program, and the computer program can be written using an instruction set of architectures such as x86, Arm, RISC, MIPS, SSE, and the like. The memory 1102 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1103 includes, for example, a USB interface, an earphone interface, and the like. The communication device 1104 is capable of, for example, wired or wireless communication, and the communication device 1105 may include at least one short-range communication module, for example, based on Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC , UWB, LiFi and other short-range wireless communication protocols for short-range wireless communication. The communication device 1104 may also include a long-distance communication module, such as any module for WLAN, GPRS, 2G/3G/4G/5G long-distance communication. The output device 1105 may include, for example, a liquid crystal display, a touch display, a speaker, and the like. The input device 1106 may include, for example, a touch screen, a keyboard, a microphone, and the like.

本实施例中,用户终端110的存储器1102用于存储计算机程序,该计算机程序用于控制处理器1101进行操作,以控制用户终端110运行以上目标应用的客户端。In this embodiment, the memory 1102 of the user terminal 110 is used to store a computer program, and the computer program is used to control the processor 1101 to operate, so as to control the user terminal 110 to run the client of the above target application.

FaaS源站130在被事件触发时运行在云服务器上。The FaaS origin 130 runs on a cloud server when triggered by an event.

如图2所示,边缘设备121包括处理器1211和存储器1212,处理器1101用于执行计算机程序,该计算机程序可以采用JavaScript、WebAssembly等架构的指令集编写。存储器1102例如包括ROM(只读存储器)、RAM(随机存取存储器)、诸如硬盘的非易失性存储器等。As shown in FIG. 2 , the edge device 121 includes a processor 1211 and a memory 1212. The processor 1101 is configured to execute a computer program, and the computer program can be written using an instruction set of a JavaScript, WebAssembly and other architectures. The memory 1102 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a nonvolatile memory such as a hard disk, and the like.

本实施例中,边缘设备121的存储器1212用于存储计算机程序,该计算机程序用于控制处理器1211进行操作,以执行根据本公开实施例的业务处理方法。In this embodiment, the memory 1212 of the edge device 121 is used to store a computer program, and the computer program is used to control the processor 1211 to operate, so as to execute the service processing method according to the embodiment of the present disclosure.

应当理解的是,尽管图1仅示出一个用户终端110,一个CDN节点120,但不意味着限制各自的数量,该业务系统可以包含多个用户终端110、多个CDN节点120。It should be understood that although FIG. 1 only shows one user terminal 110 and one CDN node 120 , it does not mean to limit the respective numbers, and the service system may include multiple user terminals 110 and multiple CDN nodes 120 .

接下来以图1所示的业务系统为例,说明由边缘设备121实施的基于边缘计算的业务处理方法,图3示出了根据本公开实施例的基于边缘计算的业务处理方法的流程示意图,图4示出了根据本公开实施例的业务处理交互流程示意图。如图3所示,本实施例的业务处理方法可以包括如下步骤S310~S330:Next, taking the service system shown in FIG. 1 as an example, the edge computing-based service processing method implemented by the edge device 121 is described. FIG. 3 shows a schematic flowchart of the edge computing-based service processing method according to an embodiment of the present disclosure. FIG. 4 shows a schematic diagram of a service processing interaction flow according to an embodiment of the present disclosure. As shown in FIG. 3 , the service processing method of this embodiment may include the following steps S310-S330:

步骤S310,接收用户终端发送的对于目标业务的业务请求。Step S310: Receive a service request for the target service sent by the user terminal.

用户可以通过用户终端110的输入装置,在目标应用的客户端页面上触发对于目标业务的业务请求,其中,该客户端页面与目标业务相对应,该客户端页面可以是客户端的任意页面,对应地,目标业务可以是该目标应用的任意业务,因此,该业务请求也可以称之为页面请求。The user can trigger a service request for the target service on the client page of the target application through the input device of the user terminal 110, wherein the client page corresponds to the target service, and the client page can be any page of the client, corresponding to The target service can be any service of the target application, therefore, the service request can also be called a page request.

用户终端110发出的业务请求会先到达域名服务器(Domain Name Server,DNS),域名服务器对该业务请求进行域名解析,基于就近服务的原则,解析到距离该用户终端110位置最近的CDN节点120,进而将该业务请求发送至该位置最近的CDN节点120,以由部署在该CDN节点120上的边缘设备121处理该业务请求,完成如图4所示的,用户终端110将业务请求发送至边缘节点121的步骤,这能够降低传输损耗,提高业务性能。The service request sent by the user terminal 110 will first arrive at a domain name server (Domain Name Server, DNS), and the domain name server performs domain name resolution on the service request, and resolves to the CDN node 120 closest to the location of the user terminal 110 based on the principle of nearest service, Then, the service request is sent to the nearest CDN node 120, so that the service request is processed by the edge device 121 deployed on the CDN node 120. As shown in FIG. 4, the user terminal 110 sends the service request to the edge step of node 121, which can reduce transmission loss and improve service performance.

步骤S320,根据接收到的业务请求,从边缘设备121所在CDN节点的缓存中获取目标业务的业务内容。Step S320, according to the received service request, obtain the service content of the target service from the cache of the CDN node where the edge device 121 is located.

本实施例中,如图1所示,边缘设备121在接收到来自用户终端110的业务请求后,将根据该业务请求,从所在CDN节点120的缓存中,获取对应于该业务请求的目标业务的业务内容。边缘设备121可以通过所在CDN节点120的CDN网关访问所在CDN节点120的缓存,并从缓存获取对应于该目标业务的业务内容;也可以直接访问所在CDN节点120的缓存,以获取所需的业务内容,在此不做限定。In this embodiment, as shown in FIG. 1 , after receiving the service request from the user terminal 110, the edge device 121 will, according to the service request, obtain the target service corresponding to the service request from the cache of the CDN node 120 where it is located. business content. The edge device 121 can access the cache of the CDN node 120 where it is located through the CDN gateway of the CDN node 120 where it is located, and obtain the service content corresponding to the target service from the cache; it can also directly access the cache of the CDN node 120 where it is located to obtain the required service. The content is not limited here.

本实施例中,缓存中的对应于该业务请求的目标业务的业务内容,如图4所示,由该边缘设备121请求FaaS源站130获得并保存在缓存中。边缘设备121可以基于业务平台140发送的业务请求,本公开将业务平台140发送的业务请求称之为模拟请求,也即为模拟用户发送的业务请求,访问FaaS源站130获取该业务内容保存在所在CDN节点120的缓存中,也可以基于设定的更新周期,定时访问FaaS源站130获取最新的业务内容,以更新缓存中的相应内容,实现缓存的更新。边缘设备121在访问FaaS源站130时,会触发FaaS源站130从容器中拉取函数以产生并执行函数实例,进而得到相应的业务内容返回至边缘设备121。In this embodiment, the service content in the cache corresponding to the target service requested by the service, as shown in FIG. 4 , is obtained and stored in the cache by the edge device 121 requesting the FaaS origin station 130 . The edge device 121 can be based on the service request sent by the service platform 140. In this disclosure, the service request sent by the service platform 140 is called a simulated request, that is, a service request sent by a simulated user. Access the FaaS source station 130 to obtain the service content and save it in the In the cache of the CDN node 120, based on the set update period, the FaaS origin site 130 may be accessed regularly to obtain the latest service content, so as to update the corresponding content in the cache, so as to realize the update of the cache. When the edge device 121 accesses the FaaS source station 130 , it will trigger the FaaS source station 130 to pull the function from the container to generate and execute the function instance, and then obtain the corresponding service content and return it to the edge device 121 .

步骤S330,将业务内容返回至所述用户终端进行响应。Step S330, returning the service content to the user terminal for response.

如图1和图4所示,边缘设备121在从边缘设备121所在CDN节点的缓存中获取到目标业务的业务内容后,将获取到的业务内容返回至用户终端110进行响应。As shown in FIG. 1 and FIG. 4 , after obtaining the service content of the target service from the cache of the CDN node where the edge device 121 is located, the edge device 121 returns the obtained service content to the user terminal 110 for response.

用户终端110在接收到该业务内容后,会响应于用户的业务请求,进行业务内容的显示。After receiving the service content, the user terminal 110 will display the service content in response to the user's service request.

如以上步骤S310~S330,根据本实施例的一个方面,本实施例的业务处理方法由部署在CDN节点120上的边缘设备121实现,属于一种边缘计算,边缘设备121可以直接基于缓存服务来响应用户终端110发送的业务请求,因此,业务系统100可以在FaaS函数异常或者FaaS环境异常的情况下,基于CDN节点120的缓存服务作为业务兜底,避免业务出现不可用状态,进而提高FaaS业务的稳定性。As shown in the above steps S310-S330, according to an aspect of this embodiment, the service processing method of this embodiment is implemented by the edge device 121 deployed on the CDN node 120, which belongs to a kind of edge computing, and the edge device 121 can directly In response to the service request sent by the user terminal 110, the service system 100 can use the cache service based on the CDN node 120 as the service bottom line when the FaaS function is abnormal or the FaaS environment is abnormal, so as to avoid the service from being unavailable, thereby improving the serviceability of the FaaS service. stability.

根据本实施例的另一方面,业务系统100中的边缘设备121和FaaS源站服务属于不同的体系,二者分属于不同的运营商,因此,边缘设备121与FaaS源站130基本不会出现同时崩溃异常的情况,可以作为FaaS源站130的补充,进而提高业务系统100的稳定性,也即提高FaaS业务的稳定性。According to another aspect of this embodiment, the edge device 121 and the FaaS origin service in the service system 100 belong to different systems and belong to different operators. Therefore, the edge device 121 and the FaaS origin 130 basically do not appear. At the same time, the abnormal crash can be used as a supplement to the FaaS origin site 130, thereby improving the stability of the service system 100, that is, improving the stability of the FaaS service.

根据本实施例的再一方面,在CDN节点120上部署边缘设备121来提高FaaS业务的稳定性,允许业务人员使用通用且熟悉的语言编写代码实现,例如,该边缘设备121可以是基于JavaScript代码运行环境或者基于WebAssembly代码运行环境的设备,不仅无需额外的硬件成本,而且因开发、联调、部署、维护对业务人员都非常友好,还具有低的开发、维护成本,进而使得整个业务系统100不仅具有高的稳定性,还具有低的开发、运行、维护等成本,使得FaaS架构的优势能够在整个业务系统100上得以体现。According to another aspect of this embodiment, the edge device 121 is deployed on the CDN node 120 to improve the stability of the FaaS service, allowing business personnel to use a common and familiar language to write code for implementation. For example, the edge device 121 may be based on JavaScript code. The operating environment or the equipment based on the WebAssembly code operating environment not only requires no additional hardware costs, but also is very friendly to business personnel due to development, joint debugging, deployment, and maintenance, and has low development and maintenance costs, thereby making the entire business system 100 Not only has high stability, but also has low development, operation, maintenance and other costs, so that the advantages of the FaaS architecture can be reflected in the entire business system 100.

为了进一步提高FaaS业务的稳定性,在一些实施例中,在步骤S310的接收用户终端发送的对于目标业务的业务请求之后,该业务处理方法还可以包括如下步骤:获取边缘设备121的工作状态;在工作状态为正常状态的情况下,执行步骤S320的根据目标业务请求,从所在CND节点的缓存中获取目标业务的业务内容的步骤;而在工作状态为异常状态的情况下,可以配置Faas源站130对业务请求进行响应。此时,FaaS源站130可以根据边缘节点121的配置,直接处理用户终端110发送的业务请求,并返回相应的业务内容至用户终端110。In order to further improve the stability of the FaaS service, in some embodiments, after receiving the service request for the target service sent by the user terminal in step S310, the service processing method may further include the following steps: acquiring the working status of the edge device 121; When the working state is normal, perform the step of obtaining the service content of the target service from the cache of the CND node according to the target service request in step S320; and when the working state is abnormal, the Faas source can be configured Station 130 responds to the service request. At this time, the FaaS source station 130 can directly process the service request sent by the user terminal 110 according to the configuration of the edge node 121 , and return the corresponding service content to the user terminal 110 .

在这些实施例中,同样是由于业务系统100中的边缘设备121和FaaS源站服务属于不同的体系,边缘设备121与FaaS源站130基本不会出现同时崩溃异常的情况,不仅边缘设备121可以作为FaaS源站130的补充,在边缘设备121出现异常时,通过自动回源至FaaS源站130进行业务处理,使得FaaS源站130也可以成为边缘设备121的补充,二者互为替补,能够进一步提高FaaS业务的稳定性。In these embodiments, also because the edge device 121 and the FaaS origin service in the business system 100 belong to different systems, the edge device 121 and the FaaS origin 130 basically do not crash abnormally at the same time, not only the edge device 121 can As a supplement to the FaaS source station 130, when the edge device 121 is abnormal, it can automatically return to the FaaS source station 130 for business processing, so that the FaaS source station 130 can also become a supplement to the edge device 121. Further improve the stability of FaaS business.

如上所述,边缘设备121是基于CDN节点120的缓存服务,响应用户的业务请求,以此来实现业务兜底。为了使得缓存中存在对应于业务请求的业务内容,以供边缘节点121提供缓存服务,边缘设备121可以被设置为基于设定的事件访问FaaS源站,以获得这些业务内容并进行缓存。因此,在一些实施例中,在上述步骤S320的边缘设备121根据业务请求,从所在CDN节点120的缓存中获取目标业务的业务内容之前,该业务处理方法还可以包括如下步骤:边缘设备121根据设定事件中的任一事件,从FaaS源站130获取该目标业务的业务内容;以及,根据获取到的目标业务的业务内容更新CDN节点的缓存。该设定事件可以根据需要设置,可以包括一个事件,也可以包括多个事件,该设定事件例如可以包括接收到业务平台的对于目标业务的模拟请求,当前时间到达设定的更新时间,接收到FaaS源站130发送的更新通知等中的至少一项。As mentioned above, the edge device 121 is based on the cache service of the CDN node 120, and responds to the user's service request, thereby realizing the service bottom line. In order to make the service content corresponding to the service request exist in the cache for the edge node 121 to provide the cache service, the edge device 121 may be configured to access the FaaS origin based on a set event to obtain and cache the service content. Therefore, in some embodiments, before the edge device 121 in the above step S320 obtains the service content of the target service from the cache of the CDN node 120 according to the service request, the service processing method may further include the following steps: the edge device 121 according to the service request Set any one of the events, obtain the service content of the target service from the FaaS source station 130; and update the cache of the CDN node according to the obtained service content of the target service. The set event can be set as required, and can include one event or multiple events. For example, the set event can include receiving a simulation request for the target service from the business platform, the current time reaching the set update time, receiving At least one of an update notification sent to the FaaS origin 130, and the like.

在这些实施例中,根据获取到的目标业务的业务内容更新缓存可以是:在缓存中不存在目标业务的业务内容的情况下,直接将获取到的业务内容保存在缓存中,而在缓存中存在目标业务的业务内容的情况下,将缓存中原有的业务内容替换为获取到的业务内容,以实现缓存的更新。In these embodiments, updating the cache according to the acquired service content of the target service may be: if the service content of the target service does not exist in the cache, directly save the acquired service content in the cache, and store the acquired service content in the cache. When the service content of the target service exists, the original service content in the cache is replaced with the acquired service content, so as to realize the update of the cache.

这些实施例中的目标业务可以是目标应用的任意业务,对于该目标应用的不同业务,边缘设备121可以按照上述步骤,将相应的业务内容保存在CDN节点120的缓存中,其中,不同业务可以具有相同的更新周期,也可以具有不同的更新周期,在此不做限定。The target service in these embodiments can be any service of the target application. For different services of the target application, the edge device 121 can store the corresponding service content in the cache of the CDN node 120 according to the above steps, wherein the different services can be It has the same update period, and may also have different update periods, which is not limited here.

在这些实施例中,根据设定事件进行业务内容在缓存中的更新,能够保证缓存服务的可靠实施,为提高业务系统100的稳定性提供支持和保障。In these embodiments, updating the service content in the cache according to the set event can ensure reliable implementation of the cache service, and provide support and guarantee for improving the stability of the service system 100 .

另外,在这些实施例中,边缘设备121通过对业务内容进行缓存,便可以直接基于缓存的业务内容对用户发出的业务请求进行响应,而无需在接收到业务请求时现访问FaaS源站,该种设置因能提高FaaS业务的稳定性,因此可以有效避免出现无法响应业务请求的异常情况,进而提升了业务性能。而且,该种设置因可以通过就近的边缘设备121对用户发出的业务请求进行相应,因此能够降低传输损耗和提高响应速度,这也实现了对业务性能的提升。In addition, in these embodiments, by caching the service content, the edge device 121 can directly respond to the service request sent by the user based on the cached service content, without having to visit the FaaS origin site when receiving the service request. This setting can improve the stability of the FaaS service, so it can effectively avoid abnormal situations that cannot respond to service requests, thereby improving service performance. Moreover, since this kind of setting can respond to the service request sent by the user through the nearby edge device 121, it can reduce the transmission loss and improve the response speed, which also realizes the improvement of the service performance.

在一些实施例中,设定事件包括当前时间到达设定的更新时间,这样,上述的根据设定事件中的任一事件,从Faas源站130获取目标业务的业务内容,可以包括:获取目标业务的更新周期;根据获取到的更新周期,检测当前时间是否到达设定的更新时间;在当前时间到达更新时间的情况下,从Faas源站获取目标业务的业务内容。In some embodiments, the set event includes that the current time reaches the set update time. In this way, obtaining the service content of the target service from the Faas origin site 130 according to any one of the set events may include: obtaining the target service Service update cycle; according to the obtained update cycle, check whether the current time reaches the set update time; if the current time reaches the update time, obtain the service content of the target service from the Faas source station.

在此,通过设置目标业务的更新周期,可以定期进行缓存更新,以使得缓存中的业务内容是最新的业务内容,保证缓存服务的有效性。对于同一目标应用,不同业务可以具有不同的更新周期,更新周期可以根据业务的更新频率配置,以使得缓存更新与FaaS源站的业务更新的一致性。Here, by setting the update period of the target service, the cache can be updated regularly, so that the service content in the cache is the latest service content, and the validity of the cache service is guaranteed. For the same target application, different services can have different update cycles, and the update cycles can be configured according to the update frequency of the services, so that the cache update is consistent with the service update of the FaaS origin site.

为了提高业务配置的灵活性,目标业务的包括更新时间在内的配置数据,不仅可以在部署边缘设备121时设置,还可以被设置为允许业务人员根据需要,在边缘设备121运行期间更改该配置数据,也就是说,边缘设备121可以被设置为允许业务平台140对目标业务进行配置。在这些实施例中,在上述获取目标业务的更新周期之前,该方法还可以包括如下步骤:边缘设备121从业务平台140拉取目标业务的配置数据,其中,该配置数据可以包括目标业务的更新周期;以及,将配置数据保存在本地以供获取。In order to improve the flexibility of service configuration, the configuration data of the target service, including the update time, can not only be set when the edge device 121 is deployed, but can also be set to allow service personnel to change the configuration during the operation of the edge device 121 as needed. Data, that is, the edge device 121 may be configured to allow the service platform 140 to configure the target service. In these embodiments, before the above-mentioned update period for acquiring the target service, the method may further include the following steps: the edge device 121 pulls the configuration data of the target service from the service platform 140, wherein the configuration data may include the update of the target service cycle; and, save configuration data locally for retrieval.

除了目标业务的更新时间,边缘设备121从业务平台拉取的配置数据还可以包括以下至少一个配置项的配置数据,这些配置项例如包括:流量监测配置项、异常处理配置项、页面渲染配置项、页面骨架屏配置项、页面灰度配置项、业务异常的页面显示配置项等。边缘设备121对于不同配置项的配置数据的拉取时间节点可以相同,也可以不同,在此不做限定。边缘设备121可以定期从业务平台140拉取配置数据,也可以根据业务平台140的通知,从业务平台140拉取配置数据,在此不做限定。在另一些实施例中,设定事件可以包括接收到业务平台的对于目标业务的模拟请求,这样,如图5所示,上述的根据设定事件中的任一事件,从Faas源站130获取目标业务的业务内容,可以包括如下步骤S510~S520:In addition to the update time of the target service, the configuration data pulled by the edge device 121 from the service platform may also include configuration data of at least one of the following configuration items, for example, these configuration items include: a traffic monitoring configuration item, an exception handling configuration item, and a page rendering configuration item , page skeleton screen configuration items, page grayscale configuration items, page display configuration items with business exceptions, etc. The time nodes for pulling configuration data of different configuration items by the edge device 121 may be the same or different, which is not limited herein. The edge device 121 may periodically pull configuration data from the service platform 140, or may pull configuration data from the service platform 140 according to a notification from the service platform 140, which is not limited herein. In other embodiments, setting the event may include receiving a simulation request for the target service from the service platform. Thus, as shown in FIG. 5 , the above-mentioned setting event is obtained from the Faas origin site 130 according to any one of the set events. The service content of the target service may include the following steps S510-S520:

步骤S510,在接收到模拟请求的情况下,确定缓存中是否存在目标业务的业务内容。Step S510, in the case of receiving the simulation request, it is determined whether the service content of the target service exists in the cache.

步骤S520,在缓存中不存在对应于该业务内容的情况下,从FaaS源站130获取目标业务的业务内容。Step S520, in the case that the service content corresponding to the service does not exist in the cache, obtain the service content of the target service from the FaaS origin site 130.

在这些实施例中,为了保证CDN节点120的缓存中具有目标业务的业务内容,业务人员可以通过业务平台140发出对于目标业务的业务请求,在此,将业务人员发出的业务请求称之为对于目标业务的模拟请求,以与用户通过用户终端110发出的业务请求相区分。边缘设备121在接收到模拟请求后,同样会从所在CDN节点120的缓存中获取目标业务的业务内容,其中,边缘设备121在从缓存中获取所需的业务内容时,会先检测缓存中是否存在该业务内容,如缓存中不存在该业务内容,则将进行回源处理,以从FaaS源站130获取该业务内容,一方面将回源得到的该业务内容保存在CDN节点的缓存中,另一方面可以将回源得到的该业务内容返回至业务平台140;如果缓存中存在该业务内容,如图5中的步骤S530,可以不进行回源处理,而将缓存中的业务内容返回至业务平台140。通过该种模拟请求,可以使得CDN节点的缓存在用户发出业务请求时会具有相应的业务内容以供响应,这可以进行业务内容的首次缓存,以及业务内容临时更新的缓存处理,进而有效提高业务系统100的稳定性。In these embodiments, in order to ensure that the cache of the CDN node 120 has the service content of the target service, the service personnel can send a service request for the target service through the service platform 140. The simulated request of the target service is distinguished from the service request sent by the user through the user terminal 110 . After receiving the simulation request, the edge device 121 will also obtain the service content of the target service from the cache of the CDN node 120 where it is located. When the edge device 121 obtains the required service content from the cache, it will first detect whether the cache is in the cache. If the service content exists, if the service content does not exist in the cache, back-to-source processing will be performed to obtain the service content from the FaaS origin site 130. On the one hand, the service content obtained by the back-to-source is stored in the cache of the CDN node, On the other hand, the service content obtained from the back-to-source can be returned to the service platform 140; if the service content exists in the cache, as shown in step S530 in FIG. Business Platform 140 . Through this kind of simulated request, the cache of the CDN node can have corresponding service content for response when the user sends a service request, which can perform the first caching of the service content and the cache processing of the temporary update of the service content, thereby effectively improving the service System 100 Stability.

在一些实施例中,边缘设备121还可以被配置为能够对目标业务的运行状态进行监测,并将监测结果反馈至业务平台140,以供业务人员掌握目标业务的运行情况,进而及时对可能出现的异常情况做出必要调整。在这些实施例中,在上述步骤S310的接收用户终端发送的对于目标业务的业务请求之后,该业务处理方法还可以包括如下步骤:根据业务请求,更新目标业务的运行状态数据;以及,将运行状态数据发送至业务平台进行目标业务的运行状态的监测。该运行状态数据可以包括目标业务的流量数据等,边缘设备121可以根据接收到的业务请求,统计目标业务的访问流量,进而生成并更新目标业务的流量数据,并定期反馈至业务平台140。In some embodiments, the edge device 121 may also be configured to be able to monitor the running status of the target service, and feed back the monitoring results to the service platform 140, so that the service personnel can grasp the running status of the target service, and then timely respond to possible occurrences of abnormal circumstances and make necessary adjustments. In these embodiments, after receiving the service request for the target service sent by the user terminal in the above step S310, the service processing method may further include the following steps: updating the running status data of the target service according to the service request; The status data is sent to the business platform to monitor the running status of the target business. The operating status data may include traffic data of the target service, etc. The edge device 121 may count the access traffic of the target service according to the received service request, and then generate and update the traffic data of the target service, and periodically feed back to the service platform 140 .

另外,本公开实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储计算机程序,该计算机程序在被处理器执行时实现根据本公开任意实施例的业务处理方法。该计算机程序也即为运行在边缘设备121中的边缘程序。In addition, an embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the service processing method according to any embodiment of the present disclosure is implemented. The computer program is also an edge program running in the edge device 121 .

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for related parts.

上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

本说明书的实施例可以是设备、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本说明书实施例的各个方面的计算机可读程序指令。Embodiments of this specification may be apparatus, methods and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the embodiments of the present specification.

计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.

这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .

用于执行本说明书的实施例操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本说明书实施例的各个方面。The computer program instructions for carrying out the operations of the embodiments of this specification may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or in one or more Source or object code written in any combination of programming languages, including object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the embodiments of this specification.

这里参照根据本说明书实施例的方法、装置(设备)和计算机程序产品的流程图和/或框图描述了本说明书实施例的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of embodiments of the specification are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (apparatus) and computer program products according to embodiments of the specification. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.

这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.

也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.

附图中的流程图和框图显示了根据本说明书的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present specification. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executables for implementing the specified logical function(s) instruction. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation in hardware, implementation in software, and implementation in a combination of software and hardware are all equivalent.

以上已经描述了本说明书的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of this specification have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.

Claims (10)

1. A method for edge computing-based traffic handling implemented by an edge device deployed on a content distribution network node, the method comprising:
receiving a service request for a target service sent by a user terminal;
acquiring the service content of the target service from the cache of the content distribution network node according to the service request; the service content is obtained by the edge equipment requesting a FaaS source station and stored in the cache;
and returning the service content to the user terminal for response.
2. The method according to claim 1, wherein before said obtaining the service content of the target service from the cache of the content distribution network node according to the service request, the method further comprises:
acquiring the service content of the target service from the FaaS source station according to any one of the set events;
and updating the cache according to the acquired service content of the target service.
3. The method of claim 2, wherein the setting up the event comprises receiving a simulation request for the target service from a service platform, and wherein the obtaining the service content of the target service from the Faas source station according to any one of the setting up the event comprises:
under the condition that the simulation request is received, determining whether the service content of the target service exists in the cache or not;
and under the condition that the service content of the target service does not exist in the cache, acquiring the service content of the target service from the FaaS source station.
4. The method according to claim 2, wherein the set event comprises that the current time reaches a set update time, and the obtaining the service content of the target service from the Faas source station according to any one of the set events comprises:
acquiring an update cycle of the target service;
detecting whether the current time reaches the updating time or not according to the updating period;
and under the condition that the current time reaches the updating time, acquiring the service content of the target service from the Faas source station.
5. The method of claim 4, wherein before the obtaining the update period corresponding to the target service, the method comprises:
pulling the configuration data of the target service from a service platform; wherein the configuration data comprises an update period of the target service;
and storing the configuration data locally.
6. The method of claim 1, wherein after receiving the service request sent by the user terminal, the method further comprises:
acquiring the working state of the edge equipment;
when the working state is a normal state, executing the step of acquiring the service content of the target service from the cache of the edge device according to the target service request;
and configuring the Faas source station to respond to the service request under the condition that the working state is an abnormal state.
7. The method of claim 1, wherein after receiving the service request sent by the user terminal, the method further comprises:
updating the state data of the target service according to the service request;
and sending the state data to a service platform for state monitoring of the target service.
8. The method of any of claims 1-7, wherein the edge device is a JavaScript code-based execution environment or a WebAssembly code-based execution environment.
9. An edge device, characterized in that it comprises a memory for storing a computer program and a processor for executing the traffic processing method according to any of claims 1 to 8 under the control of said computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a traffic processing method according to any one of claims 1 to 8.
CN202210693371.7A 2022-06-17 2022-06-17 Service processing method based on edge calculation, edge device and readable storage medium Pending CN115080063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210693371.7A CN115080063A (en) 2022-06-17 2022-06-17 Service processing method based on edge calculation, edge device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210693371.7A CN115080063A (en) 2022-06-17 2022-06-17 Service processing method based on edge calculation, edge device and readable storage medium

Publications (1)

Publication Number Publication Date
CN115080063A true CN115080063A (en) 2022-09-20

Family

ID=83254081

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210693371.7A Pending CN115080063A (en) 2022-06-17 2022-06-17 Service processing method based on edge calculation, edge device and readable storage medium

Country Status (1)

Country Link
CN (1) CN115080063A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324396A (en) * 2018-03-30 2019-10-11 英特尔公司 Techniques for accelerating edge device workloads
CN112260863A (en) * 2020-10-15 2021-01-22 腾讯科技(深圳)有限公司 Organization-level network equipment connection management method and device and computer equipment
CN113645062A (en) * 2021-07-13 2021-11-12 阿里巴巴新加坡控股有限公司 Page data processing method and device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110324396A (en) * 2018-03-30 2019-10-11 英特尔公司 Techniques for accelerating edge device workloads
CN112260863A (en) * 2020-10-15 2021-01-22 腾讯科技(深圳)有限公司 Organization-level network equipment connection management method and device and computer equipment
CN113645062A (en) * 2021-07-13 2021-11-12 阿里巴巴新加坡控股有限公司 Page data processing method and device and electronic equipment

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
刘畅;毋涛;徐雷;: "基于无服务器架构的边缘AI计算平台", 信息通信技术, no. 05, 15 October 2018 (2018-10-15) *
呼吸: "边缘计算遇上Faas —— 统一渲染服务", pages 1 - 11, Retrieved from the Internet <URL:《https://zhuanlan.zhihu.com/p/157346068》> *
李正茂等: "5G+ 5G如何改变社会", 30 September 2019, 中信出版集团, pages: 180 - 183 *
腾讯云SERVERLESS团队: "CDN 联合云函数 SCF,轻松实现定时刷新、预热任务", pages 1 - 4, Retrieved from the Internet <URL:《https://cloud.tencent.com/developer/article/1859165》> *
郭世满: "宽带接入技术及应用", 31 March 2006, 北京邮电大学出版社, pages: 312 - 316 *

Similar Documents

Publication Publication Date Title
CN106462577B (en) Infrastructure for synchronization of mobile devices and mobile cloud services
US9215201B2 (en) Providing an unseen message count across devices
O'HARE et al. Sensor web interaction
CN105743934B (en) A kind of optimization method and mobile intelligent terminal of HTTP access availability
US10796087B2 (en) Method and apparatus for obtaining web content
US9473304B1 (en) Generation and distribution of named, definable, serialized tokens
EP4247103A1 (en) Method and apparatus for determining satellite backhaul information
CN113377626B (en) Visual unified alarm method, device, equipment and medium based on service tree
CN113961311A (en) Service data processing method, device, electronic equipment and medium
CN111866071A (en) Data uploading method and device of business application, electronic equipment and storage medium
CN113722007B (en) Configuration method, device and system of VPN branch equipment
CN109145182B (en) Data acquisition method and device, computer equipment and system
WO2025119109A1 (en) Data processing method and system for cluster nodes, and device and storage medium
CN115914346B (en) Internet of things message processing method and device, electronic equipment and storage medium
US8706804B2 (en) Modeled chaining of service calls
CN115080063A (en) Service processing method based on edge calculation, edge device and readable storage medium
US10097613B2 (en) Systems and methods for enhancing performance of resource state polling
CN115589432B (en) Message push management method, device, medium and equipment
US20230206756A1 (en) Method and system of controlling traffic lighting apparatus, electronic device and storage medium
CN105359456B (en) System, method and storage medium for WI FI management
CN119211027A (en) CDN network topology sensing method and device and electronic equipment
CN116033008A (en) Message processing method and device, electronic equipment and readable storage medium
CN116069227A (en) Interface interaction method, device, equipment and storage medium
US20220301012A1 (en) Apparatuses and methods for facilitating a generation and use of models
CN112818372A (en) Authority display information processing method, device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220920