Plug-in-based task processing method and device, electronic equipment and storage medium
By using a plug-in management approach to manage complex functions separately, the complexity and scalability issues of large model plug-ins are resolved, achieving high scalability and low maintenance costs for the system, and improving the flexibility and efficiency of model updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2024-06-20
- Publication Date
- 2026-04-21
AI Technical Summary
The complexity, maintenance costs, dependencies, compatibility issues, and scalability limitations of large model plugins lead to system stability and compatibility problems, affecting the flexibility of model updates and overall reliability.
By using a plugin management approach, plugin parameters are obtained, complex functions are managed separately, and plugins are used for preprocessing, model inference, and postprocessing. This ensures that each plugin is responsible for a specific function, and when adding or modifying functions, only the corresponding plugin needs to be adjusted, without having to refactor the entire system.
It improves the system's scalability and flexibility, reduces plugin maintenance costs, increases the flexibility of model updates, reduces resource consumption, and improves system operating efficiency.
Smart Images

Figure CN118819549B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model plugin management technology, and in particular to a plugin-based task processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] The development of plugins for large language models has become an important area of AI (Artificial Intelligence) technology in recent years. These plugins aim to extend and enhance the functionality of large language models (LLMs), enabling them to better integrate with other systems and data, and to provide customized solutions for specific tasks. The development of large model plugins is not merely a technological expansion; it is also fostering innovation in new application scenarios and business models.
[0003] The development of plugins within large models is pushing the boundaries of technology and opening up new possibilities for commercial applications. With technological advancements and evolving market demands, more innovative plugins are expected to emerge in the future, further enhancing the functionality and applicability of large models.
[0004] Complexity and maintenance costs: Plugin systems can increase the complexity of large models, posing a challenge for developers and maintainers. Each plugin may require separate updates and maintenance, which not only increases costs but can also lead to system stability and compatibility issues.
[0005] Dependency and compatibility issues: Dependencies between large models and plugins can lead to version compatibility problems. When upgrading models or plugins, it may be necessary to ensure that all components can work together. This dependency can also limit the flexibility of model updates.
[0006] Scalability limitations: As the number of plugins increases, managing and integrating these plugins can become more difficult. During large-scale deployments, the interactions between different plugins can lead to unpredictability and behavioral uncertainty, which may limit the overall scalability and reliability of the system. Summary of the Invention
[0007] In view of the above problems, embodiments of the present invention are proposed to provide a plug-in-based task processing method, apparatus, electronic device and storage medium that overcomes or at least partially solves the above problems.
[0008] In a first aspect, embodiments of the present invention disclose a task processing method based on a plugin, the method comprising:
[0009] In response to receiving a request from a user for a model inference task, the system obtains the context information matching the model inference task and the plugin parameters corresponding to the target plugin, wherein the target plugin is the plugin that the user indicates to be enabled.
[0010] Based on the request information, the context information, and the plugin parameters, generate the first request data;
[0011] The first plugin is invoked to preprocess the first request data based on the plugin parameters of the first plugin, so as to obtain the second request data;
[0012] The model inference engine is invoked to perform a model inference task based on the second request data, and the first inference response data is obtained.
[0013] The second plugin is invoked to post-process the first inference response data to obtain the second inference response data, and the second inference response data is sent to the user. The target plugin includes the first plugin and the second plugin.
[0014] Optionally, before obtaining the context information matching the model inference task and the plugin parameters corresponding to the target plugin, the method further includes:
[0015] Receive the plugin acquisition request information initiated by the user;
[0016] Parse the plugin to obtain the request information and get the plugin identifier of the plugin to be requested;
[0017] The pre-set plugin management module is invoked to retrieve the plugin parameters of the requested plugin from a pre-set database based on the plugin identifier;
[0018] Determine whether the plugin parameters of the plugin to be requested need to be processed.
[0019] If it is determined that the plugin to be requested needs to perform data processing, the plugin parameters of the plugin to be requested are processed to obtain the processed plugin parameters;
[0020] Send the processing plugin parameters and the plugin identifier to the user;
[0021] Receive user requests to modify parameters of the processing plugin;
[0022] Based on the parameter modification request, the processing plugin parameters are modified to obtain the modified plugin parameters corresponding to the plugin to be requested.
[0023] Replace the plugin parameters of the plugin to be requested in the preset database with the modified plugin parameters;
[0024] The modified plugin parameters and plugin identifier of the plugin to be requested are sent to the user.
[0025] Optionally, processing the plugin parameters of the requested plugin to obtain processed plugin parameters includes:
[0026] Retrieve the processing data corresponding to the requested plugin from the database, and determine the processing plugin parameters of the requested plugin based on the processing data and the plugin parameters; and / or
[0027] The plugin parameters are calculated and processed to obtain the processing plugin parameters for the plugin to be requested; and / or
[0028] Obtain external system information that interacts with the plugin to be requested, and determine the processing plugin parameters of the plugin to be requested based on the external system information and the plugin parameters.
[0029] Optionally, sending the modified plugin parameters and the plugin identifier of the requested plugin to the user includes:
[0030] The modified plugin parameters and the plugin identifier are converted to a new format to obtain the converted plugin data, which is adapted to the user client.
[0031] The converted plugin data is sent to the user.
[0032] Optionally, obtaining the context information matched by the model inference task and the plugin parameters corresponding to the target plugin includes:
[0033] Receive plugin status retrieval requests sent by users;
[0034] In response to the plugin status acquisition request, the pre-set plugin management module is invoked to obtain the plugin identifiers, plugin parameters, and plugin status information of all plugins that are pre-stored in the database;
[0035] The plugin identifiers, plugin parameters, and plugin status information of all plugins are sent to the user in the form of a plugin list, so that the user can select the target plugin from the plugin list and set the plugin status information of all plugins.
[0036] Optionally, the first plugin consists of N plugins, where N is a positive integer greater than 1.
[0037] The step of calling the first plugin to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data includes:
[0038] The current plugin among the N plugins is called sequentially to process the request data obtained from the previous plugin based on the plugin parameters of the current plugin, so as to obtain intermediate request data, until the N plugins complete the data processing operation;
[0039] The request data obtained by processing the last plugin among the N plugins is used as the second request data.
[0040] The request data processed by the first plugin among the N plugins is the first request data.
[0041] Optionally, the second plugin consists of M plugins, where M is a positive integer greater than 1.
[0042] The step of calling the second plugin to post-process the first inference response data to obtain the second inference response data includes:
[0043] The current plugin among the M plugins is called sequentially to process the inference response data obtained from the previous plugin based on the plugin parameters of the current plugin, so as to obtain intermediate response data, until the M plugins complete the data processing operation;
[0044] The response data obtained by processing the last plugin among the M plugins is used as the second inference response data.
[0045] The response data processed by the first of the M plugins is the first inference response data.
[0046] Secondly, embodiments of the present invention provide a plug-in-based task processing device, the device comprising:
[0047] The plugin parameter acquisition module is used to respond to a user's request for a model inference task, and to acquire the context information matching the model inference task and the plugin parameters corresponding to the target plugin, wherein the target plugin is the plugin that the user indicates to be enabled.
[0048] The first request data generation module is used to generate first request data based on the request information, the context information, and the plugin parameters;
[0049] The second request data acquisition module is used to call the first plugin to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data;
[0050] The first response data acquisition module is used to call the model inference engine to perform model inference tasks based on the second request data and obtain the first inference response data.
[0051] The second response data acquisition module is used to call the second plugin to post-process the first inference response data to obtain the second inference response data, and send the second inference response data to the user, wherein the target plugin includes the first plugin and the second plugin.
[0052] Optionally, the device further includes:
[0053] The plugin request receiving module is used to receive the plugin acquisition request information initiated by the user;
[0054] The plugin identifier acquisition module is used to parse the plugin acquisition request information to obtain the plugin identifier of the plugin to be requested;
[0055] The plugin parameter retrieval module is used to call a pre-set plugin management module to retrieve the plugin parameters of the plugin to be requested from a preset database based on the plugin identifier.
[0056] The plugin parameter determination module is used to determine whether the plugin parameters of the plugin to be requested need to be processed.
[0057] The plugin parameter acquisition module is used to process the plugin parameters of the plugin to be requested when it is determined that the plugin to be requested needs to perform data processing, so as to obtain the processed plugin parameters.
[0058] A plugin parameter sending module is used to send the plugin parameters and the plugin identifier to the user;
[0059] The parameter modification request receiving module is used to receive parameter modification requests from users for the processing plugin parameters;
[0060] The plugin parameter acquisition module is used to modify the processing plugin parameters based on the parameter modification request to obtain the modified plugin parameters corresponding to the plugin to be requested.
[0061] The plugin parameter replacement module is used to replace the plugin parameters of the plugin to be requested in the preset database with the modified plugin parameters;
[0062] The plugin parameter sending module is used to send the modified plugin parameters and the plugin identifier of the plugin to be requested to the user.
[0063] Optionally, the processing plug-in parameter acquisition module includes:
[0064] The first parameter acquisition unit is used to retrieve the processing data corresponding to the plugin to be requested from the database, and determine the processing plugin parameters of the plugin to be requested based on the processing data and the plugin parameters.
[0065] The second parameter acquisition unit is used to calculate and process the plugin parameters to obtain the processing plugin parameters of the plugin to be requested.
[0066] The third parameter acquisition unit is used to acquire external system information that interacts with the plugin to be requested, and to determine the processing plugin parameters of the plugin to be requested based on the external system information and the plugin parameters.
[0067] Optionally, the modified plugin parameter sending module includes:
[0068] The parameter format conversion unit is used to convert the modified plugin parameters and the plugin identifier into a format to obtain the format-converted plugin data, which is data adapted to the user end.
[0069] The format conversion parameter sending unit is used to send the format-converted plugin data to the user.
[0070] Optionally, the plugin parameter acquisition module includes:
[0071] The status request receiving unit is used to receive plugin status retrieval requests sent by users.
[0072] The plugin status acquisition unit is used to respond to the plugin status acquisition request by calling the pre-set plugin management module to obtain the plugin identifiers, plugin parameters, and plugin status information of all plugins that are pre-stored in the database.
[0073] The plugin status sending unit is used to send the plugin identifiers of all plugins, the plugin parameters of all plugins, and the plugin status information of all plugins to the user in the form of a plugin list, so that the user can select the target plugin from the plugin list and set the plugin status information of all plugins.
[0074] Optionally, the first plugin consists of N plugins, where N is a positive integer greater than 1.
[0075] The second request data acquisition module includes:
[0076] The intermediate request data acquisition unit is used to sequentially call the current plugin among the N plugins to process the request data obtained by the previous plugin based on the plugin parameters of the current plugin, and obtain intermediate request data until the N plugins complete the data processing operation.
[0077] The second request data acquisition unit is used to take the request data obtained by processing the last plugin among the N plugins as the second request data.
[0078] The request data processed by the first plugin among the N plugins is the first request data.
[0079] Optionally, the second plugin consists of M plugins, where M is a positive integer greater than 1.
[0080] The second response data acquisition module includes:
[0081] The intermediate response data acquisition unit is used to sequentially call the current plugin among the M plugins to process the inference response data obtained by the previous plugin based on the plugin parameters of the current plugin, and obtain intermediate response data until the M plugins complete the data processing operation.
[0082] The second response data acquisition unit is used to take the response data obtained by processing the last plugin among the M plugins as the second inference response data.
[0083] The response data processed by the first of the M plugins is the first inference response data.
[0084] Thirdly, the present invention also discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the plug-in-based task processing method described above.
[0085] Fourthly, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the plug-in-based task processing method described above.
[0086] The embodiments of the present invention have the following advantages:
[0087] This invention, in response to a user's request for a model inference task, obtains context information matching the model inference task and plugin parameters corresponding to the target plugin (the plugin indicated by the user). Based on the request information, context information, and plugin parameters, first request data is generated. A first plugin is invoked to preprocess the first request data based on its plugin parameters, resulting in second request data. The model inference engine is invoked to execute the model inference task based on the second request data, resulting in first inference response data. A second plugin is invoked to post-process the first inference response data, resulting in second inference response data, which is then sent to the user. The target plugin includes both the first and second plugins. This invention manages complex functions by using plugins, increasing the scalability of the entire architecture. Each plugin is responsible for a specific function; adding or modifying functions only requires adjusting the corresponding plugin, without refactoring the entire system. This avoids the problem of plugin systems increasing the complexity of large models, reduces plugin maintenance costs, and improves the flexibility of model updates. The plugin system can load necessary functional modules on demand, reducing resource consumption and improving system operating efficiency. Attached Figure Description
[0088] Figure 1 This is a flowchart of the steps of a task processing method based on a plug-in provided in an embodiment of the present invention;
[0089] Figure 2 This is a schematic diagram of the plug-in operation process provided in an embodiment of the present invention;
[0090] Figure 3 This is a schematic diagram of a plug-in inference process provided in an embodiment of the present invention;
[0091] Figure 4 This is a structural block diagram of a plug-in-based task processing device provided in an embodiment of the present invention;
[0092] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present invention;
[0093] Figure 6 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation
[0094] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0095] One of the core concepts of this invention is to manage complex functions by breaking them down into plug-ins, thereby increasing the scalability of the entire architecture. Furthermore, using a specific structure for parameter passing makes the system more flexible.
[0096] Next, the technical solutions of the embodiments of the present invention will be described in detail with reference to specific examples.
[0097] like Figure 1 The diagram illustrates a flowchart of a plugin-based task processing method provided by an embodiment of the present invention. The method may include the following steps:
[0098] Step 101: In response to receiving a request from a user for a model inference task, obtain the context information matching the model inference task and the plugin parameters corresponding to the target plugin, wherein the target plugin is the plugin that the user instructed to enable.
[0099] This invention provides a new architecture for managing plugins. Users can initiate requests to obtain plugins and plugin parameters through API (Application Programming Interface) or web interface, and can also modify plugin parameters. The plugin management process can be described in detail below with reference to the specific implementation method.
[0100] In one specific implementation of the present invention, before step 101 above, the following may also be included:
[0101] Step A1: Receive the plugin acquisition request information initiated by the user.
[0102] In this embodiment of the invention, when a user needs to obtain plugin parameters for one or more plugins, the user can initiate a plugin retrieval request to the backend service. Specifically, the user can send an HTTP (Hypertext Transfer Protocol) request to the backend server through a web interface or API, such as... Figure 2 As shown, the URL is http: / / xxxx / pluginA, etc. The purpose of this plugin's request is to obtain the settings or configuration information of one or more plugins.
[0103] After receiving the plugin retrieval request information initiated by the user, proceed to step A2.
[0104] Step A2: Parse the plugin request information to obtain the plugin identifier of the plugin to be requested.
[0105] After receiving a plugin retrieval request from a user, the request information can be parsed to obtain the plugin identifier of the requested plugin. In practice, the user can add the plugin identifier to the plugin retrieval request information to indicate that specific plugin parameters are being retrieved. For example... Figure 2As shown, the plugin retrieval request information initiated by the user is: URL: http: / / xxxx / pluginA, where pluginA can be a plugin identifier to indicate the plugin parameters of plugin A.
[0106] After parsing the plugin to obtain the plugin identifier of the plugin to be requested, proceed to step A3.
[0107] Step A3: Invoke the pre-set plugin management module to retrieve the plugin parameters of the plugin to be requested from the preset database based on the plugin identifier.
[0108] After parsing the plugin request information to obtain the plugin identifier of the requested plugin, the pre-set plugin management module can be invoked to retrieve the plugin parameters of the requested plugin from a pre-set database based on the plugin identifier. The pre-set database stores the plugin identifiers and parameter information of all large model plugins, and the plugin parameters of the requested plugin can be retrieved from the pre-set database through data querying. After the web server receives the request, it determines the specific plugin and required settings based on the request URL and parameters. The request is forwarded to a specific component of the backend service, which specifically handles plugin setting requests from the frontend. The data type of the settings to be returned is then determined.
[0109] After the pre-set plugin management module retrieves the plugin parameters of the plugin to be requested from the preset database based on the plugin identifier, step A4 is executed.
[0110] Step A4: Determine whether the plugin parameters of the plugin to be requested need to be processed.
[0111] After the pre-set plugin management module retrieves the plugin parameters of the plugin to be requested from the preset database based on the plugin identifier, it can be determined whether the plugin parameters of the plugin to be requested need to be processed.
[0112] In the request processing component of the backend server plugin settings, it can determine whether complex data processing is required based on request parameters or internal logic. If further processing is needed, such as database queries or calls to other services, the process will move to the "data processing" stage. If no additional processing is required, it will directly jump to the "return data" stage.
[0113] If it is determined that the plugin parameters of the plugin to be requested require data processing, then proceed to step A5.
[0114] Step A5: If it is determined that the plugin to be requested needs to be processed, the plugin parameters of the plugin to be requested are processed to obtain the processed plugin parameters.
[0115] If it is determined that the plugin parameters of the requested plugin require data processing, then the plugin parameters can be processed to obtain the processed plugin parameters. Specific processing methods may include, but are not limited to, at least one of the following:
[0116] 1. Retrieve the processing data corresponding to the plugin to be requested from the database, and determine the processing plugin parameters of the plugin to be requested based on the processing data and plugin parameters.
[0117] 2. Calculate and process the plugin parameters to obtain the processing plugin parameters for the plugin to be requested.
[0118] 3. Obtain external system information that interacts with the plugin to be requested, and determine the processing plugin parameters of the plugin to be requested based on the external system information and the plugin parameters.
[0119] In practice, data processing may involve retrieving data from a database, performing calculations, or interacting with other external systems. The data processed in this stage will be used to ultimately generate the settings information returned to the user.
[0120] Step A6: Send the processing plugin parameters and the plugin identifier to the user.
[0121] After obtaining the processing plugin parameters for the requested plugin, the processing plugin parameters and plugin identifier can be sent to the user.
[0122] In this embodiment, after obtaining the processing plugin parameters, the processing plugin parameters and plugin identifier can be formatted to format the data into JSON or other front-end acceptable formats, ensuring the correctness and integrity of the data, and then the format-converted data can be sent to the user.
[0123] In the actual implementation, the web client sends a request to obtain parameters. At this time, a specific plugin calls the method in the plugin management to obtain the corresponding data. If this data has already been stored in the database of the plugin management, the retrieved data is returned directly. If this data is not in the database of the plugin management, the default parameters of the plugin are obtained by calling the method to obtain default parameters. Finally, the obtained parameter data is returned to the front-end web interface.
[0124] Step A7: Receive the user's parameter modification request for the processing plugin parameters.
[0125] A parameter modification request refers to a user's request to modify the parameters of the requested plugin.
[0126] After the processing plugin parameters of the requested plugin are sent to the user, the user can determine whether the processing plugin parameters of the requested plugin need to be modified according to their needs. If modification is required, the user can initiate a parameter modification request for the processing plugin parameters of the requested plugin.
[0127] After receiving a user's request to modify the parameters of the plugin to be requested, proceed to step A8.
[0128] Step A8: Modify the processing plugin parameters based on the parameter modification request to obtain the modified plugin parameters corresponding to the plugin to be requested.
[0129] Upon receiving a user's request to modify the processing plugin parameters for the requested plugin, the backend service can modify the processing plugin parameters based on the request to obtain the modified plugin parameters for the requested plugin. Specifically, the parameter modification request can include user-instructed modification information for the processing plugin parameters. The backend service can then modify the processing plugin parameters according to this modification information to obtain the modified plugin parameters for the requested plugin.
[0130] After modifying the processing plugin parameters based on the parameter modification request to obtain the modified plugin parameters corresponding to the plugin to be requested, steps A9 and A10 are executed.
[0131] Step A9: Replace the plugin parameters of the plugin to be requested in the preset database with the modified plugin parameters.
[0132] After modifying the plugin parameters based on the parameter modification request to obtain the modified plugin parameters corresponding to the plugin to be requested, the plugin parameters of the plugin to be requested in the preset database can be replaced with the modified plugin parameters.
[0133] Step A10: Send the modified plugin parameters and plugin identifier of the plugin to be requested to the user.
[0134] Simultaneously, the modified plugin parameters and plugin identifier of the requested plugin can be sent to the user. In this embodiment, the modified plugin parameters and plugin identifier can be format-converted to obtain format-converted plugin data, which is data adapted to the user's client. Then, the format-converted plugin data can be sent to the user.
[0135] In the actual implementation, the web client sends a request to get the list and status of plugins. At this time, a specific plugin does not perform any processing, but calls the method in the plugin management to get the corresponding plugin list and status. Then, the plugin management returns the obtained data to the plugin, and finally the plugin returns the obtained data to the front end.
[0136] The above implementation process can be described as follows: Figure 2 As shown, plugin operations can be completed collaboratively by the web client, the plugin itself, and the plugin management module of the backend service. Figure 2 The plugin operation process shown can include the following three aspects:
[0137] 1. Parameter Acquisition Process: First, the web client sends a request to retrieve parameters. At this point, a specific plugin calls the method in the plugin management to obtain the corresponding data. If this data is already stored in the database of the plugin management, the retrieved data is returned directly. If this data is not in the database of the plugin management, the default parameters of the plugin are obtained by calling the method to retrieve default parameters. Finally, the retrieved parameter data is returned to the front-end web interface.
[0138] 2. Parameter modification process: First, the web client sends a request to modify the parameters. After a specific plugin has been modified, it calls a method in the plugin management to pass the parameter data set by the plugin to the plugin management database. Then, the plugin management stores a copy of the modified data and passes it back to the plugin to store the result. Finally, the plugin returns the modified result to the front end.
[0139] 3. Process for obtaining plugin list and status: First, the web client sends a request to obtain the plugin list and status. At this time, a specific plugin does not perform any processing, but calls the method in the plugin management to obtain the corresponding plugin list and status. Then, the plugin management returns the obtained data to the plugin, and finally, the plugin returns the obtained data to the front end.
[0140] The above three processes describe the specific call and being called flow between the web frontend, plugins, and plugin management. Now that we have a list of plugins, their status, and their parameters, we can complete the actual dialogue process, enabling the corresponding plugin and using its parameters within the dialogue.
[0141] After completing the above steps, the front-end application will display a plugin list, showing all available plugins and their current status (e.g., enabled, disabled, requiring update, etc.). Users can browse the plugin list and select the plugin to enable. Upon receiving the user's selection, the front-end application will check the plugin's status and dependencies to ensure it is safe to enable the selected plugin. Then, based on the user's selection and the model inference task input by the user, it will generate the corresponding request information and send it to the back-end server.
[0142] After receiving a user's request for a model inference task, the system can obtain the context information matching the model inference task and the plugin parameters corresponding to the target plugin. The target plugin is the plugin the user indicates to activate, i.e., the plugin selected by the user. Context information refers to important data used to assist processing and inference; it persists throughout the process and is used multiple times. Context information includes user history data, session state, etc. For example, when the model inference task is for education and online learning, the context information could include students' learning history and performance data.
[0143] In this embodiment of the invention, a plugin status retrieval request sent by a user can be received. Based on the request, a pre-set plugin management module is invoked to retrieve the plugin identifiers, plugin parameters, and plugin status information of all plugins pre-stored in the database. The plugin identifiers, plugin parameters, and plugin status information of all plugins are then sent to the user in the form of a plugin list, allowing the user to select a target plugin from the list and set the plugin status information for all plugins. Specifically, the user can set the status of plugins used in the model inference task to "on" and the status of other plugins to "off," etc.
[0144] After obtaining the context information for matching the model inference task and the plugin parameters corresponding to the target plugin, proceed to step 102.
[0145] Step 102: Generate first request data based on the request information, the context information, and the plugin parameters.
[0146] After obtaining the context information matching the model inference task and the plugin parameters corresponding to the target plugin, the first request data can be generated based on the request information, context information, and plugin parameters of the target plugin.
[0147] In this embodiment, a predefined structure is used to handle the transfer of relevant parameters during preprocessing and postprocessing. This structure consists of three parts: request, context information, and plugin parameters.
[0148] After generating the first request data based on the request information, context information, and plugin parameters, step 103 is executed.
[0149] Step 103: Invoke the first plugin to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data.
[0150] After generating the first request data based on the request information, context information, and plugin parameters, the process enters the preprocessing stage. In this stage, the first plugin can be called to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data.
[0151] In this embodiment, the first plugin can be one plugin or multiple plugins. Specifically, the number of the first plugins can be determined according to business needs, and this embodiment does not impose any restrictions on this.
[0152] When the number of the first plugin is greater than 1, the processing flow of the preprocessing stage can be described in detail in conjunction with the following specific implementation method.
[0153] In one specific implementation of the present invention, the first plugin consists of N plugins, where N is a positive integer greater than 1, and step 103 above may include:
[0154] Sub-step B1: Sequentially call the current plugin among the N plugins to process the request data obtained by the previous plugin based on the plugin parameters of the current plugin, to obtain intermediate request data, until the N plugins complete the data processing operation.
[0155] In this embodiment of the invention, during the preprocessing stage using N plugins, the current plugin among the N plugins can be called sequentially to process the request data obtained by the previous plugin based on the plugin parameters of the current plugin, so as to obtain intermediate request data, until the N plugins complete the data processing operation.
[0156] Sub-step B2: Use the request data obtained by processing the last plugin among the N plugins as the second request data.
[0157] Then, the request data obtained by the last plugin among the N plugins through data processing can be used as the second request data. The request data processed by the first plugin among the N plugins is the first request data. For example, ... Figure 3 As shown, two plugins (Plugin A and Plugin B) are used in the preprocessing stage. Request V1: The user initiates a request through a web interface or API, containing initial data, context information, and specific parameters. Context information is crucial data used to assist processing and reasoning; it persists throughout the process and is used multiple times. Context information includes user history data, session state, etc.
[0158] Plugin A operation: Request V1 is passed to Plugin A for initial processing. Plugin A processes the data using preset A parameters. The A parameters are specific parameters of Plugin A stored in the previous plugin management. After Plugin A completes processing, it generates updated request data Request V2.
[0159] Request V2: The data processed by Plugin A and the updated context information together form Request V2.
[0160] Plugin B: Request V2 is passed to Plugin B for further processing. Plugin B processes the data using preset B parameters. The B parameters are specific parameters of Plugin B stored in the previous plugin management. The previous context information is also passed to Plugin B to retrieve relevant information. After Plugin B completes processing, it generates further updated request data, Request V3.
[0161] Of course, the number of plugins used in the preprocessing stage can be three or more. For example, if data filtering, data cleaning, and data preprocessing are required for a user's historical data, one plugin can be used for data filtering, another for data cleaning, and yet another for data preprocessing, thus completing the preprocessing stage.
[0162] After calling the first plugin to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data, step 104 is executed.
[0163] Step 104: Call the model inference engine to perform the model inference task based on the second request data to obtain the first inference response data.
[0164] A model inference engine can be an engine within a large language model stored on a server, used to perform inference operations on the server and provide inference results.
[0165] After the first plugin preprocesses the first request data based on its parameters to obtain the second request data, the model inference engine can be invoked to perform a model inference task based on the second request data to obtain the first inference response data. For example... Figure 3As shown, Request V3 is the request section before inference. Request V3 contains the data and context information processed by the first two plugins. Then, inference preparation can begin. This step ensures that all necessary data and context information are ready for the core inference stage. Inference: In this stage, the inference engine uses the data and context information from Request V3 to perform complex calculations or model inference. This process involves calling large language models, executing rule engines, or other forms of intelligent inference. Generating an initial response: After inference is complete, an initial inference response data, Response V1, is generated.
[0166] After calling the model inference engine to perform the model inference task based on the second request data and obtain the first inference response data, step 105 is executed.
[0167] Step 105: Call the second plugin to post-process the first inference response data to obtain the second inference response data, and send the second inference response data to the user, wherein the target plugin includes the first plugin and the second plugin.
[0168] After the model inference engine is invoked to perform a model inference task based on the second request data to obtain the first inference response data, the second plugin can be invoked to post-process the first inference response data to obtain the second inference response data, and then the second inference response data can be sent to the user.
[0169] In this embodiment, the target plugin may include a first plugin and a second plugin.
[0170] In this embodiment, the second plugin can be one plugin or multiple plugins. Specifically, the number of second plugins can be determined according to business needs, and this embodiment does not impose any restrictions on this.
[0171] When the number of second plugins is greater than 1, the post-processing flow can be described in detail in conjunction with the following specific implementation method.
[0172] In one specific implementation of the present invention, the second plugin consists of M plugins, where M is a positive integer greater than 1, and step 105 above may include:
[0173] Sub-step C1: Sequentially call the current plugin among the M plugins to process the inference response data obtained from the previous plugin based on the plugin parameters of the current plugin, and obtain intermediate response data, until the M plugins complete the data processing operation.
[0174] In this embodiment, the current plugin among the M plugins can be called sequentially to process the inference response data obtained by the previous plugin based on the plugin parameters of the current plugin, so as to obtain intermediate response data, until the M plugins complete the data processing operation.
[0175] Sub-step C2: Use the response data obtained by processing the last of the M plugins as the second inference response data.
[0176] Then, the response data obtained by processing the last of the M plugins can be used as the second inference response data. The response data processed by the first of the M plugins is the first inference response data. For example, ... Figure 3 As shown, the post-processing stage uses two plugins (Plugin C and Plugin D). Response V1: The initial response, generated during the inference stage, contains data that may not have been fully processed. Plugin C: The initial inference response data Response V1 is passed to Plugin C for post-processing. Plugin C processes the data using preset C parameters. These C parameters are specific parameters of plugin C stored in the previous plugin management. Previous context information is also passed to Plugin C to retrieve relevant information. After processing, Plugin C generates an updated response, Response V2. Response V2: This is an intermediate response, processed by Plugin C. It may be close to the final form but may require further processing. Plugin D: Response V2 is passed to Plugin D for final processing. Plugin D performs final data adjustments and optimizations to ensure the integrity and accuracy of the response data. Plugin D processes the data using preset D parameters. These D parameters are specific parameters of plugin D stored in the previous plugin management. Previous context information is also passed to Plugin D to retrieve relevant information. After Plugin D completes its processing, it generates the final response data, Response V3. Response V3: This is the final response, the result after all processing steps, ready to be returned to the user. The final response data is returned to the user via a web interface or API, completing the entire request processing process.
[0177] Of course, the number of plugins performing post-processing in the post-processing stage can be three or more. For example, for healthcare reasoning tasks, the post-processing stage can generate medical advice, treatment plans, dietary advice, exercise advice, etc., for diseases diagnosed in the reasoning stage. In this case, four plugins can be used to complete the post-processing stage, namely, plugin 1 can generate medical advice, plugin 2 can generate treatment plans, plugin 3 can generate dietary advice, and plugin 4 can generate exercise advice, etc.
[0178] It is understood that the above examples are merely examples listed to better understand the technical solutions of the embodiments of the present invention, and are not intended to be the only limitation of the embodiments.
[0179] The entire process described above begins with a user request and proceeds through a series of preprocessing, core reasoning, and post-processing steps to gradually generate the final response. Each processing step utilizes a specific plugin (such as...). Figure 3 The plugins (A, B, C, D, etc.) shown perform specific processing functions to ensure the accuracy and effectiveness of the final response. Plugin management plays a crucial role throughout the process, ensuring data consistency and processing continuity. This phased processing flow effectively organizes and manages complex data processing tasks, improving system flexibility and response speed.
[0180] This invention manages complex functions by breaking them down into plugins, resulting in a more scalable architecture. Each plugin is responsible for a specific function; adding or modifying functions only requires adjusting the corresponding plugin, without refactoring the entire system. This avoids the increased complexity of large models caused by plugin systems, reduces plugin maintenance costs, and improves the flexibility of model updates. The plugin system can load necessary functional modules on demand, reducing resource consumption and improving system efficiency.
[0181] The primary implementation scenario of this invention is the development process of existing plugins based on large language models. This entire process can be applied to many different fields, mainly because it provides highly customized and automated data processing and response capabilities. Its application scenarios may include, but are not limited to:
[0182] 1. Customer service and support system
[0183] Automated Q&A: User questions are screened and cleaned through a pre-processing plugin, then an inference engine generates an initial response, and finally, a post-processing plugin optimizes and formats the response. Such a system can provide 24 / 7 customer support, quickly answer frequently asked questions, and improve customer satisfaction.
[0184] Personalized recommendations: Based on users' historical data and current needs, the plugin system can generate personalized product or service recommendations in real time.
[0185] 2. E-commerce and shopping platforms
[0186] Order processing and tracking: Automated processing of user order requests, including inventory checks, order confirmation, and logistics tracking. The pre-processing plugin verifies and organizes order information, the inference engine optimizes logistics routes, and the post-processing plugin provides real-time tracking information to the user.
[0187] Shopping Assistant: Through natural language processing and reasoning, it helps users find and recommend products, and can even automatically fill the shopping cart and complete the purchase process based on user needs.
[0188] 3. Financial Services
[0189] Automated trading and investment advice: Market data is analyzed using sophisticated inference algorithms. The pre-processing plugin collects and organizes data, the inference stage calculates investment strategies, and the post-processing plugin generates investment advice or directly executes trades.
[0190] Risk assessment and compliance checks: The plug-in system can automatically process large amounts of customer data to conduct risk assessments, ensuring that transactions and operations comply with laws and regulations.
[0191] 4. Healthcare
[0192] Patient management and diagnostic support: The pre-processing plugin organizes and cleans patient information, the inference stage uses AI models for diagnostic support, and the post-processing plugin generates medical suggestions or treatment plans.
[0193] Health monitoring and early warning system: Monitors patient health data in real time, analyzes it through an inference engine and issues early warnings. The plug-in system can automatically adjust the treatment plan according to the specific situation.
[0194] 5. Education and online learning
[0195] Personalized learning path recommendation: Based on students' learning history and performance, the pre-processing plugin collects and analyzes data, the reasoning stage generates personalized learning paths, and the post-processing plugin provides specific course suggestions.
[0196] Automated assessment and feedback: Automatically grade assignments and exams, providing detailed feedback and improvement suggestions to enhance teaching efficiency and student learning outcomes.
[0197] Of course, the applications are not limited to the scenarios mentioned above. These solutions can be used not only in web applications but also play a crucial role in many other large-scale model application scenarios. For example, in personalized recommendations: in e-commerce and streaming platforms, plugins are used for different stages such as data collection, feature extraction, model inference, and result display. Parameter passing allows for dynamic adjustment of the recommendation algorithm's weights and priorities. In smart homes and the Internet of Things (IoT): in smart home systems, plugins are used for device status monitoring, data acquisition, and automated control. Parameter passing allows for adjusting control strategies based on user needs and environmental changes. In security monitoring and early warning systems: in intelligent security systems, pre-processing plugins are used for video and image processing, inference plugins for behavior recognition, and post-processing plugins for sending early warning notifications.
[0198] The technical solution provided by this invention can bring beneficial effects in improving system flexibility and scalability, enhancing user experience, and optimizing resource utilization. Specifically, it improves system flexibility and scalability by modularizing functions through a plug-in system, making it easy to expand and maintain. Each plug-in is responsible for a specific function; adding or modifying functions only requires adjusting the corresponding plug-in, without reconstructing the entire system. Through parameterized configuration, the system can dynamically adjust the behavior of plug-ins according to different needs, achieving highly customized services. It enhances user experience by enabling the system to respond to user requests in real time, providing immediate feedback and improving user satisfaction. It optimizes resource utilization by loading necessary functional modules on demand, reducing resource consumption and improving system operating efficiency. Through plug-in management, different functions are separated into independent modules, simplifying the system structure, facilitating debugging and maintenance, and improving system availability. In summary, the entire process significantly improves the system's flexibility, resource utilization efficiency, user experience, maintainability, and intelligence. The application of these technologies enables the system to better adapt to complex and ever-changing application scenarios, providing efficient, accurate, and personalized services.
[0199] The plug-in-based task processing method provided in this invention responds to a user's request for a model inference task by obtaining context information matching the model inference task and plug-in parameters corresponding to the target plug-in, where the target plug-in is the one indicated by the user. Based on the request information, context information, and plug-in parameters, first request data is generated. A first plug-in is invoked to preprocess the first request data based on its plug-in parameters to obtain second request data. A model inference engine is invoked to execute the model inference task based on the second request data to obtain first inference response data. A second plug-in is invoked to post-process the first inference response data to obtain second inference response data, which is then sent to the user. The target plug-in includes both the first and second plug-ins. This invention manages complex functions by decomposing them into plug-ins, resulting in a more scalable architecture. Each plug-in is responsible for a specific function; adding or modifying functions only requires adjusting the corresponding plug-in, without refactoring the entire system. This avoids the problem of increased complexity of large models due to the plug-in system, reduces plug-in maintenance costs, and improves the flexibility of model updates. The plug-in system can load necessary functional modules on demand, reducing resource consumption and improving system operating efficiency.
[0200] like Figure 4 The diagram illustrates a structural block diagram of a plug-in-based task processing device according to an embodiment of the present invention. The device includes:
[0201] The plugin parameter acquisition module 410 is used to respond to receiving a request from a user for a model inference task, and to acquire the context information matching the model inference task and the plugin parameters corresponding to the target plugin, wherein the target plugin is the plugin that the user indicates to be enabled.
[0202] The first request data generation module 420 is used to generate first request data based on the request information, the context information, and the plugin parameters;
[0203] The second request data acquisition module 430 is used to call the first plugin to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data;
[0204] The first response data acquisition module 440 is used to call the model inference engine to perform a model inference task based on the second request data and obtain the first inference response data.
[0205] The second response data acquisition module 450 is used to call the second plugin to post-process the first inference response data to obtain the second inference response data, and send the second inference response data to the user, wherein the target plugin includes the first plugin and the second plugin.
[0206] Optionally, the device further includes:
[0207] The plugin request receiving module is used to receive the plugin acquisition request information initiated by the user;
[0208] The plugin identifier acquisition module is used to parse the plugin acquisition request information to obtain the plugin identifier of the plugin to be requested;
[0209] The plugin parameter retrieval module is used to call a pre-set plugin management module to retrieve the plugin parameters of the plugin to be requested from a preset database based on the plugin identifier.
[0210] The plugin parameter determination module is used to determine whether the plugin parameters of the plugin to be requested need to be processed.
[0211] The plugin parameter acquisition module is used to process the plugin parameters of the plugin to be requested when it is determined that the plugin to be requested needs to perform data processing, so as to obtain the processed plugin parameters.
[0212] A plugin parameter sending module is used to send the plugin parameters and the plugin identifier to the user;
[0213] The parameter modification request receiving module is used to receive parameter modification requests from users for the processing plugin parameters;
[0214] The plugin parameter acquisition module is used to modify the processing plugin parameters based on the parameter modification request to obtain the modified plugin parameters corresponding to the plugin to be requested.
[0215] The plugin parameter replacement module is used to replace the plugin parameters of the plugin to be requested in the preset database with the modified plugin parameters;
[0216] The plugin parameter sending module is used to send the modified plugin parameters and the plugin identifier of the plugin to be requested to the user.
[0217] Optionally, the processing plug-in parameter acquisition module includes:
[0218] The first parameter acquisition unit is used to retrieve the processing data corresponding to the plugin to be requested from the database, and determine the processing plugin parameters of the plugin to be requested based on the processing data and the plugin parameters.
[0219] The second parameter acquisition unit is used to calculate and process the plugin parameters to obtain the processing plugin parameters of the plugin to be requested.
[0220] The third parameter acquisition unit is used to acquire external system information that interacts with the plugin to be requested, and to determine the processing plugin parameters of the plugin to be requested based on the external system information and the plugin parameters.
[0221] Optionally, the modified plugin parameter sending module includes:
[0222] The parameter format conversion unit is used to convert the modified plugin parameters and the plugin identifier into a format to obtain the format-converted plugin data, which is data adapted to the user end.
[0223] The format conversion parameter sending unit is used to send the format-converted plugin data to the user.
[0224] Optionally, the plugin parameter acquisition module includes:
[0225] The status request receiving unit is used to receive plugin status retrieval requests sent by users.
[0226] The plugin status acquisition unit is used to respond to the plugin status acquisition request by calling the pre-set plugin management module to obtain the plugin identifiers, plugin parameters, and plugin status information of all plugins that are pre-stored in the database.
[0227] The plugin status sending unit is used to send the plugin identifiers of all plugins, the plugin parameters of all plugins, and the plugin status information of all plugins to the user in the form of a plugin list, so that the user can select the target plugin from the plugin list and set the plugin status information of all plugins.
[0228] Optionally, the first plugin consists of N plugins, where N is a positive integer greater than 1.
[0229] The second request data acquisition module includes:
[0230] The intermediate request data acquisition unit is used to sequentially call the current plugin among the N plugins to process the request data obtained by the previous plugin based on the plugin parameters of the current plugin, and obtain intermediate request data until the N plugins complete the data processing operation.
[0231] The second request data acquisition unit is used to take the request data obtained by processing the last plugin among the N plugins as the second request data.
[0232] The request data processed by the first plugin among the N plugins is the first request data.
[0233] Optionally, the second plugin consists of M plugins, where M is a positive integer greater than 1.
[0234] The second response data acquisition module includes:
[0235] The intermediate response data acquisition unit is used to sequentially call the current plugin among the M plugins to process the inference response data obtained by the previous plugin based on the plugin parameters of the current plugin, and obtain intermediate response data until the M plugins complete the data processing operation.
[0236] The second response data acquisition unit is used to take the response data obtained by processing the last plugin among the M plugins as the second inference response data.
[0237] The response data processed by the first of the M plugins is the first inference response data.
[0238] The plug-in-based task processing device provided in this embodiment of the invention, upon receiving a user-initiated request for a model inference task, obtains context information matching the model inference task and plug-in parameters corresponding to the target plug-in, where the target plug-in is the plug-in instructed by the user to be enabled. Based on the request information, context information, and plug-in parameters, first request data is generated. A first plug-in is invoked to preprocess the first request data based on its plug-in parameters to obtain second request data. A model inference engine is invoked to execute the model inference task based on the second request data to obtain first inference response data. A second plug-in is invoked to post-process the first inference response data to obtain second inference response data, which is then sent to the user. The target plug-in includes both the first and second plug-ins. This embodiment of the invention manages complex functions by decomposing them into plug-ins, making the entire architecture more scalable. Each plug-in is responsible for a specific function; adding or modifying functions only requires adjusting the corresponding plug-in, without refactoring the entire system. Therefore, it avoids the problem of plug-in systems increasing the complexity of large models, reduces plug-in maintenance costs, and improves the flexibility of model updates. The plug-in system can load necessary functional modules on demand, reducing resource consumption and improving system operating efficiency.
[0239] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0240] like Figure 5 The diagram illustrates a structural block diagram of an electronic device 50 provided by an embodiment of the present invention, comprising:
[0241] The processor 501, the memory 502, and the computer program 5021 stored in the memory 502 and capable of running on the processor 401. When the computer program 5021 is executed by the processor 501, it implements the various processes of the above-described plug-in-based task processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0242] like Figure 6 The diagram shows a structural block diagram of a computer-readable storage medium 60 provided in an embodiment of the present invention. The computer-readable storage medium 60 stores a computer program 601. When the computer program 601 is executed by a processor, it implements the various processes of the above-described plug-in-based task processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0243] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0244] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0245] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0246] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0247] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0248] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.
[0249] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0250] The above provides a detailed description of the plug-in-based task processing method, apparatus, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A plug-in-based task processing method, characterized in that, The method includes: In response to receiving a request from a user for a model inference task, the system obtains the context information matching the model inference task and the plugin parameters corresponding to the target plugin, wherein the target plugin is the plugin that the user indicates to be enabled. Based on the request information, the context information, and the plugin parameters, generate the first request data; The first plugin is invoked to preprocess the first request data based on the plugin parameters of the first plugin, so as to obtain the second request data; The model inference engine is invoked to perform a model inference task based on the second request data, and the first inference response data is obtained. The second plugin is invoked to post-process the first inference response data to obtain the second inference response data, and the second inference response data is sent to the user. The target plugin includes the first plugin and the second plugin. Before obtaining the context information matching the model inference task and the plugin parameters corresponding to the target plugin, the method further includes: Receive the plugin acquisition request information initiated by the user; Parse the plugin to obtain the request information and get the plugin identifier of the plugin to be requested; The pre-set plugin management module is invoked to retrieve the plugin parameters of the requested plugin from a pre-set database based on the plugin identifier; Determine whether the plugin parameters of the requested plugin need to be processed; wherein, the determination of whether to process data is based on the request parameters or internal logic. If it is determined that the plugin to be requested needs to perform data processing, the plugin parameters of the plugin to be requested are processed to obtain the processed plugin parameters; Send the processing plugin parameters and the plugin identifier to the user; Receive user requests to modify parameters of the processing plugin; Based on the parameter modification request, the processing plugin parameters are modified to obtain the modified plugin parameters corresponding to the plugin to be requested; Replace the plugin parameters of the plugin to be requested in the preset database with the modified plugin parameters; The modified plugin parameters and plugin identifier of the plugin to be requested are sent to the user.
2. The method according to claim 1, characterized in that, The process of processing the plugin parameters of the requested plugin to obtain processed plugin parameters includes: Retrieve the processing data corresponding to the requested plugin from the database, and determine the processing plugin parameters of the requested plugin based on the processing data and the plugin parameters; and / or The plugin parameters are calculated and processed to obtain the processing plugin parameters for the plugin to be requested; and / or Obtain external system information that interacts with the plugin to be requested, and determine the processing plugin parameters of the plugin to be requested based on the external system information and the plugin parameters.
3. The method according to claim 1, characterized in that, Sending the modified plugin parameters and the plugin identifier of the requested plugin to the user includes: The modified plugin parameters and the plugin identifier are converted to a new format to obtain the converted plugin data, which is adapted to the user client. The converted plugin data is sent to the user.
4. The method according to claim 1, characterized in that, The process of obtaining the context information matched by the model inference task and the plugin parameters corresponding to the target plugin includes: Receive plugin status retrieval requests sent by users; In response to the plugin status acquisition request, the pre-set plugin management module is invoked to obtain the plugin identifiers, plugin parameters, and plugin status information of all plugins that are pre-stored in the database; The plugin identifiers, plugin parameters, and plugin status information of all plugins are sent to the user in the form of a plugin list, so that the user can select the target plugin from the plugin list and set the plugin status information of all plugins.
5. The method according to claim 1, characterized in that, The first plugin consists of N plugins, where N is a positive integer greater than 1. The step of calling the first plugin to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data includes: The current plugin among the N plugins is called sequentially to process the request data obtained from the previous plugin based on the plugin parameters of the current plugin, so as to obtain intermediate request data, until the N plugins complete the data processing operation; The request data obtained by processing the last plugin among the N plugins is used as the second request data. The request data processed by the first plugin among the N plugins is the first request data.
6. The method according to claim 1, characterized in that, The second plugin consists of M plugins, where M is a positive integer greater than 1. The step of calling the second plugin to post-process the first inference response data to obtain the second inference response data includes: The current plugin among the M plugins is called sequentially to process the inference response data obtained from the previous plugin based on the plugin parameters of the current plugin, so as to obtain intermediate response data, until the M plugins complete the data processing operation; The response data obtained by processing the last plugin among the M plugins is used as the second inference response data. The response data processed by the first of the M plugins is the first inference response data.
7. A plug-in-based task processing device, characterized in that, The device includes: The plugin parameter acquisition module is used to respond to a user's request for a model inference task, and to acquire the context information matching the model inference task and the plugin parameters corresponding to the target plugin, wherein the target plugin is the plugin that the user indicates to be enabled. The first request data generation module is used to generate first request data based on the request information, the context information, and the plugin parameters; The second request data acquisition module is used to call the first plugin to preprocess the first request data based on the plugin parameters of the first plugin to obtain the second request data; The first response data acquisition module is used to call the model inference engine to perform model inference tasks based on the second request data and obtain the first inference response data. The second response data acquisition module is used to call the second plugin to post-process the first inference response data to obtain the second inference response data, and send the second inference response data to the user, wherein the target plugin includes the first plugin and the second plugin; The device further includes: The plugin request receiving module is used to receive the plugin acquisition request information initiated by the user; The plugin identifier acquisition module is used to parse the plugin acquisition request information to obtain the plugin identifier of the plugin to be requested; The plugin parameter acquisition module is used to call a pre-set plugin management module to retrieve the plugin parameters of the plugin to be requested from a preset database based on the plugin identifier. The plugin parameter determination module is used to determine whether the plugin parameters of the plugin to be requested need to be processed; wherein, the determination of whether to process data is based on the request parameters or internal logic. The plugin parameter acquisition module is used to process the plugin parameters of the plugin to be requested when it is determined that the plugin to be requested needs to perform data processing, so as to obtain the processed plugin parameters. A plugin parameter sending module is used to send the plugin parameters and the plugin identifier to the user; The parameter modification request receiving module is used to receive parameter modification requests from users for the processing plugin parameters; The plugin parameter acquisition module is used to modify the processing plugin parameters based on the parameter modification request to obtain the modified plugin parameters corresponding to the plugin to be requested. The plugin parameter replacement module is used to replace the plugin parameters of the plugin to be requested in the preset database with the modified plugin parameters; The plugin parameter sending module is used to send the modified plugin parameters and the plugin identifier of the plugin to be requested to the user.
8. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the plug-in-based task processing method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the plug-in-based task processing method as described in any one of claims 1-6.
Citation Information
Patent Citations
Data processing method and device and data processing server
CN114691112A
Data processing method and device
CN116820591A