Plug-in interface display method, device, plug-in system and readable storage medium
By splitting the plug-in code into logical information and panel information, and generating the plug-in interface based on the display information of the application software, the problem of inconsistent display styles between the plug-in interface and the application software is solved, and the compatible display effect between the plug-in and the application software is achieved.
Patent Information
- Application Number
- CN202010932027.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-07
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2040-09-07
AI Technical Summary
In the prior art, the fixed display style of the plug-in interface is difficult to be unified with the display style of various application software, which affects the compatible display effect between the plug-in and the application software.
By receiving plug-in code information, it is divided into plug-in logic information and plug-in panel information, obtain the application software display information corresponding to the plug-in code information, and run the plug-in logic information and render the plug-in panel information based on the display information, and generate the plug-in main interface and plug-in interaction panel that match the application software display style.
It realizes the unified display style of the plug-in interface and the display style of the application software, and improves the compatibility display effect between the plug-in and different types of application software.
Smart Images

Figure CN114153532B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method and device for displaying a plug-in interface, a plug-in system and a readable storage medium. Background Art
[0002] With the development of science and technology, the functions supported by smart terminals are becoming more and more powerful, and most of the functions are realized through application software. At the same time, application software supports and is compatible with a variety of plug-ins. Plug-ins are programs written in accordance with certain standardized application program interfaces. While enriching the functions of application software, it makes application software easier to maintain and adjust, which is conducive to the flexibility of application software development.
[0003] Currently, plug-ins are usually developed independently, and the plug-in interface is displayed in a fixed style after development. In addition, the same plug-in is usually used with different application software, and different application software has different display styles; as a result, the fixed display style of the plug-in interface is difficult to unify with the display styles of the various application software, affecting the compatible display effect between the plug-in and the application software. Summary of the invention
[0004] The main purpose of the present invention is to provide a display method, device, plug-in system and readable storage medium for a plug-in interface, aiming to solve the technical problem that the fixed display style of the plug-in interface in the prior art is difficult to unify with the display style of various application software, affecting the compatible display effect between the plug-in and the application software.
[0005] To achieve the above object, the present invention provides a method for displaying a plug-in interface, the method comprising the following steps:
[0006] Receive plug-in code information, and split the plug-in code information into plug-in logic information and plug-in panel information;
[0007] Acquire display information of the application software corresponding to the plug-in code information, and run the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display;
[0008] Based on the display information, the plug-in panel information is rendered, and a plug-in interaction panel matching the display information is generated for display.
[0009] Optionally, after the step of generating a plug-in main interface and a plug-in interaction panel matching the display information for display, the step further includes:
[0010] When an interaction request is received based on the plug-in interaction panel, acquiring interaction information carried in the interaction request;
[0011] Based on the interaction information, the interface information corresponding to the interaction information in the main interface of the plug-in is updated and displayed.
[0012] Optionally, the step of updating and displaying interface information corresponding to the interaction information in the plug-in main interface based on the interaction information includes:
[0013] Based on the interaction interface corresponding to the plug-in logic information, trigger the target logic information corresponding to the interaction information in the plug-in logic information;
[0014] According to the target logic information and the interaction information, the interface information corresponding to the interaction information in the main interface of the plug-in is configured to generate a configuration result;
[0015] The interface information is updated and displayed in the plug-in main interface based on the configuration result.
[0016] Optionally, before the step of updating and displaying interface information corresponding to the interaction information in the plug-in main interface based on the interaction information, the step includes:
[0017] Acquire the information attribute of the interaction information and the attribute range of the interface information, and determine whether the information attribute is within the attribute range;
[0018] If it is within the attribute range, executing the step of updating and displaying the interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information;
[0019] If it is not within the attribute range, an abnormal information prompt message is output.
[0020] Optionally, the step of splitting the plug-in code information into plug-in logic information and plug-in panel information includes:
[0021] Separating logic information and panel information from the plug-in code information;
[0022] Convert the logic information based on a preset tool to generate plug-in logic information;
[0023] The panel information is cached based on a preset platform, and plug-in panel information of a preset data structure is generated.
[0024] Optionally, the step of separating the logic information and the panel information from the plug-in code information includes:
[0025] According to the plug-in code information, determining the validity of the logic information and the panel information;
[0026] If both the logic information and the panel information are valid, executing the step of converting the logic information based on a preset tool;
[0027] If the logic information and / or the panel information is invalid, a separation invalid prompt message is output.
[0028] Optionally, the step of running the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display includes:
[0029] Loading the plug-in logic information and determining whether the plug-in logic information has been loaded, and if loaded, running the plug-in logic information;
[0030] Based on the display information, the interface generated by running the plug-in logic information is rendered, and a plug-in main interface matching the display information is obtained for display.
[0031] Optionally, the step of rendering the plug-in panel information based on the display information and generating a plug-in interaction panel matching the display information for display includes:
[0032] Acquire an interactive area corresponding to the plug-in main interface, and render the plug-in panel information based on the display information to generate a plug-in interactive panel matching the display information;
[0033] The plug-in interaction panel is displayed in the interaction area.
[0034] Optionally, after the step of splitting the plug-in code information into plug-in logic information and plug-in panel information, the following steps are included:
[0035] The plug-in logic information and the plug-in panel information are converted into conversion information in binary format, and the conversion information is stored in a preset storage unit.
[0036] Optionally, before the step of splitting the plug-in code information into plug-in logic information and plug-in panel information, the step includes:
[0037] Compile the plug-in code information, determine whether there is logic exception information in the plug-in code information, and if there is logic exception information, output logic exception prompt information;
[0038] If there is no logic exception information, the step of splitting the plug-in code information into plug-in logic information and plug-in panel information is performed.
[0039] Furthermore, in order to achieve the above-mentioned object, the present invention also provides a display device for a plug-in interface, the display device for the plug-in interface comprising:
[0040] A splitting module, used for receiving plug-in code information, and splitting the plug-in code information into plug-in logic information and plug-in panel information;
[0041] A generation module, used to obtain display information of the application software corresponding to the plug-in code information, and run the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display;
[0042] A rendering module is used to render the plug-in panel information based on the display information, and generate a plug-in interaction panel matching the display information for display.
[0043] Optionally, the display device of the plug-in interface further includes:
[0044] An acquisition module, configured to acquire the interaction information carried in the interaction request when an interaction request is received based on the plug-in interaction panel;
[0045] An updating module is used to update and display the interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information.
[0046] Optionally, the update module further includes:
[0047] a triggering unit, configured to trigger target logic information corresponding to the interaction information in the plug-in logic information based on an interaction interface corresponding to the plug-in logic information;
[0048] A configuration unit, configured to configure the interface information corresponding to the interaction information in the plug-in main interface according to the target logic information and the interaction information, and generate a configuration result;
[0049] An updating unit is used to update and display the interface information in the plug-in main interface based on the configuration result.
[0050] Optionally, the display device of the plug-in interface further includes:
[0051] A judgment module, used to obtain the information attribute of the interaction information and the attribute range of the interface information, and judge whether the information attribute is within the attribute range;
[0052] an execution module, configured to execute, if the interface is within the attribute range, a step of updating and displaying interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information;
[0053] The output module is used to output information abnormality prompt information if the information is not within the attribute range.
[0054] Optionally, the splitting module includes:
[0055] A splitting unit, used for separating logic information and panel information from the plug-in code information;
[0056] A conversion unit, used to convert the logic information based on a preset tool to generate plug-in logic information;
[0057] The cache unit is used to cache the panel information based on a preset platform and generate plug-in panel information of a preset data structure.
[0058] Optionally, the splitting module further includes:
[0059] A judging unit, configured to judge the validity of the logic information and the panel information according to the plug-in code information;
[0060] an execution unit, configured to execute a step of converting the logic information based on a preset tool if both the logic information and the panel information are valid;
[0061] The output unit is used to output separation invalid prompt information if the logic information and / or the panel information is invalid.
[0062] Optionally, the generating module further includes:
[0063] A loading unit, used to load the plug-in logic information and determine whether the plug-in logic information has been loaded, and if the loading is completed, run the plug-in logic information;
[0064] The rendering unit is used to render the interface generated by running the plug-in logic information based on the display information, and obtain the plug-in main interface matching the display information for display.
[0065] Optionally, the rendering module further includes:
[0066] A generating unit, configured to obtain an interactive area corresponding to the plug-in main interface, and based on the display information, render the plug-in panel information to generate a plug-in interactive panel matching the display information;
[0067] The display unit is used to display the plug-in interaction panel in the interaction area.
[0068] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a plug-in system, which includes a memory, a processor, and a plug-in interface display program stored in the memory and executable on the processor, and the plug-in interface display program, when executed by the processor, implements the steps of the plug-in interface display method as described above.
[0069] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a readable storage medium, on which a display program of a plug-in interface is stored, and when the display program of the plug-in interface is executed by a processor, the steps of the display method of the plug-in interface as described above are implemented.
[0070] The plug-in interface display method, device, plug-in system and readable storage medium of the present invention first receive plug-in code information, and split the plug-in code information into plug-in logic information and plug-in panel information; then obtain the display information of the application software required to be carried by the plug-in code information, and process the plug-in logic information and plug-in panel information respectively according to the display information, and generate a plug-in main interface and a plug-in interaction panel matching the display information for display. The present invention splits the plug-in code information used to realize the plug-in function into information for realizing the plug-in logic and information for realizing the plug-in panel, and forms the plug-in main interface of the plug-in function itself by the plug-in logic information, and forms the plug-in interaction panel for setting the attributes of the plug-in main interface by the plug-in panel information; and the plug-in main interface and the plug-in interaction panel are both generated by processing the display information of the application software required to be carried by the plug-in, and the display information represents the display style of the application software. Regardless of what kind of application software the plug-in carries, its display information is obtained to process the plug-in logic information and the plug-in panel information, so that the obtained plug-in main interface and the plug-in interaction panel are unified with the carried application software in display style. Therefore, it is conducive to the compatible display effect between the plug-in and different types of application software. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a schematic diagram of the structure of the hardware operating environment involved in the embodiment of the plug-in system of the present invention;
[0072] Figure 2 It is a flowchart of a first embodiment of a method for displaying a plug-in interface of the present invention;
[0073] Figure 3 It is a functional module diagram of a preferred embodiment of the display device of the plug-in interface of the present invention.
[0074] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0075] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0076] The present invention provides a plug-in system, referring to Figure 1 , Figure 1 It is a schematic diagram of the structure of the hardware operating environment involved in the embodiment of the plug-in system of the present invention.
[0077] like Figure 1 As shown, the plug-in system may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage plug-in system independent of the aforementioned processor 1001.
[0078] Those skilled in the art will understand that Figure 1 The hardware structure of the plug-in system shown in the figure does not constitute a limitation on the plug-in system, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0079] like Figure 1 As shown, the memory 1005 as a readable storage medium may include an operating system, a network communication module, a user interface module, and a display program of the plug-in interface. The operating system is a program for managing and controlling the hardware and software resources of the plug-in system, and supports the operation of the network communication module, the user interface module, the display program of the plug-in interface, and other programs or software; the network communication module is used to manage and control the network interface 1004; and the user interface module is used to manage and control the user interface 1003.
[0080] exist Figure 1 In the plug-in system hardware structure shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; the processor 1001 can call the display program of the plug-in interface stored in the memory 1005 and perform the following operations:
[0081] Receive plug-in code information, and split the plug-in code information into plug-in logic information and plug-in panel information;
[0082] Acquire display information of the application software corresponding to the plug-in code information, and run the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display;
[0083] Based on the display information, the plug-in panel information is rendered, and a plug-in interaction panel matching the display information is generated for display.
[0084] Further, after the step of generating a plug-in main interface and a plug-in interaction panel matching the display information for display, the processor 1001 may call a display program of the plug-in interface stored in the memory 1005, and perform the following operations:
[0085] When an interaction request is received based on the plug-in interaction panel, acquiring interaction information carried in the interaction request;
[0086] Based on the interaction information, the interface information corresponding to the interaction information in the main interface of the plug-in is updated and displayed.
[0087] Furthermore, the step of updating and displaying interface information corresponding to the interaction information in the plug-in main interface based on the interaction information includes:
[0088] Based on the interaction interface corresponding to the plug-in logic information, trigger the target logic information corresponding to the interaction information in the plug-in logic information;
[0089] According to the target logic information and the interaction information, the interface information corresponding to the interaction information in the main interface of the plug-in is configured to generate a configuration result;
[0090] The interface information is updated and displayed in the plug-in main interface based on the configuration result.
[0091] Further, before the step of updating and displaying the interface information corresponding to the interaction information in the plug-in main interface based on the interaction information, the processor 1001 may call a display program of the plug-in interface stored in the memory 1005, and perform the following operations:
[0092] Acquire the information attribute of the interaction information and the attribute range of the interface information, and determine whether the information attribute is within the attribute range;
[0093] If it is within the attribute range, executing the step of updating and displaying the interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information;
[0094] If it is not within the attribute range, an abnormal information prompt message is output.
[0095] Furthermore, the step of splitting the plug-in code information into plug-in logic information and plug-in panel information includes:
[0096] Separating logic information and panel information from the plug-in code information;
[0097] Convert the logic information based on a preset tool to generate plug-in logic information;
[0098] The panel information is cached based on a preset platform, and plug-in panel information of a preset data structure is generated.
[0099] Further, after the step of separating the logic information and the panel information from the plug-in code information, the processor 1001 may call a display program of the plug-in interface stored in the memory 1005, and perform the following operations:
[0100] According to the plug-in code information, determining the validity of the logic information and the panel information;
[0101] If both the logic information and the panel information are valid, executing the step of converting the logic information based on a preset tool;
[0102] If the logic information and / or the panel information is invalid, a separation invalid prompt message is output.
[0103] Furthermore, the step of running the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display includes:
[0104] Loading the plug-in logic information and determining whether the plug-in logic information has been loaded, and if loaded, running the plug-in logic information;
[0105] Based on the display information, the interface generated by running the plug-in logic information is rendered, and a plug-in main interface matching the display information is obtained for display.
[0106] Furthermore, the step of rendering the plug-in panel information based on the display information and generating a plug-in interaction panel matching the display information for display includes:
[0107] Acquire an interactive area corresponding to the plug-in main interface, and render the plug-in panel information based on the display information to generate a plug-in interactive panel matching the display information;
[0108] The plug-in interaction panel is displayed in the interaction area.
[0109] Further, after the step of splitting the plug-in code information into plug-in logic information and plug-in panel information, the processor 1001 may call a display program of a plug-in interface stored in the memory 1005, and perform the following operations:
[0110] The plug-in logic information and the plug-in panel information are converted into conversion information in binary format, and the conversion information is stored in a preset storage unit.
[0111] Further, before the step of splitting the plug-in code information into plug-in logic information and plug-in panel information, the processor 1001 may call a display program of a plug-in interface stored in the memory 1005, and perform the following operations:
[0112] Compile the plug-in code information, determine whether there is logic exception information in the plug-in code information, and if there is logic exception information, output logic exception prompt information;
[0113] If there is no logic exception information, the step of splitting the plug-in code information into plug-in logic information and plug-in panel information is performed.
[0114] The specific implementation of the plug-in system of the present invention is basically the same as the embodiments of the display method of the plug-in interface described below, and will not be described in detail here.
[0115] The invention also provides a method for displaying a plug-in interface.
[0116] Reference Figure 2 , Figure 2 It is a flowchart of the first embodiment of the method for displaying a plug-in interface of the present invention.
[0117] The embodiment of the present invention provides an embodiment of a method for displaying a plug-in interface. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here. Specifically, the method for displaying a plug-in interface in this embodiment includes:
[0118] Step S10, receiving plug-in code information, and splitting the plug-in code information into plug-in logic information and plug-in panel information;
[0119] The display method of the plug-in interface in this embodiment is applicable to the plug-in system, and the plug-in system is used to realize that the display style of the plug-in installed in various application software is consistent with the display style of various application software. Specifically, the developer develops the plug-in, forms plug-in code information and uploads it to the plug-in system; the plug-in system receives the plug-in code information and splits it into plug-in logic information and plug-in panel information. Among them, the plug-in logic information is the code used for logical processing when implementing the plug-in function, forming the plug-in main interface of the plug-in function itself; the plug-in panel information is formed as a plug-in interaction panel, which is used to set the properties of the plug-in main interface. In the process of loading the plug-in, various application software establishes a connection with the plug-in system, so that the plug-in main interface and the plug-in interaction panel are rendered according to the display style of the application software through the plug-in system, forming a plug-in interface that matches the display style of the application software.
[0120] Understandably, the plug-in code information is formed by the code written by the developer, which may contain errors and fail to realize the function of the plug-in. Therefore, in order to ensure the normal realization of the plug-in function, this embodiment is provided with a compilation mechanism before splitting the plug-in code information. Specifically, the step of splitting the plug-in code information into the plug-in logic information and the plug-in panel information includes:
[0121] Step a1, compile the plug-in code information, determine whether there is logic abnormality information in the plug-in code information, and if there is logic abnormality information, output logic abnormality prompt information;
[0122] Step a2: if there is no logic exception information, executing the step of splitting the plug-in code information into plug-in logic information and plug-in panel information.
[0123] Furthermore, after receiving the plug-in code information, the plug-in system stores it in the temporary queue unit as a code element, and processes each code element one by one according to the arrangement order of the code elements for implementing different plug-in functions stored in the temporary queue unit. When processing the plug-in code information, the compilation mechanism is started to compile the plug-in code information, and the compilation is used to detect whether there is logical abnormality information in the plug-in code information. In addition to the code that contains abnormalities in the logical processing process of implementing the plug-in function, the logical abnormality information may also contain code with formal problems, such as variables that are used without definition, local variables used as global variables, etc.
[0124] Furthermore, if it is determined that there is logic exception information in the plug-in code information, then logic exception prompt information is output for the code with logic exception in the plug-in code information; that is, the logic exception information is generated as logic exception prompt information output, so as to quickly locate the abnormal code and correct it according to the logic exception information carried in the logic exception prompt information. If it is determined that there is no logic exception information in the plug-in code information and there is no error code in the plug-in code information, the plug-in code information is split; it is split into plug-in logic information for realizing logical functions and plug-in panel information for realizing interactive functions.
[0125] Understandably, the plug-in logic information and plug-in panel information obtained after conversion may occupy a large storage space; in order to facilitate unified storage management, the plug-in system of this embodiment converts the split plug-in logic information and plug-in panel information and compresses and stores them. Specifically, the step of splitting the plug-in code information into the plug-in logic information and the plug-in panel information includes:
[0126] Step a3: convert the plug-in logic information and the plug-in panel information into conversion information in binary format, and store the conversion information in a preset storage unit.
[0127] Furthermore, the present embodiment uses the binary format as a unified storage format, converts the split plug-in logic information and plug-in panel information, and converts the two into conversion information in a binary format. The converted plug-in logic information and plug-in panel information independently form conversion information, that is, the conversion information contains independent converted plug-in logic information and converted plug-in panel information, and the two are not confused with each other in the conversion information. In addition, a preset storage unit is pre-set, and the conversion information is stored in the preset storage unit for forming the plug-in main interface and the plug-in interaction panel.
[0128] Step S20, obtaining display information of the application software corresponding to the plug-in code information, and running the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display;
[0129] It can be understood that the plug-in code information is used to form a plug-in to implement a certain function, and the application software implements the function in the application software by loading the plug-in. The application software that loads the plug-in is regarded as the application software corresponding to the plug-in code information, and the display information of the application software is obtained. The display information represents the display style of the application software, such as display color, display font, etc. Then, based on the display information, the plug-in logic information is controlled to run, and the plug-in main interface display of the plug-in function is generated. If the function of the plug-in is to display a map, a main interface displaying the map is generated for display. Moreover, the display style of the plug-in main interface matches the display information and is consistent with the display style of the application software. Specifically, the steps of running the plug-in logic information based on the display information and generating a plug-in main interface matching the display information for display include:
[0130] Step S21, loading the plug-in logic information, and determining whether the plug-in logic information is loaded, and if loaded, running the plug-in logic information;
[0131] Step S22: based on the display information, render the interface generated by running the plug-in logic information, and obtain the plug-in main interface matching the display information for display.
[0132] Furthermore, the plug-in logic information is stored in a preset storage unit, which is first loaded during operation, and whether the loading is completed is determined according to a preset waiting time. If the loading is completed, the loaded plug-in logic information is controlled to run. If the loading is not completed, it continues to wait for a period of time until it is determined that the plug-in logic information is loaded, and then the plug-in logic information is controlled to run.
[0133] It can be understood that the plug-in logic information generates an interface that reflects the plug-in function through operation, and the interface is rendered according to the display information; it is rendered into a style that matches the display information to be consistent with the display style between application software. The rendered interface forms the plug-in main interface, which is displayed to realize the plug-in function.
[0134] Step S30: Render the plug-in panel information based on the display information, and generate a plug-in interaction panel matching the display information for display.
[0135] Furthermore, the plug-in panel information is also rendered according to the display information to generate a plug-in interaction panel for setting the plug-in main interface properties. For plug-ins that implement different functions, there are different plug-in code information, so that the plug-in logic information and plug-in panel information obtained by splitting are also different, so that the different properties of the respective plug-in main interfaces can be configured through the plug-in interaction panels of each plug-in. For example, for the plug-in main interface that displays the map mentioned above, the content displayed by the plug-in interaction panel may include the center point coordinate position, viewing angle, etc., to set the display position of the map in the application software, as well as the display viewing angle of the map content, etc. The plug-in panel information is rendered through the display information, so that the generated plug-in interaction panel matches the display information, and the display style between the application software is consistent.
[0136] Furthermore, the step of rendering the plug-in panel information based on the display information and generating a plug-in interaction panel matching the display information for display includes:
[0137] Step S31, obtaining an interactive area corresponding to the plug-in main interface, and rendering the plug-in panel information based on the display information to generate a plug-in interactive panel matching the display information;
[0138] Step S32: displaying the plug-in interaction panel in the interaction area.
[0139] Furthermore, the plug-in interaction panel and the plug-in main interface can be displayed in different areas of the application software at the same time, so as to configure the properties of the plug-in main interface through the plug-in interaction panel. Specifically, the interactive area for displaying the plug-in interaction panel is set in the interface displayed by the application software for the plug-in main interface, such as setting it to the lower left corner or the upper right corner. In the process of rendering and generating the plug-in interaction panel, the set interactive area is obtained as the interactive area corresponding to the plug-in main interface. At the same time, the plug-in panel information is rendered through the display information to obtain a plug-in interaction interface that matches the display information. The plug-in interaction interface is displayed in the interactive area, so that the plug-in interaction panel and the plug-in main interface are displayed in different areas at the same time, and the properties of the plug-in main interface are configured. In addition, the plug-in interaction panel can be rendered and displayed, and the plug-in interaction panel display can be generated in the interactive area by drawing according to the plug-in panel information in the interactive area.
[0140] The plug-in interface display method of the present invention first receives plug-in code information, and splits the plug-in code information into plug-in logic information and plug-in panel information; then obtains the display information of the application software that the plug-in code information needs to carry, and processes the plug-in logic information and the plug-in panel information respectively according to the display information, and generates a plug-in main interface and a plug-in interaction panel matching the display information for display. The present invention splits the plug-in code information used to realize the plug-in function into information for realizing the plug-in logic and information for realizing the plug-in panel, forms the plug-in main interface of the plug-in function itself by the plug-in logic information, and forms the plug-in interaction panel for setting the attributes of the plug-in main interface by the plug-in panel information; and the plug-in main interface and the plug-in interaction panel are both generated by processing the display information of the application software that the plug-in needs to carry, and the display information characterizes the display style of the application software. Regardless of what kind of application software the plug-in carries, its display information is obtained to process the plug-in logic information and the plug-in panel information, so that the obtained plug-in main interface and the plug-in interaction panel are unified with the carried application software in display style. Therefore, it is conducive to the compatible display effect between the plug-in and different types of application software.
[0141] Furthermore, based on the first embodiment of the method for displaying a plug-in interface of the present invention, a second embodiment of the method for displaying a plug-in interface of the present invention is proposed.
[0142] The difference between the second embodiment of the method for displaying the plug-in interface and the first embodiment of the method for displaying the plug-in interface is that after the step of generating a plug-in main interface and a plug-in interaction panel matching the display information for display, the step includes:
[0143] Step S40, when an interaction request is received based on the plug-in interaction panel, acquiring interaction information carried in the interaction request;
[0144] Step S50: based on the interaction information, update and display the interface information corresponding to the interaction information in the main interface of the plug-in.
[0145] The configuration of the plug-in main interface properties by the plug-in interaction panel of this embodiment is implemented through an API (Application Programming Interface) that interacts with the plug-in system. Specifically, the plug-in interaction panel contains multiple contents that support settings, and each content can exist in the form of an input box, a drop-down box, an option, or a combination of an input box, a drop-down box, and an option. After selecting or entering the content to be set from the plug-in interaction panel, an interaction request is initiated. After receiving the interaction request initiated based on the plug-in interaction panel, the plug-in system obtains the interaction information carried in the interaction request. The interaction information includes the object to be set in the plug-in main interface and the content to be set for the object; therefore, the interface information corresponding to the interaction information in the plug-in main interface is searched, and the interface information is the object to be set. Then, according to the setting content in the interaction information, the interface information is updated through the API, and the interface information is updated to the setting content. Specifically, based on the interaction information, the step of updating and displaying the interface information corresponding to the interaction information in the plug-in main interface includes:
[0146] Step S51, based on the interaction interface corresponding to the plug-in logic information, triggering the target logic information corresponding to the interaction information in the plug-in logic information;
[0147] Step S52, configuring the interface information corresponding to the interaction information in the plug-in main interface according to the target logic information and the interaction information, and generating a configuration result;
[0148] Step S53: updating and displaying the interface information in the plug-in main interface based on the configuration result.
[0149] Furthermore, when the plug-in is running, the plug-in system injects an interactive API into the plug-in running environment. The interactive API is used to call the plug-in logic information to process the interactive information, so it is used as an interactive interface corresponding to the plug-in logic information. Through the interactive interface, the target logic information corresponding to the interactive information in the plug-in logic information is triggered, and the interactive information is processed by the target logic information. For example, the plug-in logic information contains information p1 and p2 for processing attributes a and attribute b of the plug-in main interface, and the interactive information configured through the plug-in interactive panel is to configure attribute b, so p2 is triggered as the target logic information corresponding to the interactive information through the interactive interface.
[0150] Furthermore, the interface information corresponding to the interactive information is searched in the main interface of the plug-in through the interactive information. If the interactive information is used to adjust the coordinate position of the center point, the position of the original center point in the main interface of the plug-in is searched as the interface information corresponding to the interactive information. Then, the interface information searched is adjusted according to the target logic information, and the interface information is adjusted to the interactive information to realize the configuration of the interface information. The interface information displayed in the main interface of the plug-in is updated through the configuration result generated by the configuration. For example, for the interactive information where the coordinate position of the center point is located, the position of the original center point is adjusted to the coordinate position of the center point in the interactive information to obtain the configuration result. Then, according to the configuration result, the displayed center position is adjusted to realize the update and display of the interface information corresponding to the interactive information.
[0151] Understandably, the attributes supported for configuration in the plug-in main interface are usually within a certain optional range, and the interactive information sent through the plug-in interactive panel needs to be within the optional range to support effective configuration. Therefore, based on the interactive information, the step of updating and displaying the interface information corresponding to the interactive information in the plug-in main interface includes:
[0152] Step b1, obtaining the information attribute of the interaction information and the attribute range of the interface information, and determining whether the information attribute is within the attribute range;
[0153] Step b2, if it is within the attribute range, executing the step of updating and displaying the interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information;
[0154] Step b3: if the attribute is not within the range, output an abnormal information prompt message.
[0155] Furthermore, after obtaining the interactive information from the interactive request parameters, the information attribute of the interactive information is obtained; the information attribute exists in the form of interactive information characteristic values, and varies according to the type of interactive information; if the interactive information is color, the information attribute is RGB three-channel color data, and if the interactive information is position, the information attribute is coordinate data. At the same time, the attribute range of the interface information corresponding to the interactive information is obtained, and the attribute range represents the range of settings supported by the interactive information. For example, for color information, the supported range is 0 to 255, and for position, the supported range is not more than the range displayed on the main interface of the plug-in, or the range area displayed by the display terminal.
[0156] Furthermore, the information attribute is compared with the attribute range to determine whether the information attribute is within the attribute range. If it is within the attribute range, it means that the interactive information is valid, so based on it, the interface information corresponding to the interactive information in the main interface of the plug-in is updated and displayed. If it is determined that the information attribute is not within the attribute range, it means that the interactive information is invalid, and an information abnormality prompt message is output to prompt the interactive information to be updated, so that the information attribute of the interactive information is within the attribute range to support effective configuration.
[0157] In this embodiment, an interaction request is triggered through the plug-in interaction panel, and the interface information in the plug-in main panel is set and updated through the interaction information carried in the interaction request, so that the content displayed in the plug-in main panel meets the display requirements. At the same time, the validity of the interaction information is determined to ensure that the content set in the plug-in main panel is effectively displayed.
[0158] Furthermore, based on the first or second embodiment of the method for displaying a plug-in interface of the present invention, a third embodiment of the method for displaying a plug-in interface of the present invention is proposed.
[0159] The third embodiment of the method for displaying a plug-in interface is different from the first or second embodiment of the method for displaying a plug-in interface in that the step of splitting the plug-in code information into plug-in logic information and plug-in panel information includes:
[0160] Step S11, separating logic information and panel information from the plug-in code information;
[0161] Step S12, converting the logic information based on a preset tool to generate plug-in logic information;
[0162] Step S13, caching the panel information based on a preset platform, and generating plug-in panel information of a preset data structure.
[0163] This embodiment splits the plug-in code information, and makes a validity judgment on the logic information and panel information obtained by the splitting. Specifically, the plug-in code information is split, and the logic information for realizing the logic function and the panel information for realizing the panel interaction function are separated therefrom. Then, the logic information is converted and processed by a pre-configured preset tool to obtain a more compatible information module, so as to be compatible with various types of application software. Among them, the preset tool is preferably a webpack tool. At the same time, the panel information is cached by a pre-configured preset platform to form plug-in panel information of a preset data structure. The preset platform is preferably a Node platform, and the preset data structure is preferably a json structure; the panel information is cached by the virtual machine function in the Node platform to generate plug-in panel information of a json structure. In this way, the plug-in code information is split into plug-in logic information and plug-in panel information.
[0164] Furthermore, considering that there may be uncertain factors in the process of splitting the plug-in code information into logic information and panel information, which may lead to errors in the split logic information and panel information, a verification mechanism for the logic information and panel information is set. Specifically, after the step of separating the logic information and panel information from the plug-in code information, the following steps are included:
[0165] Step c1, judging the validity of the logic information and the panel information according to the plug-in code information;
[0166] Step c2, if both the logic information and the panel information are valid, executing a step of converting the logic information based on a preset tool;
[0167] Step c3: if the logic information and / or the panel information is invalid, outputting a separation invalid prompt message.
[0168] Furthermore, after the plug-in code information is separated into logic information and panel information, the validity of the separated logic information and panel information is verified through the original plug-in code information to verify whether the logic information in the code plug-in information is completely separated, and whether the panel information therein is completely separated. If it is determined through verification that the logic information in the plug-in code information is completely separated, and the panel information therein is completely separated, then it is determined that both the logic information and the panel information are valid; the logic information can be converted into plug-in logic information through a preset tool, and the panel information can be cached as plug-in panel information of a preset data structure through a preset platform. On the contrary, if it is determined that any one of the logic information and the panel information is not completely separated, the other information may also be abnormal due to the influence of the incompletely separated information, so the logic information and / or the panel information is determined to be invalid, and a separation invalid prompt message is output at this time.
[0169] This implementation splits the plug-in code information into logic information and panel information, and after judging the split logic information and panel information as valid, generates the logic information and panel information into plug-in logic information and plug-in panel information respectively. By judging the validity, the correctness of the generated plug-in logic information and plug-in panel information is ensured, so as to accurately realize the logic function and panel interaction function of the plug-in.
[0170] The present invention also provides a display device for a plug-in interface. Figure 3 , the display device of the plug-in interface includes:
[0171] A splitting module, used for receiving plug-in code information, and splitting the plug-in code information into plug-in logic information and plug-in panel information;
[0172] A generation module, used to obtain display information of the application software corresponding to the plug-in code information, and run the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display;
[0173] A rendering module is used to render the plug-in panel information based on the display information, and generate a plug-in interaction panel matching the display information for display.
[0174] Furthermore, the display device of the plug-in interface also includes:
[0175] An acquisition module, configured to acquire the interaction information carried in the interaction request when an interaction request is received based on the plug-in interaction panel;
[0176] An updating module is used to update and display the interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information.
[0177] Furthermore, the update module further includes:
[0178] a triggering unit, configured to trigger target logic information corresponding to the interaction information in the plug-in logic information based on an interaction interface corresponding to the plug-in logic information;
[0179] A configuration unit, configured to configure the interface information corresponding to the interaction information in the plug-in main interface according to the target logic information and the interaction information, and generate a configuration result;
[0180] An updating unit is used to update and display the interface information in the plug-in main interface based on the configuration result.
[0181] Furthermore, the display device of the plug-in interface also includes:
[0182] A judgment module, used to obtain the information attribute of the interaction information and the attribute range of the interface information, and judge whether the information attribute is within the attribute range;
[0183] an execution module, configured to execute, if the interface is within the attribute range, a step of updating and displaying interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information;
[0184] The output module is used to output information abnormality prompt information if the information is not within the attribute range.
[0185] Furthermore, the splitting module includes:
[0186] A splitting unit, used for separating logic information and panel information from the plug-in code information;
[0187] A conversion unit, used to convert the logic information based on a preset tool to generate plug-in logic information;
[0188] The cache unit is used to cache the panel information based on a preset platform and generate plug-in panel information of a preset data structure.
[0189] Furthermore, the splitting module also includes:
[0190] A judging unit, configured to judge the validity of the logic information and the panel information according to the plug-in code information;
[0191] an execution unit, configured to execute a step of converting the logic information based on a preset tool if both the logic information and the panel information are valid;
[0192] The output unit is used to output separation invalid prompt information if the logic information and / or the panel information is invalid.
[0193] Furthermore, the generating module further includes:
[0194] A loading unit, used to load the plug-in logic information and determine whether the plug-in logic information has been loaded, and if the loading is completed, run the plug-in logic information;
[0195] The rendering unit is used to render the interface generated by running the plug-in logic information based on the display information, and obtain the plug-in main interface matching the display information for display.
[0196] Furthermore, the rendering module also includes:
[0197] A generating unit, configured to obtain an interactive area corresponding to the plug-in main interface, and based on the display information, render the plug-in panel information to generate a plug-in interactive panel matching the display information;
[0198] The display unit is used to display the plug-in interaction panel in the interaction area.
[0199] The specific implementation of the display device of the plug-in interface of the present invention is basically the same as the embodiments of the display method of the plug-in interface described above, and will not be described in detail here.
[0200] In addition, an embodiment of the present invention further provides a readable storage medium.
[0201] The readable storage medium stores a display program for the plug-in interface. When the display program for the plug-in interface is executed by the processor, the steps of the method for displaying the plug-in interface as described above are implemented.
[0202] The readable storage medium of the present invention may be a computer-readable storage medium, and its specific implementation is substantially the same as the above-mentioned embodiments of the display method of the plug-in interface, and will not be described in detail here.
[0203] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims. All equivalent structures or equivalent process changes made using the contents of the specification and drawings of the present invention, or directly or indirectly used in other related technical fields, are protected by the present invention.
Claims
1. A method for displaying a plug-in interface, characterized in that: The method for displaying the plug-in interface comprises the following steps: Receive plug-in code information, and split the plug-in code information into plug-in logic information and plug-in panel information, wherein the plug-in logic information is the code used for logic processing when implementing the plug-in function, forming a plug-in main interface for implementing the plug-in function, and the plug-in panel information forms a plug-in interaction panel for setting the properties of the plug-in main interface; Acquire display information of the application software corresponding to the plug-in code information, and run the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display; Based on the display information, the plug-in panel information is rendered to generate a plug-in interaction panel matching the display information for display; The step of rendering the plug-in panel information based on the display information and generating a plug-in interaction panel matching the display information for display comprises: Acquire an interactive area corresponding to the plug-in main interface, and render the plug-in panel information based on the display information to generate a plug-in interactive panel matching the display information; The plug-in interaction panel is displayed in the interaction area.
2. The method for displaying a plug-in interface according to claim 1, characterized in that: The step of generating a plug-in main interface and a plug-in interaction panel matching the display information for display includes: When an interaction request is received based on the plug-in interaction panel, acquiring interaction information carried in the interaction request; Based on the interaction information, the interface information corresponding to the interaction information in the main interface of the plug-in is updated and displayed.
3. The method for displaying a plug-in interface according to claim 2, wherein: The step of updating and displaying the interface information corresponding to the interaction information in the plug-in main interface based on the interaction information includes: Based on the interaction interface corresponding to the plug-in logic information, trigger the target logic information corresponding to the interaction information in the plug-in logic information; According to the target logic information and the interaction information, the interface information corresponding to the interaction information in the main interface of the plug-in is configured to generate a configuration result; The interface information is updated and displayed in the plug-in main interface based on the configuration result.
4. The method for displaying a plug-in interface according to claim 3, wherein: The step of updating and displaying the interface information corresponding to the interaction information in the plug-in main interface based on the interaction information includes: Acquire the information attribute of the interaction information and the attribute range of the interface information, and determine whether the information attribute is within the attribute range; If it is within the attribute range, executing the step of updating and displaying the interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information; If it is not within the attribute range, an abnormal information prompt message is output.
5. The method for displaying a plug-in interface according to claim 1, characterized in that: The step of splitting the plug-in code information into plug-in logic information and plug-in panel information comprises: Separating logic information and panel information from the plug-in code information; Convert the logic information based on a preset tool to generate plug-in logic information; The panel information is cached based on a preset platform, and plug-in panel information of a preset data structure is generated.
6. The method for displaying a plug-in interface according to claim 5, characterized in that: The step of separating the logic information and the panel information from the plug-in code information includes: judging the validity of the logic information and the panel information according to the plug-in code information; If both the logic information and the panel information are valid, executing the step of converting the logic information based on a preset tool; If the logic information and / or the panel information is invalid, a separation invalid prompt message is output.
7. The method for displaying a plug-in interface according to any one of claims 1 to 6, characterized in that: The step of running the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display includes: Loading the plug-in logic information and determining whether the plug-in logic information has been loaded, and if loaded, running the plug-in logic information; Based on the display information, the interface generated by running the plug-in logic information is rendered, and a plug-in main interface matching the display information is obtained for display.
8. The method for displaying a plug-in interface according to claim 1, wherein: The step of splitting the plug-in code information into plug-in logic information and plug-in panel information includes: The plug-in logic information and the plug-in panel information are converted into conversion information in binary format, and the conversion information is stored in a preset storage unit.
9. The method for displaying a plug-in interface according to claim 1, wherein: The step of splitting the plug-in code information into plug-in logic information and plug-in panel information includes: Compile the plug-in code information, determine whether there is logic exception information in the plug-in code information, and if there is logic exception information, output logic exception prompt information; If there is no logic exception information, the step of splitting the plug-in code information into plug-in logic information and plug-in panel information is performed.
10. A display device for a plug-in interface, characterized in that: The display device of the plug-in interface includes: A splitting module is used to receive plug-in code information and split the plug-in code information into plug-in logic information and plug-in panel information. The plug-in logic information is the code used for logic processing when implementing the plug-in function, forming the plug-in main interface for implementing the plug-in function. The plug-in panel information forms a plug-in interaction panel for setting the properties of the plug-in main interface. A generation module, used to obtain display information of the application software corresponding to the plug-in code information, and run the plug-in logic information based on the display information to generate a plug-in main interface matching the display information for display; A rendering module, used to render the plug-in panel information based on the display information, and generate a plug-in interaction panel matching the display information for display; The rendering module also includes: A generating unit, configured to obtain an interactive area corresponding to the plug-in main interface, and based on the display information, render the plug-in panel information to generate a plug-in interactive panel matching the display information; The display unit is used to display the plug-in interaction panel in the interaction area.
11. The display device for the plug-in interface according to claim 10, characterized in that: The display device of the plug-in interface also includes: An acquisition module, configured to acquire the interaction information carried in the interaction request when an interaction request is received based on the plug-in interaction panel; An updating module is used to update and display the interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information.
12. The display device for the plug-in interface according to claim 11, characterized in that: The update module also includes: a triggering unit, configured to trigger target logic information corresponding to the interaction information in the plug-in logic information based on an interaction interface corresponding to the plug-in logic information; A configuration unit, configured to configure the interface information corresponding to the interaction information in the plug-in main interface according to the target logic information and the interaction information, and generate a configuration result; An updating unit is used to update and display the interface information in the plug-in main interface based on the configuration result.
13. The display device for the plug-in interface according to claim 12, characterized in that: The display device of the plug-in interface also includes: A judgment module, used to obtain the information attribute of the interaction information and the attribute range of the interface information, and judge whether the information attribute is within the attribute range; an execution module, configured to execute, if the interface is within the attribute range, a step of updating and displaying interface information corresponding to the interaction information in the main interface of the plug-in based on the interaction information; The output module is used to output information abnormality prompt information if the information is not within the attribute range.
14. The display device for the plug-in interface according to claim 10, characterized in that: The splitting module comprises: A splitting unit, used for separating logic information and panel information from the plug-in code information; A conversion unit, used to convert the logic information based on a preset tool to generate plug-in logic information; The cache unit is used to cache the panel information based on a preset platform and generate plug-in panel information of a preset data structure.
15. The display device for the plug-in interface according to claim 14, characterized in that: The splitting module also includes: A judging unit, configured to judge the validity of the logic information and the panel information according to the plug-in code information; an execution unit, configured to execute a step of converting the logic information based on a preset tool if both the logic information and the panel information are valid; The output unit is used to output separation invalid prompt information if the logic information and / or the panel information is invalid.
16. The display device for a plug-in interface according to any one of claims 10 to 15, characterized in that: The generation module also includes: A loading unit, used to load the plug-in logic information and determine whether the plug-in logic information has been loaded, and if the loading is completed, run the plug-in logic information; The rendering unit is used to render the interface generated by running the plug-in logic information based on the display information, and obtain the plug-in main interface matching the display information for display.
17. A plug-in system, characterized in that: The plug-in system includes a memory, a processor, and a display program for the plug-in interface stored in the memory and executable on the processor. When the display program for the plug-in interface is executed by the processor, the steps of the method for displaying the plug-in interface as described in any one of claims 1 to 9 are implemented.
18. A readable storage medium, characterized in that: The readable storage medium stores a plug-in interface display program, and when the plug-in interface display program is executed by a processor, the steps of the plug-in interface display method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Information processing apparatus and plug-in interaction method
CN102135909A
Information processing method and device, electronic equipment and readable storage medium
CN111625379A