Search

CN-121979799-A - Menu item configuration method, device, equipment and computer program product

CN121979799ACN 121979799 ACN121979799 ACN 121979799ACN-121979799-A

Abstract

The application provides a menu item configuration method, a device, equipment and a computer program product, wherein the method comprises the steps of obtaining menu item configuration information input by a user, wherein the menu item configuration information comprises menu item identification information of a target menu item and a configuration value of the target menu item, carrying out menu item backtracking operation from the target menu item according to the menu item identification information and a menu configuration file to determine a positioning operation sequence for positioning the target menu item from a menu system, wherein the menu configuration file records configuration information of each menu item in the menu system, positioning the target menu item from the menu system based on the positioning operation sequence, and configuring the target menu item according to the configuration value. The method can improve the efficiency of configuring the menu items of the menu system.

Inventors

  • ZHENG QIANBING
  • ZHANG LING
  • ZHOU JUN
  • WU TONG
  • LIU YONGPENG

Assignees

  • 飞腾信息技术有限公司
  • 飞腾技术(长沙)有限公司

Dates

Publication Date
20260505
Application Date
20260224

Claims (10)

  1. 1. A menu item configuration method, comprising: acquiring menu item configuration information input by a user, wherein the menu item configuration information comprises menu item identification information of a target menu item and a configuration value of the target menu item, and the menu item identification information comprises a menu item name, a father menu item name and an auxiliary identifier; Performing menu item backtracking operation from the target menu item according to the menu item identification information and a menu configuration file to determine a positioning operation sequence for positioning the target menu item from a menu system, wherein the menu configuration file records configuration information of each menu item in the menu system, and the configuration information comprises a menu item name, a menu item definition, a father menu item name, a father menu item definition, an auxiliary identifier, a menu item type and a configuration operation sequence; And positioning the target menu item from the menu system based on the positioning operation sequence, and configuring the target menu item according to the configuration value.
  2. 2. The method according to claim 1, wherein the method further comprises: determining a configuration operation sequence for configuring the target menu item as the configuration value according to the configuration value of the target menu item and the configuration operation sequence of the target menu item; determining a positioning configuration operation sequence for configuring the target menu item based on the positioning operation sequence and a configuration operation sequence for configuring the target menu item as the configuration value; positioning the target menu item from the menu system based on the positioning operation sequence, and configuring the target menu item according to the configuration value, including: And operating according to the positioning configuration operation sequence so as to set the value of the target menu item as the configuration value.
  3. 3. The method of claim 2, wherein the sequence of positioning configuration operations is represented by a simulated manual configuration operation sequence; the operating according to the positioning configuration operation sequence to set the value of the target menu item as the configuration value comprises the following steps: Converting the positioning configuration operation sequence into an ANSI escape sequence code; And sending the ANSI escape sequence code to test equipment, so that the test equipment sets the value of the target menu item to the configuration value by executing the operation corresponding to the ANSI escape sequence code.
  4. 4. The method according to claim 1, wherein the performing a menu item backtracking operation from the target menu item according to the menu item identification information and the menu configuration file to determine a positioning operation sequence for positioning the target menu item from a menu system includes: Judging whether the current menu item is a root menu item according to the menu configuration file; under the condition that the current menu item is not the root menu item, determining a parent menu item of the current menu item according to the menu item identification information of the current menu item and the menu configuration file, and determining an operation sequence from the parent menu item to the current menu item; updating the parent menu item to a new current menu item; And circularly executing the above operation until the current menu item is the root menu item, and determining a positioning operation sequence for positioning the target menu item from the menu system by utilizing each operation sequence obtained in the process of circularly executing the above operation.
  5. 5. The method of claim 4, wherein said determining the sequence of operations from the parent menu item to the current menu item comprises: Determining an operation sequence from the parent menu item to the current menu item according to the configuration operation sequence of the parent menu item under the condition that the type of the parent menu item is a compound menu type; Wherein, in case that the type of the parent menu item is a compound menu type, the configuration operation sequence of the parent menu item represents an operation sequence of locating the extended menu item and the hidden menu item through the parent menu item.
  6. 6. The method according to any one of claims 1 to 5, wherein the menu item type of any menu item recorded in the menu configuration file includes any one of a menu type, a value type, a vlist type, a vlist_menu type, a vsetting type, a vsetting _menu type, a label type, and a command type; Wherein the menu type represents a composite menu type in which a submenu item list exists; The value type represents a menu item type having a fixed value; the vlist type representing a menu item type having a plurality of selectable values; the vlist_menu type represents a composite menu type that jumps to a new menu when its selectable value is selected; the vsetting type represents a menu item type whose value can be set; The vsetting _menu type represents a composite menu type that generates a new menu item when its value is set to a specific value; The lable type represents a tag class menu item type; the command type indicates a menu item type of an execution command.
  7. 7. The method of any one of claims 1 to 5, wherein the menu system comprises a firmware menu system; And/or the number of the groups of groups, The menu item configuration information includes the menu configuration file.
  8. 8. A menu item configuring apparatus, comprising: A data acquisition unit, configured to acquire menu item configuration information input by a user, where the menu item configuration information includes menu item identification information of a target menu item and a configuration value for the target menu item, and the menu item identification information includes a menu item name, a parent menu item name, and an auxiliary identifier; The backtracking positioning unit is used for performing menu item backtracking operation from the target menu item according to the menu item identification information and a menu configuration file to determine a positioning operation sequence for positioning the target menu item from a menu system, wherein the menu configuration file is recorded with configuration information of each menu item in the menu system, and the configuration information comprises a menu item name, a menu item definition, a father menu item name, a father menu item definition, an auxiliary identifier, a menu item type and a configuration operation sequence; And the menu item configuration unit is used for positioning the target menu item from the menu system based on the positioning operation sequence and configuring the target menu item according to the configuration value.
  9. 9. An electronic device comprising a memory and a processor; the memory is connected with the processor and used for storing programs; the processor is configured to implement the menu item configuration method according to any one of claims 1 to 7 by running a program in the memory.
  10. 10. A computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the menu item configuration method of any one of claims 1 to 7.

Description

Menu item configuration method, device, equipment and computer program product Technical Field The present application relates to the field of computer technologies, and in particular, to a menu item configuration method, apparatus, device, and computer program product. Background The menu system is a system used for setting or operating hardware parameters or software programs in the hardware equipment, for example, menu items can be accessed or checked or set, adjusted and the like through the menu system, and setting or adjusting specific hardware or software functions can be realized through setting or adjusting the menu items. In the development of the menu system, it is necessary to test the menu system to verify whether it can implement the correct control function. During the test, certain menu items need to be configured to specific values. According to the existing test method, the configuration of menu items is completed by manual operation, namely, the menu items to be configured are positioned from a menu system by manual operation of a keyboard or a mouse, then the menu items are configured, and the values of the menu items are set to specific values. The menu item configuration described above is extremely inefficient and requires significant human and time costs. Disclosure of Invention Based on the technical problems, the application provides a menu item configuration method, a device, equipment and a computer program product, which can improve the efficiency of configuring menu items of a menu system. The first aspect of the present application provides a menu item configuration method, including: acquiring menu item configuration information input by a user, wherein the menu item configuration information comprises menu item identification information of a target menu item and a configuration value of the target menu item, and the menu item identification information comprises a menu item name, a father menu item name and an auxiliary identifier; Performing menu item backtracking operation from the target menu item according to the menu item identification information and a menu configuration file to determine a positioning operation sequence for positioning the target menu item from a menu system, wherein the menu configuration file records configuration information of each menu item in the menu system, and the configuration information comprises a menu item name, a menu item definition, a father menu item name, a father menu item definition, an auxiliary identifier, a menu item type and a configuration operation sequence; And positioning the target menu item from the menu system based on the positioning operation sequence, and configuring the target menu item according to the configuration value. In some implementations, the method further comprises: determining a configuration operation sequence for configuring the target menu item as the configuration value according to the configuration value of the target menu item and the configuration operation sequence of the target menu item; determining a positioning configuration operation sequence for configuring the target menu item based on the positioning operation sequence and a configuration operation sequence for configuring the target menu item as the configuration value; positioning the target menu item from the menu system based on the positioning operation sequence, and configuring the target menu item according to the configuration value, including: And operating according to the positioning configuration operation sequence so as to set the value of the target menu item as the configuration value. In some implementations, the positioning configuration operation sequence is represented by a simulated manual configuration operation sequence; the operating according to the positioning configuration operation sequence to set the value of the target menu item as the configuration value comprises the following steps: Converting the positioning configuration operation sequence into an ANSI escape sequence code; And sending the ANSI escape sequence code to test equipment, so that the test equipment sets the value of the target menu item to the configuration value by executing the operation corresponding to the ANSI escape sequence code. In some implementations, the determining a positioning operation sequence for positioning the target menu item from the menu system according to the menu item identification information and the menu configuration file includes: Judging whether the current menu item is a root menu item according to the menu configuration file; under the condition that the current menu item is not the root menu item, determining a parent menu item of the current menu item according to the menu item identification information of the current menu item and the menu configuration file, and determining an operation sequence from the parent menu item to the current menu item; updating the parent menu item to a new current menu item