An application platform management and intelligent access control method for function computing
By implementing standard function type definition and interaction protocol on the function computing platform, the problem of high threshold for use of existing platforms and no standard data interaction format is solved, and direct interaction and AI access of function applications are realized, reducing development complexity and improving development Efficiency.
Patent Information
- Application Number
- CN202410419445.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-04-09
AI Technical Summary
The existing function computing platform has a high threshold for use and no standard data interaction format, which leads to poor reusability of function applications. Developers need to add a lot of fault-tolerant logic, and the platform does not have the characteristics of direct AI call.
By implementing standard function type definition and interactive protocol on the function computing platform, providing application platform management and intelligent access control methods for function computing, users can directly call function applications through the page without programming capabilities, and the platform also supports AI access.
It lowers the threshold for ordinary users, expands the audience scope, enables function applications to have direct interaction and AI access, improves function development efficiency, and reduces the need to repeatedly add fault-tolerant logic.
Smart Images

Figure CN118312171B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of function computing application platforms, and in particular to an application platform management and intelligent access control method for function computing. Background Art
[0002] Function computing is a new serverless cloud computing service model. In this cloud computing model, the underlying resources of the service can automatically scale up and down from 0 to n and then back to 0, thereby helping developers get rid of the extra work of traditional operation and maintenance and focus more on the development of the business itself.
[0003] Developers can use the advantages of the function computing platform to complete the development and deployment of a lightweight service in a short period of time. However, the audience of such lightweight services is generally front-end and back-end developers or developers with a certain programming foundation, and they cannot be directly exposed to ordinary users as a ToC product.
[0004] There are many function computing platform solutions in the industry, such as AWS Lambda, aliyunFC, tecentSCF, etc. in public clouds, and Knative, openFaas, kubeless, etc. in open source solutions. However, the function application services currently deployed on the platform are more targeted at developers and can only be called through API / SDK code.
[0005] On the existing platform, the usage process of a function application service is mainly as follows:
[0006] The developer informs the caller of the specific function name, parameter format, and expected return format; the caller manually writes the request parameters based on the information provided by the developer; the caller requests the function computing platform through the platform's API or packaged SDK (if the function is in the form of http service, the request is made directly through the http protocol); the platform passes the request parameters to the function, and the function code is executed; the platform returns the execution result, and the caller processes and parses the result based on the caller's specific function name, parameter format, and expected return format.
[0007] The processing logic in the typical usage process code of a function is to obtain the information of the image to be processed based on the "imgs" field in the request body, so the data format in the request body must conform to the processing logic of the code.
[0008] Once a field in the request body is inconsistent with the function agreement, an execution error will occur, such as one s is missing in imgs or it is written as another field. To this end, the function itself must add a lot of additional fault-tolerant logic, such as checking whether the field exists, checking whether the above URL is legal, etc. In addition, the request process itself requires the caller to have a certain professional foundation, and the caller must at least have the programming ability to use SDK or encapsulated API.
[0009] Finally, result will return the result of the processing to the caller. The return result is also uncertain and is completely determined by the function.
[0010] Therefore, for function applications on general function computing platforms, the lack of a standard interaction format leads to the following problems:
[0011] a. The usage threshold is high. The functions are aimed at developers and users need to have certain development capabilities.
[0012] b. There is no standard for data exchange formats, each function has its own format, and the calling process has poor reusability.
[0013] c. Each function needs to add a lot of parameter checks to ensure the function's fault tolerance, and there is too much repetitive development work.
[0014] d. Currently, the functions on the platform do not have the features to be directly called by AI. Summary of the invention
[0015] In order to solve the above technical problems, the present invention provides an application platform management and intelligent access control method for function computing. The following technical solutions are adopted:
[0016] A method for managing an application platform and intelligent access control for function computing. The method for managing an application platform for function computing is:
[0017] The Function Compute platform defines standard function types, which cover all function data types during function runtime, and sets interaction protocols based on the standard function type definitions.
[0018] The intelligent access control method for application platforms oriented to function computing includes the following steps:
[0019] Step a: The user selects the required function application from the application center according to the application description;
[0020] Step b, the front end renders the application execution interface;
[0021] Step c: the user manually fills in the relevant parameters according to the application function description information and each parameter description definition;
[0022] Step d, the application management center verifies whether the parameter definition part of the function application request in the request is consistent with the database. If not, it reports a format anomaly problem and converges the error before the function is executed;
[0023] Step e: After verification, the application management center requests the function computing platform;
[0024] Step f: the function computing platform schedules and executes the corresponding function;
[0025] Step g: the front end and the management center process the specific returned function data according to the agreed output format.
[0026] By adopting the above technical solutions and implementing a set of strongly typed standard function application interaction protocols, function applications can be directly interactive and reach a wider audience. Users can call directly through page clicks without any usage threshold. By inputting and outputting parameter descriptions and function descriptions, function applications can be accessed by AI. The parameter verification behavior of the framework can improve the efficiency of function development, and developers no longer need to repeat and add additional fault-tolerant logic.
[0027] Optionally, the interactive protocol setting in the management method for the function computing application platform refers to the definition of the input and output formats of each function application and the detailed type of each parameter;
[0028] The input format includes an array of key-value pairs corresponding to the input field, each of which represents the data type and the specific value of the data;
[0029] The output format includes an array of key-value pairs corresponding to the output field. Each key-value pair represents the data type and the output variable name exposed to the user.
[0030] By adopting the above technical solution, a set of standard type definitions is given, which covers all possible data types when the function is running. For each function application, it is necessary to give the definition of the input, output and detailed type of each parameter. The input format is: the key-value pair array corresponding to the input field, each key-value pair represents the data type and the specific value of the data; the output format is: the key-value pair array corresponding to the output field, each key-value pair represents the data type and the output variable name exposed to the user. Let the function application have the ability to interact directly.
[0031] Optionally, for each function application, in addition to the basic meta-information, the function's input parameters, output parameter definitions, and application description are stored as supplementary meta-information.
[0032] By adopting the above technical solution, for each function application, in addition to the original basic meta-information (name, code path, timeout period, function entry, etc.), the function's input and output parameter definitions and application description are stored as supplementary meta-information, which has the following functions: used for front-end running interface rendering and user parameter filling; used for corpus data preparation to improve the recognition accuracy of the model.
[0033] Optionally, the application platform sets up an application management center, and the application management center sets up an application management interface. The application management interface provides basic metadata for creating functions, querying function application information, and changing function information.
[0034] By adopting the above technical solution, the Application Management Center is the front entry for function application requests, and also provides expansion capabilities such as function details query, custom type registration, and application change.
[0035] Optionally, the management method of the application platform for function computing also includes the management of function type registration. The developer accesses the application management center through the interface of the application management center and registers the function type in the parameter definition part of the function application. After the function type is registered with the application management center, all subsequent parameter definitions of function applications can use the function type. At the same time, the application center generates a derived type to represent the array type of the function type.
[0036] By adopting the above technical solution, type registration is a custom type definition for certain special business scenarios. Developers can access it through the application management center according to their own needs, and after access, they can use it in the parameter definition part of the function application.
[0037] Optionally, the management method for the function computing application platform also includes a function data conversion process, which converts the request function data into standard type data under the development language and performs parameter verification, including the following three steps:
[0038] Step 1, decoding process, decoding the request data into data that can be processed by the current language;
[0039] Step 2, load and execute process: load and execute the function business code through reflection and other mechanisms;
[0040] Step 3, encoding process: encode the execution result into http response format.
[0041] Optionally, in step 1, for basic types, check whether the input data can be converted to the corresponding type of the current language one by one, and convert them; for custom types, package them into the agreed format;
[0042] In step 3, verify whether the number of returned results and the variable name are consistent with the output in the request; and serialize the special type into json according to the standard function type definition.
[0043] Optionally, the management and control of the application platform for function computing sets up an intelligent access device, which enters the customer's natural language description of the called function and identifies the function application through a large language model.
[0044] Optionally, the intelligent access device includes a vector embedding model, a large language model and a vector database, wherein the vector embedding model stores the corpus vectors of function descriptions, communicates with the vector database, parses the function descriptions into vectors, and the large language model is used to process the natural language instructions of the caller. The output end of the large language model is connected to the input end of the vector embedding model, and the natural language instruction recognition results are parameterized and input into the vector embedding model. The vector embedding model is connected to the application management center through the application management interface.
[0045] By adopting the above technical solution, the intelligent access device is used to directly call the application required by the user through natural language description. The device needs to prepare: a vector database to store the corpus vector of the function description. A vector embedding model to parse the function description into a vector. A large language model to process the natural language instructions of the caller.
[0046] The specific implementation is as follows:
[0047] Preparation of the corpus: The data of the corpus is stored in a vector database for query by the large model. The details are as follows: 1. The description of the use of the function application and the parameter description are vectorized through the vector embedding model; 2. The vectorized data is stored in the vector database;
[0048] Matching of large models:
[0049] The user finds the corresponding application through natural language description and loads it, as follows:
[0050] 1. The user enters in the input box: I want to use an application called xxx;
[0051] 2. The input is vectorized through the vector embedding model;
[0052] 3. Use the vectorized input to find the top-N applications that match the vector database;
[0053] 4. The best matching application is selected from the large model and loaded into the interface;
[0054] 5. The large model automatically fills in the parameters and executes according to the description.
[0055] Optionally, the management method of the function computing oriented application platform also includes remote access management, where a remote user calls a remote function application through a remote call interface, the remote call interface communicates with the function computing oriented application platform through a microservice architecture, and the interaction protocol between the remote call interface and the function computing oriented application platform is implemented based on a standard function type.
[0056] By adopting the above technical solution, the interface declarations of the existing microservice architecture are not refined to the parameter details, and the same standard function type definition is used for all remote call interface declarations to implement remote function calls.
[0057] In summary, the present invention includes at least one of the following beneficial technical effects:
[0058] The present invention can provide an application platform management and intelligent access control method for function computing. By implementing a set of strongly typed standard function application interaction protocols, function services can be automatically packaged, and native function services can be converted into an interactive application, thereby lowering the usage threshold for ordinary users; in combination with an external intelligent device, the interaction protocol is used to provide users with the ability to directly access applications using natural language. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a schematic diagram of the implementation architecture of an application platform management and intelligent access control method for function computing of the present invention;
[0060] Figure 2 It is a logical schematic diagram of the intelligent access control method for application platform oriented to function computing of the present invention;
[0061] Figure 3 It is a schematic diagram of the architecture of the intelligent access device of the present invention;
[0062] Figure 4 This is a conceptual diagram of the application execution interface in step b of the application platform intelligent access control method for function computing of the present invention;
[0063] Figure 5 It is a conceptual diagram of the execution interface of the present invention for automatically filling in function application parameters through the intelligent access device;
[0064] Figure 6 It is a conceptual diagram of the results of the function application of the present invention running according to the input parameters. DETAILED DESCRIPTION
[0065] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0066] The embodiment of the present invention discloses an application platform management and intelligent access control method for function computing.
[0067] Reference Figure 1-Figure 6 Embodiment 1: A method for managing an application platform for function computing and intelligent access control. The method for managing an application platform for function computing is:
[0068] The Function Compute platform defines standard function types, which cover all function data types during function runtime, and sets interaction protocols based on the standard function type definitions.
[0069] The intelligent access control method for application platforms oriented to function computing includes the following steps:
[0070] Step a: The user selects the required function application from the application center according to the application description;
[0071] Developers configure the required parameters based on the implementation in the function code. The parameter type is obtained by the front end from the back end. The single-select method is used to effectively avoid miswriting problems caused by manual operations.
[0072] Step b, the front end renders the application execution interface;
[0073] Step c: the user manually fills in the relevant parameters according to the application function description information and each parameter description definition;
[0074] Step d, the application management center verifies whether the parameter definition part of the function application request in the request is consistent with the database. If not, it reports a format anomaly problem and converges the error before the function is executed;
[0075] Step e: After verification, the application management center requests the function computing platform;
[0076] Step f: the function computing platform schedules and executes the corresponding function;
[0077] Step g: the front end and the management center process the specific returned function data according to the agreed output format.
[0078] By implementing a set of strongly typed standard function application interaction protocols, function applications can interact directly and have a wider audience. Users can call directly through page clicks without any usage threshold. By inputting and outputting parameter descriptions and function descriptions, function applications can have AI access capabilities. The parameter verification behavior of the framework can improve function development efficiency, and developers no longer need to repeat or add additional fault-tolerant logic. The standard function type definition is shown in Table 1:
[0079] Table 1
[0080]
[0081] In the management method of the application platform for function computing, the interactive protocol setting refers to the definition of the input and output formats of each function application and the detailed type of each parameter;
[0082] The input format includes an array of key-value pairs corresponding to the input field. Each key-value pair represents the data type and the specific value of the data; for example, {"int":123}
[0083] The output format includes an array of key-value pairs corresponding to the output field. Each key-value pair represents the data type and the output variable name exposed to the user. For example, {"int":"sum"}
[0084] The specific examples are as follows: {"input":[{"int":123},{"int":244},{"str":"add"}],"output":[{"int":"sum"},]}.
[0085] A set of standard type definitions is provided, which covers all possible data types when the function is running. For each function application, it is necessary to provide a definition of the input, output, and detailed types of each parameter. The input format is: the key-value pair array corresponding to the input field, each key-value pair represents the data type and the specific value of the data; the output format is: the key-value pair array corresponding to the output field, each key-value pair represents the data type and the output variable name exposed to the user. This allows function applications to have the ability to interact directly.
[0086] In the third embodiment, for each function application, in addition to the basic meta-information, the function's input parameters, output parameter definitions, and application description are stored as supplementary meta-information.
[0087] For each function application, in addition to the original basic meta-information (name, code path, timeout, function entry, etc.), the function's input and output parameter definitions and application description are stored as supplementary meta-information. The functions are as follows: used for front-end running interface rendering and user parameter filling; used for corpus data preparation to improve the recognition accuracy of the model.
[0088] The concept format is as follows: {"appId":"appId","inList":[{"paramType":"int",
[0089] "paramName":"c1","summary":"this is a input param","defaultV alue":"1",....}],"outList":[{"paramType":"str","paramName":"1","summary":"this is aoutput param",....},"description":"this is an app"]}.
[0090] For each function application, each input and output parameter must be defined before completing the creation. The key attributes are explained as follows:
[0091] inList / outList: input / output parameter list;
[0092] paramType: parameter type, that is, the data type in A;
[0093] paramName: parameter name;
[0094] summary: parameter description;
[0095] defaultValue: default value;
[0096] description: Application description.
[0097] In embodiment 4, the application platform sets up an application management center, and the application management center sets up an application management interface. The application management interface provides functions for creating basic meta information of functions, querying function application information, and changing function information.
[0098] The Application Management Center is the front entry for function application requests. It also provides extended capabilities such as function details query, custom type registration, and application change.
[0099] Embodiment 5, the management method of the application platform for function computing also includes the management of function type registration. The developer accesses the application management center through the interface and registers the function type in the parameter definition part of the function application. After the function type is registered to the application management center, the parameter definitions of all subsequent function applications can use the function type. At the same time, the application center generates a derived type to represent the array type of the function type.
[0100] Type registration is a custom type definition for certain special business scenarios. Developers can access it through the Application Management Center according to their own needs. After access, they can use it in the parameter definition part of the function application.
[0101] Example 6, the management method of the application platform for function computing also includes a function data conversion process, which converts the request function data into standard type data under the development language and performs parameter verification, including the following three steps:
[0102] Step 1, decoding process, decoding the request data into data that can be processed by the current language;
[0103] Step 2, load and execute process: load and execute the function business code through reflection and other mechanisms;
[0104] Step 3, encoding process: encode the execution result into http response format.
[0105] In Example 7, in step 1, for basic types, check whether the input data can be converted into the corresponding type of the current language one by one, and convert them; for custom types, package them into the agreed format;
[0106] For example, the file type mentioned above needs to be serialized into a class or structure containing name and url attributes. Some of the code is as follows (in Python):
[0107] for params in data["input"]for paramin params.keys():value=params[param]#Judge data type
[0108] if param=="'str":
[0109] input.append(str(value))elif param=="int':
[0110] input.append(int(value))elif param=="float":
[0111] input.append(float(value))elif param=="'complex'":
[0112] cpx=[]
[0113] for vle in value.split(","):
[0114] cpx.append(ast.literal
[0115] eval(vle))input.append(complex(*cpx))elif param=="bool"":
[0116] input.append(bool(ast.literal eval(value)))elif param=="list":ifvalue.strip()=="[]":input.append([])
[0117] continue
[0118] input.append(list(ast.literal eval(value)))elif param=="set":
[0119] if value.strip()=="{}":input.append({})continue
[0120] input.append(set(ast.literal eval(value))).
[0121] In step 3, verify whether the number of returned results and the variable name are consistent with the output in the request; and serialize the special type into json according to the standard function type definition. Part of the code is as follows (python language):
[0122] if len(output params)!=0:
[0123] for paramin output params:
[0124] #Determine whether the parameter is of data type for param type in param.keys():param name=param[param type]
[0125] if param name not in work:return error msg(f'var{param name}n ot inresult")
[0126] if(param_type=="str"and not isinstance(work[param_name],str))or(param_type=="int"and not isinstance(work[param_name],int))or\(param type=="float"and not isinstance(work[param name],float))or(param_type=="bool"and not isinstance(work[param name],bool))or\(param_type=="tuple"and notisinstance(work[param namel,tupl e))or(param_type=="set"and not isinstance(work[param_namel,set))or\(param type=="dict"and not isinstance(work[paramname],dic t))or(param type=="list"and not isinstance(work[param name],list))return error_msg(f"var{param_name}should be{param_type}")eli f(param type=="'data"):
[0127] Embodiment 8, the management control of the application platform for function computing sets up an intelligent access device, the intelligent access device inputs the natural language description of the called function by the customer, and recognizes the function application through a large language model.
[0128] Embodiment 9, the intelligent access device includes a vector embedding model, a large language model and a vector database, the vector embedding model stores the corpus vector of the function description, communicates with the vector database, parses the function description into a vector, the large language model is used to process the natural language instructions of the caller, the output end of the large language model is connected to the input end of the vector embedding model, the natural language instruction recognition result is parameterized and input into the vector embedding model, and the vector embedding model is connected to the application management center through the application management interface.
[0129] The intelligent access device is used to directly call the application required by the user through natural language description. The device needs to be prepared: a vector database to store the corpus vectors of function descriptions. A vector embedding model to parse the function description into vectors. A large language model to process the natural language instructions of the caller.
[0130] The specific implementation is as follows:
[0131] Preparation of the corpus: The data of the corpus is stored in a vector database for query by the large model. The details are as follows: 1. The description of the use of the function application and the parameter description are vectorized through the vector embedding model; 2. The vectorized data is stored in the vector database;
[0132] Matching of large models:
[0133] The user finds the corresponding application through natural language description and loads it, as follows:
[0134] 1. The user enters in the input box: I want to use an application called xxx;
[0135] 2. The input is vectorized through the vector embedding model;
[0136] 3. Use the vectorized input to find the top-N applications that match the vector database;
[0137] 4. The best matching application is selected from the large model and loaded into the interface;
[0138] 5. The large model automatically fills in the parameters and executes according to the description.
[0139] Embodiment 10, the management method of the application platform for function computing also includes remote access management, the remote user calls the remote function application through the remote call interface, the remote call interface communicates with the application platform for function computing through the microservice architecture, and the interaction protocol between the remote call interface and the application platform for function computing is implemented based on the standard function type.
[0140] The interface declarations of the existing microservice architecture are not detailed to the parameter details. The same standard function type definition is used for all remote call interface declarations to implement remote function calls.
[0141] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for application platform management and intelligent access control for function computing, characterized in that: The management method for the function computing application platform is: The Function Compute platform defines standard function types, which cover all function data types during function runtime, and sets interaction protocols based on the standard function type definitions. The interactive protocol setting refers to the definition of the input and output formats of each function application and the detailed type of each parameter; The input format includes an array of key-value pairs corresponding to the input field; The output format includes an array of key-value pairs corresponding to the output field; It also includes the function data conversion process, which converts the request function data into standard type data under the development language and performs parameter verification, including the following three steps: Step 1: Decode the request data into data that can be processed by the current language; Step 2: Load the function business code and execute it through the reflection mechanism; Step 3, encode the execution result into http response format; The intelligent access control method for application platforms oriented to function computing includes the following steps: Step a: The user selects the required function application from the application center according to the application description; Step b, the front end renders the application execution interface; Step c: the user manually fills in the relevant parameters according to the application function description information and each parameter description definition; Step d, the application management center verifies whether the parameter definition part of the function application request in the request is consistent with the database. If not, it reports a format anomaly problem and converges the error before the function is executed; Step e: After verification, the application management center requests the function computing platform; Step f: the function computing platform schedules and executes the corresponding function; Step g: the front end and the management center process the specific returned function data according to the agreed output format.
2. The method for application platform management and intelligent access control for function computing according to claim 1, characterized in that: For each function application, in addition to the basic meta information, the function's input parameters, output parameter definitions, and application description are stored as supplementary meta information.
3. The method for application platform management and intelligent access control for function computing according to claim 1, characterized in that: The application platform sets up an application management center, and the application management center sets up an application management interface. The application management interface provides basic metadata of the creation function, query function application information, and change function information.
4. The method for application platform management and intelligent access control for function computing according to claim 3, characterized in that: The management method of the application platform for function computing also includes the management of function type registration. Developers access the application management center through the interface of the application management center and register the function type in the parameter definition part of the function application. After the function type is registered with the application management center, the parameter definitions of all subsequent function applications can use the function type. At the same time, the application center generates a derived type to represent the array type of the function type.
5. The method for application platform management and intelligent access control for function computing according to claim 4, characterized in that: In step 1, for basic types, check whether the incoming data can be converted to the corresponding type of the current language one by one, and convert them; for custom types, package them into the agreed format; In step 3, verify whether the number of returned results and variable names are consistent with the output in the request; Serialize special types into json according to standard function type definitions.
6. The method for application platform management and intelligent access control for function computing according to claim 5, characterized in that: The management and control of the application platform for function computing sets up an intelligent access device, which inputs the customer's natural language description of the called function and identifies the function application through a large language model.
7. The method for application platform management and intelligent access control for function computing according to claim 6, characterized in that: The intelligent access device includes a vector embedding model, a large language model and a vector database. The vector embedding model stores the corpus vector of the function description, communicates with the vector database, and parses the function description into a vector. The large language model is used to process the natural language instructions of the caller. The output end of the large language model is connected to the input end of the vector embedding model, and the natural language instruction recognition result is parameterized and input into the vector embedding model. The vector embedding model is connected to the application management center through the application management interface.
8. The method for application platform management and intelligent access control for function computing according to claim 6, characterized in that: The management method of the application platform for function computing also includes remote access management. The remote user calls the remote function application through the remote call interface. The remote call interface communicates with the application platform for function computing through the microservice architecture. The interaction protocol between the remote call interface and the application platform for function computing is implemented based on standard function types.
Citation Information
Patent Citations
Method for implementing code programming by graphical operations
CN102915242A
Document generation method and device, interface development method and device, server and storage medium
CN112148356A
Source code generation method and device and electronic equipment
CN113535148A