Interaction method, device, computer-readable storage medium, and program product

By building a pre-trained model runtime environment and interactive model in the management controller, the problem of the lack of user interaction functions in the management controller is solved, and the interactive application of the pre-trained model is realized. Users can continuously interact with the model on the front-end page.

WO2026137955A1PCT designated stage Publication Date: 2026-07-02INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2025-09-02
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

In existing technologies, management controllers lack the operating environment and user interaction functions for pre-trained models, making it impossible to achieve interaction between pre-trained models and users.

Method used

The pre-trained model runtime environment is set up in the management controller, and the client interaction instructions are received through the front-end user page. The back-end network management interface is used to send the instructions to the preset interactive model to generate the interaction results, and finally output to the front-end page, supporting the interaction of the pre-trained model.

Benefits of technology

The interactive functionality of the pre-trained model in the management controller has been implemented, enabling users to continuously interact with the pre-trained model on the front-end page, thus solving the problem of the inability to implement user interaction in the management controller.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025118547_02072026_PF_FP_ABST
    Figure CN2025118547_02072026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of computers. Disclosed are an interaction method, a device, a storage medium, and a program product. The interaction method comprises: by means of a front-end user page of a management controller, receiving an interaction instruction sent by a client, and forwarding same to a back-end network management interface of the management controller; using the back-end network management interface to send the interaction instruction to a preset interaction model in the management controller, and generating, by means of the preset interaction model, an interaction result corresponding to the interaction instruction, so as to output the interaction result to the back-end network management interface, the preset interaction model being a pre-trained model that is trained and embedded in the management controller in advance; and by means of the back-end network management interface, forwarding the interaction result sent by the preset interaction model to the front-end user page to be displayed. The pre-trained model can be embedded in the management controller in advance as an interaction model to implement interaction between the pre-trained model and the client in the management controller.
Need to check novelty before this filing date? Find Prior Art

Description

An interaction method, device, computer-readable storage medium, and program product

[0001] Cross-reference to related applications

[0002] This application claims priority to Chinese Patent Application No. 202411958174.9, filed on December 27, 2024, entitled “An Interactive Method, Apparatus, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This invention relates to the field of computer technology, and in particular to an interactive method, device, computer-readable storage medium, and program product. Background Technology

[0004] Currently, with the research on embedded AI (Artificial Intelligence), many manufacturers have proposed the ambitious vision of embedding AI models within management controllers. Consequently, how to embed interactive models and enable user interaction within resource-constrained embedded devices like management controllers has become a technological direction being explored by server manufacturers. However, management controllers themselves lack a mature model runtime environment. Currently, user interaction with management controllers is generally conducted through command lines or the management controller's web (World Wide Web) page. In management controllers based on modular firmware architecture, the web module provides web backend services, registering URIs (Uniform Resource Identifiers) in the module code and calling them on the front end to manage the server and management controller. However, these are all basic management functions; current management controllers based on modular firmware architecture have not yet built a runtime environment for pre-trained models or a process and function for user interaction with models.

[0005] It is evident that the relevant technologies have a technical problem in enabling the management controller's internal pre-trained model to interact with the user. Summary of the Invention

[0006] The purpose of this invention is to provide an interactive method, device, computer-readable storage medium, and program product that can embed a pre-built pre-trained model into a management controller, enabling the application of the pre-trained interactive model in the management controller and solving the current problem that pre-trained model interaction cannot be implemented in the management controller.

[0007] To address the aforementioned technical problems, in a first aspect, embodiments of the present invention provide an interaction method, comprising:

[0008] The management controller receives interactive commands sent by the client through its front-end user page and forwards the interactive commands to the management controller's back-end network management interface.

[0009] The backend network management interface is used to send interactive commands to the preset interactive model in the management controller, and the preset interactive model generates the corresponding interactive results of the interactive commands, so as to output the interactive results to the backend network management interface; the preset interactive model is a pre-trained model that has been trained in advance and embedded in the management controller.

[0010] The interaction results sent by the preset interaction model are forwarded to the front-end user page for display through the back-end network management interface.

[0011] In some embodiments, before sending the interaction command to the preset interaction model in the management controller using the backend network management interface, the method further includes:

[0012] A pre-trained model runtime environment is set up in the management controller, and a preset interaction model is determined to respond to interaction commands. The preset interaction model is then run in the pre-trained model runtime environment to generate the interaction results corresponding to the interaction commands.

[0013] In some embodiments, the interaction method of the present invention further includes:

[0014] If the preset interactive model used to respond to interactive commands supports running in the pre-trained model runtime environment, then the target code library required by the preset interactive model is directly compiled into the corresponding image in the pre-trained model runtime environment so that the preset interactive model can be run.

[0015] If the preset interactive model used to respond to interactive commands does not support running in the pre-trained model runtime environment, the code interpreter and target code library corresponding to the preset interactive model are ported to the management controller through the cross-compilation toolchain in order to rebuild the pre-trained model runtime environment and run the preset interactive model.

[0016] In some embodiments, the interaction method of the present invention further includes:

[0017] Create a separate process to run the preset interaction model, so that the preset interaction model can be run through a separate process.

[0018] In some embodiments, the interaction method of the present invention further includes:

[0019] Register the hardware management interface in the backend network management interface;

[0020] Data transfer between the front-end user page and the preset interaction model is achieved through the hardware management interface.

[0021] In some embodiments, data transmission between the front-end user page and the preset interaction model is performed through a hardware management interface, including:

[0022] Construct the first socket between the front-end user page and the back-end network management interface;

[0023] Construct a second socket between the pre-defined interaction model and the backend network management interface;

[0024] Define the target paths corresponding to the first and second sockets, and perform data transmission between the front-end user page and the preset interaction model according to the target paths through the hardware management interface;

[0025] The target path includes file system paths and / or resource paths.

[0026] In some embodiments, receiving interactive instructions sent by the client through the front-end user page of the management controller includes:

[0027] Determine the status of the data receiving flag in the socket interface corresponding to the front-end user page;

[0028] If the data receiving flag is in an idle state, the interactive commands sent by the client will be received through the front-end user page of the management controller.

[0029] Correspondingly, after forwarding the interactive commands to the backend network management interface of the management controller, it also includes:

[0030] Update the data receiving flag to busy, stop receiving interactive commands from the client, and display a prompt signal on the front-end user page to indicate that receiving interactive commands has been paused.

[0031] In some embodiments, sending interactive commands to a preset interactive model in the management controller using a backend network management interface includes:

[0032] Determine the status of the data forwarding flag in the socket interface corresponding to the backend network management interface;

[0033] If the data forwarding flag is in an idle state, the data forwarding flag is updated to busy, and the interaction command is sent to the preset interaction model in the management controller through the backend network management interface.

[0034] In some embodiments, an interaction result corresponding to an interaction command is generated through a preset interaction model, and the interaction result is output to the backend network management interface, including:

[0035] The system generates several basic interactive text elements corresponding to the interactive commands in sequence through a preset interactive model, and outputs the generated basic interactive text element directly to the backend network management interface when any basic interactive text element is generated.

[0036] In some embodiments, the interaction results sent by the preset interaction model are forwarded to the front-end user page for display through the back-end network management interface, including:

[0037] The backend network management interface sequentially receives each basic interactive text element sent by the preset interactive model, and then forwards each basic interactive text element to the frontend user page so that the frontend user page can display the currently received basic interactive text elements in real time.

[0038] In some embodiments, after generating several basic interactive text elements corresponding to interactive instructions sequentially through a preset interaction model, the method further includes:

[0039] After all basic interactive text elements are output to the backend network management interface, a first target identifier is generated to indicate the end of the interaction result generation.

[0040] Send the first target identifier to the backend network management interface so that after the backend network management interface receives the first target identifier, it updates the data receive flag to idle;

[0041] Correspondingly, after forwarding each basic interactive text element to the front-end user page in sequence, it also includes:

[0042] Generate a second target identifier to indicate the end of the interactive command interaction;

[0043] The second target identifier is sent to the front-end user page so that after the front-end user page receives the second target identifier, it updates the data forwarding flag to idle.

[0044] In some embodiments, the management controller accesses data via static random access memory.

[0045] In some embodiments, receiving interactive instructions sent by the client through the front-end user page of the management controller and forwarding the interactive instructions to the back-end network management interface of the management controller includes:

[0046] The management controller receives interactive commands sent by the client through its front-end user page, which is based on the IPMI protocol of the intelligent platform management interface, and forwards the interactive commands to the management controller's back-end network management interface.

[0047] In some embodiments, receiving interactive instructions sent by the client through the front-end user page of the management controller and forwarding the interactive instructions to the back-end network management interface of the management controller includes:

[0048] The front-end user page of the Baseboard Management Controller (BMC) receives interactive commands sent by the client and forwards the interactive commands to the back-end network management interface of the BMC. The management controller based on the Intelligent Platform Management Interface (IPMI) protocol includes the BMC.

[0049] In some embodiments, sending interactive commands to a preset interactive model in the management controller using a backend network management interface includes:

[0050] When the interaction command is used to instruct the management controller to perform natural language question-and-answer interaction, the interaction command is sent to the natural language model in the management controller. The preset interaction model includes a natural language model, which is a model with natural language question-and-answer interaction function that is pre-embedded in the management controller.

[0051] In some embodiments, generating the interaction result corresponding to the interaction command through a preset interaction model includes:

[0052] Build an independent process;

[0053] The interaction results corresponding to the interaction commands are generated by running a preset interaction model in an independent process.

[0054] In some embodiments, generating the interaction result corresponding to the interaction command through a preset interaction model includes:

[0055] The interaction results corresponding to the interaction commands are generated by outputting the answers word by word through a preset interaction model.

[0056] In a second aspect, the present invention discloses an electronic device, comprising:

[0057] The memory is configured to store computer programs;

[0058] The processor is configured to execute computer programs to implement the steps of the aforementioned interactive method.

[0059] Thirdly, the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the aforementioned interaction method.

[0060] Fourthly, the present invention discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the aforementioned interactive method.

[0061] As can be seen from the above technical solution, the present invention can receive interactive instructions sent by the client through the front-end user page of the management controller, and forward the interactive instructions to the back-end network management interface of the management controller. Then, the back-end network management interface sends the interactive instructions to a preset interactive model built based on artificial intelligence algorithms and pre-embedded in the management controller. The preset interactive model generates the interactive result corresponding to the interactive instruction, and outputs the interactive result to the back-end network management interface. The back-end network management interface then forwards the interactive result sent by the preset interactive model to the front-end user page for display.

[0062] The beneficial effects of this invention are as follows: After receiving the interaction command sent by the client, the management controller uses the backend network management interface to send the interaction command to a pre-trained model that has been pre-trained and embedded in the management controller. The pre-trained model is then used as a preset interaction model to generate the interaction result corresponding to the interaction command and forward it to the front-end user page for display. In this way, the pre-trained model can be pre-embedded into the management controller as an interaction model. A complete solution from model operation to user interaction is proposed for the architecture of the management controller, which solves the current problem that it is impossible to realize user interaction in the management controller through the pre-trained model. After receiving the interaction command sent by the client, the management controller can immediately send it to the preset interaction model in the management controller and generate the interaction result corresponding to the interaction command for display. This realizes the application of the interaction model in the management controller, enabling users to continuously interact with the pre-trained model on the front-end page. Attached Figure Description

[0063] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 is a flowchart of an interactive method provided by an embodiment of the present invention;

[0065] Figure 2 is a schematic diagram of a management controller structure provided in an embodiment of the present invention;

[0066] Figure 3 is a flowchart of an optional interaction method provided by an embodiment of the present invention;

[0067] Figure 4 is a schematic diagram of a data transmission process of a management controller according to an embodiment of the present invention;

[0068] Figure 5 is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0070] The terms "comprising" and "having," and any variations thereof, in the specification and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.

[0071] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and optional embodiments.

[0072] Currently, how to achieve interaction between users and management controllers through interactive models in resource-limited embedded devices has become a technical direction that server manufacturers are exploring. However, the management controller itself does not have a mature model running environment, nor has it built a process and function for user-model interaction. This invention can embed a pre-built pre-trained model into the management controller, realize the application of the pre-trained interactive model in the management controller, and enable users to continuously interact with the pre-trained model on the front-end page.

[0073] Next, the interaction method provided by the embodiments of the present invention will be described in detail. Figure 1 illustrates an interaction method provided by an embodiment of the present invention, including:

[0074] Step S11: Receive the interaction instructions sent by the client through the front-end user page of the management controller, and forward the interaction instructions to the back-end network management interface of the management controller.

[0075] It is understood that the optional types of management controllers in this embodiment include, but are not limited to, Baseboard Management Controllers (BMCs), Integrated Lights-Out (iLOs), and other components built on protocols such as IPMI (Intelligent Platform Management Interface) that have the functions of managing and controlling computing and communication devices. Furthermore, in this embodiment, the pre-trained model embedded within the management controller as a preset interaction model can be an embedded artificial intelligence model built based on artificial intelligence algorithms. For example, if the user's interaction requirement is to achieve natural language question-and-answer functionality through the management controller, a lightweight natural language model can be pre-trained using a corresponding algorithm and embedded as an artificial intelligence model into the management controller to realize the interaction function of the preset interaction model.

[0076] In an optional embodiment, this embodiment proposes a complete solution for the management controller based on a modular firmware architecture, as shown in Figure 2, from model execution to interaction between the model and the user terminal. This enables the application of AI dialogue models in the BMC, addressing the current issues of lacking an AI runtime environment and AI interaction scheme in management controllers based on modular firmware architecture. The existing BMCWEB architecture, Redfish protocol, and BMC front-end page of the management controller based on modular firmware architecture can be supplemented and modified, and an AI interaction module can be added to achieve the above functions. As shown in Figure 2, the interaction commands sent by the client can first be received through the front-end user page of the management controller (i.e., WEBUI-VUE front-end service), and then forwarded to the back-end network management interface of the management controller (i.e., BMCWEB back-end service). The client can be a user browser, and it is understood that the client in this embodiment is not limited to a user browser; various types of clients that can issue client commands are acceptable. Furthermore, it should be noted that the technical solution in this embodiment is not limited to management controllers based on modular firmware architecture; other embedded systems can also add corresponding AI model runtime environments and achieve interaction.

[0077] Step S12: Use the backend network management interface to send the interaction command to the preset interaction model in the management controller, and generate the interaction result corresponding to the interaction command through the preset interaction model, so as to output the interaction result to the backend network management interface; the preset interaction model is a pre-trained model that has been trained in advance and embedded in the management controller.

[0078] After receiving the client's interaction command, this embodiment uses the backend network management interface to send the interaction command to a preset interaction model in the management controller (located in the model interaction module, i.e., the AI ​​module, as shown in Figure 2). The preset interaction model then generates the corresponding interaction result, which is output to the backend network management interface. In this embodiment, the preset interaction model is a model built based on an artificial intelligence algorithm and pre-embedded in the management controller. Furthermore, before sending the interaction command to the preset interaction model in the management controller, a preset pre-trained model runtime environment can be built in the management controller, and a preset interaction model for responding to the interaction command can be determined. This allows the preset interaction model to run in the preset pre-trained model runtime environment to generate the corresponding interaction result. It should also be noted that, in one optional embodiment, if the preset interactive model used to respond to interactive commands supports running in the pre-trained model runtime environment, the target code library required by the preset interactive model is directly compiled into the corresponding image in the pre-trained model runtime environment so as to run the preset interactive model; in another optional embodiment, if the preset interactive model used to respond to interactive commands does not support running in the pre-trained model runtime environment, the code interpreter and target code library corresponding to the preset interactive model are ported to the management controller through a cross-compilation toolchain so as to rebuild the pre-trained model runtime environment and run the preset interactive model.

[0079] In other words, the AI ​​module in this embodiment comprises two parts: AI model files and a model runtime environment. The AI ​​model and the runtime environment are decoupled within the AI ​​module. This allows different AI model files to be used once the runtime environment is set up. It is understood that some AI models currently support C++ execution, while others only support Python. Therefore, for models supporting C++ execution, since the management controller based on the modular firmware architecture is written in C++, there is no need to rebuild the environment; only the libraries required for model execution need to be compiled into the image. For models that only support Python execution, a cross-compilation toolchain is required to port the corresponding version of the Python interpreter and the Python libraries that the model depends on to the BMC.

[0080] Furthermore, in this embodiment, an independent process can be constructed to run the preset interactive model, allowing the preset interactive model to be run through an independent process. That is, the newly added AI module in the management controller of this embodiment is independent of BMCWEB and other modules, and is run and maintained by an independent process. In an optional embodiment, if it is desired that this module can implement natural language question answering functionality, a lightweight natural language model can be selected. The model format can be a supported and parsable model format such as .gguf. In this case, the input to the model is a question described in natural language, and the AI ​​model can output an answer described in natural language.

[0081] Step S13: Forward the interaction results sent by the preset interaction model to the front-end user page for display through the back-end network management interface.

[0082] In this embodiment, after generating the interaction result corresponding to the client's interaction command through the preset interaction model in the AI ​​module, the interaction result sent by the preset interaction model can be forwarded to the front-end user page for display through the back-end network management interface, as shown in Figure 2.

[0083] As can be seen from the above technical solution, the present invention pre-builds a pre-trained model runtime environment in the management controller and determines a pre-trained interaction model for responding to interactive commands. This allows the pre-trained interaction model to run within the pre-trained model runtime environment. After receiving an interactive command from the client through the front-end user page of the management controller, the interaction command is forwarded to the back-end network management interface of the management controller. The back-end network management interface then sends the interaction command to the pre-trained interaction model, which is built based on an artificial intelligence algorithm and pre-embedded in the management controller. The pre-trained interaction model then generates and displays the corresponding interactive result. In this way, in this embodiment, an interaction model based on an artificial intelligence algorithm can be pre-built and embedded in the management controller. After the management controller receives an interactive command from the client, it can send it to the pre-trained interaction model in the management controller and generate and display the corresponding interactive result. This realizes the application of a pre-trained interaction model based on an artificial intelligence algorithm in the management controller, enabling users to continuously interact with the pre-trained model on the front-end page.

[0084] As can be seen from the previous embodiment, the present invention can generate and display the interaction results corresponding to the interaction commands through a preset interaction model in the management controller. Next, this embodiment will describe the interaction process in detail. Figure 3 shows an optional interaction method provided by an embodiment of the present invention, which includes:

[0085] Step S21: Receive the interaction instructions sent by the client through the front-end user page of the management controller, and forward the interaction instructions to the back-end network management interface of the management controller.

[0086] In this embodiment, as shown in Figure 2, the BMCWEB (backend service) process interacts with the WEBUI-VUE (frontend service) process using a Web Socket (first socket), while the AI ​​module (model interaction module) interacts with the BMCWEB process using a Unix Socket (second socket). Before processing client interaction commands, a hardware management interface (Redfish interface) can be registered in the backend network management interface to facilitate data transmission between the frontend user page and the preset interaction model. Optionally, a first socket can be constructed between the frontend user page and the backend network management interface, and a second socket can be constructed between the preset interaction model and the backend network management interface. Then, the target paths corresponding to the first and second sockets are defined, and data transmission between the frontend user page and the preset interaction model is performed through the hardware management interface according to the target paths. In this embodiment, the target path may include a file system path and / or a resource path.

[0087] In other words, in this embodiment, since the AI ​​module uses Unix Socket to interact with the BMCWEB process, a new Redfish interface supporting the first socket Web Socket protocol needs to be registered in the BMCWEB module. This interface internally connects the second socket Unix Socket with the first socket Web Socket for transmission. Thus, the Redfish interface registered in the BMCWEB module acts as a relay connection station, receiving data input from the front end via Web Socket and then passing it to the AI ​​module's model using Unix Socket within the interface. Simultaneously, this interface can also receive data returned from the AI ​​module via Unix Socket and transmit it to the front end using Web Socket, ultimately displaying it to the user. It's understood that Web Socket is a full-duplex persistent connection, capable of continuously sending and receiving messages. After the backend is configured, the frontend accesses it via IP address, port, and resource path. Unix Socket is also full-duplex; its address is the path of a .socket type file in the file system. In other words, the AI ​​module creates a Unix Socket server and defines a file system path, such as / tmp / ai-assistant. Then, the Redfish interface can connect to this file system path (i.e., the client side) to achieve continuous inter-process communication by reading and writing to this path. Similarly, the BMCWEB module acts as a Web Socket server, internally creating a Redfish interface supporting Web Socket communication and defining its resource paths. Correspondingly, user clients can communicate with the BMC by connecting to the corresponding BMC IP (Internet Protocol), port, and resource path. Furthermore, it should be noted that during data transmission in the management controller of this embodiment, data can be accessed and stored in Static Random Access Memory (SRAM) during interactions between modules. This introduction of SRAM for computational acceleration helps address the issue of insufficient BMC computing power.

[0088] In this embodiment, when receiving interactive commands sent by the client through the front-end user page of the management controller, the status of the data receiving flag in the socket interface corresponding to the front-end user page can be determined first. If the status of the data receiving flag is idle, the interactive commands sent by the client can be received through the front-end user page of the management controller. Correspondingly, after forwarding the interactive commands to the back-end network management interface of the management controller, the status of the data receiving flag can be updated to busy, and the reception of interactive commands sent by the client can be stopped. A prompt signal indicating that the reception of interactive commands is paused can also be displayed on the front-end user page. As shown in Figure 4, in this embodiment, during the data sending / receiving process in the management controller, a transmission flag can be maintained in the front-end service. For example, in an optional embodiment, 0 / false can be set to idle and 1 / true to busy (transmitting). Then, the management controller checks the flag status through the front-end service before receiving a user-sent event each time. After receiving the instruction sent by the user, if the flag is 0 / false, the model running flag is set to 1 / true, indicating that the model is currently in a locked state. The data is then transmitted to the website backend using WebSocket. At the same time, the front-end page displays a loading symbol. At this time, since the flag has become 1, any new message sent by the client will be intercepted, and the user will be shown a prompt message such as "send again after the answer is returned".

[0089] Step S22: Use the backend network management interface to send the interaction command to the preset interaction model in the management controller, and generate the interaction result corresponding to the interaction command through the preset interaction model, so as to output the interaction result to the backend network management interface; the preset interaction model is a pre-trained model that has been trained in advance and embedded in the management controller.

[0090] Accordingly, in this embodiment, when sending interactive commands to the preset interactive model in the management controller using the backend network management interface, the status of the data forwarding flag in the socket interface corresponding to the backend network management interface can be determined. If the data forwarding flag is idle, its status is updated to busy, and the interactive command is sent to the preset interactive model in the management controller using the backend network management interface. In other words, the backend Web Socket interface in this embodiment also maintains a transmission flag representing the status of the Unix Socket, for example, 0 represents idle, and 1 represents busy (transmitting). This flag can be checked before each write operation on the Unix Socket. After the backend service receives the message sent by the frontend, the interface should internally call the Unix Socket write operation to send the message to the AI ​​module. If the status is idle, the status is first set to busy, and then the above write operation is called to transmit the data. In other words, in this embodiment, only one piece of data is allowed to be sent to the model at the same time. The model's running result is obtained and returned to the client before the next piece of data sent by the client is received. In this way, to address the issue of the AI ​​model consuming a lot of resources, this embodiment can use read and write flags for control, so as to avoid multiple pieces of user data being sent to the model and running at the same time, which would lead to excessive load on the BMC and program crashes.

[0091] It should be noted that, as shown in Figure 4, the AI ​​model in this embodiment can choose to output the interaction result word by word. That is, when generating the interaction result corresponding to the interaction command through the preset interaction model and outputting it to the backend network management interface, it can sequentially generate several basic interactive text elements corresponding to the interaction command through the preset interaction model. When any basic interactive text element is generated, it is directly output to the backend network management interface. After all basic interactive text elements are output to the backend network management interface, a first target identifier is generated to indicate the end of the interaction result generation. This first target identifier is sent to the backend network management interface so that after receiving the first target identifier, the data receiving flag is updated to idle. In other words, in this embodiment, the data receiving process is transmitted from the AI ​​module to the front end. Therefore, as shown in Figure 4, starting with the AI ​​module, after receiving the message sent by the user, the AI ​​module first loads the model, then passes the message as input to the model. After the model runs, it outputs tokens in sequence. For example, if the model's original complete answer is a sentence "ABCD" composed of four words: A, B, C, and D, then the output will be individual words (i.e., segmented into "A", "B", "C", and "D"). Each word output is immediately sent out using a Unix Socket. Furthermore, in this embodiment, special markers can be used to indicate whether the model has finished answering. For example, outputting "[end of file]" at once indicates that the answer to the current question has been completed, or generating an "[end of file]" error when reading the output from the Unix Socket indicates that all output has been read. It is understood that the preset interaction model in this embodiment is a question-and-answer model. However, due to the model's decoupling characteristics in its operating environment, this embodiment is not limited to a language question-and-answer model. Users can replace it with a corresponding model according to their actual needs, such as an early warning model or a fault diagnosis model, and port it to the AI ​​module for operation. Simultaneously, the input and output of the corresponding model can be changed to the data and structure required by the model. Furthermore, in this embodiment, when the preset interaction model is a question-and-answer model, the interaction result is output by outputting the answer word by word. It can be understood that it is also possible to determine the space occupation of the interaction result when outputting the result, and when the BMC computing power or other preset requirements are met, the interaction result is directly output to the front-end service after the interaction result is determined to be completed, so that users can directly view the interaction result.

[0092] Step S23: Forward the interaction results sent by the preset interaction model to the front-end user page for display through the back-end network management interface.

[0093] In this embodiment, the backend network management interface can sequentially receive each basic interactive text element sent by the preset interactive model and forward each basic interactive text element to the frontend user page so that the frontend user page can display the currently received basic interactive text elements in real time. After forwarding each basic interactive text element to the frontend user page, a second target identifier is generated to indicate the end of the interactive command. The second target identifier is then sent to the frontend user page so that the frontend user page updates the data forwarding flag to idle upon receiving the second target identifier. That is, in this embodiment, after the Redfish interface calls the Unix Socket read interface to receive the words returned by the model, it can use Web Socket to transmit the words one by one to the frontend. The frontend concatenates the words in real time and displays the current content to the user, achieving a dynamic effect of word-by-word output. In particular, when Redfish receives the specified end character (e.g., "[end of file]"), the status flag of its maintained Unix Socket will be changed from busy to idle. Then, after the BMC frontend page receives the specified end character, it also changes the status flag from busy to idle, indicating that the transmission is complete. It should also be noted that when the front-end page in this embodiment is opened, a WebSocket connection can be established manually or automatically. In an optional embodiment, the corresponding interactive interface can be designed as a chat box so that different avatars or chat box background colors can be used to distinguish between the model and the user role.

[0094] Through the above technical solution, in this embodiment, corresponding transmission flags can be maintained at both the front-end and back-end interfaces. The flags are checked before each operation. When the flag is idle, it is set to busy and the corresponding operation is called to transmit data. After the interaction result is output to the front-end user page, an identifier is generated to indicate the end of the interaction command, and the flag status is updated based on the identifier. Through the above technical solution, in this embodiment, only one piece of data is allowed to be sent to the model at the same time. The next piece of data sent by the client is only received after the model's running result is obtained and returned to the client. In this way, the problem of AI model running consuming a lot of resources can be controlled by reading and writing flags to avoid multiple pieces of user data being sent to the model and running at the same time, which would cause the BMC to be overloaded and the program to crash.

[0095] Furthermore, this embodiment of the invention also discloses an electronic device. FIG5 is a structural diagram of the electronic device according to an exemplary embodiment. The content of the figure should not be construed as limiting the scope of the invention. This electronic device may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is configured to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the interactive method disclosed in any of the foregoing embodiments. Additionally, the electronic device in this embodiment may be an electronic computer.

[0096] In this embodiment, the power supply 23 is configured to provide operating voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this invention, and is not limited here; the input / output interface 25 is configured to acquire external input data or output data to the outside world, and its optional interface type can be selected according to application needs, and is not limited here.

[0097] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0098] The operating system 221 is configured to manage and control the various hardware devices on the electronic device and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the interactive methods executed by the electronic device as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0099] Furthermore, the present invention also discloses a computer-readable storage medium configured to store a computer program; the computer-readable storage medium may be, but is not limited to, a non-volatile computer-readable storage medium, wherein the computer program, when executed by a processor, implements the aforementioned disclosed interaction method. The steps of this method can be referred to the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0100] Furthermore, the present invention also discloses a computer program product, including a computer program / instructions, wherein the computer program / instructions, when executed by a processor, implement the aforementioned disclosed method. The steps of this method can be referred to the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0101] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0102] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0103] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0104] 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 apparatus 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 apparatus. 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 apparatus that includes the element.

[0105] The technical solution provided by the present invention has been described in detail above. 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 optional 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. An interaction method, characterized in that, include: The management controller receives interactive commands sent by the client through its front-end user page and forwards the interactive commands to the management controller's back-end network management interface. The interaction command is sent to the preset interaction model in the management controller through the backend network management interface, and the interaction result corresponding to the interaction command is generated through the preset interaction model, so as to output the interaction result to the backend network management interface. The preset interaction model is a pre-trained model that has been trained in advance and embedded in the management controller; The interaction results sent by the preset interaction model are forwarded to the front-end user page for display through the back-end network management interface.

2. The interaction method according to claim 1, characterized in that, Before sending the interaction command to the preset interaction model in the management controller using the backend network management interface, the method further includes: A pre-trained model runtime environment is set up in the management controller, and a preset interaction model for responding to the interaction command is determined so that the preset interaction model can be run in the pre-trained model runtime environment to generate the interaction result corresponding to the interaction command.

3. The interaction method according to claim 2, characterized in that, Also includes: If the preset interaction model used to respond to the interaction command supports running in the pre-trained model runtime environment, then the target code library required by the preset interaction model is directly compiled into the corresponding image in the pre-trained model runtime environment so as to run the preset interaction model. If the preset interaction model used to respond to the interaction command does not support running in the pre-trained model runtime environment, the code interpreter corresponding to the preset interaction model and the target code library are ported to the management controller through a cross-compilation toolchain, so as to rebuild the pre-trained model runtime environment and run the preset interaction model.

4. The interaction method according to claim 3, characterized in that, Also includes: A separate process is constructed to run the preset interaction model, so that the preset interaction model can be run through the separate process.

5. The interaction method according to any one of claims 1 to 4, characterized in that, Also includes: Register the hardware management interface in the backend network management interface; Data transmission between the front-end user page and the preset interaction model is performed through the hardware management interface.

6. The interaction method according to claim 5, characterized in that, The data transmission between the front-end user page and the preset interaction model via the hardware management interface includes: Construct the first socket between the front-end user page and the back-end network management interface; Construct a second socket between the preset interaction model and the backend network management interface; Define the target paths corresponding to the first socket and the second socket, and perform data transmission between the front-end user page and the preset interaction model through the hardware management interface according to the target paths; The target path includes file system paths and / or resource paths.

7. The interaction method according to claim 6, characterized in that, The step of receiving interactive instructions sent by the client through the front-end user page of the management controller includes: Determine the status of the data receiving flag in the socket interface corresponding to the front-end user page; If the data receiving flag is in an idle state, the interaction command sent by the client is received through the front-end user page of the management controller; Accordingly, after forwarding the interaction command to the backend network management interface of the management controller, the method further includes: The status of the data receiving flag is updated to busy, and the reception of the interactive instructions sent by the client is stopped. A prompt signal indicating that the reception of interactive instructions is paused is displayed on the front-end user page.

8. The interaction method according to claim 7, characterized in that, The step of sending the interaction command to the preset interaction model in the management controller using the backend network management interface includes: Determine the status of the data forwarding flag in the socket interface corresponding to the backend network management interface; If the data forwarding flag is in an idle state, the data forwarding flag is updated to busy, and the interaction command is sent to the preset interaction model in the management controller using the backend network management interface.

9. The interaction method according to claim 8, characterized in that, The step of generating the interaction result corresponding to the interaction command through the preset interaction model, and outputting the interaction result to the backend network management interface, includes: The preset interaction model sequentially generates several basic interactive text elements corresponding to the interaction instructions, and when any of the basic interactive text elements is generated, the currently generated basic interactive text element is directly output to the backend network management interface.

10. The interaction method according to claim 9, characterized in that, The step of forwarding the interaction result sent by the preset interaction model to the front-end user page for display through the back-end network management interface includes: The backend network management interface sequentially receives each of the basic interactive text elements sent by the preset interactive model, and sequentially forwards each of the basic interactive text elements to the frontend user page so that the frontend user page can display the currently received basic interactive text elements in real time.

11. The interaction method according to claim 10, characterized in that, After generating the basic interactive text elements corresponding to the interactive instructions sequentially through the preset interactive model, the method further includes: After all the basic interactive text elements are output to the backend network management interface, a first target identifier is generated to indicate the end of the interaction result generation. The first target identifier is sent to the backend network management interface so that after the backend network management interface receives the first target identifier, the data receiving flag is updated to idle. Accordingly, after forwarding each of the basic interactive text elements to the front-end user page in sequence, the method further includes: Generate a second target identifier to indicate the end of the interaction of the interactive command; The second target identifier is sent to the front-end user page so that after the front-end user page receives the second target identifier, the data forwarding flag is updated to idle.

12. The interaction method according to claim 1, characterized in that, The management controller accesses data via static random access memory.

13. The interaction method according to claim 1, characterized in that, The step of receiving interactive commands sent by the client through the front-end user page of the management controller and forwarding the interactive commands to the back-end network management interface of the management controller includes: The management controller receives interactive instructions sent by the client through its front-end user page, which is based on the Intelligent Platform Management Interface (IPMI) protocol, and forwards the interactive instructions to the management controller's back-end network management interface.

14. The interaction method according to claim 13, characterized in that, The step of receiving interactive commands sent by the client through the front-end user page of the management controller and forwarding the interactive commands to the back-end network management interface of the management controller includes: The management controller, which is based on the Intelligent Platform Management Interface (IPMI) protocol, receives interactive commands sent by the client through the front-end user page of the Baseboard Management Controller (BMC) and forwards the interactive commands to the back-end network management interface of the BMC.

15. The interaction method according to claim 1, characterized in that, The step of sending the interaction command to the preset interaction model in the management controller using the backend network management interface includes: When the interaction instruction is used to instruct the management controller to perform natural language question-and-answer interaction, the interaction instruction is sent to the natural language model in the management controller. The preset interaction model includes the natural language model, which is a model with natural language question-and-answer interaction function pre-embedded in the management controller.

16. The interaction method according to claim 1, characterized in that, The step of generating the interaction result corresponding to the interaction command through the preset interaction model includes: Build an independent process; The preset interaction model is run through the independent process to generate the interaction result corresponding to the interaction instruction.

17. The interaction method according to claim 1, characterized in that, The step of generating the interaction result corresponding to the interaction command through the preset interaction model includes: The interaction result corresponding to the interaction instruction is generated by outputting the answer word by word through the preset interaction model.

18. An electronic device, characterized in that, include: The memory is configured to store computer programs; The processor is configured to execute the computer program to implement the steps of the interactive method as described in any one of claims 1 to 17.

19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the interaction method as described in any one of claims 1 to 17.

20. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the interactive method according to any one of claims 1 to 17.