CN114745260A - Computing power enhancement method, device, equipment and storage medium for content distribution network - Google Patents

Computing power enhancement method, device, equipment and storage medium for content distribution network Download PDF

Info

Publication number
CN114745260A
CN114745260A CN202210231827.8A CN202210231827A CN114745260A CN 114745260 A CN114745260 A CN 114745260A CN 202210231827 A CN202210231827 A CN 202210231827A CN 114745260 A CN114745260 A CN 114745260A
Authority
CN
China
Prior art keywords
wasm
function module
content distribution
request
edge node
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.)
Granted
Application number
CN202210231827.8A
Other languages
Chinese (zh)
Other versions
CN114745260B (en
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.)
Ucloud Technology Co ltd
Original Assignee
Ucloud Technology 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 Ucloud Technology Co ltd filed Critical Ucloud Technology Co ltd
Priority to CN202210231827.8A priority Critical patent/CN114745260B/en
Publication of CN114745260A publication Critical patent/CN114745260A/en
Application granted granted Critical
Publication of CN114745260B publication Critical patent/CN114745260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of cloud computing, and discloses a computing power enhancing method, device, equipment and storage medium for a content distribution network. The computing power enhancement method of the content distribution network comprises the following steps: the WASM function module developed by a user is released in a content distribution network, and corresponding calculation examples are generated at each edge node; acquiring a content distribution request forwarded by an edge node, and analyzing to obtain a distribution configuration parameter; judging whether a calculation example of a WASM function module needs to be introduced for enhancement calculation or not based on the distribution configuration parameters; if so, acquiring a calculation example of a target WASM function module specified by the distribution configuration parameters, performing enhanced calculation on the content distribution request to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request. According to the invention, the specified WASM function module is applied to carry out enhanced calculation on the content distribution request according to the request parameters, and logic calculation is carried out as required, so that the calculation capacity of the content distribution network is enhanced.

Description

Computing power enhancement method, device, equipment and storage medium for content distribution network
Technical Field
The present invention relates to the field of cloud computing, and in particular, to a method, an apparatus, a device, and a storage medium for enhancing computing power of a content distribution network.
Background
The content distribution network forms a layer of intelligent virtual network on the basis of the existing Internet by placing node servers at all positions of the network, and can redirect the request of a user to a service node closest to the user in real time according to network flow, connection of each node, load condition, distance to the user, response time and other comprehensive information. The traditional content distribution network is only responsible for static file distribution, and when an access request is received, a corresponding file is obtained from a storage and returned for distribution, so that the dynamic calculation capability cannot be provided for the distributed file.
In the prior art, a bypass computing service is often provided by adopting JavaScript, a content distribution network forwards the request to the JavaScript bypass service after receiving the request, the JavaScript returns content to a content distribution network edge node after performing logic computation according to a user, and the edge node responds to the user.
Disclosure of Invention
The invention mainly aims to provide a computing power enhancing method, a device, equipment and a storage medium of a content distribution network, and aims to solve the technical problem that the computing power enhancing method of the content distribution network limits the development language of a user function module in the prior art.
A first aspect of the present invention provides a computing power enhancement method for a content distribution network, including:
the WASM function module developed by a user is released in the content distribution network, and a calculation example of the WASM function module is generated at each edge node;
acquiring a content distribution request forwarded by the edge node, and analyzing the content distribution request to obtain a distribution configuration parameter;
based on the distribution configuration parameters, judging whether a calculation example of a WASM function module needs to be introduced to perform enhanced calculation on the content distribution request;
if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters;
and performing enhanced computation on the content distribution request through the computation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
Optionally, in a first implementation manner of the first aspect of the present invention, the publishing, by the content distribution network, the WASM function module developed by the user, and generating, at each edge node, the computation instance of the WASM function module includes:
receiving a request issued by a console or a WASM function module of an open API (application programming interface) through a central control node, and acquiring information of all edge nodes;
based on the edge node information, respectively forwarding the WASM function module issuing request to a node gateway of each edge node;
forwarding the request issued by the WASM function module to a container gateway of the edge node through the node gateway;
forwarding the request issued by the WASM function module to each WASM function calculation engine instance in the edge node through the container gateway;
and loading the WASM function module to be issued to a memory through the WASM function calculation engine instance and generating a corresponding calculation instance of the WASM function module according to the request issued by the WASM function module.
Optionally, in a second implementation manner of the first aspect of the present invention, the forwarding, by the node gateway, the request issued by the WASM function module to the container gateway of the edge node includes:
adding an authentication TOKEN to the WASM function module issuing request through the node gateway;
and forwarding the request issued by the WASM function module with the authentication TOKEN to the container gateway of the edge node through the node gateway.
Optionally, in a third implementation manner of the first aspect of the present invention, the receiving, by the central management and control node, a request issued by a console or a WASM function module of an open API, and acquiring information of all edge nodes includes:
receiving a WASM function module issuing request of a console or an open API through a central control node;
and uploading the WASM function module to be issued to an object storage through the central control node, and acquiring all edge node information.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the loading, according to the request issued by the WASM function module, the to-be-issued WASM function module to a memory and generating a corresponding calculation instance of the WASM function module by using the WASM function calculation engine instance includes:
loading the WASM function module to be issued to a memory from the object storage through the WASM function calculation engine instance according to the request issued by the WASM function module;
and generating a corresponding WASM function module calculation example through the WASM function calculation engine example, and caching the WASM function module to a local storage.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the computing power enhancement method for a content distribution network further includes:
acquiring a service function module compiled and uploaded by a user;
calling a cloud compiling cluster to compile the service function module by using a corresponding compiler;
if the compiling fails, returning error information, otherwise, generating a corresponding WASM function module.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the performing, by the computation instance of the target WASM function module, an enhanced computation on the content distribution request to obtain a processing result of the WASM function module, and returning the processing result to the edge node, so that the enabling of the edge node to respond to the content distribution request includes:
acquiring configuration information of the target WASM function module, wherein the configuration information comprises intervention time of a calculation instance of the target WASM function module;
if the intervention opportunity of the computation instance of the WASM function module comprises a request phase, executing the processing logic of the computation instance of the WASM function module to process a request header or a request body in the request phase, and if the intervention opportunity of the computation instance of the WASM function module comprises a response phase, executing the processing logic of the computation instance of the WASM function module to process a response header or a response body in the response phase to obtain a processing result of the WASM function module;
and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
A second aspect of the present invention provides a computing power enhancement apparatus for a content distribution network, comprising:
the publishing module is used for publishing the WASM function module developed by the user in the content distribution network and generating a calculation example of the WASM function module in each edge node;
the analysis module is used for acquiring the content distribution request forwarded by the edge node and analyzing the content distribution request to obtain distribution configuration parameters;
the judging module is used for judging whether a computing example of the WASM function module needs to be introduced to carry out enhanced computation on the content distribution request or not based on the distribution configuration parameters;
an obtaining module, configured to obtain, according to a target WASM function module specified by the distribution configuration parameter, a computation instance of the target WASM function module if the computation instance of the WASM function module needs to be introduced to perform enhanced computation on the content distribution request;
and the processing module is used for performing enhanced calculation on the content distribution request through the calculation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
Optionally, in a first implementation manner of the second aspect of the present invention, the publishing module includes:
the request receiving unit is used for receiving a request issued by a console or a WASM function module of an open API through a central control node and acquiring information of all edge nodes;
a first forwarding unit, configured to forward the request issued by the WASM function module to the node gateways of the edge nodes, respectively, based on the edge node information;
a second forwarding unit, configured to forward, through the node gateway, the request issued by the WASM function module to a container gateway of the edge node;
a third forwarding unit, configured to forward, through the container gateway, the request issued by the WASM function module to each WASM function calculation engine instance in the edge node;
and the instance generation unit is used for loading the WASM function module to be issued to the memory through the WASM function calculation engine instance according to the request issued by the WASM function module and generating a calculation instance of the corresponding WASM function module.
Optionally, in a second implementation manner of the second aspect of the present invention, the second forwarding unit is specifically configured to:
adding an authentication TOKEN to the WASM function module issuing request through the node gateway;
and forwarding the WASM function module issuing request with the authentication TOKEN to the container gateway of the edge node through the node gateway.
Optionally, in a third implementation manner of the second aspect of the present invention, the request receiving unit is specifically configured to:
receiving a WASM function module issuing request of a console or an open API through a central control node;
and uploading the WASM function module to be issued to an object storage through the central control node, and acquiring all edge node information.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the instance generating unit is specifically configured to:
loading the WASM function module to be issued to a memory from the object storage through the WASM function calculation engine instance according to the request issued by the WASM function module;
and generating a corresponding WASM function module calculation example through the WASM function calculation engine example, and caching the WASM function module to a local storage.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the computing power enhancing apparatus of the content distribution network further includes:
the function acquisition module is used for acquiring a service function module compiled and uploaded by a user;
the function compiling module is used for calling the cloud compiling cluster to compile the service function module by using a corresponding compiler;
and a result returning module, wherein if the compiling fails, an error message is returned, otherwise, a corresponding WASM function module is generated.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the processing module is specifically configured to:
acquiring configuration information of the target WASM function module, wherein the configuration information comprises intervention time of a calculation instance of the target WASM function module;
if the intervention opportunity of the computation instance of the WASM function module comprises a request phase, executing the processing logic of the computation instance of the WASM function module to process a request header or a request body in the request phase, and if the intervention opportunity of the computation instance of the WASM function module comprises a response phase, executing the processing logic of the computation instance of the WASM function module to process a response header or a response body in the response phase to obtain a processing result of the WASM function module;
and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
A third aspect of the present invention provides an electronic device comprising: a memory and at least one processor, the memory having instructions stored therein; the at least one processor invokes the instructions in the memory to cause the electronic device to perform the computational power enhancement method of the content distribution network described above.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-mentioned method of computational power enhancement of a content distribution network.
In the technical scheme provided by the invention, a WASM function module developed by a user is released in a content distribution network, and corresponding calculation examples are generated at each edge node; acquiring a content distribution request forwarded by an edge node, and analyzing to obtain a distribution configuration parameter; judging whether a calculation instance pair of a WASM function module needs to be introduced for enhancement calculation or not based on the distribution configuration parameters; if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters; and performing enhanced calculation on the content distribution request through a calculation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request. According to the invention, the designated WASM function module is applied to carry out enhanced calculation on the content distribution request according to the request parameters, logical calculation is carried out as required, the calculation capacity of the content distribution network is enhanced, the dynamic calculation capacity is provided for the distributed files, and the performance of the content distribution network is improved.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a computing power enhancement method for a content distribution network in an embodiment of the invention;
FIG. 2 is a schematic diagram of another embodiment of a computing power enhancement method for a content distribution network in an embodiment of the invention;
FIG. 3 is a schematic diagram of one embodiment of a computational power enhancement apparatus of a content distribution network in an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of a computing power enhancement device of a content distribution network in an embodiment of the invention;
fig. 5 is a schematic diagram of an embodiment of an electronic device in an embodiment of the invention.
Detailed Description
The embodiment of the invention provides a computing power enhancement method, a device, equipment and a storage medium of a content distribution network.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, a detailed flow of an embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a computing power enhancing method for a content distribution network in an embodiment of the present invention includes:
101. the WASM function module developed by a user is released in the content distribution network, and a calculation example of the WASM function module is generated at each edge node;
it is to be understood that the executing entity of the present invention may be a computing power enhancing apparatus of a content distribution network, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
In this embodiment, a basic idea of a Content Delivery Network (CDN) is to avoid bottlenecks and links on the internet that may affect data transmission speed and stability as much as possible, so that Content transmission is faster and more stable. The CDN system can redirect the user's request to the service node nearest to the user in real time according to the network flow and the comprehensive information such as the connection of each node, the load condition, the distance to the user, the response time and the like, and aims to enable the user to obtain the required content nearby, solve the network congestion condition and improve the response speed of the user accessing the website.
In this embodiment, the WASM function module is an assembly language function module generated by compiling a function module developed by a high-level language into a WebAssembly, and has the characteristics of portability, small volume, fast loading and Web compatibility, and the WebAssembly has better performance compared with JavaScript.
In this embodiment, the edge node is an edge machine room, that is, an edge data Center (OC) in the content distribution network.
In this embodiment, the number of issuable WASM function modules is not limited, and each edge node has a plurality of computation instances of the issued WASM function modules.
102. Acquiring a content distribution request forwarded by the edge node, and analyzing the content distribution request to obtain a distribution configuration parameter;
in this embodiment, the content delivery request is an access request of a user in the CDN, and the delivery configuration parameter is used to determine whether the calculation of the WASM function module needs to be performed.
In this embodiment, the user modifies the CDN configuration to configure the path, for example, configure path matching or parameter matching, and forwards a request requiring intervention processing of the WASM function module.
103. Based on the distribution configuration parameters, judging whether a calculation example of a WASM function module needs to be introduced to perform enhanced calculation on the content distribution request;
in this embodiment, if the WASM function module does not need to be introduced for performing the enhanced computation, the proxy is directly executed to return to the source, and the file content is obtained from the CDN cache and then directly returned to the CDN service node.
104. If yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters;
105. and performing enhanced computation on the content distribution request through the computation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
Optionally, in an embodiment, the step 105 includes:
acquiring configuration information of the target WASM function module, wherein the configuration information comprises intervention time of a calculation example of the target WASM function module;
if the intervention time of the computation example of the WASM function module comprises a request phase, executing the processing logic of the computation example of the WASM function module to process a request header or a request body in the request phase, and if the intervention time of the computation example of the WASM function module comprises a response phase, executing the processing logic of the computation example of the WASM function module to process a response header or a response body in the response phase to obtain a processing result of the WASM function module;
and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
In the embodiment of the invention, a WASM function module developed by a user is released in a content distribution network, and corresponding calculation examples are generated at each edge node; acquiring a content distribution request forwarded by an edge node, and analyzing to obtain a distribution configuration parameter; judging whether a calculation instance pair of a WASM function module needs to be introduced for enhancement calculation or not based on the distribution configuration parameters; if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters; and performing enhanced calculation on the content distribution request through a calculation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request. According to the invention, the designated WASM function module is applied to carry out enhanced calculation on the content distribution request according to the request parameters, logical calculation is carried out as required, the calculation capacity of the content distribution network is enhanced, the dynamic calculation capacity is provided for the distributed files, and the performance of the content distribution network is improved.
Referring to fig. 2, another embodiment of the method for enhancing computing power of a content distribution network according to the embodiment of the present invention includes:
201. acquiring a service function module compiled and uploaded by a user;
in this embodiment, the programming language used by the service function module written by the user is not limited, and includes, but is not limited to, C, C + +, run, and search.
202. Calling a cloud compiling cluster to compile the service function module by using a corresponding compiler;
in this embodiment, the cloud compiling cluster is a cloud server cluster for compiling, and the cloud compiling cluster has compilers of various high-level programming languages, and can compile a service function module by applying a corresponding compiler.
203. If the compiling fails, returning error information, otherwise, generating a corresponding WASM function module;
in this embodiment, if the compilation fails, error information returned by the cloud compilation cluster is received and returned to the user, the user may upload the compilation again after modification, if the compilation succeeds, a corresponding WASM function module is generated, the WASM function module is deployed through subsequent steps, all the generation rooms are deployed with computing instances of the WASM function module, and service logic of the deployed WASM function module can be executed in various places around the world.
204. The WASM function module developed by a user is released in the content distribution network, and a calculation example of the WASM function module is generated at each edge node;
optionally, in an embodiment, the step 204 includes:
receiving a request issued by a console or a WASM function module of an open API (application programming interface) through a central control node, and acquiring information of all edge nodes;
based on the edge node information, respectively forwarding the WASM function module issuing request to the node gateways of the edge nodes;
forwarding the request issued by the WASM function module to a container gateway of the edge node through the node gateway;
forwarding the request issued by the WASM function module to each WASM function calculation engine instance in the edge node through the container gateway;
and loading the WASM function module to be issued to a memory through the WASM function calculation engine instance and generating a corresponding calculation instance of the WASM function module according to the request issued by the WASM function module.
In this embodiment, the edge cloud machine room has the characteristics of wide distribution and small scale, and only a centralized control mode can be adopted. The Center management and control node is deployed in a main Data Center (DC) machine room inside a cloud manufacturer, and realizes secure communication with an edge Data Center (OC) node, namely the edge node, through an IPsec (Internet Protocol Security) Protocol encryption channel or an IPTABLES (Internet Protocol Security) white list.
In this embodiment, the edge node is an edge machine room, and the edge node information includes, but is not limited to, a node gateway address of the edge node.
In this embodiment, on the edge machine room access machine, the node gateway serves as a unique service entry to receive the distribution request from the DC management and control, and then forwards the distribution request to the container gateway.
In this embodiment, the container gateway is mainly responsible for receiving a function module distribution request on the host side, and simultaneously completing a function module loading operation for triggering all function calculation engine instances inside the cluster.
Optionally, in an embodiment, the forwarding, by the node gateway, the request issued by the WASM function module to the container gateway of the edge node includes:
adding an authentication TOKEN to the WASM function module issuing request through the node gateway;
and forwarding the WASM function module issuing request with the authentication TOKEN to the container gateway of the edge node through the node gateway.
In this embodiment, the container gateway verifies the validity of the request of the edge access machine by dynamically generating and verifying TOKEN, and ensures the security of the distribution process of the function module.
Optionally, in an embodiment, the receiving, by the central management and control node, a request issued by a console or a WASM function module of an open API, and acquiring information of all edge nodes includes:
receiving a WASM function module issuing request of a console or an open API through a central control node;
and uploading the WASM function module to be issued to an object storage through the central control node, and acquiring all edge node information.
Optionally, in an embodiment, the loading, by the instance of the WASM function computation engine, the to-be-released WASM function module into the memory and generating the computation instance of the corresponding WASM function module according to the request issued by the WASM function module includes:
loading the WASM function module to be issued to a memory from the object storage through the WASM function calculation engine instance according to the request issued by the WASM function module;
and generating a corresponding WASM function module calculation example through the WASM function calculation engine example, and caching the WASM function module to a local storage.
205. Acquiring a content distribution request forwarded by the edge node, and analyzing the content distribution request to obtain a distribution configuration parameter;
206. based on the distribution configuration parameters, judging whether a calculation example of a WASM function module needs to be introduced to perform enhanced calculation on the content distribution request;
207. if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters;
208. and performing enhanced computation on the content distribution request through the computation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
In the embodiment of the invention, a service function module compiled and uploaded by a user is obtained; calling the cloud compiling cluster to compile by using a corresponding compiler; if the compiling fails, returning error information, otherwise, generating a corresponding WASM function module; the WASM function module developed by a user is released in a content distribution network, and corresponding calculation examples are generated at each edge node; acquiring a content distribution request forwarded by an edge node, and analyzing to obtain a distribution configuration parameter; judging whether a calculation instance pair of a WASM function module needs to be introduced for enhancement calculation or not based on the distribution configuration parameters; if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters; and performing enhanced calculation on the content distribution request through a calculation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request. The invention supports users to use the familiar language to develop the business function module, provides the cloud compiling service aiming at different development languages, simplifies the development process, obviously improves the business deployment efficiency, and because all the production machine rooms are deployed with the WASM function calculation engine examples, the users can execute the function business logic in all the places of the world after deploying the function module to the production environment.
With reference to fig. 3, the method for enhancing computing power of a content distribution network in an embodiment of the present invention is described above, and a computing power enhancing apparatus of a content distribution network in an embodiment of the present invention is described below, where an embodiment of the computing power enhancing apparatus of a content distribution network in an embodiment of the present invention includes:
a publishing module 301, configured to publish, in the content distribution network, a WASM function module developed by a user, and generate, in each edge node, a calculation instance of the WASM function module;
an analysis module 302, configured to obtain a content distribution request forwarded by the edge node, and analyze the content distribution request to obtain a distribution configuration parameter;
a judging module 303, configured to judge, based on the distribution configuration parameter, whether a computation instance of the WASM function module needs to be introduced to perform enhanced computation on the content distribution request;
an obtaining module 304, configured to obtain, according to a target WASM function module specified by the distribution configuration parameter, a computation instance of the target WASM function module if the computation instance of the WASM function module needs to be introduced to perform enhanced computation on the content distribution request;
the processing module 305 is configured to perform enhanced computation on the content distribution request through the computation instance of the target WASM function module to obtain a processing result of the WASM function module, and return the processing result to the edge node, so that the edge node can respond to the content distribution request.
Optionally, the publishing module 301 includes:
a request receiving unit 3011, configured to receive, through a central management and control node, a request issued by a console or a WASM function module of an open API, and acquire information of all edge nodes;
a first forwarding unit 3012, configured to forward the request issued by the WASM function module to a node gateway of each edge node based on the edge node information;
a second forwarding unit 3013, configured to forward, through the node gateway, the request issued by the WASM function module to a container gateway of the edge node;
a third forwarding unit 3014, configured to forward, through the container gateway, the request issued by the WASM function module to each instance of the WASM function computation engine in the edge node;
an instance generating unit 3015, configured to load, according to the request issued by the WASM function module, the to-be-issued WASM function module to a memory through the WASM function computation engine instance, and generate a computation instance of the corresponding WASM function module.
Optionally, the second forwarding unit 3013 is specifically configured to:
adding an authentication TOKEN to the WASM function module issuing request through the node gateway;
and forwarding the request issued by the WASM function module with the authentication TOKEN to the container gateway of the edge node through the node gateway.
Optionally, the request receiving unit 3011 is specifically configured to:
receiving a request issued by a WASM function module of a control console or an open API through a central control node;
and uploading the WASM function module to be issued to an object storage through the central control node, and acquiring all edge node information.
Optionally, the instance generating unit 3015 is specifically configured to:
loading the WASM function module to be issued to a memory from the object storage through the WASM function calculation engine instance according to the request issued by the WASM function module;
and generating a corresponding WASM function module calculation example through the WASM function calculation engine example, and caching the WASM function module to a local storage.
Optionally, the processing module 305 is specifically configured to:
acquiring configuration information of the target WASM function module, wherein the configuration information comprises intervention time of a calculation instance of the target WASM function module;
if the intervention opportunity of the computation instance of the WASM function module comprises a request phase, executing the processing logic of the computation instance of the WASM function module to process a request header or a request body in the request phase, and if the intervention opportunity of the computation instance of the WASM function module comprises a response phase, executing the processing logic of the computation instance of the WASM function module to process a response header or a response body in the response phase to obtain a processing result of the WASM function module;
and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
In the embodiment of the invention, a WASM function module developed by a user is released in a content distribution network, and corresponding calculation examples are generated at each edge node; acquiring a content distribution request forwarded by an edge node, and analyzing to obtain a distribution configuration parameter; judging whether a calculation instance pair of a WASM function module needs to be introduced for enhancement calculation or not based on the distribution configuration parameters; if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters; and performing enhanced calculation on the content distribution request through a calculation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request. According to the invention, the designated WASM function module is applied to carry out enhanced calculation on the content distribution request according to the request parameters, logical calculation is carried out as required, the calculation capacity of the content distribution network is enhanced, the dynamic calculation capacity is provided for the distributed files, and the performance of the content distribution network is improved.
Referring to fig. 4, another embodiment of the computing power enhancement apparatus of the content distribution network according to the embodiment of the present invention includes:
a publishing module 301, configured to publish, in the content distribution network, a WASM function module developed by a user, and generate, in each edge node, a calculation instance of the WASM function module;
an analyzing module 302, configured to obtain the content distribution request forwarded by the edge node, and analyze the content distribution request to obtain a distribution configuration parameter;
a judging module 303, configured to judge whether a computation instance of the WASM function module needs to be introduced to perform enhanced computation on the content distribution request based on the distribution configuration parameter;
an obtaining module 304, configured to obtain, according to a target WASM function module specified by the distribution configuration parameter, a computation instance of the target WASM function module if the computation instance of the WASM function module needs to be introduced to perform enhanced computation on the content distribution request;
a processing module 305, configured to perform enhanced computation on the content delivery request through the computation instance of the target WASM function module to obtain a processing result of the WASM function module, and return the processing result to the edge node, so that the edge node responds to the content delivery request;
a function obtaining module 306, configured to obtain a service function module compiled and uploaded by a user;
a function compiling module 307 for calling the cloud compiling cluster to compile the service function module by using a corresponding compiler;
and a result returning module 308, which returns error information if the compiling fails, otherwise, generates a corresponding WASM function module.
In the embodiment of the invention, a service function module compiled and uploaded by a user is obtained; calling the cloud compiling cluster to compile by using a corresponding compiler; if the compiling fails, returning error information, otherwise, generating a corresponding WASM function module; the WASM function module developed by a user is released in a content distribution network, and corresponding calculation examples are generated at each edge node; acquiring a content distribution request forwarded by an edge node, and analyzing to obtain a distribution configuration parameter; judging whether a calculation instance pair of a WASM function module needs to be introduced for enhancement calculation or not based on the distribution configuration parameters; if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters; and performing enhanced calculation on the content distribution request through a calculation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request. The invention supports users to use the familiar language to develop the business function module, provides the cloud compiling service aiming at different development languages, simplifies the development process, obviously improves the business deployment efficiency, and because all the production machine rooms are deployed with the WASM function calculation engine examples, the users can execute the function business logic in all the places of the world after deploying the function module to the production environment.
Fig. 3 and 4 above describe the computing power enhancing apparatus of the content distribution network in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the electronic device in the embodiment of the present invention is described in detail from the perspective of the hardware processing.
Fig. 5 is a schematic structural diagram of an electronic device 500 according to an embodiment of the present invention, where the electronic device 500 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a sequence of instructions for operating the electronic device 500. Further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the electronic device 500.
The electronic device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and so forth. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The present invention also provides an electronic device, which includes a memory and a processor, wherein the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor executes the steps of the computational power enhancement method of the content distribution network in the above embodiments.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, which may also be a volatile computer readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the computer power enhancing method of the content distribution network.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for enhancing computation of a content distribution network, the method comprising:
the WASM function module developed by a user is released in the content distribution network, and a calculation example of the WASM function module is generated at each edge node;
acquiring a content distribution request forwarded by the edge node, and analyzing the content distribution request to obtain a distribution configuration parameter;
based on the distribution configuration parameters, judging whether a calculation example of a WASM function module needs to be introduced to perform enhanced calculation on the content distribution request;
if yes, acquiring a calculation example of the target WASM function module according to the target WASM function module specified by the distribution configuration parameters;
and performing enhanced computation on the content distribution request through the computation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
2. The method of enhancing computing power of a content distribution network according to claim 1, wherein the publishing of the user-developed WASM function module in the content distribution network and the generation of the computation instance of the WASM function module at each edge node comprises:
receiving a request issued by a console or a WASM function module of an open API (application programming interface) through a central control node, and acquiring information of all edge nodes;
based on the edge node information, respectively forwarding the WASM function module issuing request to the node gateways of the edge nodes;
forwarding the request issued by the WASM function module to a container gateway of the edge node through the node gateway;
forwarding the request issued by the WASM function module to each WASM function calculation engine instance in the edge node through the container gateway;
and loading the WASM function module to be issued to a memory through the WASM function calculation engine instance and generating a corresponding calculation instance of the WASM function module according to the request issued by the WASM function module.
3. The method of computing power enhancement for content distribution networks according to claim 2, wherein forwarding the WASM function module publication request to the container gateway of the edge node via the node gateway comprises:
adding an authentication TOKEN to the WASM function module issuing request through the node gateway;
and forwarding the WASM function module issuing request with the authentication TOKEN to the container gateway of the edge node through the node gateway.
4. The method of claim 2, wherein the receiving, by the central management and control node, the request issued by the console or the WASM function module of the open API, and acquiring information of all edge nodes comprises:
receiving a WASM function module issuing request of a console or an open API through a central control node;
and uploading the WASM function module to be issued to an object storage through the central control node, and acquiring all edge node information.
5. The method of claim 4, wherein the loading, by the instance of the WASM function calculation engine, the WASM function module to be distributed to the memory and generating the calculation instance of the corresponding WASM function module according to the request issued by the WASM function module comprises:
loading the WASM function module to be issued to a memory from the object storage through the WASM function calculation engine instance according to the request issued by the WASM function module;
and generating a corresponding WASM function module calculation example through the WASM function calculation engine example, and caching the WASM function module to a local storage.
6. The method of any of claims 1-5, further comprising:
acquiring a service function module compiled and uploaded by a user;
calling a cloud compiling cluster to compile the service function module by using a corresponding compiler;
if the compiling fails, returning error information, otherwise, generating a corresponding WASM function module.
7. The method of claim 1, wherein the performing, by the computing instance of the target WASM function module, the enhanced computation on the content delivery request to obtain a processing result of the WASM function module, and returning the processing result to the edge node, so that the edge node responds to the content delivery request includes:
acquiring configuration information of the target WASM function module, wherein the configuration information comprises intervention time of a calculation instance of the target WASM function module;
if the intervention opportunity of the computation instance of the WASM function module comprises a request phase, executing the processing logic of the computation instance of the WASM function module to process a request header or a request body in the request phase, and if the intervention opportunity of the computation instance of the WASM function module comprises a response phase, executing the processing logic of the computation instance of the WASM function module to process a response header or a response body in the response phase to obtain a processing result of the WASM function module;
and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
8. A computing power augmentation apparatus of a content distribution network, comprising:
the publishing module is used for publishing the WASM function module developed by the user in the content distribution network and generating a calculation example of the WASM function module in each edge node;
the analysis module is used for acquiring the content distribution request forwarded by the edge node and analyzing the content distribution request to obtain distribution configuration parameters;
the judging module is used for judging whether a computing example of the WASM function module needs to be introduced to carry out enhanced computation on the content distribution request or not based on the distribution configuration parameters;
an obtaining module, configured to obtain, according to a target WASM function module specified by the distribution configuration parameter, a computation instance of the target WASM function module if the computation instance of the WASM function module needs to be introduced to perform enhanced computation on the content distribution request;
and the processing module is used for performing enhanced calculation on the content distribution request through the calculation example of the target WASM function module to obtain a processing result of the WASM function module, and returning the processing result to the edge node so that the edge node can respond to the content distribution request.
9. An electronic device, characterized in that the electronic device comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the electronic device to perform the computational power enhancement method of the content distribution network of any of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement a method of computational power enhancement of a content distribution network according to any one of claims 1-7.
CN202210231827.8A 2022-03-09 2022-03-09 Method, device, equipment and storage medium for enhancing computing power of content distribution network Active CN114745260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210231827.8A CN114745260B (en) 2022-03-09 2022-03-09 Method, device, equipment and storage medium for enhancing computing power of content distribution network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210231827.8A CN114745260B (en) 2022-03-09 2022-03-09 Method, device, equipment and storage medium for enhancing computing power of content distribution network

Publications (2)

Publication Number Publication Date
CN114745260A true CN114745260A (en) 2022-07-12
CN114745260B CN114745260B (en) 2024-04-02

Family

ID=82275390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210231827.8A Active CN114745260B (en) 2022-03-09 2022-03-09 Method, device, equipment and storage medium for enhancing computing power of content distribution network

Country Status (1)

Country Link
CN (1) CN114745260B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013178010A1 (en) * 2012-05-28 2013-12-05 ***通信集团公司 Multimedia content distribution method, device and system
CN108255605A (en) * 2017-12-29 2018-07-06 北京邮电大学 Image recognition cooperative computing method and system based on neural network
CN109887098A (en) * 2019-02-13 2019-06-14 浙江传媒学院 A kind of web AR data presentation mode based on distributed computing
CN110675256A (en) * 2019-08-30 2020-01-10 阿里巴巴集团控股有限公司 Method and device for deploying and executing intelligent contracts
CN110769039A (en) * 2019-10-09 2020-02-07 腾讯科技(深圳)有限公司 Resource scheduling method and device, electronic equipment and computer readable storage medium
US10817424B1 (en) * 2019-12-20 2020-10-27 Cloudflare, Inc. Using post-cache edge computing to re-populate dynamic content in cached content
US20210014203A1 (en) * 2020-09-25 2021-01-14 Kshitij Arun Doshi One-touch inline cryptographic data processing
CN112532669A (en) * 2019-09-19 2021-03-19 贵州白山云科技股份有限公司 Network edge computing method, device and medium
CN112929319A (en) * 2019-12-05 2021-06-08 中国电信股份有限公司 Content service method, system, apparatus and computer-readable storage medium
CN113032138A (en) * 2019-12-25 2021-06-25 亚信科技(中国)有限公司 WebAssembly-based edge calculation method and device
CN113382028A (en) * 2020-03-10 2021-09-10 中国电信股份有限公司 Method and system for realizing content distribution network and edge user plane functional entity
US20220021608A1 (en) * 2021-09-23 2022-01-20 Kshitij Arun Doshi Software defined networking with en-route computing
CN114064155A (en) * 2022-01-17 2022-02-18 深圳市华付信息技术有限公司 Container-based algorithm calling method, device, equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013178010A1 (en) * 2012-05-28 2013-12-05 ***通信集团公司 Multimedia content distribution method, device and system
CN108255605A (en) * 2017-12-29 2018-07-06 北京邮电大学 Image recognition cooperative computing method and system based on neural network
CN109887098A (en) * 2019-02-13 2019-06-14 浙江传媒学院 A kind of web AR data presentation mode based on distributed computing
CN110675256A (en) * 2019-08-30 2020-01-10 阿里巴巴集团控股有限公司 Method and device for deploying and executing intelligent contracts
CN112532669A (en) * 2019-09-19 2021-03-19 贵州白山云科技股份有限公司 Network edge computing method, device and medium
CN110769039A (en) * 2019-10-09 2020-02-07 腾讯科技(深圳)有限公司 Resource scheduling method and device, electronic equipment and computer readable storage medium
CN112929319A (en) * 2019-12-05 2021-06-08 中国电信股份有限公司 Content service method, system, apparatus and computer-readable storage medium
US10817424B1 (en) * 2019-12-20 2020-10-27 Cloudflare, Inc. Using post-cache edge computing to re-populate dynamic content in cached content
CN113032138A (en) * 2019-12-25 2021-06-25 亚信科技(中国)有限公司 WebAssembly-based edge calculation method and device
CN113382028A (en) * 2020-03-10 2021-09-10 中国电信股份有限公司 Method and system for realizing content distribution network and edge user plane functional entity
US20210014203A1 (en) * 2020-09-25 2021-01-14 Kshitij Arun Doshi One-touch inline cryptographic data processing
US20220021608A1 (en) * 2021-09-23 2022-01-20 Kshitij Arun Doshi Software defined networking with en-route computing
CN114064155A (en) * 2022-01-17 2022-02-18 深圳市华付信息技术有限公司 Container-based algorithm calling method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NORIAKI KAMIYAMA; YUUSUKE NAKANO; KOHEI SHIOMOTO; GO HASEGAWA; MASAYUKI MURATA; HIDEO MIYAHARA: "Analyzing Effect of Edge Computing on Reduction of Web Response Time", IEEE *
于清林;: "从边缘计算到算力网络", 产业科技创新, no. 03 *

Also Published As

Publication number Publication date
CN114745260B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
US10761873B2 (en) Evaluating distributed application performance in a new environment
Bremler-Barr et al. OpenBox: A software-defined framework for developing, deploying, and managing network functions
Vilaplana et al. A queuing theory model for cloud computing
Ullah et al. Design and implementation of an open source framework and prototype for named data networking-based edge cloud computing system
Yamato Study of parallel processing area extraction and data transfer number reduction for automatic GPU offloading of IoT applications
US20130086594A1 (en) Execution of applications distributed across a plurality of computing devices
US20130235868A1 (en) Optimizing traffic load in a communications network
Da Silva et al. Internet of things out of the box: using TOSCA for automating the deployment of IoT environments
US7627655B2 (en) Increased performance of grid applications
CN103338233A (en) Load balancing device, Web server, request information processing method and system
Godla et al. Socket programming-based rmi application for Amazon web services in distributed cloud computing
CN114745260B (en) Method, device, equipment and storage medium for enhancing computing power of content distribution network
Liu et al. A large-scale real-time network simulation study using prime
Sandobalin et al. ARGON: a tool for modeling cloud resources
Zimmermann et al. Data flow dependent component placement of data processing cloud applications
Geier et al. Sherlockfog: Finding opportunities for mpi applications in fog and edge computing
Geier et al. SherlockFog: a new tool to support application analysis in Fog and Edge computing
US10713153B1 (en) Method and system for testing an extended pattern using an automatic pattern testing engine
Aguiar et al. Lessons learned and challenges on benchmarking publish-subscribe IoT platforms
Bossardt et al. Chameleon: Realizing automatic service composition for extensible active routers
Ppallan et al. Reducing user perceived latency in smart phones exploiting IP network diversity
Wu et al. Ripple: An efficient runtime reconfigurable P4 data plane for multicore systems
Kern Injecting Shared Libraries with LD_PRELOAD for Cyber Deception
Kissel Janus: Lightweight Container Orchestration for High-performance Data Sharing
Wawrzoniak et al. Short-lived datacenter

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
GR01 Patent grant
GR01 Patent grant