Plug-in window management method, device and computer equipment
By introducing a target daemon thread to manage the plugin window lifecycle in the interactive initiator application, the problem of coupling between the main application and the plugin window business logic is solved, and the versatility of the application is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU SHIYUAN ELECTRONICS CO LTD
- Filing Date
- 2024-12-13
- Publication Date
- 2026-06-16
Smart Images

Figure CN122219984A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of web front-end technology, and in particular to a plug-in window management method, apparatus and computer device. Background Technology
[0002] In web front-end development, to maintain the simplicity and stability of core functionalities, reduce redundant code, and decrease coupling, plugins are generally used. Plugins can provide additional functionality while ensuring that the stability of core functions is not affected; therefore, plugin technology is widely used.
[0003] For window-based plugins, traditional plugin window management typically involves the main application controlling the entire lifecycle of the plugin window. However, the control logic within the plugin window's lifecycle is often related to specific business logic, requiring the main application to couple the business logic within the plugin window, thus reducing the main application's versatility. Summary of the Invention
[0004] Therefore, it is necessary to provide a plug-in window management method, device, computer equipment, computer-readable storage medium, and computer program product to address the above-mentioned technical problems, which can reduce the coupling between the main application and the business logic in the plug-in window and improve the versatility of the main application.
[0005] This application provides a plug-in window management method, applied to an interactive initiator application, including:
[0006] After the application that initiates the interaction starts, a target daemon thread is created;
[0007] In response to a trigger operation targeting the entry point of the target plugin in the application of the interactive initiator, the control information of the target plugin entry point is sent to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information;
[0008] Receive plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; send a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window;
[0009] In response to the closing operation of the target plugin window, close the target plugin window; send a window closing message to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0010] In one embodiment, the function corresponding to the target plugin entry is a multi-party interaction function; the method further includes:
[0011] In response to an interaction initiation action triggered in the target plugin window, obtain the interaction initiation information;
[0012] In response to the interactive participant selection operation triggered in the target plugin window, determine the identifier of the selected participant; obtain the function information corresponding to the target plugin entry; and generate interactive instructions based on the interactive initiation information, the identifier of the selected participant, and the function information.
[0013] The interaction command is sent to the respective guardian threads of all participants corresponding to the target plugin entry point, instructing each guardian thread to determine whether to create a plugin window based on the selected participant identifier in the interaction command. If so, the corresponding application creates a participant plugin window that matches the functional information in the interaction command, and displays the interaction initiation information in the interaction command in the participant plugin window.
[0014] In one embodiment, the function corresponding to the target plugin entry is a random question function; the target plugin window is a random question window;
[0015] In response to an interaction initiation action triggered in the target plugin window, obtain interaction initiation information, including:
[0016] In response to the question initiation operation triggered in the question selection window, retrieve the question to be asked;
[0017] In response to an interactive participant selection action triggered in the target plugin window, determine the selected participant's identifier; obtain the function information corresponding to the target plugin entry point; and generate interactive instructions based on the interaction initiation information, the selected participant's identifier, and the function information, including:
[0018] In response to the answerer selection operation triggered in the question selection window, determine the identifier of the selected answerer; generate interactive instructions based on the question, the identifier of the selected answerer, and the question selection function;
[0019] The interaction command is sent to the respective daemon threads of all participants corresponding to the target plugin entry point. Each daemon thread then determines whether to create a plugin window based on the selected participant identifier in the interaction command. If so, it creates a participant plugin window matching the functional information in the interaction command through the corresponding application, and displays the interaction initiation information from the interaction command in the participant plugin window, including:
[0020] The interaction command is sent to the respective guardian threads of all participants corresponding to the target plugin entry, instructing each guardian thread to determine whether to create a plugin window based on the selected responder identifier in the interaction command. If so, the corresponding application creates a participant plugin window that matches the random questioning function in the interaction command, and displays the question in the interaction command in the participant plugin window.
[0021] In one embodiment, the function corresponding to the target plugin entry is the real-time discussion function; the target plugin window is the real-time discussion window;
[0022] In response to an interaction initiation action triggered in the target plugin window, obtain interaction initiation information, including:
[0023] In response to a live discussion initiation action triggered in the live discussion window, retrieve the live discussion object;
[0024] In response to an interactive participant selection action triggered in the target plugin window, determine the selected participant's identifier; obtain the function information corresponding to the target plugin entry point; and generate interactive instructions based on the interaction initiation information, the selected participant's identifier, and the function information, including:
[0025] In response to a discussion participant selection action triggered in the real-time discussion window, the selected discussion participant identifier is determined; based on the real-time discussion participant, the selected discussion participant identifier, and the real-time discussion function, interactive instructions are generated.
[0026] The interaction command is sent to the respective daemon threads of all participants corresponding to the target plugin entry point. Each daemon thread then determines whether to create a plugin window based on the selected participant identifier in the interaction command. If so, it creates a participant plugin window matching the functional information in the interaction command through the corresponding application, and displays the interaction initiation information from the interaction command in the participant plugin window, including:
[0027] The interaction command is sent to the respective guardian threads of all participants corresponding to the target plugin entry, instructing each guardian thread to determine whether to create a plugin window based on the selected discussion party identifier in the interaction command. If so, the corresponding application creates a participant plugin window that matches the real-time discussion function in the interaction command, and displays the real-time discussion object in the interaction command in the participant plugin window.
[0028] In one embodiment, the function corresponding to the target plugin entry is a quiz-initiating function; the target plugin window is the quiz-initiating window; the plugin window management method further includes:
[0029] In response to the quiz initiation operation triggered in the quiz initiation window, retrieve the quiz question;
[0030] Interactive commands are generated based on the question-and-answer function;
[0031] The interactive command is sent to the respective guardian threads of all participants corresponding to the target plugin entry, instructing each guardian thread to create a participant plugin window that matches the answer-grabbing function in the interactive command through the corresponding application, and to display the answer-grabbing question in the interactive command in the participant plugin window.
[0032] In one embodiment, prior to the triggering operation targeting the entry point of the target plugin in the interaction initiator's application, the method further includes:
[0033] After the target daemon thread is created, receive the entry display message sent by the target daemon thread;
[0034] Based on the entry display message, at least one plugin entry is displayed.
[0035] This application also provides a plug-in window management device for use in an interactive initiator application, including:
[0036] The first thread creation module is used to create the target daemon thread after the interaction initiator's application starts.
[0037] The first triggering module is used to respond to the triggering operation of the target plugin entry in the interactive initiator's application, and send the control information of the target plugin entry to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information;
[0038] The first window creation module is used to receive plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; it sends a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window;
[0039] The closing module is used to close the target plugin window in response to the closing operation of the target plugin window; it also sends a window closing message to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0040] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0041] After the application that initiates the interaction starts, a target daemon thread is created;
[0042] In response to a trigger operation targeting the entry point of the target plugin in the application of the interactive initiator, the control information of the target plugin entry point is sent to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information;
[0043] Receive plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; send a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window;
[0044] In response to the closing operation of the target plugin window, close the target plugin window; send a window closing message to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0045] This application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the following steps:
[0046] After the application that initiates the interaction starts, a target daemon thread is created;
[0047] In response to a trigger operation targeting the entry point of the target plugin in the application of the interactive initiator, the control information of the target plugin entry point is sent to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information;
[0048] Receive plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; send a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window;
[0049] In response to the closing operation of the target plugin window, close the target plugin window; send a window closing message to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0050] This application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0051] After the application that initiates the interaction starts, a target daemon thread is created;
[0052] In response to a trigger operation targeting the entry point of the target plugin in the application of the interactive initiator, the control information of the target plugin entry point is sent to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information;
[0053] Receive plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; send a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window;
[0054] In response to the closing operation of the target plugin window, close the target plugin window; send a window closing message to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0055] The aforementioned plug-in window management method, apparatus, computer device, computer-readable storage medium, and computer program product are applied to an interactive initiator application. After the interactive initiator application starts, a target daemon thread is created. The interactive initiator application has multiple plug-in entry points. In response to a trigger operation targeting a target plug-in entry point, the control information of the target plug-in entry point is sent to the target daemon thread, which then determines the plug-in window information based on the control information. Upon receiving the plug-in window information from the target daemon thread, the target plug-in window is created and displayed based on the information, and a creation success message is sent to the target daemon thread through the target plug-in window. The target daemon thread then executes the window tasks corresponding to the target plug-in window. In response to a closing operation of the target plug-in window, the target plug-in window is closed, and a window closing message is sent to the target daemon thread through the target plug-in window. The target daemon thread then terminates the window tasks. In this way, the interactive initiator application does not need to handle the determination of plug-in window information, the execution of the window tasks corresponding to the target plug-in window, or the termination process; all these processes are executed by the target daemon thread. This achieves decoupling between the business logic of the target application and the plug-in window. The target application only needs to provide interfaces for displaying plug-in entry points, creating plug-in windows, and closing them. These interfaces are not coupled with the business logic, improving the versatility of the interactive initiator application.
[0056] This application provides a plug-in window management method for use in interactive participant applications, the method comprising:
[0057] After the interactive participant application starts, a daemon thread is created. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and to parse the interactive instructions. If the interactive instructions carry the selected participant identifier, it is determined whether to create a plugin window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application in the aforementioned plugin window management method.
[0058] Receive the function information and interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
[0059] This application also provides a plug-in window management device for use in interactive participant applications, including:
[0060] The second thread creation module is used to create a daemon thread after the application of the interactive participant starts. The daemon thread is used to receive the interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and parse the interactive instructions. If the interactive instructions carry the selected participant identifier, it determines whether to create a plugin window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application in the aforementioned plugin window management method.
[0061] The second window creation module is used to receive function information and interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
[0062] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0063] After the interactive participant application starts, a daemon thread is created. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and to parse the interactive instructions. If the interactive instructions carry the selected participant identifier, it is determined whether to create a plugin window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application in the aforementioned plugin window management method.
[0064] Receive the function information and interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
[0065] This application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the following steps:
[0066] After the interactive participant application starts, a daemon thread is created. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and to parse the interactive instructions. If the interactive instructions carry the selected participant identifier, it is determined whether to create a plugin window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application in the aforementioned plugin window management method.
[0067] Receive the function information and interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
[0068] This application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0069] After the interactive participant application starts, a daemon thread is created. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and to parse the interactive instructions. If the interactive instructions carry the selected participant identifier, it is determined whether to create a plugin window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application in the aforementioned plugin window management method.
[0070] Receive the function information and interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
[0071] The aforementioned plug-in window management method, apparatus, computer device, computer-readable storage medium, and computer program product are applied to an interactive participant application. After the interactive participant application starts, a daemon thread is created. This daemon thread receives and parses interactive instructions sent by a target daemon thread (created by the interactive initiator application upon startup). If the interactive instruction carries a selected participant identifier, the daemon thread determines whether to create a plug-in window based on the identifier. If the determination is yes, the functional information and interactive initiation information carried in the interactive instruction are sent to the interactive participant application. The interactive participant application creates a participant plug-in window matching the functional information and displays the interactive initiation information within it. In this way, the interactive participant application interacts with the target daemon thread of the interactive initiator application through the daemon thread, and the daemon thread determines whether to create a participant plug-in window based on the interactive instruction. The interactive participant application only needs to provide interfaces for creating the participant plug-in window, which are not coupled with business logic, reducing coupling with the business logic of the participant plug-in window and improving the versatility of the interactive participant application. Attached Figure Description
[0072] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0073] Figure 1 This is a flowchart illustrating a method for controlling the lifecycle of a plugin window in one embodiment.
[0074] Figure 2 This is a flowchart illustrating a plug-in window management method in one embodiment;
[0075] Figure 3 This is a schematic diagram of an interaction initiator application in one embodiment;
[0076] Figure 4 This is a schematic diagram of message passing in one embodiment;
[0077] Figure 5 This is a schematic diagram of the overall process of plug-in window management in one embodiment;
[0078] Figure 6 This is a structural block diagram of a plug-in window management device in one embodiment;
[0079] Figure 7 This is a flowchart illustrating the plug-in window management method in another embodiment;
[0080] Figure 8 This is a structural block diagram of the plug-in window management device in another embodiment;
[0081] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0082] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0083] In web front-end development, to maintain the simplicity and stability of core functionalities, reduce redundant code, and decrease coupling, plugins are generally used. Plugins can provide additional functionality while ensuring that they do not affect the stability of core functions. Therefore, plugin technology is widely used, such as Figma-based plugins and VS Code-based plugins.
[0084] Plugins come in various forms, including notification callback functions, windows, and feature enhancements. For window-based plugins, traditional plugin window management typically involves the main application controlling the entire lifecycle of the plugin window. The plugin window lifecycle includes multiple time points stored within the window, such as window creation, window closing, window activation, and window freezing. In complex applications, there may be even more lifecycle events.
[0085] like Figure 1The diagram shows a flowchart of a plugin window lifecycle control method in one embodiment. The main application provides a plugin window creation entry control and a close button (displayed as an 'X' button). After the creation entry control is clicked, the main application executes the plugin window creation lifecycle logic, including creating the plugin window and adding the close button; after the close button is clicked, the main application closes the plugin window and executes the plugin window closure lifecycle logic.
[0086] However, this method has some drawbacks. For example, the main application needs to provide specified controls for users to decide the creation and closing of the plugin window, which somewhat intrudes on the aesthetics and customizability of the plugin window. Additionally, the main application contains redundant logic for controlling the plugin window's lifecycle, for example... Figure 1 Steps 3 and 8 in the main application contain redundant logic that is often related to specific business logic. This results in the need to couple the business logic in the plugin window with the main application, reducing the generality of the main application.
[0087] Based on this, this application proposes a plug-in window management method applied to an interactive initiator application. After the interactive initiator application starts, a target daemon thread is created. In response to a trigger operation targeting a target plug-in entry point in the interactive initiator application, the control information of the target plug-in entry point is sent to the target daemon thread to instruct the target daemon thread to determine the plug-in window information based on the control information. The method receives the plug-in window information sent by the target daemon thread and creates and displays the target plug-in window based on the plug-in window information. A creation success message is sent to the target daemon thread through the target plug-in window to instruct the target daemon thread to execute the window task corresponding to the target plug-in window. In response to a closing operation of the target plug-in window, the target plug-in window is closed. A window closing message is sent to the target daemon thread through the target plug-in window to instruct the target daemon thread to end the window task. The interactive initiator application does not need to handle the determination of plug-in window information, the execution of the window task corresponding to the target plug-in window, and the termination process; all these processes are executed by the target daemon thread. This achieves decoupling between the business logic of the target application and the plug-in window. The target application only needs to provide interfaces for displaying the plug-in entry point, creating the plug-in window, and closing it. These interfaces are not coupled with the business logic, improving the versatility of the interactive initiator application.
[0088] In one embodiment, the plug-in window management method provided in this application can be applied to the main application in the terminal. Taking the main application as the interaction initiator application as an example, as follows: Figure 2 As shown, the process includes steps 202 to 208. Wherein:
[0089] Step 202: After the interaction initiator application starts, create the target daemon thread.
[0090] In this context, the initiating application refers to the main application on the terminal. The initiating application can be the main application on the terminal used to initiate the interaction in a multi-party interaction scenario, or it can be the main application on a single terminal. For example, a multi-party interaction scenario could be a teaching interaction between a teacher and students, or an interaction between a broadcaster and an audience.
[0091] A target daemon thread refers to a thread that runs in the system background during the operation of the interaction initiator application. It can provide additional functions and services to the interaction initiator application, such as performing background tasks (e.g., logging, memory cleanup), resource reclamation (closing open files, releasing occupied memory, etc.). In some embodiments, the terminal creates a target daemon thread after the interaction initiator application starts, so that relevant information can be processed in the target daemon thread.
[0092] Step 204: In response to the trigger operation of the target plugin entry in the interactive initiator application, send the control information of the target plugin entry to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information.
[0093] The interactive initiator application has multiple plugin entry points, and the target plugin entry point is the one selected by the user from among these entry points. In some embodiments, the interactive initiator application can be a webpage on the terminal, and it has a human-computer interaction interface containing multiple plugin entry points. Each plugin entry point can be a triggerable control, such as a button control.
[0094] like Figure 3 The diagram shown is a schematic of an interactive initiator application in one embodiment. The interactive initiator application includes three plugin entry points: random question selection, real-time discussion, and quick answer.
[0095] Control information refers to the information generated after the plugin entry is triggered, which can include the control's state information, the control's position information in the human-computer interaction interface, the control's identification information, etc.
[0096] Plugin window information refers to the information required to create a plugin window, such as the type of plugin window to be created and information related to the controls within the plugin window.
[0097] In response to a trigger operation targeting a plugin entry point, the terminal sends the control information of the target plugin entry point to the target daemon thread. This instructs the target daemon thread to determine the plugin window information based on the control information and send it to the interaction initiator application. For example, the control information includes the control's identification information. The target daemon thread determines the type of plugin window to be created based on the mapping relationship between the identification information and the plugin window type. For instance, if the triggered control in the interaction initiator application is control A, the target daemon thread determines the plugin window type as a lottery question window based on the control information. As another example, if the triggered control in the interaction initiator application is control B, the target daemon thread determines the plugin window type as a real-time discussion window based on the control information.
[0098] Step 206: Receive the plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; send a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window.
[0099] The target plugin window refers to the plugin window created by the interaction initiator application. After receiving the plugin window information sent by the target daemon thread, the terminal's interaction initiator application creates and displays the target plugin window based on the plugin window information. For example, if the plugin window information includes the plugin window type, then a target plugin window matching the plugin window type is created.
[0100] In some embodiments, the interaction initiator application can be an application within a browser system, and can employ iframe (inline frame, an HTML tag) technology to create and display the target plugin window within a portion of the interaction initiator application. For example, displaying the content of webpage B within a portion of webpage A, with the two webpages operating independently.
[0101] After the target plugin window is successfully created, it sends a success message to the target daemon thread. In some embodiments, communication between different iframes in the terminal can be established through service workers. A service worker is independent of any single window, providing a common executable program to the terminal system. It can be shared by all windows and can perform message passing, with messages broadcast to all windows. Figure 4The diagram illustrates message passing in one embodiment. Multiple plugin windows are present, and the target daemon thread broadcasts messages to these windows via a service worker. Similarly, plugin windows send messages to the target daemon thread using the same sending mechanism. In some embodiments, each plugin window has its own identification information, which can be used to determine whether the plugin window is sending or receiving messages.
[0102] A window task refers to the business logic that the target plugin window needs to execute. For example, if the target plugin window is a lottery question window, the corresponding window task is for the interaction initiator to initiate the lottery for participants and set the questions, etc. Different types of target plugin windows correspond to different window tasks. Window tasks are executed by the target daemon thread, which decouples the interaction initiator application from the specific business logic, thus improving the versatility of the interaction initiator application.
[0103] Step 208: In response to the closing operation of the target plugin window, close the target plugin window; send a window closing message to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0104] The target plugin window can be closed based on the user's closing request or based on the execution status of the window task. For example, if the target plugin window has a close control, the target plugin window will close in response to the triggering of the close control. Alternatively, the target plugin window can close when the window task has been completed.
[0105] The window closing information is used to indicate that the target plugin window has been successfully closed. The interaction initiating application sends the window closing information to the target daemon thread through the target plugin window, and the target daemon thread ends the window task based on the received window closing information.
[0106] like Figure 5 The diagram illustrates the overall flow of plugin window management in one embodiment. When a user clicks on the target plugin entry point, the initiating application responds to the trigger operation of the target plugin entry point by sending the control information of the target plugin entry point to the target daemon thread, instructing the daemon thread to determine the plugin window information based on the control information. Upon receiving the plugin window information from the target daemon thread, the application creates and displays the target plugin window based on the plugin window information, and sends a creation success message to the target daemon thread through the target plugin window, instructing the target daemon thread to execute the window creation lifecycle logic, i.e., the window task corresponding to the target plugin window. When the user clicks the close button in the target plugin window, the target plugin window is closed, and a window close message is sent to the target daemon thread through the target plugin window, instructing the target daemon thread to execute the window closure lifecycle logic, i.e., to end the window task.
[0107] Taking a teacher's teaching scenario as an example, the interaction initiator application is the main application on the teacher's end. The main application includes multiple plugin entry points, such as random question selection, real-time discussion, and quick response. In response to the teacher's trigger operation for random question selection, the main application sends the control information for the random question selection to the target daemon thread. The target daemon thread determines the plugin window information based on the control information. The main application receives the plugin window information sent by the target daemon thread, creates and displays the random question selection window based on the plugin window information, and sends a creation success message to the target daemon thread through the random question selection window. The target daemon thread executes the window task corresponding to the random question selection window. After the teacher clicks the close button of the random question selection window, the random question selection window is closed, and a window closure message is sent to the target daemon thread through the random question selection window. The target daemon thread then terminates the window task. In this embodiment, the target daemon thread performs the full lifecycle logic management of the random question selection window, achieving decoupling between the main application and specific business logic, and improving the versatility of the main application.
[0108] The aforementioned plugin window management method, applied to the interaction initiator application, creates a target daemon thread after the application starts. The application has multiple plugin entry points. In response to a trigger operation targeting a specific plugin entry point, the control information of that entry point is sent to the target daemon thread, which then determines the plugin window information based on this information. Upon receiving the plugin window information from the daemon thread, the application creates and displays the target plugin window, sending a creation success message to the daemon thread. The daemon thread then executes the corresponding window task. In response to a closing operation, the application closes the target plugin window, sending a window close message to the daemon thread, which then terminates the window task. This eliminates the need for the interaction initiator application to handle the determination of plugin window information, the execution of the corresponding window task, and the termination process. All these processes are handled by the target daemon thread, decoupling the business logic between the target application and the plugin window. The target application only needs to provide interfaces for displaying plugin entry points, creating plugin windows, and closing them. These interfaces are not coupled with the business logic, improving the versatility of the interaction initiator application.
[0109] In an exemplary embodiment, the function corresponding to the target plugin entry is a multi-party interaction function; the method further includes: in response to an interaction initiation operation triggered in the target plugin window, obtaining interaction initiation information; in response to an interaction participant selection operation triggered in the target plugin window, determining the selected participant identifier; obtaining the function information corresponding to the target plugin entry; generating an interaction instruction based on the interaction initiation information, the selected participant identifier, and the function information; sending the interaction instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to determine whether to create a plugin window according to the selected participant identifier in the interaction instruction; if so, creating a participant plugin window matching the function information in the interaction instruction through the corresponding application, and displaying the interaction initiation information in the interaction instruction in the participant plugin window.
[0110] In the context of applying the plugin window management method to multi-party interaction scenarios, the function corresponding to the target plugin entry is a multi-party interaction function. This function is initiated by the interaction initiator application and involves at least one interaction participant. For example, multi-party interaction functions include a random question function, a real-time discussion function, and a quick-response function. In the random question function, the interaction initiator initiates the selection and interacts with the selected participant.
[0111] An interactive initiation action refers to the operation performed by the initiator within the target plugin window. Since the target plugin window is displayed in the initiator's application, the initiator can perform corresponding operations within the target plugin window to initiate the interactive function. Interactive initiation information refers to the interactive topic initiated by the initiator. For example, interactive initiation information can include asking a question, discussing a topic, or answering a question.
[0112] The target plugin window may have selection controls for multiple interactive participants. In response to selection operations on the multiple interactive participant selection controls, the selected participant identifier is determined. The selected participant identifier indicates the participant selected by the interaction initiator, who can then interact with the participant indicated by the selected participant identifier.
[0113] Interactions between the initiator and the selected participants are conducted through message passing between plugin windows. Interaction instructions refer to the information sent by the initiator to all participants. Functional information indicates the function of the plugin window accessed through the target plugin entry point; this information is determined by the target daemon thread based on the control information of the target plugin entry point. In some embodiments, the initiator application sends the selected participant identifier to the target daemon thread, instructing the target daemon thread to generate interaction instructions based on the interaction initiation information, the selected participant identifier, and the functional information.
[0114] Each participating terminal has its own participating application. Upon startup, each participating application creates its own corresponding daemon thread. The initiating application sends the interaction command to the respective daemon threads of all participating parties. Each daemon thread then determines whether to create a plugin window based on the selected participating party identifier in the interaction command. For example, a daemon thread compares the selected participating party identifier in the interaction command with its corresponding participating party identifier. If they match, it indicates that a plugin window needs to be created. The daemon thread sends the determination that a plugin window needs to be created to the corresponding participating application, which then creates a participating party plugin window that matches the functional information in the interaction command. The interaction initiation information from the interaction command is then displayed in the participating party plugin window.
[0115] Taking an interactive teaching scenario between a teacher and multiple students as an example, the interaction initiator application is the main application on the teacher's end, and the main application on each student's end is an interaction participant application. The interaction initiator application includes multiple plugin entry points, such as random question selection, real-time discussion, and quick response. Taking the teacher triggering random question selection as an example, the interaction initiator application responds to the teacher's interaction initiation operation triggered in the random question selection window, as well as the selection operation for students, generating interaction instructions and sending them to all student ends. Each student's daemon thread determines whether it is selected based on the interaction instructions. The main application of the selected student's end creates a plugin window, and the selected student replies to the teacher's question in the plugin window. This embodiment implements multi-party interaction functionality, and the main application of each party is decoupled from specific business logic, improving the versatility of the main application.
[0116] In this embodiment, when the function corresponding to the target plugin entry is a multi-party interaction function, the interaction initiator interacts with at least one interaction participant. The interaction initiator generates interaction initiation information through the target plugin window and determines the selected participant identifier. The target daemon thread generates interaction instructions based on the interaction initiation information, the selected participant identifier, and the function information, and sends them to the daemon threads corresponding to all participants. Each daemon thread performs the corresponding plugin window creation lifecycle logic. In this way, in both the interaction initiator application and the interaction participant application, the corresponding daemon thread executes the processing logic related to the specific business, decoupling the main application from the business logic and improving the versatility of the main application.
[0117] In an exemplary embodiment, the function corresponding to the target plugin entry is a question-selection function; the target plugin window is a question-selection window; in response to an interaction initiation operation triggered in the target plugin window, interaction initiation information is obtained, including: in response to a question initiation operation triggered in the question-selection window, obtaining the question; in response to an interaction participant selection operation triggered in the target plugin window, determining the selected participant identifier; obtaining the function information corresponding to the target plugin entry; based on the interaction initiation information, the selected participant identifier, and the function information, generating an interaction instruction, including: in response to an answerer selection operation triggered in the question-selection window, determining the selected answerer identifier; based on the question, the selected answerer identifier, and the question-selection function, generating an interaction instruction; and sending the interaction instruction... The interaction command is sent to the respective guardian threads of all participants corresponding to the target plugin entry point. Each guardian thread is instructed to determine whether to create a plugin window based on the selected participant identifier in the interaction command. If so, the corresponding application creates a participant plugin window that matches the functional information in the interaction command, and displays the interaction initiation information in the interaction command in the participant plugin window. This includes: sending the interaction command to the respective guardian threads of all participants corresponding to the target plugin entry point, instructing each guardian thread to determine whether to create a plugin window based on the selected responder identifier in the interaction command. If so, the corresponding application creates a participant plugin window that matches the random question function in the interaction command, and displays the question in the interaction command in the participant plugin window.
[0118] In the case where the function corresponding to the target plugin entry is a question-selection feature, the target plugin window is a question-selection window. For example, the question-selection window includes at least a question input control and a respondent selection control. In response to an input operation on the question input control, a question is obtained; the input operation can be in the form of text or voice. In response to a trigger operation on at least one respondent selection control, a selected respondent identifier is determined. The initiator of the interaction sends the selected respondent identifier and the question to the target daemon thread, instructing the target daemon thread to generate an interaction command based on the question, the selected respondent identifier, and the question-selection feature, and send it to the respective daemon threads of all participating parties.
[0119] Each participant's corresponding daemon thread can perform window tasks related to the random question selection, including at least determining whether to create a plugin window based on the selected respondent identifier in the interaction instruction. If so, the participant plugin window that matches the random question selection function in the interaction instruction is created through the corresponding application, and the question in the interaction instruction is displayed in the participant plugin window.
[0120] In this embodiment, when the function corresponding to the target plugin entry is the random question function, the interaction initiator initiates a question through the random question window and determines the identifier of the selected respondent. The target daemon thread generates an interaction instruction based on the question, the identifier of the selected respondent, and the random question function, and sends it to the corresponding daemon threads of all participants. Each daemon thread then performs the corresponding plugin window creation lifecycle logic. In this way, in both the interaction initiator's application and the interaction participant's application, the corresponding daemon thread executes the processing logic related to the random question function. The main application and the random question function logic are decoupled, improving the versatility of the main application.
[0121] In an exemplary embodiment, the function corresponding to the target plugin entry is a real-time discussion function; the target plugin window is a real-time discussion window; in response to an interaction initiation operation triggered in the target plugin window, interaction initiation information is obtained, including: in response to a real-time discussion initiation operation triggered in the real-time discussion window, obtaining the real-time discussion object; in response to an interaction participant selection operation triggered in the target plugin window, determining the selected participant identifier; obtaining the function information corresponding to the target plugin entry; based on the interaction initiation information, the selected participant identifier, and the function information, generating an interaction instruction, including: in response to a discussion participant selection operation triggered in the real-time discussion window, determining the selected discussion participant identifier; based on the real-time discussion object, the selected discussion participant identifier, and the real-time discussion function, generating an interaction instruction; and sending the interaction... The instruction is sent to the respective guardian threads of all participants corresponding to the target plugin entry point, instructing each guardian thread to determine whether to create a plugin window based on the selected participant identifier in the interaction instruction. If so, the corresponding application creates a participant plugin window that matches the functional information in the interaction instruction, and displays the interaction initiation information in the interaction instruction in the participant plugin window. This includes: sending the interaction instruction to the respective guardian threads of all participants corresponding to the target plugin entry point, instructing each guardian thread to determine whether to create a plugin window based on the selected discussion participant identifier in the interaction instruction. If so, the corresponding application creates a participant plugin window that matches the real-time discussion function in the interaction instruction, and displays the real-time discussion object in the interaction instruction in the participant plugin window.
[0122] In the case where the function corresponding to the target plugin entry is real-time discussion, the target plugin window is a real-time discussion window. For example, the real-time discussion window includes at least a discussion object input control and a discussion participant selection control. In response to an input operation via the discussion object input control, a real-time discussion object is obtained; the input operation can be in the form of text or voice. The real-time discussion object may include a discussion topic, an initiator's identifier, and discussion content (text or images, etc.). In response to a trigger operation of at least one discussion participant selection control, a selected discussion participant identifier is determined. The interaction initiator sends the selected discussion participant identifier and the real-time discussion object to the target daemon thread, instructing the target daemon thread to generate interaction instructions based on the selected discussion participant identifier, the real-time discussion object, and the real-time discussion function, and send them to the respective daemon threads of all participating parties.
[0123] Each participant's corresponding daemon thread can perform window tasks related to real-time discussion, including at least determining whether to create a plugin window based on the selected discussion participant identifier in the interaction command. If so, the participant plugin window that matches the real-time discussion function in the interaction command is created through the corresponding application, and the real-time discussion object in the interaction command is displayed in the participant plugin window.
[0124] In this embodiment, when the function corresponding to the target plugin entry is the real-time discussion function, the interaction initiator initiates a real-time discussion object through the real-time discussion window and determines the selected discussion party identifier. The target daemon thread generates an interaction command based on the real-time discussion object, the selected discussion party identifier, and the real-time discussion function, and sends it to the corresponding daemon threads of all participants. Each daemon thread then performs the corresponding plugin window creation lifecycle logic. In this way, in both the interaction initiator application and the interaction participant application, the corresponding daemon thread executes the processing logic related to the real-time discussion function. The main application and the real-time discussion function logic are decoupled, improving the versatility of the main application.
[0125] In an exemplary embodiment, the function corresponding to the target plugin entry is a quiz-initiating function; the target plugin window is a quiz-initiating window; the plugin window management method further includes: in response to a quiz initiation operation triggered in the quiz-initiating window, obtaining the quiz question; generating an interactive instruction based on the quiz question and the quiz function; and sending the interactive instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to create a participant plugin window that matches the quiz function in the interactive instruction through the corresponding application, and display the quiz question in the interactive instruction in the participant plugin window.
[0126] In cases where the function corresponding to the target plugin entry is a quiz-style function, the target plugin window serves as the quiz-initiating window. In some embodiments, the quiz-initiating window includes at least a quiz question input control. In response to input from the quiz question input control, a quiz question is generated. After the quiz question is generated, it is sent to the target daemon thread, instructing the target daemon thread to generate interactive instructions based on the quiz question and the quiz function, and then send these instructions to the respective daemon threads of all participating parties.
[0127] Each daemon thread sends all participant identifiers to the corresponding participant application, creates a participant plugin window that matches the answer-grabbing function in the interaction command, and displays the answer-grabbing question in the interaction command in the participant plugin window.
[0128] In this embodiment, when the function corresponding to the target plugin entry is a quiz function, the interaction initiator initiates the quiz question through the quiz window. The target daemon thread generates an interaction instruction based on the quiz question and the quiz function, and sends it to the corresponding daemon threads of all participants. Each daemon thread then performs the corresponding plugin window creation lifecycle logic. In this way, in both the interaction initiator's application and the interaction participant's application, the corresponding daemon thread executes the processing logic related to the quiz function. The main application and the quiz function logic are decoupled, improving the versatility of the main application.
[0129] In an exemplary embodiment, prior to the triggering operation for a target plugin entry in the interactive initiator application, the method further includes: receiving an entry display message sent by the target daemon thread after the target daemon thread is created; and displaying at least one plugin entry based on the entry display message.
[0130] The entry display message is sent by the target daemon thread and is used to represent information about the controls that need to be displayed by the interaction initiator. The entry display message can include information about multiple controls.
[0131] The application that initiates the interaction displays at least one plugin entry point based on the entry display message. For example, the entry display message includes the position information and control type of three controls. The application that initiates the interaction generates and displays the corresponding control based on the position information and control type of each control, which is the plugin entry point.
[0132] In this embodiment, after the target daemon thread is created, an entry display message sent by the target daemon thread is received. Based on the entry display message, at least one plugin entry is displayed. In this way, the interaction initiator application only needs to provide the plugin entry display interface, and the specific entry display information is determined by the target daemon thread. This is conducive to decoupling the interaction initiator application from specific business logic and improving the versatility of the interaction initiator application.
[0133] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0134] Based on the same inventive concept, this application also provides a plug-in window management device for implementing the plug-in window management method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more plug-in window management device embodiments provided below can be found in the limitations of the plug-in window management method described above, and will not be repeated here.
[0135] In one exemplary embodiment, such as Figure 6 As shown, a plug-in window management device 600 is provided for use in an interactive initiator application, including: a first thread creation module 620, a first trigger module 640, a first window creation module 660, and a closing module 680, wherein:
[0136] The first thread creation module 620 is used to create the target daemon thread after the interaction initiator application starts.
[0137] The first trigger module 640 is used to respond to the trigger operation of the target plugin entry in the interactive initiator application, and send the control information of the target plugin entry to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information.
[0138] The first window creation module 660 is used to receive the plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; and send a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window;
[0139] The closing module 680 is used to close the target plugin window in response to the closing operation of the target plugin window; and to send window closing information to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0140] The aforementioned plug-in window management device, applied to the interactive initiator application, creates a target daemon thread after the application starts. The application has multiple plug-in entry points. In response to a trigger operation targeting a specific plug-in entry point, the control information of that entry point is sent to the target daemon thread, which then determines the plug-in window information based on this information. Upon receiving the plug-in window information from the daemon thread, the device creates and displays the target plug-in window, sending a creation success message to the daemon thread. The daemon thread then executes the corresponding window tasks. In response to a closing operation, the device closes the target plug-in window, sending a window close message to the daemon thread, which then terminates the window tasks. This eliminates the need for the interactive initiator application to handle the determination of plug-in window information, the execution of the corresponding window tasks, and the termination process, all handled by the daemon thread. This decouples the business logic of the target application from that of the plug-in window. The target application only needs to provide interfaces for displaying plug-in entry points, creating plug-in windows, and closing them. These interfaces are not coupled with the business logic, improving the versatility of the interactive initiator application.
[0141] In one embodiment, the function corresponding to the target plugin entry is a multi-party interaction function; the plugin window management device 600 further includes a multi-party interaction module, which is used to: obtain interaction initiation information in response to an interaction initiation operation triggered in the target plugin window; determine the selected participant identifier in response to an interaction participant selection operation triggered in the target plugin window; obtain the function information corresponding to the target plugin entry; generate an interaction instruction based on the interaction initiation information, the selected participant identifier, and the function information; and send the interaction instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to determine whether to create a plugin window according to the selected participant identifier in the interaction instruction. If so, the corresponding application creates a participant plugin window that matches the function information in the interaction instruction, and displays the interaction initiation information in the interaction instruction in the participant plugin window.
[0142] In one embodiment, the function corresponding to the target plugin entry is a random question selection function; the target plugin window is a random question selection window; the multi-party interaction module is further configured to: obtain the question in response to a question initiation operation triggered in the random question selection window; determine the selected respondent identifier in response to a respondent selection operation triggered in the random question selection window; generate an interaction instruction based on the question, the selected respondent identifier, and the random question selection function; and send the interaction instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to determine whether to create a plugin window based on the selected respondent identifier in the interaction instruction. If so, the corresponding application creates a participant plugin window that matches the random question selection function in the interaction instruction, and displays the question in the interaction instruction in the participant plugin window.
[0143] In one embodiment, the function corresponding to the target plugin entry is a real-time discussion function; the target plugin window is a real-time discussion window; the multi-party interaction module is further configured to: obtain the real-time discussion object in response to a real-time discussion initiation operation triggered in the real-time discussion window; determine the selected discussion party identifier in response to a discussion party selection operation triggered in the real-time discussion window; generate an interaction instruction based on the real-time discussion object, the selected discussion party identifier, and the real-time discussion function; and send the interaction instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to determine whether to create a plugin window based on the selected discussion party identifier in the interaction instruction. If so, the corresponding application creates a participant plugin window that matches the real-time discussion function in the interaction instruction, and displays the real-time discussion object in the interaction instruction in the participant plugin window.
[0144] In one embodiment, the function corresponding to the target plugin entry is a quiz-initiating function; the target plugin window is a quiz-initiating window; the plugin window management device 600 further includes a quiz-initiating module, which is used to: obtain the quiz question in response to a quiz initiation operation triggered in the quiz-initiating window; generate an interactive instruction based on the quiz question and the quiz function; and send the interactive instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to create a participant plugin window that matches the quiz function in the interactive instruction through the corresponding application, and display the quiz question in the interactive instruction in the participant plugin window.
[0145] In one embodiment, prior to triggering an operation on a target plugin entry in the interactive initiator application, the first triggering module 640 is further configured to: receive an entry display message sent by the target daemon thread after the target daemon thread is created; and display at least one plugin entry based on the entry display message.
[0146] Each module in the aforementioned plug-in window management device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0147] In one embodiment, the plug-in window management method provided in this application can be applied to the main application in a terminal. Taking the main application as an interactive participant application as an example, multi-party interaction can occur between the interactive participant application and the interactive initiator application, such as... Figure 7 As shown, the process includes steps 702 to 704. Wherein:
[0148] Step 702: After the interactive participant application starts, a daemon thread is created. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and to parse the interactive instructions. If the interactive instructions carry the selected participant identifier, it is determined whether to create a plugin window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application in the aforementioned plugin window management method.
[0149] Step 704: Receive the function information and interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
[0150] In the context of plugin window management, when applied to multi-party interaction scenarios, the participating application refers to a terminal application capable of multi-party interaction with the initiating application. Each participant's terminal has its own participating application. Multi-party interaction functions are initiated by the initiating application and involve at least one participating application. Examples of such functions include random question selection, real-time discussion, and quick-response functionality. In the random question selection function, the initiating application initiates the selection and interacts with the selected participant.
[0151] The following explanation uses an interactive participant application in any participating terminal involved in multi-party interaction as an example. After the interactive participant application starts, the participating terminal creates a daemon thread. This daemon thread is independent of the interactive participant application and is used to execute the lifecycle logic for creating the participant plugin window. This includes at least receiving the interaction command sent by the target daemon thread corresponding to the interaction initiator application, parsing the command, and, if the command carries a selected participant identifier, determining whether to create a plugin window based on that identifier. If the determination is yes, the function information and interaction initiation information carried in the command are sent to the interactive participant application. For example, if the function information carried in the command is a random question function, and the interaction initiation information is a question, and if the participant identifier corresponding to the interactive participant application matches the selected participant identifier carried in the command, then it is determined that the interactive participant application will create the participant plugin window.
[0152] Based on the function information and interaction initiation information sent by the daemon thread, the participating application creates a participant plugin window that matches the function information and displays the interaction initiation information in the participant plugin window. For example, if the function information carried by the interaction instruction is a random question function and the interaction initiation information is a question, the participating application creates a participant plugin window that matches the random question function and displays the question in the participant plugin window.
[0153] The aforementioned plugin window management method involves creating a daemon thread after the interactive participant application starts. This daemon thread receives and parses the interactive instructions sent by the target daemon thread (created by the interactive initiator application upon startup). If the interactive instruction carries a selected participant identifier, it determines whether to create a plugin window based on that identifier. If the determination is correct, the functional information and interactive initiation information carried in the interactive instruction are sent to the interactive participant application. The interactive participant application then creates a participant plugin window matching the functional information and displays the interactive initiation information within it. In this way, the interactive participant application interacts with the target daemon thread of the interactive initiator application through the daemon thread, and the daemon thread determines whether to create a participant plugin window based on the interactive instruction. The interactive participant application only needs to provide interfaces for creating the participant plugin window, which are not coupled with business logic, reducing the coupling between the interactive participant application and the business logic of the participant plugin window, thus improving the versatility of the interactive participant application.
[0154] In one exemplary embodiment, such as Figure 8 As shown, a plug-in window management device 800 is provided for use in interactive participant applications, including: a second thread creation module 820 and a second window creation module 840, wherein:
[0155] The second thread creation module 820 is used to create a daemon thread after the interactive participant application starts. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and parse the interactive instructions. If the interactive instructions carry the selected participant identifier, it determines whether to create a plugin window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application in the aforementioned plugin window management method.
[0156] The second window creation module 840 is used to receive function information and interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
[0157] The aforementioned plug-in window management device is applied to interactive participant applications. After the interactive participant application starts, a daemon thread is created. This daemon thread receives and parses interactive instructions sent by a target daemon thread (created by the interactive initiator application upon startup). If the interactive instruction carries a selected participant identifier, it determines whether to create a plug-in window based on the identifier. If the determination is yes, the functional information and interactive initiation information carried in the interactive instruction are sent to the interactive participant application. The interactive participant application then creates a participant plug-in window matching the functional information and displays the interactive initiation information within it. In this way, the interactive participant application interacts with the target daemon thread of the interactive initiator application through the daemon thread, and the daemon thread determines whether to create a participant plug-in window based on the interactive instruction. The interactive participant application only needs to provide interfaces for creating participant plug-in windows, which are not coupled with business logic, reducing the coupling between the interactive participant application and the business logic of the participant plug-in window, thus improving the versatility of the interactive participant application.
[0158] To illustrate the plug-in window management method and its effects in this solution in detail, the following is a detailed example:
[0159] The plugin window management method can be applied to browser systems, which use iframe tags. In the interaction initiator's application on the interaction initiator's terminal, the target plugin window can be displayed in a portion of the application; similarly, in the interaction participant's application on the interaction participant's terminal, the participant's plugin window can be displayed in a portion of the application. Different iframe tags within the same system can communicate via service workers.
[0160] In some embodiments, the plugin window management method can be applied to the interaction initiator application, and the plugin window lifecycle is managed by the target daemon thread corresponding to the interaction initiator application. Specifically, after the interaction initiator application starts, a target daemon thread is created; in response to a trigger operation targeting the target plugin entry point in the interaction initiator application, the control information of the target plugin entry point is sent to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information; the plugin window information sent by the target daemon thread is received, and the target plugin window is created and displayed based on the plugin window information; a creation success message is sent to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window; in response to a closing operation of the target plugin window, the target plugin window is closed; and a window closing message is sent to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
[0161] In other embodiments, the plug-in window management method can be applied to multi-party interaction scenarios, where an interaction is initiated by an initiating application and participated in by at least one participating party. For example, the initiating application could be a teacher, and the participating party could be a student. The target daemon thread corresponding to the initiating application and the daemon thread corresponding to the participating application manage the lifecycle of their respective plug-in windows. Specifically, in response to an interaction initiation operation triggered in the target plug-in window, interaction initiation information is obtained; in response to an interaction participant selection operation triggered in the target plug-in window, the selected participant identifier is determined; the function information corresponding to the target plug-in entry is obtained; based on the interaction initiation information, the selected participant identifier, and the function information, an interaction command is generated; the interaction command is sent to the respective daemon threads of all participants corresponding to the target plug-in entry, instructing each daemon thread to determine whether to create a plug-in window based on the selected participant identifier in the interaction command. If so, a participant plug-in window matching the function information in the interaction command is created through the corresponding application, and the interaction initiation information in the interaction command is displayed in the participant plug-in window.
[0162] For example, the function corresponding to the target plugin entry is a random question selection function; the target plugin window is a random question selection window; the plugin window management method includes: in response to a question initiation operation triggered in the random question selection window, obtaining the question; in response to a respondent selection operation triggered in the random question selection window, determining the identifier of the selected respondent; generating an interaction instruction based on the question, the identifier of the selected respondent, and the random question selection function; sending the interaction instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to determine whether to create a plugin window based on the identifier of the selected respondent in the interaction instruction; if so, creating a participant plugin window matching the random question selection function in the interaction instruction through the corresponding application, and displaying the question in the interaction instruction in the participant plugin window.
[0163] For example, the function corresponding to the target plugin entry is the real-time discussion function; the target plugin window is the real-time discussion window; the plugin window management method includes: in response to a real-time discussion initiation operation triggered in the real-time discussion window, obtaining the real-time discussion object; in response to a discussion party selection operation triggered in the real-time discussion window, determining the selected discussion party identifier; generating an interaction command based on the real-time discussion object, the selected discussion party identifier, and the real-time discussion function; sending the interaction command to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to determine whether to create a plugin window based on the selected discussion party identifier in the interaction command; if so, creating a participant plugin window matching the real-time discussion function in the interaction command through the corresponding application, and displaying the real-time discussion object in the interaction command in the participant plugin window.
[0164] For example, the function corresponding to the target plugin entry is a quiz-initiating function; the target plugin window is a quiz-initiating window; the plugin window management method further includes: in response to a quiz-initiating operation triggered in the quiz-initiating window, obtaining the quiz question; generating an interactive instruction based on the quiz question and the quiz function; sending the interactive instruction to the respective guardian threads of all participants corresponding to the target plugin entry, so as to instruct each guardian thread to create a participant plugin window that matches the quiz function in the interactive instruction through the corresponding application, and displaying the quiz question in the interactive instruction in the participant plugin window.
[0165] In some embodiments, prior to triggering an operation on a target plugin entry in the interaction initiator's application, the method further includes: receiving an entry display message sent by the target daemon thread after the target daemon thread is created; and displaying at least one plugin entry based on the entry display message.
[0166] The aforementioned plugin window management method, when applied to the interaction initiator application, eliminates the need for the initiator application to handle the determination of plugin window information, the execution of window tasks corresponding to the target plugin window, and the termination process. These processes are all executed by the target daemon thread, achieving decoupling between the target application and the business logic of the plugin window. The target application only needs to provide interfaces for plugin entry display, plugin window creation, and closing. These interfaces are not coupled with the business logic, improving the versatility of the interaction initiator application. When applied to the interaction participant application, the participant application interacts with the target daemon thread of the interaction initiator application through a daemon thread. The daemon thread determines whether to create a participant plugin window based on the interaction instructions. The participant application only needs to provide interfaces for participant plugin window creation, which are not coupled with the business logic, reducing the coupling with the business logic of the participant plugin window and improving the versatility of the interaction participant application.
[0167] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a plug-in window management method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0168] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0169] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the above-described plug-in window management method applied to an interactive initiator application or the above-described plug-in window management method applied to an interactive participant application.
[0170] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described plug-in window management method applied to an interactive initiator application or implements the above-described plug-in window management method applied to an interactive participant application.
[0171] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described plug-in window management method applied to an interactive initiator application or implements the above-described plug-in window management method applied to an interactive participant application.
[0172] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0173] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0174] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0175] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A plug-in window management method, characterized in that, Applied to interactive initiator applications, the method includes: After the application that initiates the interaction starts, a target daemon thread is created; In response to a trigger operation targeting a target plugin entry in the application of the interaction initiator, the control information of the target plugin entry is sent to the target daemon thread to instruct the target daemon thread to determine the plugin window information based on the control information; The system receives the plugin window information sent by the target daemon thread, creates and displays the target plugin window based on the plugin window information, and sends a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window. In response to the closing operation of the target plugin window, the target plugin window is closed; the window closing information is sent to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
2. The method according to claim 1, characterized in that, The function corresponding to the target plugin entry is a multi-party interaction function; the method also includes: In response to an interaction initiation operation triggered in the target plugin window, obtain interaction initiation information; In response to an interactive participant selection operation triggered in the target plugin window, the identifier of the selected participant is determined; the function information corresponding to the target plugin entry is obtained; and an interactive instruction is generated based on the interactive initiation information, the identifier of the selected participant, and the function information. The interactive instruction is sent to the guardian threads of all participants corresponding to the target plugin entry, so that each guardian thread can determine whether to create a plugin window based on the selected participant identifier in the interactive instruction. If so, the corresponding application creates a participant plugin window that matches the functional information in the interactive instruction, and displays the interactive initiation information in the interactive instruction in the participant plugin window.
3. The method according to claim 2, characterized in that, The function corresponding to the target plugin entry is the random question selection function; the target plugin window is the random question selection window; The step of responding to an interaction initiation operation triggered in the target plugin window and obtaining interaction initiation information includes: In response to the question initiation operation triggered by the question selection window, the question is retrieved; In response to an interactive participant selection operation triggered in the target plugin window, the system determines the identifier of the selected participant; obtains the function information corresponding to the target plugin entry; and generates an interactive instruction based on the interactive initiation information, the identifier of the selected participant, and the function information, including: In response to the respondent selection operation triggered by the random question window, the identifier of the selected respondent is determined; based on the question, the identifier of the selected respondent, and the random question function, an interactive instruction is generated; The step of sending the interaction command to the respective guardian threads of all participants corresponding to the target plugin entry point instructs each guardian thread to determine whether to create a plugin window based on the selected participant identifier in the interaction command. If so, a participant plugin window matching the functional information in the interaction command is created through the corresponding application, and the interaction initiation information in the interaction command is displayed in the participant plugin window, including: The interactive instruction is sent to the respective guardian threads of all participants corresponding to the target plugin entry, so that each guardian thread can determine whether to create a plugin window based on the selected responder identifier in the interactive instruction. If so, a participant plugin window matching the random questioning function in the interactive instruction is created through the corresponding application, and the question in the interactive instruction is displayed in the participant plugin window.
4. The method according to claim 2, characterized in that, The target plugin entry point corresponds to the real-time discussion function; the target plugin window is the real-time discussion window. The step of responding to an interaction initiation operation triggered in the target plugin window and obtaining interaction initiation information includes: In response to a live discussion initiation operation triggered in the live discussion window, obtain the live discussion object; In response to an interactive participant selection operation triggered in the target plugin window, the system determines the identifier of the selected participant; obtains the function information corresponding to the target plugin entry; and generates an interactive instruction based on the interactive initiation information, the identifier of the selected participant, and the function information, including: In response to a discussion participant selection operation triggered in the real-time discussion window, the identifier of the selected discussion participant is determined; based on the real-time discussion participant, the identifier of the selected discussion participant, and the real-time discussion function, an interactive command is generated; The step of sending the interaction command to the respective guardian threads of all participants corresponding to the target plugin entry point instructs each guardian thread to determine whether to create a plugin window based on the selected participant identifier in the interaction command. If so, a participant plugin window matching the functional information in the interaction command is created through the corresponding application, and the interaction initiation information in the interaction command is displayed in the participant plugin window, including: The interactive command is sent to the respective guardian threads of all participants corresponding to the target plugin entry, so that each guardian thread can determine whether to create a plugin window based on the selected discussion party identifier in the interactive command. If so, the corresponding application creates a participant plugin window that matches the real-time discussion function in the interactive command, and displays the real-time discussion object in the interactive command in the participant plugin window.
5. The method according to claim 1, characterized in that, The function corresponding to the target plugin entry is the quiz-initiating function; the target plugin window is the quiz-initiating window. The method further includes: In response to the answer-initiating operation triggered in the answer-initiating window, obtain the answer question; Generate interactive instructions based on the question and the answer-grabbing function; The interactive command is sent to the guardian threads of all participants corresponding to the target plugin entry, so that each guardian thread can create a participant plugin window that matches the answer-grabbing function in the interactive command through the corresponding application, and display the answer-grabbing question in the interactive command in the participant plugin window.
6. The method according to claim 1, characterized in that, Prior to the triggering operation targeting the target plugin entry in the interaction initiator's application, the response also includes: After the target daemon thread is created, receive the entry display message sent by the target daemon thread; Based on the entry display message, at least one plugin entry is displayed.
7. A plug-in window management method, characterized in that, The method, applied to interactive participant applications, includes: After the interactive participant application starts, a daemon thread is created. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and to parse the interactive instructions. If the interactive instructions carry a selected participant identifier, it is determined whether to create a plug-in window based on the selected participant identifier. If the determination result is yes, the functional information and interactive initiation information carried by the interactive instructions are sent to the interactive participant application. The interactive initiator application is the interactive initiator application to which the plug-in window management method of any one of claims 1 to 6 is applied. The system receives the function information and interaction initiation information sent by the daemon thread, creates a participant plugin window that matches the function information, and displays the interaction initiation information in the participant plugin window.
8. A plug-in window management device, characterized in that, The device, used in interactive initiator applications, includes: The first thread creation module is used to create a target daemon thread after the application of the interaction initiator is started; The first triggering module is used to respond to a triggering operation on the target plugin entry in the application of the interaction initiator, and send the control information of the target plugin entry to the target guardian thread to instruct the target guardian thread to determine the plugin window information based on the control information; The first window creation module is used to receive the plugin window information sent by the target daemon thread, and create and display the target plugin window based on the plugin window information; and send a creation success message to the target daemon thread through the target plugin window to instruct the target daemon thread to execute the window task corresponding to the target plugin window; The closing module is used to close the target plugin window in response to the closing operation of the target plugin window; and to send the window closing information to the target daemon thread through the target plugin window to instruct the target daemon thread to end the window task.
9. A plug-in window management device, characterized in that, The device, used in interactive participant applications, includes: The second thread creation module is used to create a daemon thread after the interactive participant application starts. The daemon thread is used to receive interactive instructions sent by the target daemon thread corresponding to the interactive initiator application, and to parse the interactive instructions. If the interactive instructions carry a selected participant identifier, it determines whether to create a plugin window based on the selected participant identifier. If the determination result is yes, it sends the function information and interactive initiation information carried by the interactive instructions to the interactive participant application. The interactive initiator application is the interactive initiator application to which the plugin window management method of any one of claims 1 to 6 is applied. The second window creation module is used to receive the function information and the interaction initiation information sent by the daemon thread, create a participant plugin window that matches the function information, and display the interaction initiation information in the participant plugin window.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.