CN114385672A - Information processing method and device, electronic device and storage medium - Google Patents

Information processing method and device, electronic device and storage medium Download PDF

Info

Publication number
CN114385672A
CN114385672A CN202111614846.0A CN202111614846A CN114385672A CN 114385672 A CN114385672 A CN 114385672A CN 202111614846 A CN202111614846 A CN 202111614846A CN 114385672 A CN114385672 A CN 114385672A
Authority
CN
China
Prior art keywords
menu
configuration data
page
group
current user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111614846.0A
Other languages
Chinese (zh)
Inventor
陈俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Easylinkin Technology Co ltd
Original Assignee
Wuhan Easylinkin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Easylinkin Technology Co ltd filed Critical Wuhan Easylinkin Technology Co ltd
Priority to CN202111614846.0A priority Critical patent/CN114385672A/en
Publication of CN114385672A publication Critical patent/CN114385672A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses an information processing method and device, electronic equipment and a storage medium, wherein the information processing method comprises the following steps: inquiring menu configuration data corresponding to the current user identity information ID; generating a menu group based on the menu configuration data; establishing a mapping relation between the menu group and at least one preset page; and binding the mapping relation and the current user ID, wherein the bound mapping relation is used for displaying the preset page associated with the mapping relation bound by the current user ID when a display instruction that the current user ID acts on the menu group is received. Therefore, through the menu configuration data and the mapping relation bound with the user ID, the personalized menu and the corresponding relation between the personalized menu and the page can be provided for the user, and different menu functions can be provided for different users.

Description

Information processing method and device, electronic device and storage medium
Technical Field
The invention relates to the field of internet of things, in particular to an information processing method and device, electronic equipment and a storage medium.
Background
At present, in most internet of things system platforms, especially in internet of things Software as a Service (SaaS) application system Software, the definition of a menu is basically fixed during system development, and one page corresponds to one menu. Moreover, the hierarchical structure of menus such as parent-child menus and the like is already determined, and the application system cannot be changed any more during running.
For the general menu implementation method, as shown in fig. 1, an application developer stores a menu authority table in a database, loads the menu authority table at the front end of an application to display a page, and plans and designs a menu composition of an internet of things application during product definition, including a menu name, a menu icon, a hierarchical structure between menus, and the like. After the design is completed, the front-end developer will develop a corresponding front-end page, and fixedly write the menu identifier of the page and the like in the code. After the development and online of application products are completed, a user of the system logs in a menu seen by the application of the internet of things, the menu is a subset of all default menu trees of the system, and the name of the menu, the sequence of the menus and the hierarchical structure of the menus are not changed. Therefore, for different users of the application system of the internet of things, personalized menu function requirements cannot be met.
Disclosure of Invention
In view of this, embodiments of the present invention provide an information processing method and apparatus, an electronic device, and a storage medium.
The technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an information processing method, where the method includes:
inquiring menu configuration data corresponding to the current user identity information ID;
generating a menu group based on the menu configuration data;
establishing a mapping relation between the menu group and at least one preset page;
and binding the mapping relation and the current user ID, wherein the bound mapping relation is used for displaying the preset page associated with the mapping relation bound by the current user ID when a display instruction that the current user ID acts on the menu group is received.
Further, the method further comprises:
generating a page identification group according to the page identification of at least one preset page;
the establishing of the mapping relationship between the menu group and at least one preset page comprises the following steps:
and establishing a mapping relation between the menu group and the page identification group.
Further, the page identifications of the at least one preset page are at the same level.
Further, the generating a menu group based on the menu configuration data includes:
determining the corresponding relation between a parent menu and a sub-menu and the priority sequence between a plurality of sub-menus corresponding to each parent menu based on the menu configuration data;
and generating a menu group based on the corresponding relation and the priority order.
Further, the determining, based on the menu configuration data, a correspondence between a parent menu and a sub-menu and a priority order between a plurality of sub-menus corresponding to each parent menu includes:
determining the corresponding relation between a parent menu and a sub-menu according to the parent menu ID recorded in the menu configuration data of each menu;
and determining the priority sequence among a plurality of submenus corresponding to each parent menu according to the menu level information recorded in the menu configuration data.
Further, the method further comprises:
if the menu configuration data are inquired and an updating instruction from the current user ID is detected, modifying the menu configuration data based on the updating instruction;
alternatively, the first and second electrodes may be,
and if the menu configuration data is not inquired and a creation instruction from the current user ID is detected, establishing the menu configuration data based on the creation instruction.
In a second aspect, an embodiment of the present invention provides an information processing apparatus, including:
the query unit is used for querying menu configuration data corresponding to the current user identity information ID;
a generating unit configured to generate a menu group based on the menu configuration data;
the establishing unit is used for establishing a mapping relation between the menu group and at least one preset page;
and the binding unit is used for binding the mapping relation and the current user ID, wherein the bound mapping relation is used for displaying the preset page associated with the mapping relation bound by the current user ID when a display instruction that the current user ID acts on the menu group is received.
Further, the apparatus further comprises:
the identification unit is used for generating a page identification group according to the page identification of at least one preset page;
the establishing unit is specifically configured to:
and establishing a mapping relation between the menu group and the page identification group.
Further, the page identifications of the at least one preset page are at the same level.
Further, the generating unit is specifically configured to:
determining the corresponding relation between a parent menu and a sub-menu and the priority sequence between a plurality of sub-menus corresponding to each parent menu based on the menu configuration data;
and generating a menu group based on the corresponding relation and the priority order.
Further, the generating unit is specifically configured to:
determining the corresponding relation between a parent menu and a sub-menu according to the parent menu ID recorded in the menu configuration data of each menu;
and determining the priority sequence among a plurality of submenus corresponding to each parent menu according to the menu level information recorded in the menu configuration data.
Further, the apparatus further comprises:
the configuration unit is used for modifying the menu configuration data based on the update instruction if the menu configuration data is inquired and the update instruction from the current user ID is detected; or if the menu configuration data is not inquired and a creation instruction from the current user ID is detected, establishing the menu configuration data based on the creation instruction.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: a processor and a memory for storing a computer program capable of running on the processor;
the processor, when running said computer program, performs the steps of one or more of the preceding claims.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions; the computer-executable instructions, when executed by a processor, are capable of implementing the methods described in one or more of the preceding claims.
The information processing method provided by the invention comprises the following steps: inquiring menu configuration data corresponding to the current user identity information ID; generating a menu group based on the menu configuration data; establishing a mapping relation between the menu group and at least one preset page; and binding the mapping relation and the current user ID, wherein the bound mapping relation is used for displaying the preset page associated with the mapping relation bound by the current user ID when a display instruction that the current user ID acts on the menu group is received. Therefore, based on the menu configuration data matched by the user ID, the generated mapping relation between the menu group and the preset page can represent the personalized setting of the user, so that the personalized menu function and the page display function can be provided for the corresponding user after the menu group is bound with the user ID, and the richness and diversity of the menu function of the user are improved.
Drawings
FIG. 1 is a flow chart illustrating a method for implementing a menu function in the related art;
FIG. 2 is a flowchart illustrating an information processing method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a page identifier group according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a mapping relationship between a page and a menu according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of displaying a personalized menu according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where appropriate, to enable embodiments of the invention described herein to be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
As shown in fig. 2, an embodiment of the present invention provides an information processing method, including:
s110: inquiring menu configuration data corresponding to the current user identity information ID;
s120: generating a menu group based on the menu configuration data;
s130: establishing a mapping relation between the menu group and at least one preset page;
s140: and binding the mapping relation and the current user ID, wherein the bound mapping relation is used for displaying the preset page associated with the mapping relation bound by the current user ID when a display instruction that the current user ID acts on the menu group is received.
In the embodiment of the present invention, the menu configuration data is content such as configuration parameters required for generating the menu, and may include at least one of an Identity Information (ID) of a unique identifier of the menu, a menu name, icon data, a sorting level of a sub-menu, a permission identifier, an identifier of an associated page path, an ID of a parent menu, and the like, for example.
Here, the menu configuration data may be saved in the form of JS Object Notation (JSON) array data or the like. The menu can be used for showing on a user interface, such as a navigation bar and the like, and a page matched with the menu is displayed based on a display instruction, such as a clicking operation and the like, acting on the menu.
In one embodiment, generating a menu group based on the menu configuration data may include: generating at least one menu based on the menu configuration data; a menu group is generated based on the at least one menu. Since the menu configuration data includes configuration parameters, definition contents, and the like necessary for generating a menu, a menu corresponding to a user ID can be generated based on the menu configuration data corresponding to the user ID.
In another embodiment, the menu configuration data may be created by the current user, or generated by personalized modification based on the default menu configuration data of the system. Further, generating a menu group based on the menu configuration data may include: if the menu configuration data corresponding to the current user ID is not inquired, acquiring default menu configuration data of the system, and generating a menu group based on the default menu configuration data of the system; and/or outputting a prompt message. The prompt information is used for prompting whether to create personalized menu configuration data. And if the confirmation feedback aiming at the prompt information is received, entering a generation process of creating menu configuration data bound with the current user ID.
In one embodiment, establishing a mapping relationship between the menu group and the at least one preset page may include establishing a mapping relationship between at least one menu in the menu group and the at least one preset page. For example, the mapping relationship between the menus in the menu group and the preset page may be established according to the page information or the content to be displayed corresponding to each menu recorded in the menu configuration data.
In one embodiment, the menu configuration data further records a display order between at least one preset page to be displayed and/or a display item to be displayed and/or a hidden display item on each page to be displayed. The display order may be determined by a priority order between menus corresponding to the preset pages, and/or a display hierarchy relationship and/or a display jump relationship of the preset pages. For example, the display hierarchical relationship may be embodied by a parent page and a child page between preset pages to be displayed, or the display jump relationship may be embodied by a jump term or a link between two preset pages. In addition, the menu configuration data can also configure a plurality of preset pages to be displayed simultaneously, or the pages without parent-child relationship are sequentially displayed in sequence, and the like.
In another embodiment, the binding mapping relationship and the current user ID may be a mapping relationship recorded in a storage location corresponding to the current user ID, for example, may be stored in a database of the current user ID together with the menu configuration data.
When a display instruction which is sent by the current user ID and acts on the menu group is received, the mapping relation bound by the current user ID can be read, and the corresponding preset page is matched from the mapping relation for displaying based on the menu indicated by the display instruction.
In another embodiment, after the mapping relationship is bound to the current user ID, before the menu in the menu group is displayed on the user interface, the content such as the name and icon of the menu may be rendered according to the display parameters in the menu configuration data, so as to display the personalized menu content on the user interface.
Therefore, based on the menu configuration data corresponding to the user ID, the generated menu group can better embody the personalized configuration of the user to the menu, and further, based on the binding of the mapping relation generated by the menu group and the user, the personalized requirement of the user on the menu and page association display function can be met when the user operates the menu. On the basis, different menu and page association relations can be correspondingly provided for users corresponding to different user IDs, so that the richness and diversity of user menu functions are improved.
In some embodiments, the method further comprises:
generating a page identification group according to the page identification of at least one preset page;
the establishing of the mapping relationship between the menu group and at least one preset page comprises the following steps:
and establishing a mapping relation between the menu group and the page identification group.
In the embodiment of the present invention, the page identifier may be identification information uniquely representing the page identity information, for example, the page identifier may be a page ID, or page number information, and the like. Illustratively, the page identifications of the plurality of preset pages may be "page 1", "page 2", "page 3" …, respectively, and the like.
In one embodiment, the page identifier group is used to record the page identifier of the preset page, so as to establish a mapping relationship between the menu group and the page identifier group, which may be a mapping relationship between each menu in the menu group and the page identifier of the preset page. For example, the menu ID of each menu in the menu group and the page identifier of the corresponding preset page are recorded in the mapping relationship.
In another embodiment, one menu in the menu group may have a mapping relationship with page identifiers of one or more preset pages, for example, a mapping relationship records a correspondence relationship between one menu and page identifiers of n preset pages. Based on this, the generated binding relationship information may be used to display n preset pages corresponding to the menu indicated by the display instruction when the display instruction is received.
In another embodiment, the binding relationship information generated by binding the established mapping relationship with the user ID may be used to match a corresponding page identifier when a display instruction acting on one menu in the menu group from the current user ID is received, and then search and display a corresponding preset page according to the page identifier.
Therefore, the mapping relation is established based on the page identification group, the data volume of the mapping relation can be effectively reduced, and the efficiency of inquiring the mapping relation to obtain the preset page can be improved.
In some embodiments, the page identifications of the at least one preset page are at the same level.
Here, the page identification may be page number information, such as "page 1", "page 2", and the like.
Wherein the content of the first and second substances,
the page identifiers at the same level may be page identifiers of a plurality of preset pages arranged at the same level, and the hierarchical relationship between the pages is not represented by the page identifiers. Such as a default page and its subpages, the corresponding pages are identified as "page 1", "page 2", "page 3", …, etc.
Therefore, compared with the related art, the method has the advantages that the method is implemented by the following steps of "page 1", "page 1.1", "page 1.2"; the page identification modes of the page 2, the page 2.1 and the page 2.2 … represent the hierarchical relationship between a parent page and a child page, and the page identifications of a plurality of preset pages can be set to be the same level, so that the page identifications of all the child pages of one preset page are inhibited from being synchronously modified when the page identification of the preset page is modified, and the workload of increasing, deleting, modifying and checking the page identification group is reduced. The page identification may include page number information, and may also include a thumbnail of the page display content, and the like.
In some embodiments, the S120 may include:
determining the corresponding relation between a parent menu and a sub-menu and the priority sequence between a plurality of sub-menus corresponding to each parent menu based on the menu configuration data;
and generating a menu group based on the corresponding relation and the priority order.
In an embodiment of the present invention, the menu corresponding to the menu configuration data may include a parent menu and a child menu, where the parent menu is a hierarchical menu above the child menu, and for example, after the parent menu is selected, at least one corresponding child menu may be displayed.
In one embodiment, the correspondence between the parent menu and the sub-menu may be determined by menu configuration data characterizing the association of the parent menu and/or the sub-menu of each menu. For example, it may include: and/or determining a submenu belonging to the menu according to a submenu ID recorded in the menu configuration data of the menu.
In another embodiment, the priority order among the submenus corresponding to each parent menu may be determined according to the ordering level of the submenus recorded in the menu configuration data, and the like. For example, in the menu configuration data of each menu, the ranking levels of all submenus corresponding to the menu may be recorded, and when the menu is selected, all submenus are displayed according to the priority order determined by the ranking levels.
In one embodiment, the menu group generated based on the correspondence and priority order may be in the form of a menu tree. For example, a top-bottom hierarchical relationship between menus may be constructed based on a correspondence relationship between a parent menu and a sub-menu, where a corresponding parent menu, that is, a menu at a previous hierarchical level, may be determined according to a parent menu ID recorded in menu configuration data of the menu, and if the parent menu ID does not exist in the menu configuration data, it is indicated that the menu is a root menu of the system, that is, a menu at a highest hierarchical level in a menu tree. The method can also comprise the step of arranging a plurality of menus of each level in the menu tree based on the priority order, wherein the menu arrangement positions with higher priority orders are closer to the front, and the priority orders of different levels, namely the ordering levels of the submenus corresponding to different parent menus, are not influenced mutually.
In some embodiments, the determining, based on the menu configuration data, a correspondence between a parent menu and a sub-menu and a priority order between a plurality of sub-menus corresponding to each of the parent menu includes:
determining the corresponding relation between a parent menu and a sub-menu according to the parent menu ID recorded in the menu configuration data of each menu;
and determining the priority sequence among a plurality of submenus corresponding to each parent menu according to the menu level information recorded in the menu configuration data.
In the embodiment of the present invention, the menu level information may be information indicating a ranking level between a plurality of submenus corresponding to each parent menu, for example, the ranking number of each submenu may be such that the smaller the ranking number, the higher the ranking level corresponding to the submenu, the higher the corresponding priority order.
In one embodiment, the correspondence between the parent menu and the sub-menu may also be determined according to the parent menu ID and/or the sub-menu ID recorded in the menu configuration data of each menu. The menu level information may be recorded in the menu configuration data of the parent menu, that is, the menu level information recorded in the menu configuration data of each menu represents the ranking levels of all submenus belonging to the menu.
In some embodiments, the method further comprises:
if the menu configuration data are inquired and an updating instruction from the current user ID is detected, modifying the menu configuration data based on the updating instruction;
alternatively, the first and second electrodes may be,
and if the menu configuration data is not inquired and a creation instruction from the current user ID is detected, establishing the menu configuration data based on the creation instruction.
Here, for the internet of things application system, especially for being used as a platform for rapidly generating the internet of things application, the menu is fixed, so that the generated diversity and personalization of the internet of things application cannot be reflected. Furthermore, the page or menu function in the application platform of the internet of things may have some personalized menu requirements for different users, such as changing the name, icon, sequence or menu hierarchy of the menu, and the like. Therefore, in order to meet such demands, it is necessary to specially customize the development for it to adapt. However, if the cloud deployment mode is public, the change of the menu can also affect the use of other users, and the requirements of the users cannot be directly met.
Therefore, in the embodiment of the present invention, personalized menu configuration data may be established for the user based on the creation instruction, or the personalized menu configuration data of the user may be customized and modified based on the update instruction.
In one embodiment, whether the menu configuration data corresponding to the current user ID exists is determined based on the query result of the menu configuration data corresponding to the current user ID, and if the menu configuration data corresponding to the current user ID does not exist, it is indicated that the user corresponding to the current user ID does not establish the self-defined menu configuration data.
In an embodiment, when the menu configuration data corresponding to the current user ID is queried, if the update instruction from the current user ID is not detected, the foregoing steps S120 to S140 are executed. If the update instruction is detected, the menu configuration data can be modified according to modification information carried in the update instruction. The modified menu configuration data is used for executing the steps of S120 to S140 for generating the menu group and the mapping relation.
In another embodiment, when the menu configuration data corresponding to the current user ID is not queried, if a creation instruction from the current user ID is not detected, the default menu configuration data of the system is obtained for executing steps S120 to S140. And if the creation instruction is detected, establishing menu configuration data corresponding to the current user ID according to creation information carried by the creation instruction.
In yet another embodiment, the method may further include: if a display instruction which is sent by the current user ID and acts on one or more menus in a menu group is detected, inquiring the binding relationship information of the current user ID; determining the mapping relation bound by the current user ID based on the inquired binding relation information; matching a preset page corresponding to the menu with the display instruction function based on the mapping relation; and displaying the matched preset page.
Therefore, user-defined setting and binding of the user menu group and the mapping relation can be realized based on the updating instruction or the creating instruction of the current user ID, and further, the personalized menu function is realized.
As shown in fig. 3, an embodiment of the present invention provides an information processing apparatus, including:
the query unit 10 is configured to query menu configuration data corresponding to the current user identity information ID;
a generating unit 20 for generating a menu group based on the menu configuration data;
the establishing unit 30 is used for establishing a mapping relation between the menu group and at least one preset page;
a binding unit 40, configured to bind the mapping relationship and the current user ID, where the bound mapping relationship is used to display the preset page associated with the mapping relationship bound by the current user ID when a display instruction that the current user ID acts on the menu group is received.
In some embodiments, the apparatus further comprises:
the identification unit is used for generating a page identification group according to the page identification of at least one preset page;
the establishing unit 30 is specifically configured to:
and establishing a mapping relation between the menu group and the page identification group.
In some embodiments, the page identifications of the at least one preset page are at the same level.
In some embodiments, the generating unit 20 is specifically configured to:
determining the corresponding relation between a parent menu and a sub-menu and the priority sequence between a plurality of sub-menus corresponding to each parent menu based on the menu configuration data;
and generating a menu group based on the corresponding relation and the priority order.
In some embodiments, the generating unit 20 is specifically configured to:
determining the corresponding relation between a parent menu and a sub-menu according to the parent menu ID recorded in the menu configuration data of each menu;
and determining the priority sequence among a plurality of submenus corresponding to each parent menu according to the menu level information recorded in the menu configuration data.
In some embodiments, the apparatus further comprises:
the configuration unit is used for modifying the menu configuration data based on the update instruction if the menu configuration data is inquired and the update instruction from the current user ID is detected; or if the menu configuration data is not inquired and a creation instruction from the current user ID is detected, establishing the menu configuration data based on the creation instruction.
One specific example is provided below in connection with any of the embodiments described above:
the technical implementation method in the embodiment of the invention mainly comprises the following main process steps: flattening processing of the function page, page identification, definition and custom menu tree of the menu model, automatic loading and adaptive display of the front-end application and the like.
1. Flattening processing and page identification of function page
In general development of internet-of-things application software, firstly, when product definition is performed in the previous period, a menu and a service page (page) corresponding to the menu are defined, the service page corresponding to the menu is designed with a path according to a hierarchical structure of the menu, and usually, a suffix is additionally added after a path of a child page (subpage, sub) to embody the hierarchical structure of the child page. If the page path of the parent menu is "/page 1", the child menu page path of the parent menu is usually in the form of "/page 1/xxx".
In the embodiment of the invention, in order to realize the user-defined menu, the corresponding relation between the page design and the menu needs to be broken. As shown in fig. 4, the menu and the page are separated from the development level, all page path hierarchies are broken up, the front page path hierarchy is set to be only one layer, and the page path identifier of each page is reserved.
The original page levels and paths with menu similar levels are flattened, so that a single-level page structure can be unified, the path of each business function page is simplified into a single path, and the single path is identified as an independent and unique page path identifier in the system.
At this time, a group of page identifier groups with page path identifiers can be obtained, each page identifier in the page identifier group has independence in the system, and each identifier represents each functional service page. The page identifier group can be used for carrying out flexible relational mapping correspondence with a user-defined menu. In the subsequent iterative development of the application of the Internet of things, only the page identification group needs to be added, replaced or deleted continuously.
2. Menu model definition and custom menu tree
In an internet of things application system, a menu is usually applied to a navigation bar of the system, and a model definition of the menu usually comprises a unique identification ID of the menu, a menu name, a displayed icon, a sequencing level, a permission identification, a page path identification, a parent menu ID and the like; the navigation bar in the application system of the internet of things shows different effects through the application of various attributes in the models of the menu.
The 'father menu ID' in the menu model is the key for realizing the menu hierarchical structure, if the field is empty, the menu is the root menu of the system, otherwise, the menu belongs to the sub-menu corresponding to the father menu; and arranging through a 'parent menu ID' field in the menu model to realize a menu tree with hierarchy. The menu needs to be associated with the page to display and jump the page in the system, so that the page path identifier in the menu model needs to be correspondingly bound and mapped with the identifier in the page identifier group, and the corresponding menu and page correspondence and interaction can be realized. Other attributes in the menu model, such as names, icons, etc., are needed to enable custom menus, which need to support custom modifications by the user.
Therefore, as shown in fig. 5, to implement a customized menu in the same internet of things application system, each tenant needs to correspond to a set of personalized menu trees belonging to the tenant, where each tree node (i.e., menu) can be edited in a personalized manner, and only each tree node needs to be associated with a page of a corresponding page identifier group.
Based on the page identifier group, different tenants perform menu customization, different tenants can define different menu directory structures, names, icons and the like, and only the customized menu can be associated and corresponding to each page identifier in the page identifier group.
Therefore, in the application system of the internet of things, a user-defined menu tree table associated with the tenant needs to be additionally added in the database to store the user-defined menu tree of the tenant, and when the tenant loads the system for the first time, the user-defined menu tree can be obtained through the interface and initialized and loaded.
3. Front-end application automated loading adaptive display
Here, the front-end engineering application of the internet of things application system automatically loads and adapts the custom menu tree, and a flowchart is shown in fig. 6. Firstly, when a tenant logs in an application, the system completes a series of initialization actions. When the menu navigation bar of the application is initialized, a request of a background server is carried out, whether the configuration of the personalized menu exists in the tenant or not is checked according to the login information of the tenant, if the configuration of the personalized menu does not exist, default menu configuration data of a system are loaded in a default mode, and if the configuration of the personalized menu does not exist in the tenant, the personalized menu configuration data of the tenant are loaded in a default mode.
The personalized menu data comprises JSON array data of the menu model, namely menu group data. Each JSON array data contains the ID of the menu, parent menu ID, menu name, menu icon, sort level, associated page identification and path, etc. After the front-end application software acquires data, firstly, assembling menu tree data of menu group data according to a parent menu ID to form a menu with a hierarchical structure; then according to the sorting grade of each menu, the menus in each layer are sequentially arranged from small to large according to the grade sequence, and here, it is noted that the sorting grade is only effective for the menus in the same father menu, and does not work for the menus in the previous level or the next level. And finishing the assembly of the menu tree structure of the personalized menu by applying the parent menu ID and the sequencing level. After the assembly is completed, the front-end application carries out association mapping on the developed page according to the identification and the associated identification of the menu, so that the matching between the menu and the page is guaranteed, the authority identification is loaded, the menu is ensured to be displayed, and the page access can be carried out when the menu is clicked. And finally, page rendering is carried out on the names, icons and the like of the menus, and the personalized display part of the menus is completely presented, so that the application system of the Internet of things finishes loading and adaptive display of the personalized menus.
The technical scheme provided by the embodiment of the invention has the following advantages and effects:
1. the tenants realize personalized menu configuration and meet the personalized menu display requirements of different tenants.
2. The method has great use value for a comprehensive and modularized Internet of things application platform, and different Internet of things application subsystems are generated according to modularized assembly and configuration of personalized menus.
3. Through the realization of the self-defined menu mode, the application system of the Internet of things has more flexibility and adaptability, and the repeated research and development investment caused by the customization of project software is avoided.
4. The menu navigation bar of the application system of the Internet of things has more openness and expansibility.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: a processor and a memory for storing a computer program capable of running on the processor, the computer program when executed by the processor performing the steps of one or more of the methods described above.
An embodiment of the present invention further provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and after being executed by a processor, the computer-executable instructions can implement the method according to one or more of the foregoing technical solutions.
The computer storage media provided by the present embodiments may be non-transitory storage media.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
In some cases, any two of the above technical features may be combined into a new method solution without conflict.
In some cases, any two of the above technical features may be combined into a new device solution without conflict.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (14)

1. An information processing method, characterized in that the method comprises:
inquiring menu configuration data corresponding to the current user identity information ID;
generating a menu group based on the menu configuration data;
establishing a mapping relation between the menu group and at least one preset page;
and binding the mapping relation and the current user ID, wherein the bound mapping relation is used for displaying the preset page associated with the mapping relation bound by the current user ID when a display instruction that the current user ID acts on the menu group is received.
2. The method of claim 1, further comprising:
generating a page identification group according to the page identification of at least one preset page;
the establishing of the mapping relationship between the menu group and at least one preset page comprises the following steps:
and establishing a mapping relation between the menu group and the page identification group.
3. The method according to claim 2, wherein the page identifications of the at least one preset page are at the same level.
4. The method of claim 1, wherein generating a menu group based on the menu configuration data comprises:
determining the corresponding relation between a parent menu and a sub-menu and the priority sequence between a plurality of sub-menus corresponding to each parent menu based on the menu configuration data;
and generating a menu group based on the corresponding relation and the priority order.
5. The method of claim 4, wherein determining the correspondence between the parent menu and the sub-menus and the priority order among the plurality of sub-menus corresponding to each parent menu based on the menu configuration data comprises:
determining the corresponding relation between a parent menu and a sub-menu according to the parent menu ID recorded in the menu configuration data of each menu;
and determining the priority sequence among a plurality of submenus corresponding to each parent menu according to the menu level information recorded in the menu configuration data.
6. The method of claim 1, further comprising:
if the menu configuration data are inquired and an updating instruction from the current user ID is detected, modifying the menu configuration data based on the updating instruction;
alternatively, the first and second electrodes may be,
and if the menu configuration data is not inquired and a creation instruction from the current user ID is detected, establishing the menu configuration data based on the creation instruction.
7. An information processing apparatus characterized in that the apparatus comprises:
the query unit is used for querying menu configuration data corresponding to the current user identity information ID;
a generating unit configured to generate a menu group based on the menu configuration data;
the establishing unit is used for establishing a mapping relation between the menu group and at least one preset page;
and the binding unit is used for binding the mapping relation and the current user ID, wherein the bound mapping relation is used for displaying the preset page associated with the mapping relation bound by the current user ID when a display instruction that the current user ID acts on the menu group is received.
8. The apparatus of claim 7, further comprising:
the identification unit is used for generating a page identification group according to the page identification of at least one preset page;
the establishing unit is specifically configured to:
and establishing a mapping relation between the menu group and the page identification group.
9. The apparatus according to claim 8, wherein the page identifications of the at least one preset page are at the same level.
10. The apparatus according to claim 7, wherein the generating unit is specifically configured to:
determining the corresponding relation between a parent menu and a sub-menu and the priority sequence between a plurality of sub-menus corresponding to each parent menu based on the menu configuration data;
and generating a menu group based on the corresponding relation and the priority order.
11. The apparatus according to claim 10, wherein the generating unit is specifically configured to:
determining the corresponding relation between a parent menu and a sub-menu according to the parent menu ID recorded in the menu configuration data of each menu;
and determining the priority sequence among a plurality of submenus corresponding to each parent menu according to the menu level information recorded in the menu configuration data.
12. The apparatus of claim 7, further comprising:
the configuration unit is used for modifying the menu configuration data based on the update instruction if the menu configuration data is inquired and the update instruction from the current user ID is detected; or if the menu configuration data is not inquired and a creation instruction from the current user ID is detected, establishing the menu configuration data based on the creation instruction.
13. An electronic device, characterized in that the electronic device comprises: a processor and a memory for storing a computer program capable of running on the processor; wherein the content of the first and second substances,
the processor, when executing the computer program, performs the steps of the information processing method of any one of claims 1 to 6.
14. A computer-readable storage medium having stored thereon computer-executable instructions; the computer-executable instructions, when executed by a processor, enable the information processing method of any one of claims 1 to 6 to be implemented.
CN202111614846.0A 2021-12-27 2021-12-27 Information processing method and device, electronic device and storage medium Pending CN114385672A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111614846.0A CN114385672A (en) 2021-12-27 2021-12-27 Information processing method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111614846.0A CN114385672A (en) 2021-12-27 2021-12-27 Information processing method and device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN114385672A true CN114385672A (en) 2022-04-22

Family

ID=81198625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111614846.0A Pending CN114385672A (en) 2021-12-27 2021-12-27 Information processing method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114385672A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816173A (en) * 2022-04-25 2022-07-29 深信服科技股份有限公司 Navigation menu generation method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816173A (en) * 2022-04-25 2022-07-29 深信服科技股份有限公司 Navigation menu generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107818163B (en) Page display method, device, computer equipment and storage medium
US10088980B2 (en) Method and system for providing menu data for mobile applications
US10635408B2 (en) Method and apparatus for enabling agile development of services in cloud computing and traditional environments
WO2004044735A2 (en) Modeling system for graphic user interface
CN106598591A (en) Webpage dynamic menu generation method and device
CN111209000B (en) Processing method and device of custom control, electronic equipment and storage medium
CN111596965A (en) Project engineering initialization method, device, computer equipment and storage medium
CN101833467A (en) Method and equipment for adding menu items into Android menu
CN109862063A (en) Distribution subscription matching process, device and storage medium based on MQTT
CN111324535A (en) Control abnormity detection method and device and computer equipment
CN108958731B (en) Application program interface generation method, device, equipment and storage medium
CN109582302A (en) Establishment of item system and automation projects creation method
CN110928710B (en) Information prompting method and device, electronic equipment and storage medium
CN113031951A (en) Menu generation method and device, computer equipment and storage medium
CN112337099A (en) Service management method and device
CN114385672A (en) Information processing method and device, electronic device and storage medium
CN114546563A (en) Multi-tenant page access control method and system
US9741060B2 (en) Recursive navigation in mobile CRM
CN107220044B (en) Method and device for driving business object based on meta-model
CN101685395A (en) Object property processing method of product data management system
CN104252351A (en) Method and device for realizing list control
CN112181409A (en) Application construction method, application rendering method and device
CN104808896A (en) Data processing method and system
CN114745280A (en) Asset information management method, device, equipment and readable storage medium
JPH1173459A (en) Work flow management system and method for operating document management

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination