Menu data management method and device
By using automated menu data management methods, the problem of complex and cumbersome menu data management has been solved, and efficient menu data archiving and management have been achieved.
Patent Information
- Application Number
- CN202411077593.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-12
AI Technical Summary
In software product development, menu data management is complex and cumbersome, and existing technologies rely on manual operation, which is inefficient and prone to errors.
This paper provides a menu data management method that obtains the data and attribute information of the target menu, generates the target correspondence, and calls the menu archiving interface to automatically archive the data to the database, including the verification of project number and version number and permission control.
It enables automated archiving of menu data, improving developer efficiency and saving development time.
Smart Images

Figure CN118939606A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for managing menu data. Background Art
[0002] In the scenario of software product development, standard products often cannot meet customer needs and customized development is often required. Often the supporting menu data also needs to be customized. Therefore, with the increase in the number of projects and the iteration of project books, customized development becomes more and more common, and the management of menu data becomes complex and cumbersome.
[0003] Therefore, it is necessary to effectively archive and manage the menu data of corresponding projects and versions. Currently, traditional archiving methods usually rely on manual operations, which are not only inefficient but also prone to errors. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a method and device for managing menu data, which can improve the efficiency in archiving menu data.
[0005] In a first aspect, an embodiment of the present application provides a method for managing menu data, including:
[0006] Acquire target data corresponding to the target menu; the target data includes menu data and attribute information corresponding to the target menu; the attribute information includes the item number and version number corresponding to the target menu;
[0007] receiving an archiving instruction for the target menu;
[0008] In response to the archiving instruction, generating a target correspondence relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu;
[0009] The menu archiving interface is called to archive the target correspondence and the target data corresponding to the target menu into a target database.
[0010] As an optional implementation of the embodiment of the present application, the generating of the target correspondence relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu includes:
[0011] Performing a first verification operation on the item number and version number corresponding to the target menu; the first verification operation includes a naming convention check, a continuity check, and a repeatability check;
[0012] When the item number and the version number corresponding to the target menu pass the first verification operation, the target corresponding relationship is generated based on the target menu, and the item number and the version number corresponding to the target menu.
[0013] As an optional implementation of the embodiment of the present application, the attribute information of the target menu also includes a parent node number, a menu name and a menu sequence number corresponding to the target menu, and the method further includes:
[0014] A second verification operation is performed on the parent node number, the menu name and the menu sequence number corresponding to the target menu; the second verification operation includes an existence check on the parent node number, a same-level repeatability check on the menu name of the target menu, and an upper-lower level loop check on the menu sequence number of the target menu;
[0015] When the parent node number, the menu name and the menu sequence number of the item corresponding to the target menu pass the second verification, the target corresponding relationship is generated based on the target menu, and the item number and version number corresponding to the target menu.
[0016] As an optional implementation of the embodiment of the present application, after the calling menu archiving interface archives the target correspondence, the target menu, and the attribute information corresponding to the target menu into the target database, the method further includes:
[0017] Receive a call instruction for a target menu;
[0018] In response to the calling instruction of the target menu, the target menu is determined from the target correspondence based on the item number and the version number and called.
[0019] As an optional implementation of the embodiment of the present application, the method further includes:
[0020] Obtaining the menu element display permission carried in the calling instruction for the target menu;
[0021] Based on the menu element display authority, the target menu is rendered to generate a target menu structure corresponding to the target menu.
[0022] As an optional implementation of the embodiment of the present application, the method further includes:
[0023] receiving a viewing instruction for the target data of the target menu;
[0024] In response to the instruction to view the target menu, obtaining permission to view the target menu;
[0025] Based on the permission to view the target menu, attribute data corresponding to the target menu is acquired from the target database.
[0026] As an optional implementation of the embodiment of the present application, the method further includes:
[0027] receiving an editing instruction for the target menu;
[0028] In response to the editing instruction for the target menu, obtaining permission to edit the target menu;
[0029] After obtaining the permission to edit the target menu, the updated target menu is obtained, and the menu archiving interface is called to update the updated target menu into the target database.
[0030] In a second aspect, an embodiment of the present application provides a menu data management device, including:
[0031] An acquisition unit, used for acquiring target data corresponding to a target menu; the target data includes menu data and attribute information corresponding to the target menu; the attribute information includes an item number and a version number corresponding to the target menu;
[0032] A receiving unit, configured to receive an archiving instruction for the target menu;
[0033] A generating unit, configured to generate a target corresponding relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu in response to the archiving instruction;
[0034] The archiving unit is used to call the menu archiving interface to archive the target correspondence and the target data corresponding to the target menu into a target database.
[0035] As an optional implementation of the embodiment of the present application, the menu data management device also includes a verification unit, which is specifically used to perform a first verification operation on the item number and version number corresponding to the target menu; the first verification operation includes a naming convention check, a continuity check and a repeatability check; when the item number and version number corresponding to the target menu pass the first verification operation, the target correspondence relationship is generated based on the target menu, and the item number and version number corresponding to the target menu.
[0036] As an optional implementation of the embodiment of the present application, the attribute information of the target menu also includes the parent node number, menu name and menu serial number corresponding to the target menu, and the verification unit is specifically used to perform a second verification operation on the parent node number, the menu name and the menu serial number corresponding to the target menu; the second verification operation includes performing an existence check on the parent node number, performing a same-level repeatability check on the menu name of the target menu, and performing an upper and lower level loop check on the menu serial number of the target menu; when the parent node number, the menu name and the menu serial number of the item corresponding to the target menu pass the second verification, the target correspondence relationship is generated based on the target menu, and the item number and version number corresponding to the target menu.
[0037] As an optional implementation of the embodiment of the present application, the receiving unit is also used to receive a call instruction for a target menu; in response to the call instruction for the target menu, the target menu is determined from the target correspondence based on the project number and the version number and called.
[0038] As an optional implementation of the embodiment of the present application, the receiving unit is also used to obtain the menu element display permission carried in the calling instruction for the target menu; based on the menu element display permission, the target menu is rendered to generate a target menu structure corresponding to the target menu.
[0039] As an optional implementation of the embodiment of the present application, the receiving unit is also used to receive an instruction to view the target data of the target menu; in response to the instruction to view the target menu, obtain permission to view the target menu; based on the permission to view the target menu, obtain attribute data corresponding to the target menu from the target database.
[0040] As an optional implementation of the embodiment of the present application, the receiving unit is also used to receive an editing instruction for the target menu; in response to the editing instruction for the target menu, obtain the permission to edit the target menu; after obtaining the permission to edit the target menu, obtain the updated target menu, and call the menu archiving interface to update the updated target menu to the target database.
[0041] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable the electronic device to implement the menu data management method described in any of the above embodiments when executing the computer program.
[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computing device, the computing device implements the menu data management method described in any of the above embodiments.
[0043] The menu data management method provided in the embodiment of the present application is specifically as follows: obtaining the target data corresponding to the target menu; the target data includes the menu data and attribute information corresponding to the target menu; the attribute information includes the project number and version number corresponding to the target menu; receiving the archiving instruction for the target menu; in response to the archiving instruction, generating the target correspondence relationship based on the menu data corresponding to the target menu, and the project number and version number corresponding to the target menu; calling the menu archiving interface to archive the target correspondence relationship and the target data corresponding to the target menu into the target database. After obtaining the target data corresponding to the target menu, the present application will immediately receive the archiving instruction for the target menu, and then generate the target correspondence relationship based on the menu data corresponding to the target menu, and the project number and version number corresponding to the target menu, and archive the target correspondence relationship and the target data corresponding to the target menu into the target database, thereby realizing the archiving of the target menu into the target database. Compared with the prior art that requires manual archiving of the target data corresponding to the target menu, the present application can automatically archive the target menu, so it can improve the efficiency of developers in menu archiving and save development time. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 One of the step flow charts of the menu data management method provided in the embodiment of the present application;
[0047] Figure 2 The second step flow chart of the method for managing menu data provided in the embodiment of the present application;
[0048] Figure 3 The third step flow chart of the menu data management method provided in the embodiment of the present application;
[0049] Figure 4 A schematic diagram of the logical architecture of the menu data management method provided in an embodiment of the present application;
[0050] Figure 5 The second step flow chart of the method for managing menu data provided in the embodiment of the present application;
[0051] Figure 6 A schematic diagram of the structure of a menu data management device provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0055] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0056] It should be noted that, in this article, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0057] The present application embodiment provides a method for managing menu data. Figure 1 As shown, the menu data management method includes the following steps S101-S104:
[0058] S101. Obtain target data corresponding to a target menu.
[0059] The target data includes menu data and attribute information corresponding to the target menu; the attribute information includes the item number and version number corresponding to the target menu.
[0060] In the process of application software development, it is often accompanied by the generation of multiple page menu data, so that users can use the application software more clearly; thus, the management of menu data becomes an important part of software development. There are functional differences in the software programs corresponding to different projects. At the same time, the projects will be updated and upgraded at any time. In order to meet the customized requirements of different projects and different versions, it is often necessary to configure the corresponding page menu data, which will generate a large amount of page menu data that needs to be archived and managed. In this embodiment of the present application, when the target menu that needs to be archived is generated, it is necessary to first obtain the target data corresponding to the target menu, and then save the target data corresponding to the target menu in combination with the project number and version number of the target menu to the database, that is, complete the archiving of the target menu, so that the corresponding target menu can be obtained according to the project number and version number. Furthermore, when developing software for other similar projects, menu data that is referenced for the development of other similar projects can be selected from the database, saving development time and improving the efficiency of developers.
[0061] Specifically, the attribute information in the target data of the target menu includes not only the project number and version number corresponding to the target menu, but also the parent menu number corresponding to the target menu, the sequence number of the current level menu, the menu name, the page routing address and other parameters.
[0062] It should be noted that the menu data architecture will include multiple levels. In order to archive the menu data more clearly, it is generally necessary to archive the parent menu number of the corresponding menu, the current level menu number, the menu name and other parameters that can represent the hierarchical relationship of the current menu; among them, the parent menu number corresponding to the target menu can be understood as the number of the upper-level menu of the target menu.
[0063] S102: Receive an archiving instruction for the target menu.
[0064] In the embodiment of the present application, after the target data corresponding to the target menu is acquired, the archiving process is automatically entered, that is, an archiving instruction for the target menu is first generated for the target menu, instructing the target menu to be archived.
[0065] S103 . In response to the archiving instruction, generate a target correspondence relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu.
[0066] In some embodiments, after receiving the archiving instruction of the target menu, it is necessary to respond to the archiving instruction of the target menu immediately, that is, first generate a target correspondence relationship based on the menu data corresponding to the target menu, and the project number and version number corresponding to the target menu, and then execute the following step S104 to archive the target menu so that subsequent developers can manage the menu data.
[0067] S104: Calling a menu archiving interface to archive the target correspondence and the target data corresponding to the target menu into a target database.
[0068] In some embodiments, the target database may be a MySQL database, which is a relational database management system that stores data in different tables instead of placing all data in a large warehouse, a design that increases speed and flexibility. The SQL (Structured Query Language) used in MySQL is the most commonly used standardized language for accessing databases, which allows users to query, insert, update, and delete data in a database by writing SQL statements.
[0069] Exemplarily, the application scenario of the menu data management method provided by the present application is as follows: a corresponding menu A is developed for the scheduling system in software A, and the current project number corresponding to menu A is 1, and the version number is 1; now the developer needs to develop a corresponding menu B for the scheduling system in software B, and finds that menu B only improves part of the data relative to menu A. Then, when developing menu B for the scheduling system in software B, the menu data corresponding to menu A can be obtained through the project number and version number corresponding to menu A, and then development can be carried out based on the menu data of menu A, so that the menu data corresponding to menu B of the scheduling system in software B can be quickly obtained, saving development time.
[0070] The menu data management method provided in the embodiment of the present application is specifically as follows: obtaining the target data corresponding to the target menu; the target data includes the menu data and attribute information corresponding to the target menu; the attribute information includes the project number and version number corresponding to the target menu; receiving the archiving instruction for the target menu; in response to the archiving instruction, generating the target correspondence relationship based on the menu data corresponding to the target menu, and the project number and version number corresponding to the target menu; calling the menu archiving interface to archive the target correspondence relationship and the target data corresponding to the target menu into the target database. After obtaining the target data corresponding to the target menu, the present application will immediately receive the archiving instruction for the target menu, and then generate the target correspondence relationship based on the menu data corresponding to the target menu, and the project number and version number corresponding to the target menu, and archive the target correspondence relationship and the target data corresponding to the target menu into the target database, thereby realizing the archiving of the target menu into the target database. Compared with the prior art that requires manual archiving of the target data corresponding to the target menu, the present application can automatically archive the target menu, so it can improve the efficiency of developers in menu archiving and save development time.
[0071] As an extension and refinement of the above embodiment, the present application embodiment also provides a method for managing menu data, referring to Figure 2 As shown, the specific steps include the following steps S201-S205:
[0072] S201. Acquire target data corresponding to a target menu; the target data includes menu data and attribute information corresponding to the target menu.
[0073] The attribute information includes the item number and version number corresponding to the target menu.
[0074] S202: Receive an archiving instruction for the target menu.
[0075] S203: In response to the archiving instruction, perform a first verification operation on the item number and version number corresponding to the target menu.
[0076] The first verification operation includes a naming convention check, a continuity check and a repeatability check.
[0077] In the embodiment of the present application, a large amount of menu data needs to be archived and called. In order to more clearly obtain the hierarchical relationship between each menu, it is necessary to identify it with a project number and a version number, so it is necessary to ensure that the project number and version number corresponding to each menu have a high degree of accuracy. Therefore, the naming conventions, continuity and repeatability of the project number and version number need to be verified in the present application. It should be noted that the developer can customize the naming conventions of the project number and version number according to the actual situation, and the present application does not make specific restrictions on this.
[0078] S204: When the item number and the version number corresponding to the target menu pass the first verification operation, the target corresponding relationship is generated based on the target menu, and the item number and the version number corresponding to the target menu.
[0079] In some embodiments, after the item number and version number corresponding to the target menu pass the first verification operation, it means that the item number and version number of the target menu are legal, and the target correspondence relationship can continue to be generated based on the target menu and the item number and version number corresponding to the target menu.
[0080] Then, after the item number and version number corresponding to the target menu fail to pass the first verification operation, for example, the item number corresponding to the target menu has been occupied by other menus in the target database, or there is no previous item number continuous with the item number in the target database; at this time, an exception message can be generated to notify the user that an exception has occurred in the archiving of the target menu this time, and archiving cannot be performed, and the corresponding attribute information needs to be changed; then the user modifies the corresponding information and resubmits the target data of the target menu until the item number and version number of the target menu can pass the first verification operation.
[0081] In the embodiment of the present application, the attribute information of the target menu also includes the parent node number, menu name and menu sequence number corresponding to the target menu, so it is also necessary to verify the parent node number, menu name and menu sequence number corresponding to the target menu. The specific implementation method includes the following steps a and b:
[0082] Step a: performing a second verification operation on the parent node number, the menu name and the menu sequence number corresponding to the target menu.
[0083] The second verification operation includes performing an existence check on the parent node number, performing a duplication check on the menu name of the target menu at the same level, and performing a loop check on the menu sequence number of the target menu.
[0084] Step b: After the parent node number, the menu name and the menu sequence number of the item corresponding to the target menu pass the second verification, the target correspondence relationship is generated based on the target menu, and the item number and version number corresponding to the target menu.
[0085] It is necessary to check the existence of the received menu parent node number, the duplication of the menu name at this level, and whether the upper and lower level dependencies of the menu form a loop.
[0086] S205: Calling a menu archiving interface to archive the target correspondence and the target data corresponding to the target menu into a target database.
[0087] In the embodiment of the present application, after the target correspondence and the target data corresponding to the target menu are archived in the target database, the user can issue a viewing instruction or an editing instruction to view or edit the target data of the target menu. The specific implementation steps include the following:
[0088] Step 11: Receive a viewing instruction for the target data of the target menu.
[0089] Step 12: In response to the instruction to view the target menu, obtain permission to view the target menu.
[0090] In some embodiments, in order to prevent data leakage, after receiving the instruction to view the target menu, the permission interface of the user who currently sends the viewing instruction will be called first. After obtaining the permission to view the target menu, the user can view the target menu, thereby achieving the purpose of protecting data.
[0091] Step 13: Based on the permission to view the target menu, obtain attribute data corresponding to the target menu from the target database.
[0092] Step 21: Receive an editing instruction for the target menu.
[0093] Step 22: In response to the instruction to edit the target menu, obtain permission to edit the target menu.
[0094] In some embodiments, in order to prevent other illegal persons from maliciously modifying data, after receiving the editing instruction for the target menu, the permission interface of the user who currently sends the editing instruction will be called first. After obtaining the permission to edit the target menu, the user can edit the target menu, thereby achieving the purpose of protecting data.
[0095] Step 23: After obtaining the permission to edit the target menu, obtain the updated target menu, and call the menu archiving interface to update the updated target menu into the target database.
[0096] In some embodiments, after the user edits the target menu, that is, the original data of the target menu has been updated, the target data of the target menu in the target database also needs to be updated, so it is necessary to re-call the menu archiving interface to update the updated target menu into the target database.
[0097] As an extension and refinement of the above embodiment, after the above step S205 is executed, refer to Figure 3 As shown, a menu data management method provided in an embodiment of the present application further includes the following steps S301-S302:
[0098] S301: Receive a call instruction for a target menu.
[0099] S302: In response to a call instruction of the target menu, determine the target menu from the target correspondence based on the project number and the version number and call it.
[0100] In the embodiment of the present application, after the target data of the target menu is archived in the target database, the data of the target menu can be called. For example, when the project corresponding to the target menu is started, the target data corresponding to the target menu can be called from the target database by the project number and version number. It should be noted that when calling the target menu, the present application also needs to verify whether the authority to call the target menu is available before calling the target menu in the target database. Therefore, the embodiment of the present application also includes the following steps S3021 and S3022:
[0101] S3021. Obtain the menu element display permission carried in the calling instruction for the target menu.
[0102] S3022. Render the target menu based on the menu element display permission, and generate a target menu structure corresponding to the target menu.
[0103] After calling the target menu, that is, after obtaining the target data corresponding to the target menu, the target menu can be rendered to generate a target menu structure corresponding to the target menu; Figure 4As shown, it is a rendering interface of the menu structure of the scheduling platform corresponding to a certain system, as shown in 400, it can be seen that the scheduling platform includes: scheduling operation overview, task management, instance management, system tasks, service management, system alarm management, basic configuration and other first-level menu items, wherein the system alarm management also includes two second-level menu items, alarm rules and alarm information; when the user clicks on a corresponding menu item under the scheduling platform, the corresponding content can be displayed in the content display area 1-3 as shown in the figure; the embodiment of the present application does not impose specific restrictions on the display method of the content display area.
[0104] Specifically, in Figure 4 In the example, after each menu item, there will be a corresponding preset pattern as shown in area 41. The user can call out the two function items of edit 411 and delete 412 by touching the preset pattern, and can delete or edit the corresponding menu item, thereby facilitating user operation.
[0105] Furthermore, the present application also provides a logical architecture corresponding to a method for managing menu data, which can be referred to as Figure 5 As shown, it includes: a front-end menu component 51, a back-end menu management 52, a target database 53, and a configuration center 54; the front-end menu component 51 includes: an initialization menu data module 511, a menu viewing module 512, and a menu editing module 513; the back-end menu management 52 includes a version management module 521, a menu archiving module 522, and a permission management module 523.
[0106] The initialization menu data module 511 in the front-end menu component 51 will initialize the target data of the target menu, that is, the project number, version number, parent menu number, current menu number, menu name, page routing address and other parameters corresponding to the target menu, and then, after receiving the archiving instruction, call the menu archiving interface in the version menu archiving module 522 in the end menu management 52 to complete the archiving of the target data corresponding to the target menu.
[0107] After the target menu is archived, the target data corresponding to the archived target menu can be viewed or edited through the menu viewing module 512 and the menu editing module 513.
[0108] The version management module 521 is used to manage and store information such as the item number and version number of each menu, and perform a first verification operation on the item number and version number corresponding to the target menu.
[0109] The menu archiving module 522 is used to perform a second verification operation on the parent node number, the menu name and the menu sequence number of each menu, and archive the target correspondence relationship and the target data corresponding to the target menu into a target database.
[0110] The authority management module 523 is used to control the authority of the user when viewing and editing the menu. The purpose of controlling the viewing or editing of menu data is achieved by allocating the operation authority of the function item to the user, and the relevant data can be obtained through the authority query interface.
[0111] The target database 53 is used to persist the archived menu data and provide query and editing capabilities; it should be noted that in the embodiment of the present application, there is no specific limitation on the target database, and it can be any database that can implement a menu data management method provided in the embodiment of the present application.
[0112] The configuration center 54 is responsible for configuring the project number and version number to which the application service currently belongs, so as to filter a large number of menus in the target database according to the project number and version number when a project is started, and obtain the menu data corresponding to the menu of the project.
[0113] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides a menu data management device, which corresponds to the above method embodiment. For ease of reading, this embodiment will no longer repeat the details of the above method embodiment one by one, but it should be clear that the menu data management device in this embodiment can correspond to all the contents of the above method embodiment.
[0114] The present application embodiment provides a menu data management device, Figure 6 is a schematic diagram of the structure of the menu data management device, such as Figure 6 As shown, the menu data management device 600 includes:
[0115] The acquisition unit 601 is used to acquire target data corresponding to the target menu; the target data includes menu data and attribute information corresponding to the target menu; the attribute information includes the item number and version number corresponding to the target menu;
[0116] The receiving unit 602 is used to receive an archiving instruction for the target menu;
[0117] A generating unit 603, configured to generate a target corresponding relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu in response to the archiving instruction;
[0118] The archiving unit 604 is used to call the menu archiving interface to archive the target correspondence and the target data corresponding to the target menu into a target database.
[0119] As an optional implementation of the embodiment of the present application, the menu data management device also includes a verification unit, which is specifically used to perform a first verification operation on the item number and version number corresponding to the target menu; the first verification operation includes a naming convention check, a continuity check and a repeatability check; when the item number and version number corresponding to the target menu pass the first verification operation, the target correspondence relationship is generated based on the target menu, and the item number and version number corresponding to the target menu.
[0120] As an optional implementation of the embodiment of the present application, the attribute information of the target menu also includes the parent node number, menu name and menu serial number corresponding to the target menu, and the verification unit is specifically used to perform a second verification operation on the parent node number, the menu name and the menu serial number corresponding to the target menu; the second verification operation includes performing an existence check on the parent node number, performing a same-level repeatability check on the menu name of the target menu, and performing an upper and lower level loop check on the menu serial number of the target menu; when the parent node number, the menu name and the menu serial number of the item corresponding to the target menu pass the second verification, the target correspondence relationship is generated based on the target menu, and the item number and version number corresponding to the target menu.
[0121] As an optional implementation of the embodiment of the present application, the receiving unit 601 is also used to receive a call instruction for a target menu; in response to the call instruction for the target menu, the target menu is determined from the target correspondence based on the project number and the version number and called.
[0122] As an optional implementation of the embodiment of the present application, the receiving unit 604 is also used to obtain the menu element display permission carried in the calling instruction for the target menu; based on the menu element display permission, the target menu is rendered to generate a target menu structure corresponding to the target menu.
[0123] As an optional implementation of the embodiment of the present application, the receiving unit 601 is also used to receive an instruction to view the target data of the target menu; in response to the instruction to view the target menu, obtain permission to view the target menu; based on the permission to view the target menu, obtain attribute data corresponding to the target menu from the target database.
[0124] As an optional implementation of the embodiment of the present application, the receiving unit 601 is also used to receive an editing instruction for the target menu; in response to the editing instruction for the target menu, obtain the permission to edit the target menu; after obtaining the permission to edit the target menu, obtain the updated target menu, and call the menu archiving interface to update the updated target menu to the target database.
[0125] Based on the same inventive concept, the embodiment of the present disclosure also provides an electronic device. FIG. 7 is a schematic diagram of the structure of the electronic device provided by the embodiment of the present disclosure. Figure 7 As shown, the electronic device provided in this embodiment includes: a memory 701 and a processor 702, wherein the memory 701 is used to store a computer program; and the processor 702 is used to execute the menu data management method provided in the above embodiment when executing the computer program.
[0126] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computing device implements the menu data management method provided in the above embodiment.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0128] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0129] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0130] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for managing menu data, It is characterized in that include: Acquire target data corresponding to the target menu; the target data includes menu data and attribute information corresponding to the target menu; The attribute information includes the project number and version number corresponding to the target menu; receiving an archiving instruction for the target menu; In response to the archiving instruction, generating a target correspondence relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu; The menu archiving interface is called to archive the target correspondence and the target data corresponding to the target menu into a target database.
2. The method according to claim 1, It is characterized in that The generating the target correspondence relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu includes: Performing a first verification operation on the item number and version number corresponding to the target menu; the first verification operation includes a naming convention check, a continuity check, and a repeatability check; When the item number and the version number corresponding to the target menu pass the first verification operation, the target corresponding relationship is generated based on the target menu, and the item number and the version number corresponding to the target menu.
3. The method according to claim 2, It is characterized in that The attribute information of the target menu also includes a parent node number, a menu name and a menu sequence number corresponding to the target menu, and the method further includes: A second verification operation is performed on the parent node number, the menu name and the menu sequence number corresponding to the target menu; the second verification operation includes an existence check on the parent node number, a same-level repeatability check on the menu name of the target menu, and an upper-lower level loop check on the menu sequence number of the target menu; When the parent node number, the menu name and the menu sequence number of the item corresponding to the target menu pass the second verification, the target corresponding relationship is generated based on the target menu, and the item number and version number corresponding to the target menu.
4. The method according to claim 1, It is characterized in that After the calling menu archiving interface archives the target correspondence, the target menu, and the attribute information corresponding to the target menu into the target database, the method further includes: Receive a call instruction for a target menu; In response to the calling instruction of the target menu, the target menu is determined from the target correspondence based on the item number and the version number and called.
5. The method according to claim 4, It is characterized in that The method further comprises: Obtaining the menu element display permission carried in the calling instruction for the target menu; Based on the menu element display authority, the target menu is rendered to generate a target menu structure corresponding to the target menu.
6. The method according to claim 1, It is characterized in that The method further comprises: receiving a viewing instruction for the target data of the target menu; In response to the instruction to view the target menu, obtaining permission to view the target menu; Based on the permission to view the target menu, attribute data corresponding to the target menu is acquired from the target database.
7. The method according to claim 1, It is characterized in that The method further comprises: receiving an editing instruction for the target menu; In response to the editing instruction for the target menu, obtaining permission to edit the target menu; After obtaining the permission to edit the target menu, the updated target menu is obtained, and the menu archiving interface is called to update the updated target menu into the target database.
8. A menu data management device, It is characterized in that include: An acquisition unit, used for acquiring target data corresponding to a target menu; The target data includes menu data and attribute information corresponding to the target menu; The attribute information includes the project number and version number corresponding to the target menu; A receiving unit, configured to receive an archiving instruction for the target menu; A generating unit, configured to generate a target corresponding relationship based on the menu data corresponding to the target menu, and the item number and version number corresponding to the target menu in response to the archiving instruction; The archiving unit is used to call the menu archiving interface to archive the target correspondence and the target data corresponding to the target menu into a target database.
9. An electronic device, It is characterized in that include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable the electronic device to implement the menu data management method described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the menu data management method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Version management method of configuration management system and configuration version management system
CN115328537A
Data archiving method and device for business system and medium
CN116166615A
Menu data processing method, device and system and electronic equipment
CN116661650A
Entity instantiation data archiving method and device, storage medium and terminal equipment
CN117492735A
