Menu data processing method and device, electronic equipment and computer readable medium

Through automated menu data processing methods, the problem of low menu data processing efficiency in software development is solved, and the target menu script data and menu data are quickly and accurately generated, saving developers' time and improving processing efficiency.

CN119621059APending Publication Date: 2025-03-14CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411862422.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

During the software development process, when creating menu functions and storing menu information in the database, manually writing menu SQL scripts is cumbersome and prone to errors, especially when menu levels are deep or menu items are large, resulting in low efficiency in menu data processing.

Method used

By receiving menu processing requests, obtaining the number of menu levels and menu configuration data, determining the hierarchy depth of menu nodes at each level, obtaining the existing menu script data of menu nodes corresponding to the depth of each level, comparing and determining the inconsistent type, calling the writing program to generate target menu script data, and executing the generation of target menu data.

Benefits of technology

Save developers time and energy, improve menu data processing efficiency, and reduce manual operation workload and error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621059A_ABST
    Figure CN119621059A_ABST
Patent Text Reader

Abstract

The invention discloses a menu data processing method and device, electronic equipment and a computer readable medium, and relates to the technical field of big data processing, and a specific implementation mode comprises the steps that the number of menu levels and menu configuration data are obtained according to a received menu processing request; in response to the situation that the menu hierarchy number is larger than a preset hierarchy number threshold value, determining the hierarchy depth of the menu node of each hierarchy; obtaining existing menu script data of the menu node corresponding to each hierarchy depth, comparing each existing menu script data with menu configuration data of the corresponding menu node, and determining an inconsistency type in response to a comparison result that the existing menu script data is inconsistent with the menu configuration data of the corresponding menu node; calling a corresponding writing program according to the inconsistent type so as to generate corresponding target menu script data according to the corresponding menu configuration data; and executing the target menu script data to generate corresponding target menu data. Therefore, time and energy of developers are saved, and menu data processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of big data processing, and in particular to a menu data processing method, device, electronic device and computer-readable medium. Background Art

[0002] At present, in the process of software development, it is often necessary to create menu functions and store menu information in the database. Usually, developers need to manually write menu SQL scripts to insert menus and their corresponding permission information into the database table. This manual operation is cumbersome and error-prone, especially when the menu level is deep or there are many menu items, which will waste a lot of time and energy, and the menu data processing efficiency is low. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a menu data processing method, device, electronic device and computer-readable medium, which can solve the problem of low menu data processing efficiency during the existing software development process, which often requires creating menu functions and storing menu information in a database.

[0004] To achieve the above object, according to one aspect of an embodiment of the present application, a menu data processing method is provided, comprising:

[0005] Obtaining the number of menu levels and menu configuration data according to the received menu processing request;

[0006] In response to the number of menu levels being greater than a preset level number threshold, determining a level depth of menu nodes at each level;

[0007] Acquire existing menu script data of menu nodes corresponding to each level depth, compare each existing menu script data with menu configuration data of the corresponding menu node, and in response to the comparison result being inconsistent, determine the inconsistency type;

[0008] Calling a corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data;

[0009] Execute the target menu script data to generate corresponding target menu data.

[0010] Optionally, determining the hierarchical depth of each level of menu nodes includes:

[0011] The root node corresponding to each level of the menu node is determined, and the depth from each level of the menu node to the corresponding root node is determined as the level depth of each level of the menu node.

[0012] Optionally, obtaining the number of menu levels and menu configuration data according to the received menu processing request includes:

[0013] The menu definition data is acquired according to the received menu processing request, the number of menu levels is determined according to the menu definition data, and the menu configuration data is acquired.

[0014] Optionally, obtain existing menu script data of menu nodes corresponding to each level depth, including:

[0015] Generate corresponding query statements based on the depth of each level;

[0016] Execute each query statement in the hierarchical depth table to query each target menu node;

[0017] Get the existing menu script data corresponding to each target menu node.

[0018] Optionally, determine the type of inconsistency, including:

[0019] Get the inconsistent fields in the comparison results, and determine the inconsistency type based on the inconsistent fields.

[0020] Optionally, a corresponding writing program is called according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data, including:

[0021] Calling a corresponding writing program according to the inconsistency type to extract target data corresponding to the inconsistent field in the corresponding menu configuration data;

[0022] The original data corresponding to the inconsistent fields in the corresponding existing menu script data are replaced with the target data to generate the corresponding target menu script data.

[0023] Optionally, the method further comprises:

[0024] In response to a format error or conflict occurring when generating corresponding target menu script data, an exception prompt message is output and a corresponding exception handling procedure is executed.

[0025] In addition, the present application also provides a menu data processing device, including:

[0026] an acquisition unit, configured to acquire the number of menu levels and menu configuration data according to the received menu processing request;

[0027] a hierarchical depth determination unit, configured to determine the hierarchical depth of the menu nodes of each level in response to the number of menu levels being greater than a preset level number threshold;

[0028] A comparison unit is configured to obtain existing menu script data of menu nodes corresponding to each level depth, compare each existing menu script data with the menu configuration data of the corresponding menu node, and determine the inconsistency type in response to the comparison result being inconsistent;

[0029] The target menu script data generating unit is configured to call a corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data;

[0030] The target menu data generating unit is configured to execute the target menu script data to generate corresponding target menu data.

[0031] Optionally, the level depth determination unit is further configured to:

[0032] The root node corresponding to each level of the menu node is determined, and the depth from each level of the menu node to the corresponding root node is determined as the level depth of each level of the menu node.

[0033] Optionally, the acquisition unit is further configured to:

[0034] The menu definition data is acquired according to the received menu processing request, the number of menu levels is determined according to the menu definition data, and the menu configuration data is acquired.

[0035] Optionally, the comparison unit is further configured to:

[0036] Generate corresponding query statements based on the depth of each level;

[0037] Execute each query statement in the hierarchical depth table to query each target menu node;

[0038] Get the existing menu script data corresponding to each target menu node.

[0039] Optionally, the comparison unit is further configured to:

[0040] Get the inconsistent fields in the comparison results, and determine the inconsistency type based on the inconsistent fields.

[0041] Optionally, the target menu script data generating unit is further configured to:

[0042] Calling a corresponding writing program according to the inconsistency type to extract target data corresponding to the inconsistent field in the corresponding menu configuration data;

[0043] The original data corresponding to the inconsistent fields in the corresponding existing menu script data are replaced with the target data to generate the corresponding target menu script data.

[0044] Optionally, the menu data processing device further includes an exception processing unit configured to:

[0045] In response to a format error or conflict occurring when generating corresponding target menu script data, an exception prompt message is output and a corresponding exception handling procedure is executed.

[0046] In addition, the present application also provides a menu data processing electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the menu data processing method as described above.

[0047] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the menu data processing method as described above is implemented.

[0048] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.

[0049] A computer program product according to an embodiment of the present application includes a computer program, and when the program is executed by a processor, the menu data processing method provided by the embodiment of the present application is implemented.

[0050] One embodiment of the above invention has the following advantages or beneficial effects: the application obtains the number of menu levels and menu configuration data according to the received menu processing request; in response to the number of menu levels being greater than the preset level number threshold, determines the level depth of the menu nodes of each level; obtains the existing menu script data of the menu nodes corresponding to each level depth, compares each existing menu script data with the menu configuration data of the corresponding menu node, and in response to the comparison result being inconsistent, determines the inconsistency type; calls the corresponding writing program according to the inconsistency type to generate the corresponding target menu script data according to the corresponding menu configuration data; executes the target menu script data to generate the corresponding target menu data. This saves the developer's time and energy and improves the efficiency of menu data processing.

[0051] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.

[0053] Figure 1 is a schematic diagram of the main flow of a menu data processing method according to an embodiment of the present application;

[0054] Figure 2 is a schematic diagram of the main flow of a menu data processing method according to an embodiment of the present application;

[0055] Figure 3is a schematic diagram of the main flow of a menu data processing method according to an embodiment of the present application;

[0056] Figure 4 is a schematic diagram of main units of a menu data processing device according to an embodiment of the present application;

[0057] Figure 5 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;

[0058] Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following is an explanation of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of known functions and structures is omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, certain software, components, models, and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution. In the technical solution of the present application, the collection, analysis, use, transmission, storage, and other aspects of the user's personal information involved are in compliance with the provisions of relevant laws and regulations, and are used for legal and reasonable purposes, and are not shared, leaked, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Take necessary measures to prevent illegal access to such user personal information data, ensure that persons who have access to such personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, the risk should be minimized by limiting or even prohibiting data collection and / or deleting the data.

[0060] When used, including in certain related applications, user privacy is protected by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of data stored, controlling how data is stored, and / or other methods of de-identification.

[0061] Figure 1 is a schematic diagram of the main flow of a menu data processing method according to an embodiment of the present application. Figure 1As shown, the menu data processing method mainly includes the following steps S101 to S105.

[0062] In the embodiments of the present application, the terms that may be involved are explained as follows: SQL script: Structured Query Language (Structured Query Language) script, a set of instructions for interacting with a relational database. Java: A widely used object-oriented programming language, often used to develop cross-platform applications. Automation: refers to the use of computer technology and equipment, as well as programming and algorithms, to achieve automatic execution of tasks or processes, reduce human intervention, and improve efficiency and accuracy. Menu: In this article, it refers to the interface elements used to display function options in the system. Database: A collection of data that is stored, organized, and managed, organized using a specific data model.

[0063] Step S101, obtaining the number of menu levels and menu configuration data according to the received menu processing request.

[0064] In this embodiment, the execution subject of the menu data processing method (for example, a server) can receive a menu processing request through a wired connection or a wireless connection. The menu processing request can be a request to create a menu during the software development process. If the menu to be created during the software development process has a deep hierarchy or many menu items, the execution subject can obtain the number of menu levels and menu configuration data corresponding to the received menu processing request. Among them, the menu configuration data may include menu name, menu hierarchy, menu items, permissions, etc.

[0065] Step S102: in response to the number of menu levels being greater than a preset level number threshold, determining the level depth of menu nodes at each level.

[0066] If the number of menu levels is greater than the preset threshold, it indicates that the menu to be created or updated has a deeper level. Each level may contain one or more menu nodes. Each menu node may store the menu name, menu items, permissions and other data of the corresponding menu. The execution entity may determine the level depth of each level of menu nodes. Level depth refers to the depth from the current menu node to its corresponding root node.

[0067] Step S103, obtaining existing menu script data of menu nodes corresponding to each level depth, comparing each existing menu script data with the menu configuration data of the corresponding menu node, and determining the inconsistency type in response to the comparison result being inconsistent.

[0068] There may be one or more menu nodes corresponding to the same level depth. For each level depth, the existing menu script data stored in the corresponding one or more menu nodes may be obtained, which may include menu names, menu items, permissions, etc. The existing menu script data of each menu node corresponding to each level depth is compared with the menu configuration data. The specific comparison content may include menu names, menu items, permissions, and a comparison result is obtained. The comparison result may be that the existing menu script data of each menu node corresponding to each level depth is consistent with the menu name, menu items and permissions of the menu configuration data. The comparison result may also be that the existing menu script data of each menu node corresponding to each level depth is inconsistent with one or more of the menu name, menu items and permissions of the menu configuration data, then the comparison result is determined to be inconsistent. If the comparison result is inconsistent, the type of inconsistency is determined. For example, the type of inconsistency may include overall inconsistency and partial inconsistency, such as overall inconsistency of menu names, partial inconsistency of menu items, overall inconsistency of permissions, etc.

[0069] Step S104, calling a corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data.

[0070] If the inconsistency type is overall inconsistency, the corresponding writing program can be an overwrite replacement program. If the inconsistency type is partial inconsistency, the corresponding writing program can be a partial update program. The execution subject can accurately call the corresponding writing program according to the inconsistency type to modify the existing menu script data accurately and quickly (which may include overwrite replacement and partial update) according to the menu configuration data, so as to accurately and quickly generate the corresponding target menu script data.

[0071] Step S105, executing the target menu script data to generate corresponding target menu data.

[0072] If the amount of target menu script data is greater than a preset threshold, the execution entity can generate asynchronous tasks based on the target menu script data, call the thread pool to execute each asynchronous task, and then quickly and accurately generate the corresponding target menu data.

[0073] This embodiment obtains the number of menu levels and menu configuration data according to the received menu processing request; in response to the number of menu levels being greater than a preset threshold of the number of levels, determines the level depth of the menu nodes of each level; obtains the existing menu script data of the menu nodes corresponding to each level depth, compares each existing menu script data with the menu configuration data of the corresponding menu node, and in response to the comparison result being inconsistent, determines the inconsistency type; calls the corresponding writing program according to the inconsistency type to generate the corresponding target menu script data according to the corresponding menu configuration data; executes the target menu script data to generate the corresponding target menu data. This saves the developer's time and energy and improves the menu data processing efficiency.

[0074] Figure 2 FIG. 1 is a main flow chart of a menu data processing method according to an embodiment of the present application. Figure 2 As shown, the menu data processing method mainly includes the following steps S201 to S205.

[0075] Step S201 : acquiring menu definition data according to the received menu processing request, determining the number of menu levels according to the menu definition data and acquiring menu configuration data.

[0076] The menu definition data may include menu data structure and menu configuration data, for example, menu name, menu level, menu item and authority, etc. The execution subject may determine the number of menu levels corresponding to the menu level in the menu definition data and obtain the menu configuration data.

[0077] Step S202, in response to the number of menu levels being greater than a preset level number threshold, determining the root node corresponding to the menu node of each level, and determining the depth from the menu node of each level to the corresponding root node as the level depth of the menu node of each level.

[0078] The root nodes corresponding to the menu nodes at each level may be different. If the root nodes corresponding to the menu nodes at each level are different, the depths from each menu node at each level to the corresponding root nodes may also be different, that is, the level depths of the menu nodes at each level may be different.

[0079] Step S203, obtaining existing menu script data of menu nodes corresponding to each level depth, comparing each existing menu script data with the menu configuration data of the corresponding menu node, and determining the inconsistency type in response to the comparison result being inconsistent.

[0080] Specifically, determining the inconsistency type includes: obtaining inconsistent fields in the comparison result, and determining the inconsistency type according to the inconsistent fields.

[0081] In some embodiments, if the existing menu script data does not contain inconsistent fields, the inconsistency type is determined to be field missing; if the menu configuration data does not contain inconsistent fields, the inconsistency type is determined to be field redundancy.

[0082] Step S204, calling the corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data.

[0083] In some embodiments, if the inconsistency type is missing field, the corresponding field filling writing program is called to fill the fields of the existing menu script data according to the menu configuration data to generate the corresponding target menu script data; if the inconsistency type is field redundancy, the corresponding field deletion writing program is called to delete the fields of the existing menu script data according to the menu configuration data to generate the corresponding target menu script data.

[0084] In some embodiments, a corresponding writing program is called according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data, including: calling the corresponding writing program according to the inconsistency type to extract the target data corresponding to the inconsistent field in the corresponding menu configuration data (i.e., extracting the field value corresponding to the inconsistent field in the menu configuration data); replacing the original data corresponding to the inconsistent field in the corresponding existing menu script data with the target data to generate the corresponding target menu script data.

[0085] Specifically, the menu data processing method further includes: in response to a format error or conflict occurring when generating corresponding target menu script data, outputting an exception prompt message and executing a corresponding exception handling procedure.

[0086] For example, in the process of generating the script, appropriate error handling and prompts are performed for format errors or conflicts to ensure the accuracy of the generated target menu script data.

[0087] Step S205, executing the target menu script data to generate corresponding target menu data.

[0088] The menu data processing method of the embodiment of the present application can accurately and quickly generate target menu script data and then generate corresponding target menu data by introducing hierarchical depth, thereby saving developers' time and energy and improving menu data processing efficiency.

[0089] Figure 3 FIG. 1 is a main flow chart of a menu data processing method according to an embodiment of the present application. Figure 3 As shown, the menu data processing method mainly includes the following steps S301 to S308.

[0090] Step S301, obtaining the number of menu levels and menu configuration data according to the received menu processing request.

[0091] The execution subject can accurately determine the number of menu levels according to the menu level identifier carried in the menu processing request, and obtain the menu configuration data corresponding to the menu processing request.

[0092] Step S302: in response to the number of menu levels being greater than a preset level number threshold, determining the level depth of menu nodes at each level.

[0093] When the number of menu levels is greater than a preset level number threshold, the level depth of the menu nodes of each level is determined, and the process of processing menu data according to the level depth is started, thereby improving the efficiency and accuracy of processing menu data.

[0094] Step S303: Generate corresponding query statements based on the depth of each level.

[0095] In some embodiments, the execution subject may call the query statement generation template to generate corresponding query statements for each level depth, and specifically, may replace the corresponding placeholder in the query statement generation template with each level depth to generate the corresponding query statement, thereby improving the accuracy of the generated query statement and the precision of menu data processing.

[0096] In some embodiments, the execution entity may call a query statement generation template and replace each placeholder in the same query statement generation template with each level depth to generate a query statement, thereby improving the efficiency of query statement generation and menu data processing efficiency.

[0097] Step S304: execute each query statement in the hierarchical depth table to query and obtain each target menu node.

[0098] The hierarchical depth table can store information about each menu node and information about the root node and hierarchical depth corresponding to each menu node. When there are multiple query statements, they can correspond to multiple hierarchical depths. The execution subject executes each query statement in the hierarchical depth table to accurately and quickly query the menu nodes corresponding to the corresponding multiple hierarchical depths, i.e., the target menu nodes.

[0099] Step S305, obtaining the existing menu script data corresponding to each target menu node.

[0100] The execution subject can call an existing menu script database, and then accurately and quickly search for corresponding existing menu script data based on each target menu node from the existing menu script database.

[0101] Step S306: Compare each existing menu script data with the menu configuration data of the corresponding menu node, and in response to the comparison result being inconsistent, determine the inconsistency type.

[0102] In some embodiments, the inconsistency type may include a permissions inconsistency.

[0103] Step S307, calling the corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data.

[0104] If the inconsistency type is inconsistent permissions, the execution subject can call the permission modification writing program to modify the corresponding permissions in the existing menu script data according to the menu configuration data, and then accurately generate the corresponding target menu script data.

[0105] Step S308, executing the target menu script data to generate corresponding target menu data.

[0106] The menu data processing method of the embodiment of the present application can accurately and quickly generate target menu script data and then generate corresponding target menu data by introducing hierarchical depth, thereby saving developers' time and energy and improving menu data processing efficiency.

[0107] The embodiment of the present application automatically generates menu SQL scripts based on Java. Specifically, the definition of menu information is that the developer defines the menu information through a data structure or configuration file, including menu name, menu level, menu items, permissions, etc. Automatically generate scripts: Use Java to write programs, and automatically generate corresponding SQL scripts according to the menu information definition. Database operation: Execute the generated SQL script through Java's database connection technology, and store the menu information in the database. Error handling: In the process of generating scripts, appropriate error handling and prompts are performed for format errors or conflicts. The menu data processing of the embodiment of the present application involves three modules: Menu module: configure menu information, menu name, menu level and menu permissions. Java module: Write programs in Java to generate corresponding SQL. Database module: Execute corresponding SQL to store menu information in the menu.

[0108] The embodiment of the present application can realize the automatic processing of menu information, reduce the workload and error rate of manual operation, and improve development efficiency. The embodiment of the present application can realize automatic generation: after the developer defines the menu information, the method of automatically generating the menu SQL script saves the time and energy of manual writing; universality: the menu data processing method of the embodiment of the present application has strong universality, does not rely on a specific development framework or system, and is applicable to various relational databases. Error handling mechanism: error handling and prompts are taken into account in the process of generating scripts, making the generation of scripts more robust and reliable.

[0109] In the embodiments of the present application, scripts can also be written manually: However, in some specific scenarios, manual scripting may be a simpler and faster way, especially for simple menu structures. Use third-party tools: Developers can use existing third-party software or plug-ins to generate menu SQL scripts, but they need to pay attention to the versatility and adaptability of these tools. The embodiments of the present application can realize the automatic generation of menu SQL scripts, improve development efficiency, reduce errors, and enhance versatility.

[0110] Figure 4 Schematic diagram of the main units of the menu data processing device according to the embodiment of the present application. Figure 4 As shown, the menu data processing device 400 includes an acquisition unit 401, a hierarchical depth determination unit 402, a comparison unit 403, a target menu script data generation unit 404 and a target menu data generation unit 405.

[0111] The acquisition unit 401 is configured to acquire the number of menu levels and menu configuration data according to the received menu processing request.

[0112] The level depth determining unit 402 is configured to determine the level depth of the menu nodes of each level in response to the number of menu levels being greater than a preset level number threshold.

[0113] The comparison unit 403 is configured to obtain existing menu script data of menu nodes corresponding to each level depth, compare each existing menu script data with the menu configuration data of the corresponding menu node, and determine the inconsistency type in response to the comparison result being inconsistent.

[0114] The target menu script data generating unit 404 is configured to call a corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data.

[0115] The target menu data generating unit 405 is configured to execute the target menu script data to generate corresponding target menu data.

[0116] In some embodiments, the hierarchical depth determination unit 402 is further configured to: determine the root node corresponding to each hierarchical menu node, and determine the depth from each hierarchical menu node to the corresponding root node as the hierarchical depth of each hierarchical menu node.

[0117] In some embodiments, the acquisition unit 401 is further configured to: acquire menu definition data according to the received menu processing request, determine the number of menu levels according to the menu definition data, and acquire menu configuration data.

[0118] In some embodiments, the comparison unit 403 is further configured to: generate corresponding query statements based on each level depth; execute each query statement in the level depth table to query and obtain each target menu node; and obtain existing menu script data corresponding to each target menu node.

[0119] In some embodiments, the comparison unit 403 is further configured to: obtain inconsistent fields in the comparison result, and determine the inconsistency type according to the inconsistent fields.

[0120] In some embodiments, the target menu script data generation unit 404 is further configured to: call the corresponding writing program according to the inconsistency type to extract the target data corresponding to the inconsistent field in the corresponding menu configuration data; replace the original data corresponding to the inconsistent field in the corresponding existing menu script data with the target data to generate the corresponding target menu script data.

[0121] In some embodiments, the menu data processing device further includes Figure 4 The exception handling unit not shown in the figure is configured to: in response to a format error or conflict occurring when generating the corresponding target menu script data, output an exception prompt message and execute a corresponding exception handling procedure.

[0122] It should be noted that the menu data processing method and the menu data processing device of the present application have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.

[0123] Figure 5 An exemplary system architecture 500 to which the menu data processing method or menu data processing device according to the embodiment of the present application can be applied is shown.

[0124] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0125] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0126] The terminal devices 501 , 502 , and 503 may be various electronic devices having a menu data processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0127] Server 505 can be a server that provides various services, such as a background management server that supports menu data processing requests submitted by users using terminal devices 501, 502, and 503 (only as an example). The background management server can obtain the number of menu levels and menu configuration data according to the received menu processing request; in response to the number of menu levels being greater than the preset level number threshold, determine the level depth of the menu nodes at each level; obtain the existing menu script data of the menu nodes corresponding to each level depth, compare each existing menu script data with the menu configuration data of the corresponding menu node, and in response to the comparison result being inconsistent, determine the inconsistency type; call the corresponding writing program according to the inconsistency type to generate the corresponding target menu script data according to the corresponding menu configuration data; execute the target menu script data to generate the corresponding target menu data. This saves developers time and energy and improves the efficiency of menu data processing.

[0128] It should be noted that the menu data processing method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the menu data processing device is generally arranged in the server 505 .

[0129] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0130] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0131] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0132] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0133] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0134] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0135] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, may be described as: a processor includes an acquisition unit, a hierarchical depth determination unit, a comparison unit, a target menu script data generation unit, and a target menu data generation unit. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0137] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device obtains the number of menu levels and menu configuration data according to the received menu processing request; in response to the number of menu levels being greater than a preset level number threshold, determines the level depth of the menu nodes of each level; obtains the existing menu script data of the menu nodes corresponding to each level depth, compares each existing menu script data with the menu configuration data of the corresponding menu node, and in response to the comparison result being inconsistent, determines the inconsistency type; calls the corresponding writing program according to the inconsistency type to generate the corresponding target menu script data according to the corresponding menu configuration data; executes the target menu script data to generate the corresponding target menu data.

[0138] The computer program product of the present application includes a computer program, and when the computer program is executed by a processor, the menu data processing method in the embodiment of the present application is implemented.

[0139] According to the technical solution of the embodiment of the present application, the time and energy of developers can be saved and the efficiency of menu data processing can be improved.

[0140] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A menu data processing method, characterized in that: include: Obtaining the number of menu levels and menu configuration data according to the received menu processing request; In response to the number of menu levels being greater than a preset level number threshold, determining a level depth of menu nodes at each level; Acquire existing menu script data of menu nodes corresponding to each of the hierarchical depths, compare each of the existing menu script data with the menu configuration data of the corresponding menu node, and in response to the comparison result being inconsistent, determine the inconsistency type; Calling a corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data; Execute the target menu script data to generate corresponding target menu data.

2. The method according to claim 1, characterized in that The step of determining the level depth of each level of the menu node includes: The root node corresponding to each level of the menu node is determined, and the depth from each level of the menu node to the corresponding root node is determined as the level depth of each level of the menu node.

3. The method according to claim 1, characterized in that The acquiring the number of menu levels and menu configuration data according to the received menu processing request includes: The menu definition data is acquired according to the received menu processing request, the number of menu levels is determined according to the menu definition data, and the menu configuration data is acquired.

4. The method according to claim 1, characterized in that: The obtaining of existing menu script data of menu nodes corresponding to each of the hierarchical depths includes: Based on each of the level depths, generate corresponding query statements; Execute each query statement in the hierarchical depth table to query and obtain each target menu node; Obtain the existing menu script data corresponding to each target menu node.

5. The method according to claim 1, characterized in that The determination of the inconsistency type includes: Obtain inconsistent fields in the comparison result, and determine the inconsistency type according to the inconsistent fields.

6. The method according to claim 1, characterized in that The calling of a corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data includes: Calling a corresponding writing program according to the inconsistency type to extract target data corresponding to the inconsistent field in the corresponding menu configuration data; The target data is used to replace the original data corresponding to the inconsistent field in the corresponding existing menu script data to generate corresponding target menu script data.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: In response to a format error or conflict occurring when generating the corresponding target menu script data, an exception prompt message is output and a corresponding exception handling procedure is executed.

8. A menu data processing device, characterized in that: include: an acquisition unit, configured to acquire the number of menu levels and menu configuration data according to the received menu processing request; a hierarchical depth determination unit, configured to determine the hierarchical depth of the menu nodes of each level in response to the number of menu levels being greater than a preset level number threshold; A comparison unit is configured to obtain existing menu script data of menu nodes corresponding to each of the hierarchical depths, compare each of the existing menu script data with the menu configuration data of the corresponding menu node, and determine the inconsistency type in response to the comparison result being inconsistent; a target menu script data generating unit, configured to call a corresponding writing program according to the inconsistency type to generate corresponding target menu script data according to the corresponding menu configuration data; The target menu data generating unit is configured to execute the target menu script data to generate corresponding target menu data.

9. The device according to claim 8, characterized in that The hierarchical depth determination unit is further configured to: The root node corresponding to each level of the menu node is determined, and the depth from each level of the menu node to the corresponding root node is determined as the level depth of each level of the menu node.

10. The device according to claim 8, characterized in that The acquisition unit is further configured to: The menu definition data is acquired according to the received menu processing request, the number of menu levels is determined according to the menu definition data, and the menu configuration data is acquired.

11. The device according to claim 8, characterized in that The comparison unit is further configured to: Based on each of the level depths, generate corresponding query statements; Execute each query statement in the hierarchical depth table to query and obtain each target menu node; Obtain the existing menu script data corresponding to each target menu node.

12. The device according to claim 8, characterized in that The comparison unit is further configured to: Obtain inconsistent fields in the comparison result, and determine the inconsistency type according to the inconsistent fields.

13. The device according to claim 8, characterized in that The target menu script data generating unit is further configured to: Calling a corresponding writing program according to the inconsistency type to extract target data corresponding to the inconsistent field in the corresponding menu configuration data; The target data is used to replace the original data corresponding to the inconsistent field in the corresponding existing menu script data to generate corresponding target menu script data.

14. A menu data processing electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

15. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.