Method for dynamically adjusting menu content by plug-in

The method of dynamically adjusting menu content through plug-ins solves the flexibility and scalability problems of static configuration of menu content and template generation methods, realizes flexible adjustment and personalized display of menu content, and improves the maintainability and user experience of the software system.

CN118733138BActive Publication Date: 2025-10-24HANGZHOU ARCVIDEO TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410646463.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2025-10-24
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

In the existing technology, the static configuration and template generation methods of menu content lack flexibility and scalability. The initial attempts at plug-in technology have problems such as low integration between the plug-in and the main program and poor collaborative work, which makes it difficult to achieve the ideal effect of menu adjustment.

Method used

A plug-in method is used to dynamically adjust the menu content. By defining a unified plug-in interface and a technical interface defined by the menu standard, the menu content is realized. The development and display of the menu content are realized, including defining the interface and data. Through the defined technical solution, including defining a unified plug-in interface and menu standards, developing and registering plug-ins, loading and collecting menu content, merging, filtering and displaying, realizing the interface and data, through the defined technical interface, realizing the interface and data, through defining a unified plug-in interface and menu standards, developing and registering plug-ins, loading and collecting menu content, merging, filtering and sorting, passing it to the front-end rendering and display, and triggering the back-end service logic.

Benefits of technology

It improves the flexibility and scalability of the software system, simplifies the adjustment and maintenance process of menu content, provides a personalized user experience, and enhances user satisfaction and the market competitiveness of the software system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733138B_ABST
    Figure CN118733138B_ABST
Patent Text Reader

Abstract

The application discloses a kind of plug-in dynamic adjustment menu content method, applied to including access client, main program and several plug-in plug-in dynamic adjustment menu content system, comprising the following steps: S10, define uniform plug-in interface and menu standard;S20, development and registration plug-in, plug-in is generated according to uniform interface and standard and logic processing of menu content;Main program is according to the format of module definition defined by menu standard definition realizes the declaration of its menu information;S30, in main program, load registered plug-in, and collect the menu content provided by plug-in;S40, according to the rules of pre-set, the collected menu content is merged, filtered and sorted;S50, main program and plug-in will the menu content after processing be passed to front end and be rendered and shown;S60, when user is through access client and interacts with menu item, trigger corresponding back-end service logic.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computer software, and specifically relates to a method for dynamically adjusting menu content through plug-in. BACKGROUND

[0002] With the rapid development of information technology, computer software has become an indispensable tool in various industries. In the user interface of computer software, menu as an important entrance for user interaction with software, its design and functionality richness directly affect the user experience and software usability. However, the traditional menu design often uses hard-coded way, and the modification and adjustment of menu content need to modify the source code directly, which not only increases the development difficulty, but also limits the flexibility and scalability of software system.

[0003] In recent years, with the continuous progress of software technology and the continuous change of user demand, plug-in technology has gradually become a popular trend in software development. Plug-in technology modularizes software functions, allowing developers or third parties to extend and customize software system functions by writing plug-ins. This technology makes it possible to dynamically adjust menu content, making the menu interface of software system more flexible and personalized.

[0004] In the prior art, the following methods are usually used: (1) Static menu configuration technology: Currently, many software systems still use static menu configuration technology. This technology usually defines menu content in configuration files, and adjusts menu content by modifying configuration files. Although this method is relatively simple, it lacks flexibility and scalability. Once the menu content needs to be modified, the configuration file needs to be re-edited and the software system needs to be redeployed, which is impractical for large and complex software systems. (2) Template-based menu generation technology: Some software systems use template-based menu generation technology to generate menu interfaces by defining templates. This method can generate different menu styles according to different templates, but modifying menu content still requires modifying template files, and for complex menu structures, template writing and maintenance will become quite complex. (3) Preliminary attempt of plug-in menu technology: In recent years, a few software systems have begun to try to use plug-in technology to achieve dynamic adjustment of menu. These systems define plug-in interfaces to allow developers to write plug-ins to extend menu content. However, these preliminary attempts often have some problems, such as low integration of plug-ins with the main program, and not smooth collaboration between plug-ins, which makes it difficult to achieve ideal results in actual application. SUMMARY

[0005] In view of the above problems, the present application provides a method for dynamically adjusting menu content through plug-in.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] A plug-in method for dynamically adjusting menu content is applied to a system including an access client, a main program, and several plug-ins for dynamically adjusting menu content. The system principle block diagram is shown in Figure 2 As shown, the following steps are included:

[0008] S10, define a unified plug-in interface and menu standard;

[0009] S20, develop and register plug-ins, which implement the generation and logical processing of menu content according to unified interfaces and standards; the main program implements its own menu information declaration according to the format defined by the menu standard definition module;

[0010] S30, loading the registered plug-in in the main program and collecting the menu content provided by the plug-in;

[0011] S40, merging, filtering and sorting the collected menu contents according to preset rules;

[0012] S50, the main program and plug-in pass the processed menu content to the front end for rendering and display;

[0013] S60: When the user interacts with the menu item by accessing the client, the corresponding backend service logic is triggered.

[0014] In one possible implementation, the definition of a unified plug-in interface and menu standard in S10 includes: setting a menu standard definition module on the main program, the menu standard definition module is used to define interface standards and data standards, wherein the interface standard is used for the current module to call a unified interface to obtain all menu implementations including the main program; the data standard is used to define the standard format of menu information, ensuring that all plug-ins and main programs declare menu information in a unified format, and the menu information includes menu ID, name, link, icon and permission identifier.

[0015] In one possible implementation method, the main program in S20 implements its own menu information declaration according to the format defined by the menu standard definition module, including: setting the main program to include a main program menu standard implementation module, wherein the main program includes a menu standard implementation module, which is the main program implementing its own menu information declaration according to the format defined by the menu standard definition module.

[0016] In one possible implementation, the plug-in in S20 implements the generation and logical processing of menu content according to a unified interface and standard, including: setting the plug-in to include a plug-in menu standard implementation module, the menu standard implementation module is the plug-in implementing its own menu information declaration according to the format defined by the main program menu standard definition module.

[0017] In a possible implementation, the collecting menu content provided by the plug-ins in S30 comprises: setting a menu collecting module in the host program, and the menu collecting module is configured to collect menu information of all plug-ins and the host program itself.

[0018] In a possible implementation, the merging the collected menu content according to the preset rule in S40 comprises: setting a menu merging module in the host program, and the menu merging module is configured to receive menu information of all plug-ins and the host program itself, and perform merging processing according to menu IDs.

[0019] In a possible implementation, the filtering the collected menu content according to the preset rule in S40 comprises: setting a menu filtering module in the host program, and the menu filtering module is configured to perform filtering and sorting processing on the merged menu information based on permission identifiers in the menu data standard according to user permissions and system configurations.

[0020] In a possible implementation, in S50, the host program and the plug-ins deliver the processed menu content to the front end for rendering and display, which comprises: setting a host program front-end resource rendering module in the host program, and the host program front-end resource rendering module is configured to generate resources required by the front end for rendering according to the host program menu information after filtering and sorting.

[0021] In a possible implementation, in S50, the host program and the plug-ins deliver the processed menu content to the front end for rendering and display, which comprises: setting a plug-in front-end resource rendering module in the plug-in, and the plug-in front-end resource rendering module is configured to generate resources required by the front end for rendering according to the plug-in menu information after filtering and sorting.

[0022] In a possible implementation, the resources required by the front end for rendering are VUE front-end resources, and the link in the menu data standard is a VUE file link of the current module.

[0023] The application has the following advantages:

[0024] (1) Improving the flexibility and scalability of the software system: through the plug-in technology, the developer or the third party can extend and customize the menu content of the software system without modifying the host program code. The software system can be more flexible to adapt to different user needs and use scenarios, and the scalability of the system is improved.

[0025] (2) Simplifying the adjustment and maintenance process of the menu content: the traditional adjustment of the menu content usually involves modifying the source code and redeploying the software system, which is complicated and prone to errors. The plug-in mechanism is used in the embodiment of the application to simplify the adjustment and maintenance process of the menu content, and the developer only needs to write plug-ins to realize the dynamic adjustment of the menu content, thereby reducing the maintenance cost.

[0026] (3) Provide personalized user experience: By dynamically adjusting menu content through plug-ins, a personalized menu interface can be customized according to user preferences and habits. This not only improves user satisfaction and loyalty, but also helps to enhance the market competitiveness of the software system. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A flowchart of the steps of a plug-in method for dynamically adjusting menu content according to an embodiment of the present invention;

[0028] Figure 2 This is a principle block diagram of a system for dynamically adjusting menu content using a plug-in in a method for dynamically adjusting menu content using a plug-in according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0030] See also Figure 1 , shown is a flowchart of the steps of a plug-in method for dynamically adjusting menu content according to an embodiment of the present invention, which is applied to a system for dynamically adjusting menu content according to a plug-in, including an access client, a main program, and several plug-ins. The access client is responsible for triggering calls and rendering effects; the main program includes submodules such as a menu collection module, a menu standard definition module, a menu merging module, a menu filtering module, a main program menu standard implementation module, a main program front-end resource rendering module, and a main program back-end service logic module; the plug-in includes submodules such as a plug-in menu standard implementation module, a menu front-end resource rendering module, and a menu back-end service logic module, including the following steps:

[0031] S10, define a unified plug-in interface and menu standard;

[0032] S20, develop and register plug-ins, which implement the generation and logical processing of menu content according to unified interfaces and standards; the main program implements its own menu information declaration according to the format defined by the menu standard definition module;

[0033] S30, loading the registered plug-in in the main program and collecting the menu content provided by the plug-in;

[0034] S40, merging, filtering and sorting the collected menu contents according to preset rules;

[0035] S50, the main program and the plug-in pass the processed menu content to the front end for rendering and display;

[0036] S60, when the user interacts with the menu item through the access client, the corresponding back-end service logic is triggered.

[0037] In another embodiment of the present application, a method for plug-in dynamic adjustment of menu content is provided, and the definition of the unified plug-in interface and the menu standard in S10 comprises: setting a menu standard definition module on the main program, which is used to define an interface standard and a data standard, wherein the interface standard is used to enable the current module to call the unified interface to obtain all menu implementations including the main program, and the data standard is used to define a standard format of menu information, so as to ensure that all plug-ins and the main program declare the menu information according to the unified format, and the menu information comprises a menu ID, a name, a link, an icon and a permission identifier. In the embodiment of the present application, the plug-in rewrites the menu content of the main program or other plug-ins through the menu ID. Specifically, when the plug-in declares the menu, if the ID of a certain menu is the same as the menu ID already existing in the main program or other plug-ins, the menu content of the plug-in will cover the original menu content. In this way, the developer can easily extend or modify the menu content without modifying the code of the main program.

[0038] In another embodiment of the present application, a method for plug-in dynamic adjustment of menu content is provided, and the implementation of the menu information declaration of the main program according to the format defined by the menu standard definition module in S20 comprises: setting a main program menu standard implementation module on the main program, which is used to enable the main program to implement the menu information declaration according to the format defined by the menu standard definition module, that is, to first implement the interface standard and then respond according to the data standard. Meanwhile, the plug-in generates and processes the menu content according to the unified interface and standard, which comprises: setting a plug-in menu standard implementation module on the plug-in, which is used to enable the plug-in to implement the menu information declaration according to the format defined by the main program menu standard definition module. That is, to first implement the interface standard and then respond according to the data standard. If the menu content of the main program or other plug-ins is to be rewritten, only the menu ID needs to be set as the menu ID of the main program or other plug-ins, and in addition, the priority or rewriting rule of the plug-in can be specified through a configuration file or an annotation. For example, a priority value can be allocated to each plug-in, and when multiple plug-ins rewrite the same menu, the plug-in with a higher priority will cover the plug-in with a lower priority. In addition, a specific rewriting rule can be defined, such as allowing a certain plug-in to completely rewrite the menu content of other plug-ins or allowing only the value of a specific attribute to be modified.

[0039] The method for dynamically adjusting menu content by plug-in in another embodiment of the application comprises the following steps: S30, collecting menu content provided by the plug-in comprises: setting a menu collection module in the main program, and the menu collection module is used for collecting menu information of all plug-ins and the main program itself; in order to facilitate rendering of the menu link, the VUE component remote loading principle is adopted, that is, the menu link is taken as a source, and the content thereof is dynamically rendered to a fixed interface, for example, the left side of a commonly used system is a menu, and the right side is a fixed display interface, so that the front-end single-page effect is realized. VUE is a JavaScript framework for building user interfaces. It is built on standard HTML, CSS and JavaScript, and provides a declarative and component-based programming model, which can efficiently develop user interfaces.

[0040] The method for dynamically adjusting menu content by plug-in in another embodiment of the application comprises the following steps: S40, merging the collected menu content according to a preset rule comprises: setting a menu merging module in the main program, and the menu merging module is used for receiving menu information of all plug-ins and the main program itself, and performing merging processing according to menu IDs. For example, if a plurality of menus have the same ID, the final menu content is determined according to the priority of the plug-in or a specific rewriting rule.

[0041] The method for dynamically adjusting menu content by plug-in in another embodiment of the application comprises the following steps: S40, filtering the collected menu content according to a preset rule comprises: setting a menu filtering module in the main program, and the menu filtering module is used for performing screening and sorting processing on the merged menu information based on the permission identifier in the menu data standard according to user permissions and system configurations. Only the menu meeting the permission requirement can be displayed to the user.

[0042] The method for dynamically adjusting menu content by plug-in in another embodiment of the application comprises the following steps: S50, the main program and the plug-in deliver the processed menu content to the front end for rendering and display comprises: setting a main program front-end resource rendering module in the main program, and the main program front-end resource rendering module is used for generating resources required by front-end rendering according to the main program menu information after screening and sorting; meanwhile, setting a plug-in front-end resource rendering module in the plug-in, and the plug-in front-end resource rendering module is used for generating resources required by front-end rendering according to the plug-in menu information after screening and sorting. The resources required by front-end rendering are VUE front-end resources, and the link in the menu data standard is a VUE file link of the current module.

[0043] The method for dynamically adjusting menu content by plug-in in another embodiment of the application, the triggering of the corresponding back-end service logic in S60 includes setting the main program to include a main program back-end service logic module, and the main program back-end service logic module processes the back-end service logic related to the menu according to the screened and sorted main program menu information, such as permission verification and data interaction. Meanwhile, the plug-in is set to include a plug-in back-end service logic module, and the plug-in back-end service logic module processes the back-end service logic related to the menu according to the screened and sorted plug-in menu information, such as permission verification and data interaction.

[0044] Through the method for dynamically adjusting menu content by plug-in, the access client is mainly used for triggering the call and rendering effect, and the access client sends a call request to the main program. After the main program processes the request, the corresponding menu content is returned to the access client. The access client renders according to the returned menu content and displays it to the user. The main program is responsible for providing the menu content to the access client and collecting and processing the related menu data, and is the main functional module for realizing the embodiment of the application. The plug-in is responsible for providing the menu data according to the main program menu standard, and the plug-in and the main program use the same running body and are realized by different loading methods, for example, the same JVM environment is used in the java language, different ClassLoader is used to load the related code, the menu standard interface is shared in different ClassLoader, and the plug-in is the basis for realizing the dynamic of the whole embodiment of the application.

[0045] When the operation of the access client is to access the homepage, the main program loads the plug-in menu and itself, merges and filters the menu, and returns the corresponding menu list to the access client; when the operation of the access client is to access the menu content of the main program, the internal interface logic of the main program is executed, the content is rendered, and the corresponding main program menu content is returned to the client; when the operation of the access client is to access the menu content provided by the plug-in, the main program is forwarded to the corresponding plug-in, the internal interface logic of the corresponding plug-in is executed, the content is rendered, and the corresponding plug-in menu content is returned to the client.

[0046] Through the above description, through the method for dynamically adjusting menu content by plug-in, the developer can more flexibly expand and modify the menu content, and the maintainability and scalability of the software system are improved. Meanwhile, since the plug-in architecture is adopted, different teams or developers can independently develop the plug-in, and the decoupling and reuse of the function are realized.

[0047] It is to be understood that the example embodiments described herein are illustrative rather than limiting. Although one or more embodiments of the application are described in connection with the accompanying drawings, it will be understood that various modifications in form and detail can be made without departing from the spirit and scope of the application as defined by the appended claims.

Claims

1. A method of plug-in dynamic adjustment of menu content, characterized by, The application is applied to a plug-inized dynamic adjustment menu content system including an access client, a main program and several plug-ins, and comprises the following steps: S10, defining a unified plug-in interface and menu standard; S20, developing and registering plug-ins, the plug-ins generating and logically processing menu content according to the unified interface and standard, and the main program realizing its own menu information declaration in the format defined by the menu standard definition module; S30, loading the registered plug-ins in the main program and collecting the menu content provided by the plug-ins; S40, merging, filtering and sorting the collected menu content according to preset rules; S50, the main program and the plug-ins delivering the processed menu content to the front end for rendering and display; S60, when the user interacts with the menu items through the access client, triggering corresponding back-end service logic; S10 comprises the following steps: setting a menu standard definition module on the main program, the menu standard definition module being used for defining interface standards and data standards, wherein the interface standards are used for the current module to call the unified interface to obtain all menu implementations including the main program, and the data standards are used for defining the standard format of menu information, ensuring that all plug-ins and the main program declare the menu information in a unified format, and the menu information comprises a menu ID, a name, a link, an icon and a permission identifier. 2.The method of dynamically adjusting menu content with plug-ins of claim 1, wherein, S20 comprises the following steps: setting a main program menu standard implementation module on the main program, the main program menu standard implementation module being the format defined by the menu standard definition module, and realizing the declaration of its own menu information. 3.The method of claim 1, wherein, S20 comprises the following steps: setting a main program menu standard implementation module on the main program, the main program menu standard implementation module being the format defined by the menu standard definition module, and realizing the declaration of its own menu information.

4. The method of dynamically adjusting menu contents with plug-ins of claim 1, wherein, S30 comprises the following steps: setting a menu collection module on the main program, the menu collection module being used for collecting the menu information of all plug-ins and the main program itself. 5.The method of dynamically adjusting menu content with plug-ins of claim 1, wherein, S40 comprises the following steps: setting a menu merging module on the main program, the menu merging module being used for receiving the menu information of all plug-ins and the main program itself, and performing merging processing according to the menu ID. 6.The method of dynamically adjusting menu content with plug-ins of claim 1, wherein, S40 comprises the following steps: setting a menu filtering module on the main program, the menu filtering module being used for screening and sorting the menu information according to the user permission and system configuration based on the permission identifier in the menu data standard.

7. The method of dynamically adjusting menu contents with plug-ins of claim 1, wherein, S50 comprises the following steps: setting a main program front-end resource rendering module on the main program, the main program front-end resource rendering module being used for generating the resources required by the front end for rendering according to the screened and sorted main program menu information. 8.The method of dynamically adjusting menu content with plug-ins of claim 1, wherein, S50, the main program and the plug-in pass the processed menu content to the front end for rendering and display, including: setting the plug-in to include a plug-in front-end resource rendering module, the plug-in front-end resource rendering module is used to generate the resources required for front-end rendering according to the sorted plug-in menu information.

9. The method of dynamically adjusting menu contents with plug-ins of claim 7, wherein, The generated resources required for front-end rendering adopt VUE front-end resources, and the link in the menu data standard is the VUE file link of the main program front-end resource rendering module.

10. The method of dynamically adjusting menu contents with plug-ins of claim 8, wherein, The generated resources required for front-end rendering adopt VUE front-end resources, and the link in the menu data standard is the VUE file link of the plug-in front-end resource rendering module.

Citation Information

Patent Citations

  • Information processing apparatus, control method, and program

    EP2241967A2

  • Information processing apparatus, menu screen controlling method, and menu screen controlling program

    US20090031252A1