CN113296750B - Function creation method and system, function calling method and system - Google Patents

Function creation method and system, function calling method and system Download PDF

Info

Publication number
CN113296750B
CN113296750B CN202110516934.0A CN202110516934A CN113296750B CN 113296750 B CN113296750 B CN 113296750B CN 202110516934 A CN202110516934 A CN 202110516934A CN 113296750 B CN113296750 B CN 113296750B
Authority
CN
China
Prior art keywords
function
gateway
computing platform
processing request
application
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.)
Active
Application number
CN202110516934.0A
Other languages
Chinese (zh)
Other versions
CN113296750A (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.)
Alibaba Innovation Co
Original Assignee
Alibaba Singapore Holdings Pte 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 Singapore Holdings Pte Ltd filed Critical Alibaba Singapore Holdings Pte Ltd
Priority to CN202110516934.0A priority Critical patent/CN113296750B/en
Publication of CN113296750A publication Critical patent/CN113296750A/en
Application granted granted Critical
Publication of CN113296750B publication Critical patent/CN113296750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the specification provides a function creation method and system, and a function calling method and system, wherein the function creation method comprises a client, a gateway and a function computing platform, and comprises the following steps: the client side determines an application function of the target application based on attribute information of the target application carried in a function creation request sent by a user, creates a corresponding function based on the application function, and sends a function processing request to the gateway, wherein the function processing request carries the function; and the gateway sends the function carried in the received function processing request to the function computing platform. According to the method, the characteristic that the function calculation does not need to care about a server is utilized, the function of the target application is split into independent functions to be placed on the function calculation platform, the development and operation cost of the target application is obviously reduced, a developer does not need to care about the server, the implementation of the target function is focused more, and the development efficiency is improved.

Description

Function creation method and system, function calling method and system
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a function creation method. One or more embodiments of the present specification relate to a function creation system, two function calling methods, a function calling system, a function calling apparatus, a computing device, and a computer-readable storage medium.
Background
The console is a Web application, which is a typical architecture with front-end and back-end separation and communication through restful api. The console provides the management function of cloud products for users, and helps the users to better use cloud resources. Because the rear end of the console is realized based on the java language and the spring framework, only the java API can be called, if the dependent service only provides the APIs of other development languages, the corresponding functions cannot be supported, and the development constraint is large. Meanwhile, the back-end server has large release, deployment, upgrading and operation costs, occupies a large amount of research and development time and influences research and development efficiency.
Therefore, there is an urgent need to provide a function creation method for solving the technical problems of limited development language, low development efficiency and high operation and maintenance cost.
Disclosure of Invention
In view of this, the present embodiment provides a function creation method. One or more embodiments of the present specification are also directed to a function creation system, two function calling methods, a function calling system, a function calling apparatus, a computing device, and a computer-readable storage medium that solve the technical drawbacks of the related art.
According to a first aspect of embodiments of the present disclosure, there is provided a function creation method, including a client, a gateway, and a function computing platform, including:
the client side determines an application function of the target application based on attribute information of the target application carried in a function creation request sent by a user, creates a corresponding function based on the application function, and sends a function processing request to the gateway, wherein the function processing request carries the function;
and the gateway sends the function carried in the received function processing request to the function computing platform.
According to a second aspect of embodiments of the present specification, there is provided a function call method, comprising a client, a gateway and a function computing platform, wherein,
the client initiates a webpage processing request based on the webpage operation of the access user, and sends the webpage processing request to the gateway, wherein the webpage processing request carries a function identifier;
the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request;
the function computing platform processes the webpage processing request based on the objective function and returns a processing result to the gateway;
And the gateway receives a processing result returned by the function computing platform and sends the processing result to the client, wherein the objective function is obtained through the function creation method.
According to a third aspect of embodiments of the present disclosure, there is provided a function calling method, applied to a gateway, including:
receiving a webpage processing request initiated by a client based on a webpage operation of an access user, wherein the webpage processing request carries a function identifier;
invoking an objective function from a function computing platform based on the function identifier carried in the webpage processing request;
and receiving a processing result of the function computing platform on the webpage processing request based on the objective function, and sending the processing result to the client, wherein the objective function is obtained through the function creation method.
According to a fourth aspect of embodiments of the present specification, there is provided a function creation system including a client, a gateway, and a function calculation platform, including:
the client is configured to determine an application function of a target application based on attribute information of the target application carried in a function creation request sent by a user, create a corresponding function based on the application function, and send a function processing request to the gateway, wherein the function processing request carries the function;
The gateway is configured to send the function carried in the received function processing request to the function computing platform.
According to a fifth aspect of embodiments of the present description, there is provided a function call system comprising a client, a gateway and a function computing platform, wherein,
the client is configured to initiate a webpage processing request based on the webpage operation of an access user and send the webpage processing request to the gateway, wherein the webpage processing request carries a function identifier;
the gateway is configured to call an objective function from the function computing platform based on the function identifier carried in the webpage processing request;
the function computing platform is configured to process the webpage processing request based on the objective function and return a processing result to the gateway;
the gateway is further configured to receive a processing result returned by the function computing platform and send the processing result to the client, wherein the objective function is obtained through the function creation method.
According to a sixth aspect of embodiments of the present specification, there is provided a function calling device comprising:
The request receiving module is configured to receive a webpage processing request initiated by a client based on the webpage operation of an access user, wherein the webpage processing request carries a function identifier;
a function calling module configured to call an objective function from a function computing platform based on the function identifier carried in the web page processing request;
and the request processing module is configured to receive a processing result of the function computing platform for processing the webpage based on the target function and send the processing result to the client, wherein the target function is obtained through the function creation method.
According to a seventh aspect of embodiments of the present specification, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer executable instructions that, when executed by the processor, implement the steps of the function creation method or the function call method described above.
According to an eighth aspect of embodiments of the present specification, there is provided a computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the above-described function creation method or the above-described function call method.
An embodiment of the present disclosure implements a method and an apparatus for creating a function, where the method for creating a function includes a client, a gateway, and a function computing platform, including: the client side determines an application function of the target application based on attribute information of the target application carried in a function creation request sent by a user, creates a corresponding function based on the application function, and sends a function processing request to the gateway, wherein the function processing request carries the function; and the gateway sends the function carried in the received function processing request to the function computing platform. Specifically, the function creation method fully utilizes the characteristic that function calculation does not need to be concerned with a server, splits the function of the target application into independent functions to be placed on a function calculation platform, and obviously reduces the development and operation cost of the target application, so that developers do not need to be concerned with the server, and are more focused on the realization of the target function, and development efficiency is improved.
Drawings
FIG. 1 is a block diagram of a server system adapted for web applications based on function computation, according to one embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of function creation provided by one embodiment of the present description;
FIG. 3 is a flow chart of a method of function invocation provided in one embodiment of the present disclosure;
FIG. 4 is a process flow diagram of a method for function call provided in one embodiment of the present disclosure;
FIG. 5 is a flow chart of a method of function call applied to a gateway provided in one embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a function creation system according to one embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a first function call system according to one embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a second function call system according to one embodiment of the present disclosure;
FIG. 9 is a block diagram of a computing device provided in one embodiment of the present description.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many other forms than described herein and similarly generalized by those skilled in the art to whom this disclosure pertains without departing from the spirit of the disclosure and, therefore, this disclosure is not limited by the specific implementations disclosed below.
The terminology used in the one or more embodiments of the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the specification. As used in this specification, one or more embodiments and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first may also be referred to as a second, and similarly, a second may also be referred to as a first, without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
First, terms related to one or more embodiments of the present specification will be explained.
serverless: the architecture without server means that the logic of the server is realized by a developer, runs in a stateless computing container, is triggered by an event, is completely managed by a third party, and the state of the project level is stored in a database or other media.
And (3) function calculation: function as a service, a function, a service, is a form of (serverless) serverless computing, essentially an event-driven, message-triggered service.
API gateway: the API gateway is used as an internal bridge and an external bridge; providing service to the outside through exposing the HTTP interface; and managing interfaces exposed to the outside of all the project systems, completing authentication of the request, and distributing the request to each project system inside.
Restful api: the restful API is a REST-style API in which REST represents state transitions (representation state transfer). In brief, resources are represented by URIs, and operations on these resources are characterized by HTTP methods (GET, POST, PUT, DELETE).
Specifically, server is a no-server architecture, which aims to make the developer concentrate more on the program functions themselves, and the third party service handles all the complexity related to server deployment, storage and database. The method makes the server invisible, provides a cost-effective service, brings a new mode of software architecture and application program deployment to all developers, and is also the evolution trend from server-base to server less and the place of user demands in the whole cloud computing industry.
Function computation (Function as a service) serves as a subset of the serverless, provides an event-driven full-support serverless computing service, is invoked on smaller and finer granularity, and is elastically stretched in real time to meet the requirements of various peak-valley flow, and is used according to the quantity, so that the cost is saved.
A console is a web application that is a typical front-end and back-end split architecture that communicates through RESTful APIs. The console provides the management function of cloud products for users, and helps the users to better use cloud resources. Because the rear end of the console is realized based on the java language and the spring framework, only the java API can be called, if the dependent service only provides the APIs of other development languages, the corresponding functions cannot be supported, and the development constraint is large. Meanwhile, the back-end server has large release, deployment, upgrading and operation costs, occupies a large amount of research and development time and influences research and development efficiency.
In practical application, the console can be built based on SAE (namely a server application engine, serverless App Engine, SAE for short), the whole spring project is packaged and then deployed on SAE, server is realized, the service is used according to the requirement, the charging is carried out according to the quantity, and meanwhile, the operation and maintenance cost is reduced. This is also a server architecture suitable for web applications, but since SAE is a packaged deployment of the entire application, there are the following significant drawbacks:
1. The whole application is deployed on SAE, if one function is abnormal to cause the whole application to fail, other functions can be influenced in a linked manner, and isolation among a plurality of functions is poor.
2. The elastic speed is slower: the capacity expansion speed of SAE is in the order of minutes, and when the flow increases suddenly, there may be a problem that the capacity expansion is not timely resulting in that part of the requests are not responded.
3. Developing language locking: all functions can be developed based on only one programming language, limiting flexibility of development.
In this specification, however, a function creation method is provided. One or more embodiments of the present specification relate to a function creation system, two function calling methods, a function calling system, a function calling apparatus, a computing device, and a computer-readable storage medium, one by one, which are described in detail in the following embodiments.
In specific implementation, the function creation method and the function call method provided in the present specification can be applied to a server system.
Referring to FIG. 1, FIG. 1 illustrates a block diagram of a server system adapted for web applications based on function computing, according to one embodiment of the present description.
The server system may be understood as a function creation system or a function call system in the embodiment of the present specification.
Taking the server system as an example, the function creation system in the embodiment of the present specification will be described in detail.
Specifically, the function creation system in fig. 1 includes a console front end, a gateway authentication layer and a function layer (i.e., a function computing platform), where the console front end is used for user interaction, and initiates a RESTful request; the gateway authentication layer is used for calling a function through an http trigger after authenticating the user; the function computing platform is used to store functions (function a.. function Z), each corresponding to one function of the console, and supports a plurality of development languages, such as nodejs, python, go language, etc.
When the method is implemented, firstly, the functions of the web application of the console are determined, the functions of the web application are disassembled into independent functions, and different development languages are selected to create functions based on actual needs; and sending the created function to a gateway authentication layer by the front end of the control console, authenticating a user by the gateway authentication layer, and sending the function created by the control console to a function computing platform after the authentication is passed so as to realize the storage of the function in the function computing platform.
In the embodiment of the specification, the server system suitable for the web application based on function calculation can utilize the characteristics of elasticity, no operation and maintenance and pay-per-quantity of function calculation, so that the resource utilization rate of the web application is greatly improved, and the calculation resource limitation is avoided; and the functions of the web application are disassembled into independent functions, so that a developer can select different development languages for each function, and the flexibility of function development is enhanced. In addition, the granularity of functions can be achieved when the web application is updated and deployed, and only the changed functions are updated, so that the full control on the change influence surface is realized.
Referring to fig. 2, fig. 2 shows a flowchart of a function creation method provided according to an embodiment of the present disclosure, where the function creation method may be applied to the server system of the foregoing embodiment, and includes a client, a gateway, and a function computing platform, and specifically includes the following steps.
Step 202: the client side determines an application function of the target application based on attribute information of the target application carried in a function creation request sent by a user, creates a corresponding function based on the application function, and sends a function processing request to the gateway, wherein the function processing request carries the function.
Wherein, the client can be understood as the front end of the console of the above embodiment; the gateway can be understood as the gateway authentication layer of the above embodiment; the target application may be understood as a history application or an application to be developed (e.g., a web application), and the attribute information of the target application may be understood as an application identification of the target application, an application profile, and the like.
Specifically, the client determines an application function of a target application based on attribute information of the target application carried in a function creation request sent by a user, creates a corresponding function based on the application function, and includes:
the client receives a function creation request sent by a user, and analyzes attribute information of a target application carried in the function creation request to determine at least one application function corresponding to the target application;
and determining a corresponding function creation language for each application function based on the preset requirement, and creating at least one corresponding function for the at least one application function based on the function creation language corresponding to each application function.
Taking the target application as a historical application and taking the attribute information of the target application as an application identifier of the target application as an example, after receiving a function creation request sent by a user, the client can acquire the target application based on the application identifier of the target application, and can determine which application functions the target application comprises through analysis of the target application. Such as a password modification function, a visitor number accumulation function, a video play function, etc.
In the case that the target application is an application to be created, the attribute information of the target application may be an application profile of the application to be created, that is, it may be determined by the application profile which application functions the application to be created needs to have, and the like.
In practical application, one target application corresponds to a plurality of application functions, and after the plurality of application functions corresponding to the target application are obtained in the above manner, a corresponding function can be created for each application function.
Specifically, the preset requirements may be set according to actual applications, for example, the preset requirements may be understood as development habits of developers, running efficiency of functions, or development time of functions.
In specific implementation, a function creation language corresponding to each application function can be determined according to the preset requirement, and then the function creation is performed on each application function based on the function creation language corresponding to the application function.
In the embodiment of the specification, the corresponding independent function can be created for the application function based on the application function, and the function can be created through different development languages according to actual requirements, so that the flexibility of function development is improved, and the user experience is improved.
Step 204: and the gateway sends the function carried in the received function processing request to the function computing platform.
The function is created by the client through different development languages according to actual requirements. In practical application, after receiving a function processing request sent by a client, a gateway sends a function carried in the function processing request to a function computing platform for subsequent function call realization.
Specifically, the gateway sends the function carried in the received function processing request to the function computing platform, which includes:
the gateway performs identity verification on the user based on the attribute information of the user carried in the received function processing request;
and sending the function carried in the function processing request to the function computing platform under the condition that verification is passed.
Wherein, the attribute information of the user comprises, but is not limited to, a login account number, a login password and the like of the user.
Taking the attribute information of the user as a login account and a login password as an example, the gateway performs identity verification on the user based on the received attribute information of the user carried in the function processing request, which can be understood as that the gateway judges whether the user who sends the function creation request is a legal login account, namely whether the login account and the login password of the user are correct, if so, the gateway can send the function created by the gateway at the client to the function computing platform, and if not, the gateway does not perform function transmission so as to ensure the safety of data transmission.
In the embodiment of the specification, the function creation method fully utilizes the characteristic that function calculation does not need to be concerned with a server, splits the function of the target application into independent functions to be placed on a function calculation platform, and obviously reduces the development and operation cost of the target application, so that a developer does not need to be concerned with the server, and is more focused on the realization of the function of the target application, and development efficiency is improved.
In another embodiment of the present disclosure, in order to reduce network overhead of subsequent function calls, location deployment may be performed on the created function based on location information, and specific implementation manners are as follows:
before the gateway sends the function carried in the received function processing request to the function computing platform, the gateway further comprises:
and the gateway deploys at least one piece of corresponding position information for each function in the at least one function and performs function backup based on the at least one piece of position information corresponding to each function.
Specifically, the functions of each function created based on the application function are different, for example, some functions are modification functions, some functions are addition functions, some functions are counting functions, and the like.
In practical applications, the functions of the same function may be called by developers in different regions, and in this case, if the functions are deployed in the place a and the developers in the place B, the network overhead will be great when the developers call the functions in the place a in the place B.
Currently, many enterprises will set up branches in various regions, and the functions that each developer of the branches may need to call are identical, so that different call positions can be set for a function with the same function based on actual needs of the enterprises, that is, at least one position information corresponding to each function is deployed according to the actual needs, for example, the function a is deployed in two regions of a and B.
When a function is deployed based on the corresponding location information, the function to be deployed needs to be backed up based on the location information, for example, function a is backed up once in the network of the a site, and function B is backed up once in the network of the B site.
In another embodiment of the present disclosure, by adopting the function creation method provided in the embodiment of the present disclosure, when an application function is updated, the entire back-end application may not be updated, only the function corresponding to the application function needs to be updated, so that an impact surface of code change is fully controlled, and development cost increase caused by a large number of code changes is avoided, and specific implementation manners are as follows:
After the gateway sends the function carried in the received function processing request to the function computing platform, the gateway further comprises:
the client receives the application update request sent by the user, analyzes the application update request to determine at least one updated application function corresponding to the application update request,
determining a corresponding function creation language for the updated application function based on a preset requirement, creating at least one corresponding update function for the at least one updated application function based on the function creation language corresponding to each updated application function, and sending the application update request and the at least one update function to the gateway;
and the gateway performs identity verification on the user based on the attribute information of the user carried in the application update request, and sends the update function to the function computing platform under the condition that verification is passed.
The details of the preset requirements and the user authentication can be referred to the above embodiments, and are not described herein.
Specifically, after receiving an application update request sent by a user, the client analyzes the application update request to determine a target application corresponding to the application update request and an application function updated by the target application.
And determining a corresponding function creation language for the updated application function based on the preset requirement, creating a corresponding update function for the updated application function based on the function creation language, and then sending an application update request and the update function to the gateway.
The gateway firstly verifies the user identity based on the attribute information of the user carried in the application update request, and under the condition that the verification is passed, the gateway sends an updated function corresponding to the updated application function to the function computing platform. At this time, the function computing platform stores two versions of functions corresponding to the application function, namely, a function before update and a function after update, and the function before update and the function after update correspond to the same application function. For example, the function of the function before update is an account modification function, and the function of the function after update has not only an account modification function but also an association function with other accounts.
In another embodiment of the present disclosure, in order to ensure that the function of the function may meet the web application, a developer may further perform adjustment such as adding, deleting, or modifying the function of the function computing platform based on the actual web application requirement, where a specific implementation manner is as follows:
After the gateway sends the function carried in the received function processing request to the function computing platform, the gateway further comprises:
the client receives a function adjustment request sent by the user and sends the function adjustment request to the gateway, wherein the function adjustment request carries attribute information and function identification of the user;
the gateway performs identity verification on the user based on the attribute information of the user, which is carried in a function adjustment request sent by a received client, and sends the function adjustment request to the function computing platform under the condition that verification is passed;
and the function computing platform determines a function based on the function identifier carried in the function adjustment request, adjusts the function based on the function adjustment request, and sends an adjustment result to the gateway.
Where a function adjustment request may be understood as a request for modification, deletion, or addition of a function.
In practical application, the client may receive a request for modifying, deleting or adding a function sent by the user, and send the request to the gateway, after the authentication of the user is passed, the gateway sends the request for adjusting the function to the function computing platform, the function computing platform determines the function to be adjusted based on the function identifier, and adjusts the function based on the request for adjusting the function, for example, the function computing platform modifies the function name, deletes the function, adds the function, and the like, and returns an adjustment result to the gateway, and the gateway returns the adjustment result to the client. The adjustment result may be understood as a message indicating whether the adjustment was successful.
In addition, after the gateway sends the function carried in the received function processing request to the function computing platform, the gateway further includes:
and the function computing platform receives the function sent by the gateway and sets processing permission for the function.
The processing authority is understood as a calling authority, an adjusting authority, and the like.
In practical application, in order to further ensure the security of the function, after the function computing platform receives the function sent by the gateway, the function computing platform sets the calling and adjusting rights of the function, for example, only the creating user of the function is set to have the calling and adjusting rights, and other users only have the calling rights, so that the function is prevented from being modified by other users, and the security of the function is ensured.
In the embodiment of the present disclosure, the function creation method may be applied to the server system of the above embodiment, which has the advantage of high stability: each function corresponds to a function, each function corresponds to an independent running environment, and if the execution abnormality of a certain function does not influence the execution of other functions, the service stability is greatly improved. Low cost: each function is deployed on demand, charged on a volume basis; resource scheduling can be controlled to function granularity, whereas traditional web architecture can only achieve application granularity, resulting in idle computing resources. Has elasticity: when sudden increase is requested, the function calculation can achieve millisecond elastic capability and timely capacity expansion. Break through the language limit: each function can select different development languages as development languages, so that a developer can select an appropriate development language according to different requirements, performances and dependence, and user experience is improved.
Referring to fig. 3, fig. 3 shows a flowchart of a function calling method provided in an embodiment of the present disclosure, where the function creating method may be applied to the server system of the foregoing embodiment, and the method includes a client, a gateway, and a function computing platform, and specifically includes the following steps.
Step 302: the client initiates a webpage processing request based on the webpage operation of the access user, and sends the webpage processing request to the gateway, wherein the webpage processing request carries a function identifier.
Wherein, the client can be understood as the front end of the console of the above embodiment; the gateway may be understood as the gateway authentication layer of the above embodiments.
In practical applications, the users in the above embodiments and the access users in the present embodiment may be the same user or different users. Where the accessing user may be understood as a user accessing a web page of the target application.
Specifically, the page operation of the access user can be understood as an operation that the access user clicks or touches a certain picture, link or control on the page of the target application. Such as accessing a login page of a user at a target application of the client, clicking on a login control. When any operation of the access user on the page is performed, a webpage processing request is triggered.
Taking a webpage processing request as a password modification request as an example, an access user clicks a modification control on a page of a certain target application of a client, namely, initiates an http request, namely, a webpage processing request, and the client sends the webpage processing request to a gateway, wherein the webpage processing request carries a function identifier corresponding to the webpage processing request.
Step 304: and the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request.
Specifically, the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request, and the method comprises the following steps:
the gateway performs identity verification on the user based on the attribute information of the user carried in the received webpage processing request;
and calling an objective function from the function computing platform based on the function identifier carried in the webpage processing request under the condition that verification is passed.
The detailed description of the gateway for performing the authentication on the access user based on the attribute information of the access user can be referred to the above embodiment, and will not be described herein.
Specifically, the gateway performs identity verification on the access user based on the attribute information of the access user, and under the condition that verification is passed, the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request.
In implementation, in order to save network overhead, the called objective function is generally determined based on the IP address of the accessing user, and the specific implementation manner is as follows:
the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request, and the method comprises the following steps:
and the gateway calls an objective function from the function computing platform based on the address identification of the access user and the function identification carried in the webpage processing request.
Wherein the address identification of the accessing user can be understood as the IP address of the accessing user.
In the embodiment of the present disclosure, when performing the objective function call, the relationship between the function and the IP address of the accessing user is considered not only based on the function identifier but also from the network overhead.
Specifically, the gateway calls an objective function from the function computing platform based on the address identifier of the access user and the function identifier carried in the webpage processing request, and the method includes:
the gateway determines the address identification of the access user carried in the webpage processing request;
determining at least one initial function of the function computing platform based on the function identifier, and determining position information corresponding to each initial function;
Based on the position information corresponding to each initial function, judging whether an objective function matched with the address identification of the access user exists in the at least one initial function,
if yes, the objective function is called from the function computing platform,
if not, calling a preset initial function matched with the address identifier from the function computing platform as the target function.
In combination with the above embodiment, each function will backup a plurality of functions based on the location information, that is, a function with the same function is prepared for each location according to the actual requirement, so one function identifier may correspond to a plurality of functions.
In practical application, after receiving a web page processing request, a gateway first determines an address identifier of an access user carried in the web page processing request; meanwhile, determining a plurality of initial functions corresponding to the function identifications and position information corresponding to each initial function from a function computing platform based on the function identifications; and then matching the position information corresponding to each initial function with the address identification of the access user, and taking the initial function matched with the address identification of the access user as the target function.
For example, according to the address identification of the access user, determining that the access user is at the site A, where the initial function corresponding to the function identification includes a function A, a function B and a function C, where the function A corresponds to the site A, the function B corresponds to the site B, and the function C corresponds to the site C, and determining that the address identification of the access user corresponds to the location information of the function A, and taking the function A as the target function.
Specifically, after determining the objective function, the objective function is called from the function computing platform to process the web page processing request based on the objective function.
In the implementation, there is a case that the location information of all the initial functions is not matched with the address identifier of the accessing user, and in this case, the preset initial function matched with the address identifier can be called from the function computing platform as the target function.
If the previous D-place preset function is A, the function A is used as an objective function.
In the embodiment of the specification, when the function call is performed, the location information of the access user can be judged, the target function corresponding to the location information of the access user is found to perform webpage processing, and the network overhead of the function call can be greatly reduced.
In addition, in another case, there may be multiple versions of the objective function, in the case of updating the application function of the objective application, in the above embodiment, the objective function may also be updated correspondingly, and then there may be multiple versions of the objective function, where in this case, not all new versions of the function are adapted to all access users, each version of the function may correspond to a gray list, only the access users in the gray list may call the new version of the function, for example, since the new version of the function has instability, only a tester may call the new version of the function, so in the case that the objective function has different versions, gray test needs to be performed on the access personnel to ensure the security of function call, which is implemented as follows:
the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request, and the method comprises the following steps:
the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request;
under the condition that different versions of the objective function exist, determining a user set corresponding to the objective function of the latest version;
And calling the latest version of the objective function from the function computing platform under the condition that the access user belongs to the user in the user set.
Specifically, a corresponding user set is set for the latest version of the objective function in advance, and only the access user in the user set can call the objective function.
Firstly, a gateway determines an objective function from a function computing platform based on a function identifier, then determines the objective function of the latest version under the condition that a plurality of versions exist in the objective function, acquires a user set corresponding to the objective function of the latest version, and takes the function of the latest version in the function computing platform as the objective function under the condition that the access user belongs to the user set based on attribute information (such as a login account of the access user) of the access user; if the accessing user does not belong to the user set, the function of which version the accessing user belongs to is seen, then the functions are ordered, and the function of the first version is selected as the target function.
In addition, in the above embodiment, after determining the objective function based on the address identifier of the accessing user, in order to ensure the accuracy of the objective function, further determination may be further performed on the objective function based on the version, which is specifically implemented as follows:
The invoking the objective function from the function computing platform includes:
the gateway determines a user set corresponding to the objective function of the latest version under the condition that the objective function has different versions;
and calling the latest version of the objective function from the function computing platform under the condition that the access user belongs to the user in the user set.
In specific implementation, the detailed process of further determining the objective function based on different versions may be referred to the above embodiments, which are not described herein.
In another embodiment of the present disclosure, in order to ensure that when a user's web page processing request suddenly increases, the function computing platform may perform expansion in time with the elastic capability of millisecond level, and the function computing platform may perform expansion for a certain function when the number of times of calling the function suddenly increases, a specific implementation manner is as follows:
and the function computing platform increases the number of the target functions according to a preset capacity expansion condition when the number of times of calling the target functions, which is sent by the gateway and is received, is greater than or equal to a preset number threshold.
The preset number threshold may be set according to practical applications, for example, the preset number threshold is 50 or 60.
In the implementation, when the number of calls for a certain target function sent by the received gateway is greater than or equal to a preset number threshold, the function computing platform increases the number of the target functions according to a preset capacity expansion condition. The preset capacity expansion condition can also be set according to practical application, for example, 3 objective functions are added when the calling number is 80; when the number of calls is 100, 4 objective functions are added.
Step 306: and the function computing platform processes the webpage processing request based on the objective function and returns a processing result to the gateway.
Specifically, the function computing platform processes the webpage processing request based on the target function under the condition of receiving the target function call of the gateway, for example, modifies the function name based on the target function, modifies the login password of the user and the like. And returns the processing result to the gateway, for example, returns a message of successful login password modification to the gateway.
Step 308: and the gateway receives the processing result returned by the function computing platform and sends the processing result to the client.
Wherein the objective function is obtained by the function creation method of the above embodiment.
Specifically, after receiving the processing result returned by the function computing platform, the gateway returns the processing result to the client.
In the embodiment of the specification, after the function calling method receives the webpage processing request, the function calling method can call the target function created by any development language in the function computing platform based on the function identifier in the webpage processing request, and the webpage processing request is operated based on the target function, so that the flexibility is high; when the target function is called, the target function is selected based on the address identification of the access user, so that network overhead is saved; in addition, when a request facing a certain function is suddenly increased, the function computing platform can also achieve millisecond-level elastic capacity, expand capacity of the function computing platform in time and improve user experience.
The function calling method provided in the present specification is further described below with reference to fig. 4 by taking an application of the function calling method in a server system as an example. Fig. 4 is a flowchart of a processing procedure of a function calling method according to an embodiment of the present disclosure, which specifically includes the following steps.
Step 402: the console front end sends a web page processing request to the gateway authentication layer based on user operation.
The web page processing request can be understood as a payment request, and the web page processing request carries attribute information of a user and a function identifier of a function to be called.
Step 404: the gateway authentication layer performs identity verification on the user based on the attribute information of the user.
For example, based on the login account and login password of the user, whether the user has successfully logged in is determined.
Step 406: and the gateway authentication layer performs environment judgment.
In practical application, under the condition of real development, a development environment, a prefire environment, an online environment and the like exist for function functions. Under the condition of developing a function, the development and creation of the function can be performed in a development environment, verification is performed in a prefire environment after the development is completed, and the function is online after the verification is completed, so that the function is actually invoked in the online environment.
That is, the gateway authentication layer judges whether the current environment is an on-line environment, and can only make function call under the on-line environment.
Step 408: the gateway authentication layer calls a corresponding function from the function computing platform based on the function identification of the function to be called.
Step 410: functions called by the function computing platform and developed through multiple languages operate on web page processing requests through an OpenAPI.
Among other things, an OpenAPI may be understood as a call interface for other pages or applications.
Still taking a web page processing request as an example of a payment request, the function may be understood as a payment function, which may call a payment page through an OpenAPI to perform a payment operation.
Step 412: and the function computing platform receives an operation result of operating the webpage processing request through the OpenAPI.
Step 414: and the function computing platform sends the operation result to the gateway authentication layer.
Step 416: the gateway authentication layer sends the operation result to the front end of the control desk.
The gateway authentication layer provides a unified interface (i.e. http trigger) to the outside, the front end of the console accesses different functions by customizing different functionnames (i.e. function names), and request parameters are transmitted to a function computing platform (faas function) through the gateway authentication layer, for example:
an interface: fcservice/runfunction. Json mode: POST parameters: { "FunctionName": "token/getToken",// the name of the fc function to be called "params" { }// the specific parameters of the request, json structure, will be passed through to the fas function }
The function layer (function computing platform) is a plurality of fas functions, and breaks up the functions of the console into a plurality of functions, wherein each function corresponds to a console function. The web application management granularity is thinned from an application level to a function level, so that an developer can doubly improve the efficiency in each stage of function development, operation and maintenance and upgrading. And each function can select a proper development language according to different requirements, performances and dependencies when the function is developed (created). When a certain function is updated, only the corresponding function is needed to be changed, and the influence surface of code change is fully controlled.
In the embodiment of the specification, the function calling method firstly reforms the traditional web application through the capability of function calculation, and breaks down the functions of the web application to the function granularity, so as to achieve the purposes of serverless, no operation and maintenance, elasticity, low cost and language limitation breakthrough, and the function calling can be directly carried out without considering the development language of the function in actual application.
Referring to fig. 5, fig. 5 shows a flowchart of a function calling method provided in an embodiment of the present disclosure, where the function calling method is applied to a gateway, and specifically includes the following steps.
Step 502: and receiving a webpage processing request initiated by the client based on the webpage operation of the access user, wherein the webpage processing request carries a function identifier.
Step 504: and calling an objective function from a function computing platform based on the function identifier carried in the webpage processing request.
Specifically, the calling the objective function from the function computing platform based on the function identifier carried in the web page processing request includes:
and carrying out identity verification on the access user based on the attribute information of the access user carried in the webpage processing request, and calling an objective function from a function computing platform based on the function identifier carried in the webpage processing request under the condition that verification is passed.
Step 506: and receiving a processing result of the function computing platform on the webpage processing request based on the objective function, and sending the processing result to the client.
The objective function is obtained through the function creation method.
Specifically, the function calling method provided in the embodiments of the present disclosure may refer to the detailed processing procedure of the gateway in the function calling method of the foregoing embodiments, which is not described herein.
In the embodiment of the specification, after the function calling method receives the webpage processing request, the function identifier in the webpage processing request can be used for calling the target function created by any development language in the function computing platform, and the webpage processing request is operated based on the target function, so that the flexibility is high.
Corresponding to the method embodiment, the present disclosure further provides a function creation system embodiment, and fig. 6 shows a schematic structural diagram of a function creation system provided in one embodiment of the present disclosure. As shown in fig. 6, the system includes a client 602, a gateway 604, and a function computing platform 606, wherein:
the client 602 is configured to determine an application function of a target application based on attribute information of the target application carried in a function creation request sent by a user, create a corresponding function based on the application function, and send a function processing request to the gateway 604, where the function processing request carries the function;
The gateway 604 is configured to send the function carried in the received function processing request to the function computing platform 606.
Optionally, the client 602 is further configured to:
receiving a function creation request sent by a user, and analyzing attribute information of a target application carried in the function creation request to determine at least one application function corresponding to the target application;
and determining a corresponding function creation language for each application function based on the preset requirement, and creating at least one corresponding function for the at least one application function based on the function creation language corresponding to each application function.
Optionally, the gateway 604 is further configured to:
and deploying corresponding at least one piece of position information for each function in the at least one function, and carrying out function backup based on the at least one piece of position information corresponding to each function.
Optionally, the client 602 is further configured to:
receiving an application update request sent by the user, analyzing the application update request to determine at least one updated application function corresponding to the application update request,
Determining a corresponding function creation language for the updated application function based on a preset requirement, creating at least one corresponding update function for the at least one updated application function based on the function creation language corresponding to each updated application function, and sending the application update request and the at least one update function to the gateway 604;
the gateway 604 is further configured to: and carrying out identity verification on the user based on the attribute information of the user carried in the application update request, and sending the update function to the function computing platform 606 under the condition that verification is passed.
Optionally, the client 602 is further configured to:
receiving a function adjustment request sent by the user, and sending the function adjustment request to the gateway 604, where the function adjustment request carries attribute information and a function identifier of the user;
the gateway 604 is further configured to: performing identity verification on the user based on attribute information of the user, which is carried in a function adjustment request sent by a received client, and sending the function adjustment request to the function computing platform 606 when verification is passed;
The function computing platform 606 is further configured to: and determining a function based on the function identifier carried in the function adjustment request, adjusting the function based on the function adjustment request, and sending an adjustment result to the gateway 604.
Optionally, the gateway 604 is further configured to:
performing identity verification on the user based on the attribute information of the user carried in the received function processing request;
in case the verification is passed, the function carried in the function processing request is sent to the function computing platform 606.
Optionally, the function computing platform 606 is further configured to:
the function sent by the gateway 604 is received and processing permissions are set for the function.
The above is an exemplary scheme of a function creation system of the present embodiment. It should be noted that, the technical solution of the function creation system and the technical solution of the function creation method belong to the same concept, and details of the technical solution of the function creation system, which are not described in detail, can be referred to the description of the technical solution of the function creation method.
Corresponding to the above method embodiments, the present disclosure further provides a function call system embodiment, and fig. 7 shows a schematic structural diagram of a first function call system provided in one embodiment of the present disclosure. As shown in fig. 7, the system includes a client 702, a gateway 704, and a function computing platform 706, wherein:
The client 702 is configured to initiate a web page processing request based on a page operation of an access user, and send the web page processing request to the gateway 704, where the web page processing request carries a function identifier;
the gateway 704 is configured to call an objective function from the function computing platform 706 based on the function identifier carried in the web page processing request;
the function computing platform 706 is configured to process the web page processing request based on the objective function, and return a processing result to the gateway 704;
the gateway 704 is further configured to receive a processing result returned by the function computing platform 706, and send the processing result to the client 702, where the objective function is obtained by the function creation method described above.
Optionally, the gateway 704 is further configured to:
and calling an objective function from the function computing platform 706 based on the address identification of the access user and the function identification carried in the webpage processing request.
Optionally, the gateway 704 is further configured to:
determining an address identifier of the access user carried in the webpage processing request;
Determining at least one initial function of the function computing platform 706 based on the function identifier, and determining position information corresponding to each initial function;
based on the position information corresponding to each initial function, judging whether an objective function matched with the address identification of the access user exists in the at least one initial function,
if so, the objective function is called from the function computing platform 706,
if not, calling a preset initial function matched with the address identifier from the function computing platform 706 as the target function.
Optionally, the gateway 704 is further configured to:
invoking an objective function from the function computing platform 706 based on the function identifier carried in the web page processing request;
under the condition that different versions of the objective function exist, determining a user set corresponding to the objective function of the latest version;
in the event that it is determined that the accessing user belongs to a user in the set of users, the latest version of the objective function is invoked from the function computing platform 706.
Optionally, the gateway 704 is further configured to:
performing identity verification on the user based on the attribute information of the user carried in the received webpage processing request;
In the case of verification passing, an objective function is invoked from the function computing platform 706 based on the function identification carried in the web page processing request.
Optionally, the function computing platform 706 is further configured to:
and when the number of times of calling the target function sent by the gateway 704 is larger than or equal to a preset number threshold, increasing the number of the target functions according to a preset capacity expansion condition.
Optionally, the gateway 704 is further configured to:
performing identity verification on the user based on the attribute information of the user carried in the received webpage processing request;
in the case of verification passing, an objective function is invoked from the function computing platform 706 based on the function identification carried in the web page processing request.
The above is an exemplary scheme of a function call system of the present embodiment. It should be noted that, the technical solution of the function call system and the technical solution of the function call method belong to the same conception, and details of the technical solution of the function call system, which are not described in detail, can be referred to the description of the technical solution of the function call method.
Corresponding to the above method embodiments, the present disclosure further provides a function calling device embodiment, and fig. 8 shows a schematic structural diagram of a second function calling device provided in one embodiment of the present disclosure. As shown in fig. 8, the apparatus includes:
A request receiving module 802, configured to receive a web page processing request initiated by a client based on a page operation of an access user, where the web page processing request carries a function identifier;
a function calling module 804 configured to call an objective function from a function computing platform based on the function identifier carried in the web page processing request;
and a request processing module 806, configured to receive a processing result of the function computing platform on the web page processing request based on the objective function, and send the processing result to the client, where the objective function is obtained by the function creation method described above.
The above is a schematic scheme of a function calling device of the present embodiment. It should be noted that, the technical solution of the function calling device and the technical solution of the function calling method applied to the gateway belong to the same concept, and details of the technical solution of the function calling device, which are not described in detail, can be referred to the description of the technical solution of the function calling method applied to the gateway.
Fig. 9 illustrates a block diagram of a computing device 900 provided in accordance with one embodiment of the present specification. The components of computing device 900 include, but are not limited to, memory 910 and processor 920. Processor 920 is coupled to memory 910 via bus 930 with database 950 configured to hold data.
Computing device 900 also includes an access device 940, access device 940 enabling computing device 900 to communicate via one or more networks 960. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 940 may include one or more of any type of network interface, wired or wireless (e.g., a Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 900 and other components not shown in FIG. 9 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device illustrated in FIG. 9 is for exemplary purposes only and is not intended to limit the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 900 may be any type of stationary or mobile computing device including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smart phone), wearable computing device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 900 may also be a mobile or stationary server.
Wherein the processor 920 is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the function creation method or the function call method described above.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the function creation method or the function call method belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the function creation method or the function call method.
An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the function creation method or the function call method described above.
The above is an exemplary version of a computer-readable storage medium of the present embodiment. It should be noted that, the technical solution of the storage medium and the technical solution of the function creation method or the function call method belong to the same concept, and details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the function creation method or the function call method.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying 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.
The computer instructions include computer program code that may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, randomAccess Memory), an electrical carrier signal, a telecommunication signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the embodiments are not limited by the order of actions described, as some steps may be performed in other order or simultaneously according to the embodiments of the present disclosure. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily all required for the embodiments described in the specification.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are merely used to help clarify the present specification. Alternative embodiments are not intended to be exhaustive or to limit the invention to the precise form disclosed. Obviously, many modifications and variations are possible in light of the teaching of the embodiments. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the invention. This specification is to be limited only by the claims and the full scope and equivalents thereof.

Claims (13)

1. A function creation method comprises a client, a gateway and a function calculation platform, and comprises the following steps:
the client receives a function creation request sent by a user, and analyzes attribute information of a target application carried in the function creation request to determine at least one application function corresponding to the target application; determining a corresponding function creation language for each application function based on a preset requirement, creating at least one corresponding function for the at least one application function based on the function creation language corresponding to each application function, and sending a function processing request to the gateway, wherein the function processing request carries the at least one function, and the preset requirement comprises development habit of a developer, operation efficiency of the function or development time of the function;
and the gateway sends the at least one function carried in the received function processing request to the function computing platform.
2. The function creation method according to claim 1, wherein before the gateway sends the at least one function carried in the received function processing request to the function computing platform, the method further comprises:
And the gateway deploys at least one piece of corresponding position information for each function in the at least one function and performs function backup based on the at least one piece of position information corresponding to each function.
3. The function creation method according to claim 1, wherein after the gateway sends the at least one function carried in the received function processing request to the function computing platform, the method further comprises:
the client receives the application update request sent by the user, analyzes the application update request to determine at least one updated application function corresponding to the application update request,
determining a corresponding function creation language for the updated application function based on a preset requirement, creating at least one corresponding update function for the at least one updated application function based on the function creation language corresponding to each updated application function, and sending the application update request and the at least one update function to the gateway;
and the gateway performs identity verification on the user based on the attribute information of the user carried in the application update request, and sends the update function to the function computing platform under the condition that verification is passed.
4. The function creation method according to claim 1, wherein after the gateway sends the at least one function carried in the received function processing request to the function computing platform, the method further comprises:
the client receives a function adjustment request sent by the user and sends the function adjustment request to the gateway, wherein the function adjustment request carries attribute information and function identification of the user;
the gateway performs identity verification on the user based on the attribute information of the user, which is carried in a function adjustment request sent by a received client, and sends the function adjustment request to the function computing platform under the condition that verification is passed;
and the function computing platform determines a function based on the function identifier carried in the function adjustment request, adjusts the at least one function based on the function adjustment request, and sends an adjustment result to the gateway.
5. A function calling method comprises a client, a gateway and a function computing platform, wherein,
the client initiates a webpage processing request based on the webpage operation of the access user, and sends the webpage processing request to the gateway, wherein the webpage processing request carries a function identifier;
The gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request;
the function computing platform processes the webpage processing request based on the objective function and returns a processing result to the gateway;
the gateway receives a processing result returned by the function computing platform and sends the processing result to the client, wherein the objective function is obtained by the function creation method according to any one of claims 1 to 4.
6. The function call method of claim 5, the gateway calling an objective function from the function computing platform based on the function identification carried in the web page processing request, comprising:
and the gateway calls an objective function from the function computing platform based on the address identification of the access user and the function identification carried in the webpage processing request.
7. The function call method of claim 6, wherein the gateway calls an objective function from the function computing platform based on the address identifier of the access user and the function identifier carried in the web page processing request, comprising:
The gateway determines the address identification of the access user carried in the webpage processing request;
determining at least one initial function of the function computing platform based on the function identifier, and determining position information corresponding to each initial function;
based on the position information corresponding to each initial function, judging whether an objective function matched with the address identification of the access user exists in the at least one initial function,
if yes, the objective function is called from the function computing platform,
if not, calling a preset initial function matched with the address identifier from the function computing platform as the target function.
8. The function call method of claim 6, the gateway calling an objective function from the function computing platform based on the function identification carried in the web page processing request, comprising:
the gateway calls an objective function from the function computing platform based on the function identifier carried in the webpage processing request;
under the condition that different versions of the objective function exist, determining a user set corresponding to the objective function of the latest version;
and calling the latest version of the objective function from the function computing platform under the condition that the access user belongs to the user in the user set.
9. The function call method according to any one of claims 5-8, wherein the gateway calls an objective function from the function computing platform based on the function identifier carried in the web page processing request, including:
the gateway performs identity verification on the user based on the attribute information of the user carried in the received webpage processing request;
and calling an objective function from the function computing platform based on the function identifier carried in the webpage processing request under the condition that verification is passed.
10. The function call method of claim 5, further comprising:
and the function computing platform increases the number of the target functions according to a preset capacity expansion condition when the number of times of calling the target functions, which is sent by the gateway and is received, is greater than or equal to a preset number threshold.
11. A function calling method is applied to a gateway and comprises the following steps:
receiving a webpage processing request initiated by a client based on a webpage operation of an access user, wherein the webpage processing request carries a function identifier;
invoking an objective function from a function computing platform based on the function identifier carried in the webpage processing request;
receiving a processing result of the function computing platform on the web page processing request based on the objective function, and sending the processing result to the client, wherein the objective function is obtained by the function creation method according to any one of claims 1-4.
12. A function creation system comprising a client, a gateway, and a function computing platform, comprising:
the client is configured to receive a function creation request sent by a user, and analyze attribute information of a target application carried in the function creation request to determine at least one application function corresponding to the target application; determining a corresponding function creation language for each application function based on a preset requirement, creating at least one corresponding function for the at least one application function based on the function creation language corresponding to each application function, and sending a function processing request to the gateway, wherein the function processing request carries the at least one function, and the preset requirement comprises development habit of a developer, operation efficiency of the function or development time of the function;
the gateway is configured to send the at least one function carried in the received function processing request to the function computing platform.
13. A function call system comprises a client, a gateway and a function computing platform, wherein,
the client is configured to initiate a webpage processing request based on the webpage operation of an access user and send the webpage processing request to the gateway, wherein the webpage processing request carries a function identifier;
The gateway is configured to call an objective function from the function computing platform based on the function identifier carried in the webpage processing request;
the function computing platform is configured to process the webpage processing request based on the objective function and return a processing result to the gateway;
the gateway is further configured to receive a processing result returned by the function computing platform and send the processing result to the client, wherein the objective function is obtained by the function creation method according to any one of claims 1-4.
CN202110516934.0A 2021-05-12 2021-05-12 Function creation method and system, function calling method and system Active CN113296750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110516934.0A CN113296750B (en) 2021-05-12 2021-05-12 Function creation method and system, function calling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110516934.0A CN113296750B (en) 2021-05-12 2021-05-12 Function creation method and system, function calling method and system

Publications (2)

Publication Number Publication Date
CN113296750A CN113296750A (en) 2021-08-24
CN113296750B true CN113296750B (en) 2023-12-08

Family

ID=77321525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110516934.0A Active CN113296750B (en) 2021-05-12 2021-05-12 Function creation method and system, function calling method and system

Country Status (1)

Country Link
CN (1) CN113296750B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114650279B (en) * 2022-03-25 2023-10-03 阿里巴巴(中国)有限公司 Instance processing method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688555A (en) * 2017-08-24 2018-02-13 无锡清华信息科学与技术国家实验室物联网技术中心 A kind of function trustship relies on the general offer method of service in calculating
CN108415710A (en) * 2018-03-14 2018-08-17 苏州思必驰信息科技有限公司 The method and system of API is issued, called in Intelligent dialogue development platform
CN109683856A (en) * 2018-10-26 2019-04-26 平安科技(深圳)有限公司 Electronic device, Faas stage function creation method and storage medium
WO2019090523A1 (en) * 2017-11-08 2019-05-16 华为技术有限公司 Business deployment method under serverless architecture and function management platform
CN111651146A (en) * 2020-04-29 2020-09-11 宁波吉利汽车研究开发有限公司 Function generation method, device, equipment and medium
CN111831269A (en) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 Application development system, operation method, equipment and storage medium
CN112445550A (en) * 2020-12-08 2021-03-05 中国科学院深圳先进技术研究院 Server-free computing method and system for preprocessing function

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9652314B2 (en) * 2012-10-15 2017-05-16 Alcatel Lucent Dynamic application programming interface publication for providing web services
US9418183B2 (en) * 2013-06-10 2016-08-16 Abb Research Ltd. Model development environment for assisting user in developing model describing condition of industrial asset
US10656980B2 (en) * 2018-06-18 2020-05-19 Wipro Limited Method and system for processing data in a serverless computing environment
US10983767B2 (en) * 2019-01-04 2021-04-20 T-Mobile Usa, Inc. Microservice-based software development

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688555A (en) * 2017-08-24 2018-02-13 无锡清华信息科学与技术国家实验室物联网技术中心 A kind of function trustship relies on the general offer method of service in calculating
WO2019090523A1 (en) * 2017-11-08 2019-05-16 华为技术有限公司 Business deployment method under serverless architecture and function management platform
CN110612705A (en) * 2017-11-08 2019-12-24 华为技术有限公司 Method for service deployment under server-free architecture and function management platform
CN108415710A (en) * 2018-03-14 2018-08-17 苏州思必驰信息科技有限公司 The method and system of API is issued, called in Intelligent dialogue development platform
CN109683856A (en) * 2018-10-26 2019-04-26 平安科技(深圳)有限公司 Electronic device, Faas stage function creation method and storage medium
CN111651146A (en) * 2020-04-29 2020-09-11 宁波吉利汽车研究开发有限公司 Function generation method, device, equipment and medium
CN111831269A (en) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 Application development system, operation method, equipment and storage medium
CN112445550A (en) * 2020-12-08 2021-03-05 中国科学院深圳先进技术研究院 Server-free computing method and system for preprocessing function

Also Published As

Publication number Publication date
CN113296750A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
US20220027919A1 (en) Real-time selection of authentication procedures based on risk assessment
KR101848576B1 (en) Methods and systems of using application-specific and application-type-specific models for the efficient classification of mobile device behaviors
CN112118565A (en) Multi-tenant service gray level publishing method and device, computer equipment and storage medium
JP2018514848A (en) Method and system for identifying malware through differences in cloud-to-client behavior
CN105493045A (en) Virtual computing instance migration
US10891569B1 (en) Dynamic task discovery for workflow tasks
EP2594050A1 (en) Method and apparatus for processing biometric information using distributed computation
US9946653B2 (en) Predictive memory caching
CN110062022B (en) Method for updating API of server-side gray deployment application system
US20230073638A1 (en) Local data classification based on a remote service interface
CN108415710A (en) The method and system of API is issued, called in Intelligent dialogue development platform
US11948023B2 (en) Automatic application program interface (API) selector for unsupervised natural language processing (NLP) intent classification
CN110011875A (en) Dial testing method, device, equipment and computer readable storage medium
CN113296750B (en) Function creation method and system, function calling method and system
CN113010561B (en) Data acquisition method and device based on super account book and computer system
CN113010238A (en) Permission determination method, device and system for micro application call interface
CN112241544A (en) Business system, access method, device, computer equipment and storage medium
US11443058B2 (en) Processing requests at a remote service to implement local data classification
US11757976B2 (en) Unified application management for heterogeneous application delivery
CN114282940A (en) Method and apparatus for intention recognition, storage medium, and electronic device
CN115686813A (en) Resource scheduling method and device, electronic equipment and storage medium
CN110414230A (en) Checking and killing virus method, apparatus, computer equipment and storage medium
WO2019046371A1 (en) Predictive system for selecting groups of users in connection with a network service
Valentin et al. A blockchain-based access and management system for IoT devices
US11687116B2 (en) Intelligent user equipment central processing unit core clock adjustment

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40059139

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240306

Address after: # 03-06, Lai Zan Da Building 1, 51 Belarusian Road, Singapore

Patentee after: Alibaba Innovation Co.

Country or region after: Singapore

Address before: Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore

Patentee before: Alibaba Singapore Holdings Ltd.

Country or region before: Singapore

TR01 Transfer of patent right