General model effect display method, device, equipment and storage medium
By creating a general model effect display service and configuring the interface parameters of the AI model, the problem of low efficiency in the front-end display interface development of the AI model is solved, and efficient and flexible model effect display is achieved.
Patent Information
- Application Number
- CN202310185117.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-02-24
AI Technical Summary
In the prior art, developing front-end display interfaces for different categories of AI models requires a lot of customized development, resulting in large workload, low efficiency and high cost, and the inability to flexibly adapt to model iteration and upgrading.
Provide a general model effect display method. By creating a model effect display service, obtaining interface parameters of multiple categories of AI models, and configuring services based on these parameters to generate target model effect display services for each category, which are used to display AI model effects in the client interface.
It improves development efficiency, reduces workload, shortens the online time, enhances the flexibility and adaptability of model effect display, and reduces the cost of customized development.
Smart Images

Figure CN116225424B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to the field of artificial intelligence technology, and specifically to a general model effect display method, device, equipment and storage medium. Background Art
[0002] With the rapid development of artificial intelligence (AI) technology, the variety and number of AI models are constantly expanding. These massive numbers of AI models require promotion and sales to be implemented in specific AI application scenarios and ultimately realize their value. The promotion and sales of AI models require visual displays to intuitively demonstrate their functions and advantages. Summary of the Invention
[0003] The present disclosure provides a general model effect display method, device, equipment and storage medium.
[0004] According to the first aspect of the present disclosure, a general model effect display method is provided, including: creating a model effect display service, the model effect display service is used to display the model effect in the client interface; obtaining interface parameters of multiple categories of artificial intelligence AI models, the interface parameters of the AI model are used to call the AI model; for each category of AI model, according to the interface parameters of the AI model, the model effect display service is configured to obtain a target model effect display service corresponding to each category of AI model; wherein the target model effect display service is used to display the model effect of the corresponding category of AI model in the client interface based on the content to be identified input by the user.
[0005] According to the second aspect of the present disclosure, a general model effect display device is provided, including: a creation unit, used to create a model effect display service, the model effect display service is used to display the model effect in the client interface; an acquisition unit, used to obtain interface parameters of multiple categories of artificial intelligence AI models, the interface parameters of the AI model are used to call the AI model; a processing unit, used to configure the model effect display service for each category of AI model according to the interface parameters of the AI model, so as to obtain a target model effect display service corresponding to each category of AI model; wherein the target model effect display service is used to display the model effect of the corresponding category of AI model in the client interface based on the content to be identified input by the user.
[0006] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0007] at least one processor; and
[0008] a memory communicatively connected to at least one processor; wherein,
[0009] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the methods in the first aspect.
[0010] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, comprising:
[0011] The computer instructions are used to cause a computer to execute any one of the methods in the first aspect.
[0012] According to a fifth aspect of the present disclosure, there is provided a computer program product, comprising:
[0013] A computer program, wherein the computer program executes any one of the methods in the first aspect when executed by a processor.
[0014] The technology disclosed in this disclosure solves the problems of developing front-end display interfaces corresponding to different categories of AI models, which results in large development workload, low development efficiency, and high labor costs.
[0015] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0017] Figure 1 This is a flowchart of a general model effect display method provided by an embodiment of the present disclosure;
[0018] Figure 2 This is an example diagram of a client interface display provided by an embodiment of the present disclosure;
[0019] Figure 3 This is another example diagram of a client interface provided by an embodiment of the present disclosure;
[0020] Figure 4 This is a flowchart of another general model effect display method provided by an embodiment of the present disclosure;
[0021] Figure 5 This is a flowchart of another general model effect display method provided by an embodiment of the present disclosure;
[0022] Figure 6 This is a flowchart of another general model effect display method provided by an embodiment of the present disclosure;
[0023] Figure 7 This is a schematic diagram of the implementation logic corresponding to a general model effect display method provided in an embodiment of the present disclosure;
[0024] Figure 8 This is a schematic structural diagram of a general model effect display device provided by an embodiment of the present disclosure;
[0025] Figure 9 It is a block diagram of an electronic device for a general model effect display method provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0027] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0028] Before introducing the general model effect display method of the embodiment of the present disclosure in detail, the application scenario of the embodiment of the present disclosure is first introduced.
[0029] First, the application scenarios of the embodiments of the present disclosure are introduced.
[0030] AI models need to be promoted and sold before they can be implemented in specific AI application scenarios and ultimately realize their value. The promotion and sales of AI models require visual displays to intuitively demonstrate the functions and effects of AI models.
[0031] Due to the wide variety of AI models, including text recognition, speech recognition, and video recognition, and the fact that the service interface request and response formats for different AI models are not standardized, and the names, quantities, and display methods of dynamic parameters are inconsistent, it is impossible to use a single front-end display interface to showcase the effects of various AI models.
[0032] Existing solutions for displaying AI model recognition results rely on customized development for each AI model category to adapt to the AI model's personalized interface. Ultimately, a visual display interface corresponding to each AI model category is developed to showcase the model's performance. Specifically, the personalized features corresponding to each AI model category's interface must be configured to develop a visual display interface specific to each AI model category.
[0033] Among them, the personalized features corresponding to the interface of the AI model (referred to as interface parameters in the embodiment of this disclosure) include: model interface request address, authentication information, request body format type, return body format type, request body template, return body template, request body dynamic parameters and return body dynamic parameters, etc.
[0034] Because existing solutions require the development of interface adaptation for each specific category of AI model, this results in a large development workload and high labor costs. In addition, existing solutions require not only customized development work, but also testing, verification, and deployment, which is time-consuming and leads to slow launch of model effect display functions and low efficiency. In addition, if the AI model is iteratively upgraded and the interface parameters change, an error will be directly displayed on the front-end interface, and the recognition results of the AI model cannot be displayed normally. The solution is inflexible and has poor adaptability.
[0035] In order to solve the above problems, the embodiment of the present disclosure provides a general model effect display method, which is applied to the application scenario of displaying the model effects of AI models of different categories. In this method, a model effect display service is first created for displaying the model effect in the client interface, and then the interface parameters of multiple categories of AI models are obtained to call the corresponding AI model through the interface parameters of the AI model in subsequent steps; further, for each category of AI model, the model effect display service is configured according to the interface parameters of the AI model to obtain the target model effect display service corresponding to each category of AI model; thereby, through the target model effect display service, the model effect of the corresponding category of AI model is displayed in the client interface based on the content to be identified input by the user.
[0036] It is understandable that the present disclosure can configure a pre-created model effect display service based on the interface parameters of multiple categories of AI models to obtain a target model effect display service corresponding to each category of AI model, so that the model effect of the corresponding category of AI model can be displayed in the client interface based on the content to be recognized input by the user through the target model effect display service corresponding to each category of AI model. Thus, when the user enters the content to be recognized in the client interface, the model effect can be displayed through the target model effect display service corresponding to the corresponding category of AI model. Through the above method, for different categories of AI models, a pre-created model effect display service can be configured based on the interface parameters of different categories of AI models to generate a target model effect display service corresponding to each category of AI model. There is no need to perform customized development work according to different AI models to adapt the personalized service interface of each category of AI model to develop a dedicated front-end display interface corresponding to each AI model. This can improve the efficiency of developing dedicated model effect display services corresponding to different categories of AI models and reduce the development workload.
[0037] The general model effect display method provided in the present disclosure may be executed by a general model effect display device, which may be a server. The execution device may also be the server's central processing unit (CPU), or a processing module in the server for generating a target model effect display service. In the embodiments of the present disclosure, the general model effect display method provided in the embodiments of the present disclosure is described by taking the server executing the general model effect display method as an example.
[0038] It should be noted that the embodiments of the present disclosure do not limit the server. The server in the embodiments of the present disclosure may be an independent physical server, or a server cluster or distributed file system composed of multiple physical servers, or at least one of the cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data or artificial intelligence platforms. The embodiments of the present disclosure do not limit this. In addition, the client in the embodiments of the present disclosure may be installed in an electronic device, which may be a tablet computer, mobile phone, desktop, laptop, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook or other device. The embodiments of the present disclosure do not impose any special restrictions on the specific form of the electronic device.
[0039] The general model effect display method provided by the disclosed embodiment includes two phases: the first phase is to configure the target model effect display service corresponding to each category of AI model; the second phase is to display the AI model effect. The following describes the solution provided by this embodiment through these two phases.
[0040] like Figure 1 As shown, a general model effect display method provided by an embodiment of the present disclosure specifically includes the stage of configuring target model effect display services corresponding to each category of AI models, that is, corresponding to the first stage mentioned above, the method may include:
[0041] S101. Create a model effect display service.
[0042] Among them, the model effect display service is used to display the model effect in the client interface.
[0043] In an embodiment of the present disclosure, when it is necessary to develop target model effect display services (or exclusive model effect display services) corresponding to multiple categories of AI models, a general model effect display service can be created in advance, and the pre-created general model effect display service can be configured based on the interface parameters of each category of AI models in the multiple categories of AI models to obtain the target model effect display service corresponding to each category of AI models.
[0044] The optional, general model effect display service is a pre-built basic service.
[0045] It can be understood that the pre-created model effect display service is a general service. Developers can obtain an exclusive model effect display service by further configuring some exclusive parameters, thereby improving development efficiency and reducing development workload.
[0046] S102: Obtain interface parameters of multiple categories of AI models.
[0047] Among them, the interface parameters of the AI model are used to call the AI model.
[0048] In one possible implementation, the interface parameters corresponding to each category of AI model can be directly obtained from an electronic device that stores multiple categories of AI models. The electronic devices storing the interface parameters of different categories of AI models can be the same or different. In another possible implementation, the interface parameters corresponding to multiple categories of AI models can also be pre-stored locally. This disclosure does not specifically limit the method for obtaining the interface parameters corresponding to the AI model.
[0049] Optionally, multiple categories of AI models may include: image recognition model, text recognition model, speech recognition model, etc., and each category of AI model may include multiple different models.
[0050] In one possible implementation, the interface parameters include at least one of the following: model interface request address, authentication information, request body format type, return body format type, request body template, return body template, request body dynamic parameters, and return body dynamic parameters.
[0051] Among them, the model interface request address is used to call the corresponding AI model, the authentication information is used to authenticate the request message generated based on the target model effect display service; the request body format type, request body template, and request body dynamic parameters are used to generate the request message; the return body format type, return body template, and return body dynamic parameters are used to determine the recognition result corresponding to the content to be identified from the response message.
[0052] S103. For each category of AI model, configure the model effect display service according to the interface parameters of the AI model to obtain the target model effect display service corresponding to each category of AI model.
[0053] Among them, the target model effect display service is used to display the model effect of the corresponding category of AI model in the client interface based on the content to be identified input by the user.
[0054] In one possible implementation, after obtaining the target model effect display service corresponding to each category of AI model, the target model effect display service corresponding to each category of AI model can also be published online, so that users can use the required target model effect display service to view the model effect of the corresponding AI model through the required target model effect display service.
[0055] Among them, the interface for displaying the model effects of different categories of AI models (i.e., the interface of the above-mentioned customers) can be different.
[0056] For example, Figure 2 As shown, this is the client display interface corresponding to the text recognition model, which includes: text input area, recognition result display area, button to initiate recognition request, format type, upper limit of character number and other information.
[0057] Another example is Figure 3 As shown, this is the client display interface corresponding to the image recognition model, which includes: image input area, recognition result display area, button to initiate recognition request (start analysis control), image address input area and other information.
[0058] In one possible implementation, before displaying the client display interface corresponding to any category of AI model, a model category selection interface may be displayed. The user may select the desired category of AI model in the model category selection interface, thereby triggering the display of the corresponding interface (e.g., displaying Figure 2 The interface shown or Figure 3 interface shown).
[0059] like Figure 4 As shown, another general model effect display method provided by the embodiment of the present disclosure specifically includes the stage of configuring the target model effect display service corresponding to each category of AI model, that is, corresponding to the first stage mentioned above, the method may include:
[0060] S401. Create a model effect display service.
[0061] S402: Obtain interface parameters of multiple categories of AI models.
[0062] It should be noted that the specific description of S401 is the same as that of S101, and the specific description of S402 is the same as that of S102, which will not be repeated here.
[0063] S403. For each category of AI model, obtain configuration information of the interface parameters of the AI model.
[0064] S404. Configure the configuration information of the interface parameters into the model effect display service to obtain the target model effect display service corresponding to each category of AI model.
[0065] Optionally, operation and maintenance personnel can select or enter interface parameters corresponding to different categories of AI models in the configuration interface of the model effect display service, so that the server can obtain these interface parameters and obtain corresponding configuration information based on the obtained interface parameters, so that the server can configure the configuration information of the corresponding interface parameters into the model effect display service.
[0066] For example, the model effect display service can be understood as a section of code (for example, called code 1), and the configuration information can also be understood as a section of code (for example, called code 2, which includes interface parameters). When the operation and maintenance personnel select or enter the interface parameters corresponding to the AI model in the configuration interface of the model effect display service, the server can obtain the corresponding interface parameters, and obtain the configuration information of the interface parameters based on the obtained interface parameters, and configure them into the model effect display service. Among them, configuring the configuration information into the model effect display service can be understood as: the server nests (or modifies) code 2 (or the interface parameters in code 2) into the corresponding parameters of code 1 to establish the relationship between the two codes.
[0067] Specifically, for different categories of AI models, operation and maintenance personnel can determine the style of the corresponding client display interface after determining the model category that needs to be configured (such as text recognition model or image recognition model), and further configure the configuration information of the corresponding interface parameters in the configuration interface of the model effect display service.
[0068] Specifically, operations personnel can enter the interface request address corresponding to the AI model in the corresponding area of the Model Effect Display Service configuration interface. The server can then obtain the interface request address and, based on the obtained interface request address, retrieve the configuration information for the interface request address. The server can then configure the configuration information for the interface request address corresponding to the AI model into the Model Effect Display Service.
[0069] It should be noted that the interface request address corresponding to the AI model is used to call the AI model. The interface request address corresponding to the AI model can be the address of the server where the AI model is stored; it can also be the storage address of the locally stored AI model.
[0070] For example, the interface request address corresponding to the AI model can be a link (for example, http: / / ***.*.*.*:**** / v1 / modle / ocr). The operation and maintenance personnel can enter http: / / ***.*.*.*:**** / v1 / modle / ocr in the corresponding area of the configuration interface of the model effect display service. After that, the server can obtain the interface request address: http: / / ***.*.*.*:**** / v1 / modle / ocr. Based on the obtained interface request address, the server can obtain its configuration information. The server can configure the configuration information of the obtained interface request address into the model effect display service.
[0071] Among them, after the configuration information of the interface request address corresponding to the AI model is configured into the pre-created model effect display service to obtain the target model effect display service, the AI model can be called based on the configuration information of the interface request address in the target model effect display service.
[0072] Specifically, operations personnel can also enter the authentication information corresponding to the AI model in the corresponding area of the Model Effect Display Service configuration interface. The server can obtain this authentication information. Based on the obtained authentication information, the server can obtain the configuration information for this authentication information. The server can then configure the authentication information configuration information corresponding to the AI model into the Model Effect Display Service.
[0073] Among them, the authentication information corresponding to the AI model can be obtained from the AI model, and the authentication information is used to ensure the security of AI model calls.
[0074] In one possible implementation, each AI model can be pre-set with exclusive authentication information.
[0075] Exemplarily, the authentication information corresponding to the AI model may be verification code information.
[0076] The configuration information of the authentication information is used to add the authentication information to the request message (also referred to as the call request) for requesting to call the AI model. As an example, the configuration information of the authentication information can be used to add an Authorization field to the request message, such as in the request header of the request message, when generating a request message, and fill the authentication information (such as verification code information) in the field. Therefore, when calling the AI model based on the target model effect display service, the AI model can only be successfully called after the authentication information is authenticated, thereby ensuring the interface security of the AI model.
[0077] That is to say, the target model effect display service is allowed to call the AI model only when the authentication information included in the request header of the request message is correct; when the authentication information included in the request header of the request message is incorrect, or the authentication information is not included in the request header of the request message, the target model effect display service is not allowed to call the AI model.
[0078] Specifically, operations and maintenance personnel can also configure the request body format type and return body format type in the corresponding area of the model effect display service configuration interface. Afterwards, the server can obtain the request body format type and return body format type and, based on the obtained request body format type and return body format type, obtain the corresponding configuration information. The server can configure the configuration information of the request body format type and return body format type into the model effect display service. Subsequently, operations and maintenance personnel can configure the corresponding request body template and return body template based on the request body format type and return body format type.
[0079] The request body format type is the same as the response body format type, and the format type can be any of the following: JSON, Text, or XML.
[0080] For example, in the configuration interface of the model effect display service, you can select any one of the various format types such as JSON, Text, XML, etc. in the drop-down options to configure the request body format type and the return body format type.
[0081] In a possible implementation, the request body format type may be determined based on the content to be identified, and the return body format type may be determined based on the request body format type, such as the two being consistent.
[0082] Operations and maintenance personnel can also configure request body templates and return body templates based on the request body format type and return body format type. The request body template is consistent with the request body format type, and the return body template is consistent with the return body format type.
[0083] For example, taking the format type as JSON, the request body template configured by the operation and maintenance personnel can be:
[0084]
[0085] For example, taking the format type as JSON, the configured return body template can be:
[0086]
[0087] After the operation and maintenance personnel configure the request body template, the server can obtain the request body template and, based on the obtained request body template, obtain the configuration information of the request body template. The server can configure the configuration information of the request body template corresponding to the AI model into the model effect display service. Similarly, after the operation and maintenance personnel configure the return body template, the server can obtain the return body template and, based on the obtained return body template, obtain the configuration information of the return body template. The server can configure the configuration information of the return body template corresponding to the AI model into the model effect display service.
[0088] Specifically, operators can configure the request body dynamic parameters and the return body dynamic parameters in the corresponding areas of the model effect display service configuration interface. The request body dynamic parameters are used to fill the request body template with the content to be recognized, and the return body dynamic parameters are used to determine the recognition result corresponding to the content to be recognized in the response message based on the return body template.
[0089] After the operation and maintenance personnel configure the request body dynamic parameters, the server can obtain the request body dynamic parameters, and based on the obtained request body dynamic parameters, obtain the configuration information of the request body dynamic parameters. The server can configure the configuration information of the request body dynamic parameters corresponding to the AI model into the model effect display service. Similarly, after the operation and maintenance personnel configure the return body dynamic parameters, the server can obtain the return body dynamic parameters, and based on the obtained return body dynamic parameters, obtain the configuration information of the return body dynamic parameters. The server can configure the configuration information of the return body dynamic parameters corresponding to the AI model into the model effect display service. Among them, the configuration information of the request body dynamic parameters is used to indicate the multi-layer nested relationship of the request body, and the configuration information of the return body dynamic parameters is used to indicate the multi-layer nested relationship of the return body.
[0090] The request body dynamic parameter can refer to a field (or multiple fields) of the input item in the interface of the client corresponding to the AI model, such as the field that needs to be filled in the name field in the request body template in the above example. This field (or multiple fields) requires the user to manually enter it in the client interface. The return body dynamic parameter can refer to the field of the recognition result displayed in the interface of the client corresponding to the AI model, such as, Figure 2 or Figure 3 In the interface shown, the field or fields on the right are included in the corresponding fields of the response body, such as the shortName field in the response body template in the above example.
[0091] For example, taking the request body dynamic parameter as the field that needs to be filled in the name field in the request body template, the request body dynamic parameter can be the text content entered in the interface of the client corresponding to the AI model. To configure this field of the request body dynamic parameter, you can use the "requestBody.name" method. That is, the configuration information of the request dynamic parameter can be requestBody.name, which indicates the multi-layer nested relationship of the corresponding request body, specifically the name field in requestBody. In this way, after the user manually enters text in the client interface, based on the configuration information configured in the target model effect display service, the text manually entered by the user can be filled in the request body template as the value of the name field, and this value is carried when calling the corresponding AI model.
[0092] For example, when the text entered by the user in the client interface is "***** Health Technology Co., Ltd.", based on the configuration information requestBody.name configured in the target model effect display service, the server can embed the text in the "name" field in the request body template to obtain the corresponding request body. The obtained request body is as follows:
[0093]
[0094] For example, the dynamic parameter field in the response body can be configured using the format "result.name:company short name." That is, the configuration information for the dynamic parameter in the response body can be "result.shortname:company short name." This configuration information indicates the multi-layer nesting relationship of the corresponding response body, specifically the shortname field in "result." The text after the colon indicates the content of this field displayed in the client interface.
[0095] In the disclosed embodiments, when configuring a model effect display service, the model effect display service can be configured based on the configuration information of the interface parameters of any category of AI models, thereby obtaining a target model effect display service corresponding to any category of AI models. That is, by configuring the configuration information of the interface parameters of different categories of AI models in the model effect display service, the target model effect display service corresponding to the different categories of AI models can be obtained. This allows personalized parameter configuration of a pre-created model effect display service to obtain the desired target model effect display service, thereby improving the efficiency of building the model effect display service.
[0096] like Figure 5 As shown, a general model effect display method provided by an embodiment of the present disclosure specifically includes a stage of displaying the AI model effect, that is, corresponding to the above-mentioned second stage, the method may include:
[0097] S501: Obtain content to be identified input by a user in a first interface of a client.
[0098] The first interface corresponds to the first category of AI models, which are included in multiple categories of AI models. For example, the first interface can be Figure 2 or Figure 3 The interface shown.
[0099] Optionally, the first interface of the client may include at least one of the following display contents: an input area for content to be recognized, an area for displaying recognition results, a button for initiating a recognition request, and the like.
[0100] Optionally, the content to be recognized may be any of the following: text content, image content, voice content, etc. Specifically, text content may be a string directly entered into the input box, image content may be a picture directly entered into the input box, or a link to the image (storage address), etc., and voice content may be a voice directly entered into the input box, or a link to the voice (storage address), etc.
[0101] Different categories of content to be identified obtain identification results based on the corresponding categories of AI models, and the client interface displaying different categories of AI models may be different.
[0102] In one possible implementation, after the target model effect display service corresponding to each category of AI model is released online, users can use the target model effect display service corresponding to any category of AI model to obtain the display effect of the AI model in that category. For example, the user can enter the content to be identified in the interface of the client corresponding to the AI model of that category, such as the first interface. After the user enters the content to be identified in the first interface, such as after the user enters the content to be identified in the first interface and triggers the button to initiate the identification request, the content to be identified entered by the user can be obtained from the first interface of the client for subsequent processing.
[0103] In one possible implementation, after obtaining the content to be identified, it is necessary to further convert the content to be identified into a language form (such as machine language) readable by the first category of AI model.
[0104] S502. Based on the target model effect display service corresponding to the first category of AI model, the content to be identified is input into the first category of AI model to obtain the recognition result corresponding to the content to be identified, and displayed in the first interface of the client.
[0105] In one possible implementation, the first category of AI model can be called based on the target model effect display service corresponding to the first category of AI model to identify and analyze the content to be identified through the first category of AI model to obtain the identification result corresponding to the content to be identified.
[0106] In one possible implementation, after obtaining the recognition result corresponding to the content to be identified, the recognition result corresponding to the content to be identified can be sent to the first interface of the client and displayed through the target model effect display service corresponding to the first category of AI model, so as to show the user the recognition result of the first category of AI model for the content to be identified, so that the user can view the model effect of the first category of AI model through the client interface.
[0107] It can be understood that after configuring the pre-created model effect display service to obtain the target model effect display service and publishing it online, the user can enter the content to be identified in the client interface, and click the initiate recognition request button to trigger the target model effect display service to call the corresponding AI model, identify and analyze the content to be identified, and obtain the recognition result corresponding to the content to be identified, and then display the recognition result in the client interface to display the model effect of the corresponding AI model.
[0108] In an embodiment of the present disclosure, when a user uses the target model effect display service, the content to be recognized entered by the user in the first interface of the client corresponding to the first category of AI model can be obtained, and based on the target model effect display service corresponding to the first category of AI model, the content to be recognized is entered into the first category of AI model to obtain the recognition result corresponding to the content to be recognized, and displayed in the first interface of the client. When the user uses the interface in the client corresponding to a different category of AI model, the content to be recognized entered by the user can be entered into the AI model corresponding to the interface to obtain the corresponding recognition result. This can improve the efficiency of displaying the model effect.
[0109] like Figure 6 As shown, another general model effect display method provided by the embodiment of the present disclosure specifically includes a stage of displaying the AI model effect, that is, corresponding to the second stage above, the method may include:
[0110] S601: Obtain content to be identified input by a user in a first interface of a client.
[0111] It should be noted that the specific description of S601 is the same as that of S501 and will not be repeated here.
[0112] S602: Generate a request message based on the configuration information of the request body format type, the configuration information of the request body template, and the configuration information of the request body dynamic parameters.
[0113] The request message includes the content to be identified and authentication information.
[0114] In one possible implementation, after obtaining the content to be identified input in the first interface of the client, the content to be identified can be nested into the corresponding request body template according to the configuration information of the request body format type, the configuration information of the request body template, and the configuration information of the request body dynamic parameters, thereby generating the corresponding request body, or a request message.
[0115] Optionally, after generating the corresponding request message, the target model effect display service can call the AI model of the corresponding category through the request message.
[0116] S603: Authenticate the request message based on the authentication information.
[0117] In one possible implementation, since the corresponding authentication information is added to the request header of the request message (for a specific description, see the corresponding content in S404), it is possible to determine whether the authentication information carried in the request message is consistent with the authentication information of the AI model, so as to authenticate the request message and determine the legitimacy of the access.
[0118] Optionally, the AI model is allowed to be called only when the authentication information included in the request header of the request message passes the authentication, otherwise the AI model is not allowed to be called.
[0119] S604: After successful authentication, the AI model of the first category is called based on the request message and the configuration information of the model interface request address to input the content to be identified into the AI model of the first category.
[0120] In a possible implementation, the first category of AI models may be accessed based on configuration information of the model interface request address, so that the request message is forwarded to the first category of AI models through the model interface request address.
[0121] In one possible implementation, after forwarding the request message to the first category of AI model through the model interface request address, the first category of AI model can obtain the content to be identified carried in the request message, and perform identification and analysis on the content to be identified to obtain the corresponding identification result.
[0122] In one possible implementation, after the first category of AI model obtains the recognition result corresponding to the content to be recognized, the recognition result can be carried in a response message and returned to the server of the target model effect display service.
[0123] S605: Obtain a response message returned by the AI model of the first category.
[0124] The response message includes the recognition result corresponding to the content to be recognized.
[0125] S606: Based on the configuration information of the return body format type, the configuration information of the return body template, and the configuration information of the return body dynamic parameters, determine the recognition result corresponding to the content to be recognized from the response message and display it in the first interface of the client.
[0126] In one possible implementation, the server of the target model effect display service receives a response message carrying the recognition result returned by the first category of AI model, and based on the configuration information of the return body format type, the configuration information of the return body template, and the configuration information of the return body dynamic parameters, determines the recognition result corresponding to the content to be recognized from the response message (also referred to as the return body), thereby displaying the recognition result in the first interface of the client.
[0127] In an embodiment of the present disclosure, after obtaining the content to be identified input into the first interface of the client, a request message carrying the content to be identified and authentication information can be generated based on pre-configured configuration information of the request body format type, the request body template, and the request body dynamic parameter. The request message is then authenticated based on the authentication information. After successful authentication, the first category of AI models is called based on the request message and the configuration information of the model interface request address, thereby inputting the content to be identified into the first category of AI models. The first category of AI models then performs recognition and analysis on the content to be identified, obtaining a corresponding recognition result, and receiving a response message carrying the recognition result returned by the first category of AI models. Furthermore, the recognition result corresponding to the content to be identified can be determined from the response message based on the configuration information of the return body format type, the return body template, and the return body dynamic parameter. The above method can determine the AI model to be called based on the interface of the content to be identified input by the user, thereby improving the efficiency of generating recognition results corresponding to the content to be identified.
[0128] For example, Figure 7 As shown, a schematic diagram of the implementation logic corresponding to a general model effect display method provided by an embodiment of the present disclosure is provided. After creating the model effect display service, it is first necessary to determine the model category that currently needs to be configured, so as to determine the display effect of the client's display interface based on the model category to be configured, and generate the corresponding front-end style code through the page effect configuration module (the front-end style code corresponding to different categories of AI models is different, and the interface effect is different). Further, the interface parameters of any category of AI model are obtained (i.e., personalized interface parameters, including model interface request address, authentication information, request body format type, return body format type, request body template, return body template, request body dynamic parameters and return body dynamic parameters, etc.), and the pre-created model effect display service is configured according to the configuration information of the interface parameters of any category of AI model. Specifically, after configuring the configuration information of the interface parameters in the pre-created model effect display service, the server can generate the model interface request code through the interface request configuration module and the result parsing configuration module in the background configuration module, thereby obtaining the target model effect display service corresponding to any category of AI model.
[0129] Furthermore, when the user needs to view the recognition result of the AI model for the content to be recognized through the target model effect display service, the user can enter the content to be recognized in the client interface, so that the server can obtain the content to be recognized through the client interface (i.e., the front-end style code) and initiate a request to the target model effect display service (model interface request code), thereby generating a request message based on the target model effect display service corresponding to any category of AI model, based on the configuration information of the request body format type, the configuration information of the request body template, and the configuration information of the request body dynamic parameters. After the request message is successfully authenticated through the authentication information, a call request is initiated to the AI model through the configuration information of the model interface request address to input the content to be recognized into the AI model. The AI model generates the corresponding recognition result based on the content to be recognized and returns a response message including the recognition result to the target model effect display service (model interface request code). The target model effect display service parses the recognition result from the response message based on the configuration information of the return body format type, the configuration information of the return body template, and the configuration information of the return body dynamic parameters, and sends it to the front-end display code to display it in the client interface for the user to view.
[0130] The present disclosure realizes the flexible calling of various AI model interfaces by the client interface and displays the recognition results of the AI model through the flexible configuration of the interface request message and the hierarchical marking of the dynamic parameters of the AI model request body and return body. This configuration and marking-based AI model effect display method saves a lot of customized development work caused by differences in AI model interfaces, and greatly shortens the launch time of the AI model effect display service. This method can meet the effect display requirements for different categories of models without repeated development and customization, effectively reducing the development cost of model visualization display. In scenarios where a large number of model effects need to be displayed, the release speed of the model effect display can be improved, and customer satisfaction can be improved. Moreover, when the model is iterated or changed, the model interface can be adapted directly by modifying the configuration parameter information, which is more flexible and efficient.
[0131] Based on the above technical solution, the present disclosure can configure a pre-created model effect display service based on the interface parameters of multiple categories of artificial intelligence (AI) models, obtain a target model effect display service corresponding to each category of AI model, and display the model effect of the corresponding category of AI model in the client interface based on the content to be recognized input by the user through the target model effect display service corresponding to each category of AI model. Therefore, when the user enters the content to be recognized in the client interface, the model effect can be displayed through the target model effect display service corresponding to the corresponding category of AI model. Through the above method, for different categories of AI models, a pre-created model effect display service can be configured based on the interface parameters of different categories of AI models to generate a target model effect display service corresponding to each category of AI model. There is no need to carry out customized development work according to different AI models to adapt the personalized service interface of each AI model to develop a dedicated front-end display interface corresponding to each AI model in order to display the model effect of each AI model. This can improve the efficiency of developing dedicated model effect display services corresponding to different categories of AI models and reduce the development workload.
[0132] The above mainly introduces the solution provided by the embodiment of the present disclosure from the perspective of computer equipment. It can be understood that in order to realize the above functions, the computer equipment includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the general model effect display method steps of each example described in the embodiment disclosed in the present disclosure, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present disclosure.
[0133] The embodiment of the present disclosure can divide the general model effect display method into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0134] like Figure 8FIG. 8 is a schematic diagram of a general model effect display device according to an embodiment of the present disclosure. The general model effect display device may include: a creation unit 801 , an acquisition unit 802 , and a processing unit 803 .
[0135] A creation unit 801 is used to create a model effect display service, which is used to display the model effect in the client interface; an acquisition unit 802 is used to obtain interface parameters of multiple categories of artificial intelligence AI models, and the interface parameters of the AI model are used to call the AI model; a processing unit 803 is used to configure the model effect display service for each category of AI model according to the interface parameters of the AI model to obtain a target model effect display service corresponding to each category of AI model; wherein the target model effect display service is used to display the model effect of the corresponding category of AI model in the client interface based on the content to be identified input by the user.
[0136] Optionally, different interfaces are used to display the model effects of different categories of AI models.
[0137] Optionally, the acquisition unit 802 is further configured to acquire configuration information of interface parameters; and the processing unit 803 is further configured to configure the configuration information of the interface parameters into the model effect display service.
[0138] Optionally, the acquisition unit 802 is also used to obtain the content to be identified input by the user in the first interface of the client, the first interface corresponds to the AI model of the first category, and the AI model of the first category is included in the AI models of multiple categories; the processing unit 803 is also used to input the content to be identified into the AI model of the first category based on the target model effect display service corresponding to the AI model of the first category, so as to obtain the recognition result corresponding to the content to be identified, and display it in the first interface of the client.
[0139] Optionally, the interface parameters include at least one of the following: model interface request address, authentication information, request body format type, return body format type, request body template, return body template, request body dynamic parameters, and return body dynamic parameters.
[0140] Optionally, the processing unit 803 is also used to generate a request message based on the configuration information of the request body format type, the configuration information of the request body template, and the configuration information of the request body dynamic parameters, where the request message includes the content to be identified and authentication information; the processing unit 803 is also used to authenticate the request message based on the authentication information; the processing unit 803 is also used to call the first category of AI model based on the request message and the configuration information of the model interface request address after successful authentication, so as to input the content to be identified into the first category of AI model; the acquisition unit 802 is also used to obtain a response message returned by the first category of AI model, where the response message includes the recognition result corresponding to the content to be identified; the processing unit 803 is also used to determine the recognition result corresponding to the content to be identified from the response message based on the configuration information of the return body format type, the configuration information of the return body template, and the configuration information of the return body dynamic parameters.
[0141] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0142] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0143] like Figure 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0144] Multiple components in the electronic device 900 are connected to the I / O interface 905, including an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0145] The computing unit 901 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as the general model effect display method. For example, in some embodiments, the general model effect display method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the general model effect display method described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the general model effect display method by any other appropriate means (e.g., by means of firmware).
[0146] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0147] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0148] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0149] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0150] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0151] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0152] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0153] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A general model effect display method, including: Creating a model effect display service, wherein the model effect display service is used to display the model effect in the client interface; Obtaining interface parameters of multiple categories of artificial intelligence (AI) models, where the interface parameters of the AI models are used to call the AI models, and the interface parameters include at least one of the following: a model interface request address, authentication information, a request body format type, a return body format type, a request body template, a return body template, a request body dynamic parameter, and a return body dynamic parameter; For each category of AI model, the model effect display service is configured according to the interface parameters of the AI model to obtain a target model effect display service corresponding to each category of AI model; wherein the target model effect display service is used to display the model effect of the corresponding category of AI model in the interface of the client based on the content to be identified input by the user; The recognition result corresponding to the content to be recognized is determined in the following manner: Generate a request message based on the configuration information of the request body format type, the configuration information of the request body template, and the configuration information of the request body dynamic parameters, wherein the request message includes the content to be identified and the authentication information; authenticating the request message based on the authentication information; After successful authentication, calling the AI model of the first category based on the request message and the configuration information of the model interface request address to input the content to be identified into the AI model of the first category; Obtain a response message returned by the AI model of the first category, where the response message includes a recognition result corresponding to the content to be recognized; Based on the configuration information of the return body format type, the configuration information of the return body template, and the configuration information of the return body dynamic parameters, an identification result corresponding to the content to be identified is determined from the response message.
2. The method according to claim 1, wherein The interfaces for displaying model effects for different categories of AI models are different.
3. The method according to claim 1 or 2, wherein: The model effect display service is configured according to the interface parameters of the AI model, including: Obtaining configuration information of the interface parameters; The configuration information of the interface parameters is configured into the model effect display service.
4. The method according to claim 3, wherein: The method further comprises: Obtaining content to be recognized input by a user in a first interface of the client, where the first interface corresponds to an AI model of a first category, and the AI model of the first category is included in the multiple categories of AI models; Based on the target model effect display service corresponding to the first category of AI model, the content to be identified is input into the first category of AI model to obtain the recognition result corresponding to the content to be identified, and displayed in the first interface of the client.
5. A general model effect display device, comprising: A creation unit, configured to create a model effect display service, wherein the model effect display service is configured to display the model effect in the interface of the client; An acquisition unit, configured to acquire interface parameters of multiple categories of artificial intelligence (AI) models, wherein the interface parameters of the AI models are used to call the AI models, and the interface parameters include at least one of the following: a model interface request address, authentication information, a request body format type, a return body format type, a request body template, a return body template, a request body dynamic parameter, and a return body dynamic parameter; A processing unit configured to configure the model effect display service for each category of AI model according to the interface parameters of the AI model to obtain a target model effect display service corresponding to each category of AI model; wherein the target model effect display service is used to display the model effect of the corresponding category of AI model in the interface of the client based on the content to be identified input by the user; The processing unit is further configured to generate a request message based on the configuration information of the request body format type, the configuration information of the request body template, and the configuration information of the request body dynamic parameters, wherein the request message includes the content to be identified and the authentication information; The processing unit is further configured to authenticate the request message based on the authentication information; The processing unit is further configured to, after successful authentication, call an AI model of the first category based on the request message and configuration information of the model interface request address, so as to input the content to be identified into the AI model of the first category; The acquiring unit is further configured to acquire a response message returned by the AI model of the first category, wherein the response message includes a recognition result corresponding to the content to be recognized; The processing unit is further configured to determine, from the response message, an identification result corresponding to the content to be identified based on the configuration information of the return body format type, the configuration information of the return body template, and the configuration information of the return body dynamic parameters.
6. The universal model effect display device according to claim 5, wherein: The interfaces for displaying model effects for different categories of AI models are different.
7. The universal model effect display device according to claim 5 or 6, wherein: The acquiring unit is further configured to acquire configuration information of the interface parameters; The processing unit is further configured to configure the configuration information of the interface parameters into the model effect display service.
8. The universal model effect display device according to claim 7, wherein: The acquisition unit is further configured to acquire content to be recognized input by a user in a first interface of the client, wherein the first interface corresponds to an AI model of a first category, and the AI model of the first category is included in the multiple categories of AI models; The processing unit is also used to input the content to be identified into the AI model of the first category based on the target model effect display service corresponding to the AI model of the first category, so as to obtain the recognition result corresponding to the content to be identified, and display it in the first interface of the client.
9. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-4.
11. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Machine learning model application method and device, computer equipment and storage medium
CN111369011A