Multi-modal application development system, method, equipment and medium
Through a three-layer multimodal application development system, modular design and flexible model selection and task combination are used to solve the cumbersome and repetitive problems in multimodal application development, and improve development efficiency and system maintenance.
Patent Information
- Application Number
- CN202411603793.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the development of multimodal applications requires a separate development of the assembly line, which is tedious and repetitive, and has extremely low efficiency.
A three-layer architecture multimodal application development system is proposed. Through modular design, flexible model selection and task combination, including model modules, task modules and application modules, the development efficiency, expansion capabilities and system maintenance are significantly improved.
It significantly improves the development efficiency, expansion capabilities and system maintenance of multimodal applications, and is suitable for multimodal task scenarios that require rapid iteration and flexible deployment.
Smart Images

Figure CN119557017A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to technical fields such as natural language processing and deep learning, and specifically to a multimodal application development system, a multimodal application development method, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include natural language processing technology, computer vision technology, speech recognition technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0003] Multimodal applications are an important support for the implementation of multimodal large models. Multimodal applications include data input, multimodal model access and reasoning, and finally reasoning results. Different multimodal applications are different in data input, model and output.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0005] The present disclosure provides a multimodal application development system, a multimodal application development method, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of the present disclosure, a system for developing a multimodal application is provided, comprising: a model module, configured to: determine a plurality of candidate models, wherein the plurality of candidate models include a multimodal basic model; a task module, configured to: obtain task information of a task to be created, wherein the task information includes a task identifier and at least one target model for the task to be created determined from the plurality of candidate models; instantiate the task to be created using the task information to obtain a task instance; construct task configuration information for the task to be created, and add the task configuration information to a task configuration table, wherein the task configuration information indicates a mapping relationship between the task identifier and the task instance; and an application module, configured to: retrieve the task configuration table, and determine a plurality of target tasks in the task configuration table; determine a combination relationship among the plurality of target tasks; and associate the task configuration information of the plurality of target tasks based on the combination relationship to obtain application configuration information of a target application.
[0007] According to another aspect of the present disclosure, a method for developing a multimodal application is provided. The development system includes a model module, a task module and an application module. The method includes: determining multiple candidate models in the model module, the multiple candidate models including a multimodal basic model; obtaining task information of a task to be created in the task module, wherein the task information includes a task identifier and at least one target model for the task to be created determined by the user in the multiple candidate models; instantiating the task to be created using the task information to obtain a task instance; constructing task configuration information for the task to be created, and adding the task configuration information to a task configuration table, wherein the task configuration information indicates a mapping relationship between the task identifier and the task instance; calling the task configuration table in the application module, and obtaining multiple target tasks determined by the user in the task configuration table; determining a combination relationship between the multiple target tasks; and associating the task configuration information of the multiple target tasks based on the combination relationship to obtain application configuration information of the target application.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable 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 execute the above method.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above method.
[0010] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.
[0011] According to one or more embodiments of the present disclosure, the multimodal application development system with a three-tier architecture proposed in the present disclosure significantly improves development efficiency, expansion capability and system maintainability through modular design, flexible model selection and task combination, and is suitable for multimodal task scenarios that require fast iteration and flexible deployment.
[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;
[0015] Figure 2 A structural block diagram of a multimodal application development system according to an embodiment of the present disclosure is shown;
[0016] Figure 3 A schematic diagram of a system for developing multimodal applications according to an embodiment of the present disclosure is shown;
[0017] Figure 4 A flowchart showing a method for developing a multimodal application according to an embodiment of the present disclosure; and
[0018] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0020] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, temporal relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0021] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0022] In the related technology, developers need to develop a set of pipelines separately for different multimodal tasks, which is tedious, repetitive and extremely inefficient.
[0023] To solve the above problems, the three-layer multimodal application development system proposed in the present disclosure significantly improves development efficiency, expansion capability and system maintainability through modular design, flexible model selection and task combination, and is suitable for multimodal task scenarios that require rapid iteration and flexible deployment. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0025] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the methods of the present disclosure.
[0026] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.
[0027] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0028] The user can use client devices 101, 102, 103, 104, 105 and / or 106 to perform human-computer interaction. The client device can provide an interface that enables the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0029] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.
[0030] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0031] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0032] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0033] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and / or 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and / or 106.
[0034] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0035] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.
[0036] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0037] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0038] According to one aspect of the present disclosure, a system for developing a multimodal application is provided. Figure 2 As shown, the development system 200 includes: a model module 210, which is configured to determine multiple candidate models, and the multiple candidate models include a multimodal basic model. A task module 220, which is configured to: obtain task information of the task to be created, wherein the task information includes a task identifier and at least one target model for the task to be created determined in multiple candidate models; instantiate the task to be created using the task information to obtain a task instance; construct task configuration information of the task to be created, and add the task configuration information to the task configuration table, wherein the task configuration information indicates a mapping relationship between the task identifier and the task instance; and an application module 230, which is configured to: call the task configuration table, and determine multiple target tasks in the task configuration table; determine the combination relationship of the multiple target tasks; and associate the task configuration information of the multiple target tasks based on the combination relationship to obtain the application configuration information of the target application.
[0039] Therefore, the three-tier multimodal application development system proposed in the present invention significantly improves development efficiency, expansion capability and system maintainability through modular design, flexible model selection and task combination, and is suitable for multimodal task scenarios that require rapid iteration and flexible deployment.
[0040] The modularity of the three-layer structure enables each layer to have independent functions and roles: the model layer is responsible for providing the basic model, the task layer realizes specific tasks by combining models, and the application layer completes specific applications by scheduling tasks. This modular design allows developers to combine or modify each layer according to specific needs without having to start development from scratch for each application, thereby improving the flexibility and reusability of the development system.
[0041] A multimodal application (which may also include a cross-modal application) is a pipeline including data input, model access, and reasoning results. The model module, task module, and application module in the development system are also referred to as the model layer, task layer, and application layer in this disclosure.
[0042] The model module (model layer) includes basic models of various different modalities. In some embodiments, the multimodal basic model may include basic models of text modality, audio modality, and image modality.
[0043] The multimodal basic model can also be divided into two parts: a multimodal understanding model and a multimodal generation model. In an exemplary embodiment, the multimodal understanding model may include a graphic pre-training model (e.g., CLIP, LLaVA), an open world visual model (e.g., Grounding DINO, YOLO), etc., and the multimodal generation model may include a text-based model (e.g., Stable Diffusion, ControlNet), a text-based video model (e.g., LVDM), an audio generation model (e.g., AudioLDM), etc. It is understandable that the multimodal basic model may also include other models, which are not limited here.
[0044] In some embodiments, the model module (model layer) can maintain a model library. When the development system is started, all models in the model library can be scanned to obtain a mapping table of model identifiers and model instances. When a model needs to be called, only the model identifier needs to be provided to obtain the model instance.
[0045] In some embodiments, multiple candidate models may be determined based on a user's selection from multiple multimodal base models in a model library. By selecting candidate models in advance, it is possible to facilitate the subsequent development process.
[0046] In some embodiments, the task module (task layer) mainly realizes different tasks by combining different basic models in the model module.
[0047] In some embodiments, the task information of the task to be created may be obtained from the user side. For example, the user may provide a task identifier and select at least one target model corresponding to the current task from multiple candidate models. It is understandable that a single model or multiple models may be configured in the same task. In addition, the at least one target model for each task to be created may also be determined by other means, which are not limited here.
[0048] According to some embodiments, the task information may also include input pre-processing logic and output post-processing logic of at least one target model. The task instance can be configured to convert the input data of the task to be created into a format acceptable to at least one target model based on the input pre-processing logic, and convert the reasoning results of at least one target model into a format expected by the user or a format available to downstream tasks based on the post-processing logic. By including the pre-processing and post-processing steps in the task information, the data processing of each model before and after reasoning can be standardized and optimized, thereby improving reasoning performance and output quality. Especially when faced with complex applications consisting of multiple tasks, this approach can make the data flow seamless, thereby reducing the redundancy of intermediate steps and improving the execution efficiency of the entire task flow. In addition, this development method also brings convenience to developers.
[0049] After obtaining the task information, the task can be instantiated based on the task information. After the task is instantiated into a task instance, it is easier to call it by the application module. In addition, such a design allows flexible combination between a large number of tasks to achieve richer application functions.
[0050] According to some embodiments, a task module may include a task flow base class, and the task flow base class includes a model reasoning method function, an input pre-processing method function, and an output post-processing method function. The task module may be configured to: inherit the task flow base class using task information to obtain a task instance, including: rewriting the model reasoning method function based on at least one target model; rewriting the input pre-processing method function based on the input pre-processing logic of at least one target model; and rewriting the output post-processing method function based on the output post-processing logic of at least one target model.
[0051] Therefore, by abstracting common functions (such as model pre-processing, post-processing, reasoning, etc.) as base classes, developers can quickly create new tasks and applications. This reusability significantly reduces duplication of development work and greatly improves the iteration speed of cross-modal applications. Each time a new task or application is added, it only needs to be inherited and combined based on the existing base class, reducing code rewriting and shortening the development cycle.
[0052] By inheriting the task flow base class, users can easily create task instances according to specific needs, automate the pre- and post-processing of input data and model reasoning, simplify the development process of multimodal tasks, and ensure the modularity and reusability of tasks.
[0053] In some embodiments, the rewritten model inference method function can manage the model that needs to be called through the model module, including the model loading and calling methods; the rewritten input pre-processing method function is used to convert the input data into a format acceptable to the model; the rewritten output post-processing method function can convert the model inference results into the user's expected results or a format available to downstream tasks.
[0054] In an exemplary embodiment, when a user wants to create a specific task, he can inherit the task flow base class and customize the pre-processing, model calling, and post-processing according to the task requirements. The user can first create a new class and inherit the base class, such as creating a task class for open world detection. In the inherited class, the user can implement the pre-processing method for processing the input data so that the input meets the requirements of the model. For example, for an open world detection task, it may be necessary to convert the input image to a specific size or normalize it. Then, the reasoning process of the task can be defined, that is, the pre-processed data is input into the model for reasoning. Finally, the user can implement post-processing to convert the model output into the final format desired by the user or required by downstream tasks.
[0055] After instantiation is completed, the task configuration information of the task can be constructed and added to the task configuration table. The task configuration information includes a mapping relationship between a task identifier and a task instance. The task identifier can be provided by a user or generated by a development system. In some embodiments, the task configuration information can also include a mapping relationship between a task identifier and a model identifier to facilitate direct calling of the model.
[0056] In an exemplary embodiment, the task configuration table may be:
[0057]
[0058]
[0059] The above task configuration table includes the mapping relationship of three tasks. The first line of each task is the task identifier ("paddlemix / blip2-caption-opt2.7b", "GroundingDino / groundingdino-swint-ogc" and "Sam / SamVitH-1024"), and the second and third lines (task_class and task_flag) are the task instance and model identifier respectively.
[0060] The application module (application layer) can retrieve the task configuration table and determine multiple target tasks in the task configuration table. Further, the combination relationship of the multiple target tasks can be determined, and the task configuration information of the multiple target tasks can be associated to obtain the application configuration information of the target application. The combination relationship can include, for example, a series relationship, a parallel relationship, a combination relationship or other relationships.
[0061] In some embodiments, the name or identification of the application to be configured, multiple target tasks and / or the combination relationship of multiple target tasks can be determined based on the input provided by the user. In some embodiments, these contents can also be completed by the development system itself.
[0062] After obtaining the application configuration information, the application can be regarded as having been developed. In some embodiments, the application configuration information can also be added to the application list.
[0063] In an exemplary embodiment, the application list may be:
[0064]
[0065]
[0066] The above application list includes two applications: automatic labeling application auto_label and text-to-image conversion application text2image.
[0067] According to some embodiments, the application configuration information may include an application identifier of the target application. The application module may be configured to: receive an application call request for the target application via an application program interface, the application call request including the application identifier of the target application; and send task call requests for task instances of each of the plurality of target tasks to the task module in sequence based on the application configuration information of the target application.
[0068] Through the above methods, a set of standardized task flow management and application calling interfaces are implemented. Through this unified application programming interface, developers can use a unified method to manage different applications. Regardless of the complexity of the application, they can all be called through the same API, thereby improving the consistency and maintainability of the system.
[0069] In some embodiments, related tasks can be scheduled in sequence according to the combination relationship of multiple target tasks in the application configuration information. In an exemplary embodiment, the automatic image annotation application can first call the "open world detection task" and then call the "picture and text question and answer task". There is a dependency relationship between tasks, and the output of the previous task is the input of the next task. For example, the "open world detection task" will first annotate the object information in the image, and this output (annotation result) will be passed to the subsequent "picture and text question and answer task" as input to further enrich the annotation content.
[0070] According to some embodiments, the task module can be configured to: in response to receiving a task call request for a task instance of a target task among multiple target tasks, process the input of the above-mentioned target task based on the corresponding input pre-processing logic to obtain a first intermediate result; send model call requests for at least one target model corresponding to the above-mentioned target task to the model module in sequence, and obtain the returned second intermediate result; process the second intermediate result based on the corresponding output post-processing logic to obtain an inference result; and return the inference result.
[0071] When executing a task, you can first obtain the relevant model instance from the task configuration table, complete the preprocessing of the input data, and then pass the processed data to the model.
[0072] In some embodiments, before entering the model reasoning, the task can perform a pre-processing operation on the input data to obtain a first intermediate result. Different models may have different data formats and processing methods, which can be defined by the input pre-processing logic. For example, the image model can resize and normalize the input image. After the pre-processing is completed, the model performs reasoning to obtain a second intermediate result. For example, the image segmentation model will output the segmentation outline of the object, and the text generation model will output the corresponding description.
[0073] In some embodiments, the inference results can also be further processed to facilitate the use of downstream tasks or as final output. For example, the coordinates output by the object detection model can be converted into readable annotation information.
[0074] According to some embodiments, the model module may include a model mapping table. The model mapping table may include a mapping relationship between a model identifier and a model instance of each of a plurality of candidate models, and the model call request may include a model identifier of a corresponding target model. The model module may be configured to: in response to receiving a model call request, determine and call the model instance of the corresponding target model using the model mapping table based on the model identifier included in the model call request.
[0075] When a model is needed in the task layer, the model module can be called through the model identifier, and the model module returns the corresponding model instance based on the model identifier. In this way, the corresponding model resources can be obtained more conveniently and flexibly.
[0076] Figure 3A schematic diagram of a development system for a multimodal application according to an embodiment of the present disclosure is shown. The development system 300 includes three parts: a model layer 310, a task layer 320, and an application layer 330. Data 340 enters the application layer 330, and the application layer 330, the task layer 320, and the model layer 310 collaborate to complete the processing of the data, and finally obtain an output 350. Among them, the application layer 330 calls the task layer 320, and the task layer 320 further calls the model layer 310. The model layer 310 returns the result of the model processing to the task layer 320, and the task layer 320 returns the task reasoning result to the application layer 330.
[0077] In an exemplary embodiment, Figure 3 As shown, the model layer 310 may include basic models such as an open world detection model 312, a text-image understanding model 314, a text-image model 316, and an audio generation model 318. The task layer 320 may include tasks such as an open world detection 322, a text-image task 326, a text-image question-answering 324, and an audio task 328. The application layer 330 may include applications such as automatic image annotation 332, image editing 334, and image music 336.
[0078] According to another aspect of the present disclosure, a method for developing a multimodal application is provided. The development system includes a model module, a task module, and an application module. Figure 4 As shown, the development method includes: step S401, determining multiple candidate models in the model module, the multiple candidate models including a multimodal basic model; step S402, obtaining task information of the task to be created in the task module, wherein the task information includes a task identifier and at least one target model selected by the user from multiple candidate models; step S403, instantiating the task to be created using the task information to obtain a task instance; step S404, constructing task configuration information of the task to be created, and adding the task configuration information to a task configuration table, wherein the task configuration information indicates a mapping relationship between the task identifier and the task instance; step S405, calling the task configuration table in the application module, and obtaining multiple target tasks determined by the user in the task configuration table; step S406, determining a combination relationship of multiple target tasks; and step S407, associating the task configuration information of the multiple target tasks based on the combination relationship to obtain application configuration information of the target application.
[0079] Understandably, Figure 4 The operations and effects of steps S401 to S407 in the development system 200 can refer to the above description of modules 210 to 230 in the development system 200, and will not be repeated here.
[0080] In some embodiments, the model module may include a model library including a plurality of multimodal base models. According to some embodiments, the multimodal base model may include base models of text modality, audio modality, and image modality.
[0081] In step S401, multiple candidate models may be determined based on a user's selection of multiple candidate models in a model library.
[0082] In step S402, task information provided by a user may be received, including a task identifier and at least one target model selected by the user from a plurality of candidate models.
[0083] According to some embodiments, the task module may include a task flow base class, and the task flow base class may include a model reasoning method function, an input pre-processing method function, and an output post-processing method function. Step S403, using the task information to instantiate the task to be created, and obtaining the task instance may include: using the task information to inherit the task flow base class to obtain the task instance, including: rewriting the model reasoning method function based on at least one target model; rewriting the input pre-processing method function based on the input pre-processing logic of at least one target model; and rewriting the output post-processing method function based on the output post-processing logic of at least one target model.
[0084] In step S405, multiple target tasks may be determined according to the user's selection of multiple target tasks in the task configuration table. Application information provided by the user may also be received, which may include, for example, an application identifier.
[0085] According to some embodiments, the task information also includes input pre-processing logic and output post-processing logic of at least one target model. The task instance can be configured to convert the input data of the task to be created into a format acceptable to at least one target model based on the input pre-processing logic, and convert the reasoning result of at least one target model into a format expected by the user or a format available to downstream tasks based on the post-processing logic.
[0086] According to some embodiments, the development method may further include: receiving, in an application module, an application call request for a target application via an application program interface, the application call request including an application identifier of the target application; and sending, in sequence, task call requests for respective task instances of a plurality of target tasks to a task module based on application configuration information of the target application.
[0087] According to some embodiments, the development method may also include: in response to the task module receiving a task call request for a task instance of a target task among multiple target tasks, processing the input of the above-mentioned target task based on the corresponding input pre-processing logic to obtain a first intermediate result; sending model call requests for at least one target model corresponding to the above-mentioned target task to the model module in sequence, and obtaining the returned second intermediate result; processing the second intermediate result based on the corresponding output post-processing logic to obtain an inference result; and returning the inference result.
[0088] According to some embodiments, the model module may include a model mapping table, the model mapping table may include a mapping relationship between a model identifier and a model instance of each of a plurality of candidate models, and the model call request may include a model identifier of a corresponding target model. The development method may further include: in response to the model module receiving a model call request, based on the model identifier included in the model call request, using the model mapping table to determine and call the model instance of the corresponding target model.
[0089] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0090] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.
[0091] refer to Figure 5 , a block diagram of an electronic device 500 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, 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 processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0092] like Figure 5As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0093] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 can be any type of device that can input information to the electronic device 500. The input unit 506 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 507 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 can include but is not limited to a disk, an optical disk. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0094] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 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 running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods, processes, and / or processes described above. For example, in some embodiments, these methods, processes, and / or processes may be implemented as computer software programs, which are tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the methods, processes, and / or processes described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform these methods, processes, and / or processes in any other appropriate manner (e.g., by means of firmware).
[0095] Various implementations of the systems and techniques described above herein 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), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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.
[0096] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0097] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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.
[0098] 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).
[0099] The systems and techniques described herein can be implemented in a computing system that includes backend 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 frontend components (e.g., a user computer with 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 backend components, middleware components, or frontend 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), the Internet, and a blockchain network.
[0100] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server for a distributed system, or a server combined with a blockchain.
[0101] It should be understood that the various forms of 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 different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0102] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A multimodal application development system, comprising: The model module is configured as: Determining a plurality of candidate models, the plurality of candidate models comprising a multimodal base model; The task module is configured as: Acquire task information of a task to be created, wherein the task information includes a task identifier and at least one target model determined from among the multiple candidate models for the task to be created; Instantiating the task to be created using the task information to obtain a task instance; Constructing task configuration information of the task to be created, and adding the task configuration information to a task configuration table, wherein the task configuration information indicates a mapping relationship between the task identifier and the task instance; and Application modules are configured as follows: Retrieving the task configuration table, and determining a plurality of target tasks in the task configuration table; Determining a combination relationship of the multiple target tasks; and The task configuration information of the multiple target tasks is associated based on the combination relationship to obtain the application configuration information of the target application.
2. The development system according to claim 1, wherein: The task information also includes the input pre-processing logic and output post-processing logic of the at least one target model respectively, wherein the task instance is configured to convert the input data of the task to be created into a format acceptable to the at least one target model based on the input pre-processing logic, and convert the inference result of the at least one target model into a format expected by the user or a format available to downstream tasks based on the post-processing logic.
3. The development system according to claim 2, wherein: The application configuration information includes an application identifier of the target application, and the application module is configured as follows: Receiving, via an application program interface, an application call request for the target application, the application call request including an application identifier of the target application; and Based on the application configuration information of the target application, task call requests for the task instances of the respective multiple target tasks are sent to the task module in sequence.
4. The development system according to claim 3, wherein: The task module is configured as follows: In response to receiving a task call request for a task instance of a target task among the multiple target tasks, processing the input of the target task based on the corresponding input pre-processing logic to obtain a first intermediate result; Sending model call requests for at least one target model corresponding to the one target task to the model module in sequence, and obtaining a returned second intermediate result; Processing the second intermediate result based on the corresponding output post-processing logic to obtain an inference result; as well as The inference result is returned.
5. The development system according to claim 4, wherein: The model module includes a model mapping table, the model mapping table includes a mapping relationship between the model identifiers of the plurality of candidate models and the model instances, the model call request includes the model identifier of the corresponding target model, Wherein, the model module is configured as follows: In response to receiving a model calling request, based on the model identifier included in the model calling request, the model instance of the corresponding target model is determined using the model mapping table and called.
6. The development system according to claim 2, wherein: The task module includes a task flow base class, which includes a model reasoning method function, an input pre-processing method function, and an output post-processing method function. The task module is configured as follows: The task flow base class is inherited by using the task information to obtain the task instance, including: rewriting the model inference method function based on the at least one target model; Rewrite the pre-input processing method function based on the pre-input processing logic of the at least one target model; and The output post-processing method function is rewritten based on the output post-processing logic of the at least one target model.
7. The development system according to any one of claims 1 to 6, wherein: The multimodal basic model includes basic models of text modality, audio modality and image modality.
8. A method for developing a multimodal application, wherein: The development system includes a model module, a task module and an application module, and the method includes: Determining a plurality of candidate models in the model module, wherein the plurality of candidate models include a multimodal basic model; Acquiring, in the task module, task information of the task to be created, wherein the task information includes a task identifier and at least one target model determined by the user from among the multiple candidate models for the task to be created; Instantiating the task to be created using the task information to obtain a task instance; Constructing task configuration information of the task to be created, and adding the task configuration information to a task configuration table, wherein the task configuration information indicates a mapping relationship between the task identifier and the task instance; Retrieving the task configuration table in the application module, and obtaining a plurality of target tasks determined by the user in the task configuration table; Determining a combination relationship of the multiple target tasks; and The task configuration information of the multiple target tasks is associated based on the combination relationship to obtain the application configuration information of the target application.
9. The method according to claim 8, wherein: The task information also includes the input pre-processing logic and output post-processing logic of the at least one target model respectively, wherein the task instance is configured to convert the input data of the task to be created into a format acceptable to the at least one target model based on the input pre-processing logic, and convert the inference result of the at least one target model into a format expected by the user or a format available to downstream tasks based on the post-processing logic.
10. The method according to claim 9, further comprising: Receiving, in the application module via an application program interface, an application call request for the target application, wherein the application call request includes an application identifier of the target application; as well as Based on the application configuration information of the target application, task call requests for the task instances of the respective multiple target tasks are sent to the task module in sequence.
11. The method according to claim 10, further comprising: In response to the task module receiving a task call request for a task instance of a target task among the multiple target tasks, processing the input of the target task based on the corresponding input pre-processing logic to obtain a first intermediate result; Sending model call requests for at least one target model corresponding to the one target task to the model module in sequence, and obtaining a returned second intermediate result; Processing the second intermediate result based on the corresponding output post-processing logic to obtain an inference result; as well as The inference result is returned.
12. The method according to claim 11, wherein: The model module includes a model mapping table, the model mapping table includes a mapping relationship between the model identifiers of the plurality of candidate models and the model instances, the model call request includes the model identifier of the corresponding target model, Wherein, the method further comprises: In response to the model module receiving a model calling request, based on the model identifier included in the model calling request, the model instance of the corresponding target model is determined using the model mapping table and called.
13. The method according to claim 9, wherein: The task module includes a task flow base class, and the task flow base class includes a model reasoning method function, an input pre-processing method function, and an output post-processing method function, wherein the task to be created is instantiated using the task information to obtain a task instance including: The task flow base class is inherited by using the task information to obtain the task instance, including: rewriting the model inference method function based on the at least one target model; Rewrite the pre-input processing method function based on the pre-input processing logic of the at least one target model; and The output post-processing method function is rewritten based on the output post-processing logic of the at least one target model.
14. The method according to any one of claims 8 to 13, wherein: The multimodal basic model includes basic models of text modality, audio modality and image modality.
15. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled 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 8 to 14.
16. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 8-14.
17. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 8 to 14 is implemented.
Citation Information
Patent Citations
Video understanding method and related device
CN112597338A
Task processing method and device and computer readable storage medium
CN112905328A
Multi-task deployment method and device, electronic equipment and storage medium
CN113791882A
Task deployment method and device, equipment, storage medium and product
CN114048024A
Business processing method and related equipment
CN116389600A