A method and device for presenting a menu view

By receiving sliding gestures to determine the target element and presenting the menu view, the problems of limitations and poor customization capabilities of menu view in the prior art are solved, and flexible menu view display effect is achieved.

CN113760146BActive Publication Date: 2025-08-22BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110007685.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-05
Publication Date
2025-08-22
Estimated Expiration
2041-01-05

AI Technical Summary

Technical Problem

In the prior art, the menu view display method is limited to a specified view, cannot be flexibly customized, and has insufficient universality, so it cannot be displayed in a specified area.

Method used

By receiving sliding gestures, the gesture data is parsed to determine the target element, and the menu view is presented on the target page based on the items to be displayed, the display area and the layout method in the menu display information, thereby realizing flexible menu view display.

Benefits of technology

It realizes flexible display of menu views in the specified display area on the specified target page, overcoming the problems of poor customization capabilities and insufficient versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113760146B_ABST
    Figure CN113760146B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for presenting a menu view, and relates to the field of computer technology. A specific implementation of the method includes: receiving a sliding gesture operated by a user on a target page, and parsing to obtain gesture data; determining the target element being operated on the target page according to the gesture data; in the case where it is determined according to the gesture data that a menu display instruction for the target element is triggered, calling the menu display information of the target element based on the menu display instruction; based on the items to be displayed, the display area information, and the layout method in the menu display information, using the layout method to layout the items to be displayed in the corresponding display area on the target page, so as to present the menu view of the target element on the target page. This implementation can determine the corresponding target element according to the sliding gesture, call the menu display information after the menu display instruction of the target element is triggered, and then present the menu view in the specified area on the target page, thereby achieving the effect of flexibly displaying the menu view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for presenting a menu view. Background Art

[0002] On a mobile terminal, a sliding gesture is usually used to trigger a menu display view. In the prior art, a view display method provided by the system is usually used to display the menu.

[0003] In the process of implementing the present invention, there are at least the following problems in the prior art:

[0004] The view display method provided by the system has certain limitations. It can only be used on specified views and can only use the entire area of ​​the specified view to display the menu. The menu view display has poor customization capabilities and lacks versatility. Summary of the Invention

[0005] In view of this, an embodiment of the present invention provides a method and device for presenting a menu view, which can determine the corresponding target element according to a sliding gesture, and call the menu display information of the target element when the menu display instruction of the target element is triggered, and then based on the items to be displayed, display area information, and layout method in the menu display information, the items to be displayed are laid out in the corresponding display area on the target page using the layout method, so as to present the menu view of the target element in the specified display area on the specified target page, thereby achieving the effect of flexible display of the menu view.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for presenting a menu view is provided, comprising:

[0007] Receiving a sliding gesture performed by a user on a target page, and analyzing the sliding gesture to obtain gesture data;

[0008] determining a target element to be operated in the target page according to the gesture data; and in a case where it is determined according to the gesture data that a menu display instruction for the target element is triggered, retrieving menu display information of the target element based on the menu display instruction;

[0009] Based on the items to be displayed, display area information, and layout method in the menu display information, the items to be displayed are laid out in the corresponding display area on the target page using the layout method to present a menu view of the target element on the target page.

[0010] Optionally, determining the operated target element in the target page according to the gesture data includes:

[0011] Retrieving page layout information of the target page;

[0012] Determining the coordinate range of each element in the target page according to the page layout information;

[0013] The coordinate range of the gesture start coordinates in the gesture data is determined, and the element corresponding to the coordinate range is used as the target element.

[0014] Optionally, determining whether the gesture data triggers a menu display instruction for the target element is performed according to the following method, including:

[0015] Retrieving a gesture instruction library of the target element;

[0016] Obtain the gesture trajectory in the gesture data, and determine whether there is a display instruction corresponding to the gesture trajectory in the gesture instruction library; if so, determine that the gesture data triggers a menu display instruction for the target element, and use the display instruction corresponding to the gesture trajectory in the gesture instruction library as the menu display instruction for the target element.

[0017] Optionally, the calling of the gesture instruction library of the target element includes:

[0018] Obtain the type of the target element; retrieve the element gesture instruction library corresponding to the element type as the gesture instruction library for the target element; or,

[0019] The type of the target page is obtained; and a page gesture instruction library corresponding to the page type is retrieved as a gesture instruction library for the target element.

[0020] Optionally, the step of laying out the items to be displayed in corresponding display areas on the target page using the layout mode based on the items to be displayed, display area information, and layout mode in the menu display information, so as to present a menu view of the target element on the target page, includes:

[0021] Determining coordinate data and shape attribute data according to the display area information;

[0022] Determine a window creation area based on the coordinate data and the shape attribute data, and create a target view window in the window creation area in the target page;

[0023] The items to be displayed are drawn on the target view window using the layout method, so as to realize the presentation of the menu view of the target element on the target page.

[0024] Optionally, determining the coordinate data and shape attribute data according to the display area information includes:

[0025] When the display area information includes specified coordinate data, the specified coordinate data is used as the coordinate data; when the display area information does not include specified coordinate data, a method is called according to the coordinates in the display area information to obtain the gesture end coordinates in the gesture data as the coordinate data;

[0026] When the display area information contains specified shape attribute data, the specified shape attribute data is used as the shape attribute data; when the display area information does not contain specified shape attribute data, a method is called according to the shape attribute in the display area information to obtain the gesture trajectory in the gesture data to determine the shape attribute data.

[0027] Optionally, before laying out the items to be displayed in the corresponding display area on the target page using the layout method, the method further includes:

[0028] confirming that a menu view of the target element does not exist in the target page; and,

[0029] If the menu view already exists, when the menu display information includes a display area reset method, call the display area reset method to obtain the gesture end coordinates in the gesture data, and determine the shape attribute data based on the display area information; determine the reset display area based on the gesture end coordinates and the shape attribute data; and use the layout method to layout the items to be displayed in the reset display area on the target page.

[0030] Optionally, before determining, according to the gesture data, that a menu display instruction for the target element is triggered, the method further includes:

[0031] confirming that there is no displayed menu view of the target element in the target page; and,

[0032] If a displayed menu view of the target element already exists in the target page, determine whether a menu closing instruction is triggered for the displayed menu view based on the gesture data; and if triggered, close the displayed menu view corresponding to the menu closing instruction.

[0033] Optionally, determining, according to the gesture data, whether a menu closing instruction is triggered for the displayed menu view includes:

[0034] Obtaining a gesture trajectory in the gesture data, and retrieving a second gesture instruction library of the target element;

[0035] If there is a menu closing instruction corresponding to the gesture trajectory in the second gesture instruction library, determining whether the menu closing instruction triggers closing of the displayed menu view;

[0036] If so, confirm that the gesture data triggers a menu closing instruction for the displayed menu view.

[0037] Optionally, after presenting the menu view of the target element on the target page, the method further includes:

[0038] When other menu views exist in the target page, the coexistence attribute of each other menu view is obtained; and the other menu views whose coexistence attribute is negative are closed.

[0039] According to another aspect of an embodiment of the present invention, a device for presenting a menu view is provided, comprising:

[0040] A receiving module, configured to receive a sliding gesture performed by a user on a target page, and analyze the sliding gesture to obtain gesture data;

[0041] an acquisition module, configured to determine a target element to be operated in the target page according to the gesture data; and, if it is determined according to the gesture data that a menu display instruction for the target element is triggered, retrieve menu display information of the target element based on the menu display instruction;

[0042] A layout module is used to layout the items to be displayed in the corresponding display area on the target page using the layout method based on the items to be displayed, display area information, and layout method in the menu display information, so as to present the menu view of the target element on the target page.

[0043] Optionally, the acquiring module determines the operated target element in the target page according to the gesture data, including:

[0044] Retrieving page layout information of the target page;

[0045] Determining the coordinate range of each element in the target page according to the page layout information;

[0046] The coordinate range of the gesture start coordinates in the gesture data is determined, and the element corresponding to the coordinate range is used as the target element.

[0047] Optionally, the acquisition module determines whether the gesture data triggers a menu display instruction for the target element according to the following method, including:

[0048] Retrieving a gesture instruction library of the target element;

[0049] Obtain the gesture trajectory in the gesture data, and determine whether there is a display instruction corresponding to the gesture trajectory in the gesture instruction library; if so, determine that the gesture data triggers a menu display instruction for the target element, and use the display instruction corresponding to the gesture trajectory in the gesture instruction library as the menu display instruction for the target element.

[0050] Optionally, the acquisition module retrieves the gesture instruction library of the target element, including:

[0051] Obtain the type of the target element; retrieve the element gesture instruction library corresponding to the element type as the gesture instruction library for the target element; or,

[0052] The type of the target page is obtained; and a page gesture instruction library corresponding to the page type is retrieved as a gesture instruction library for the target element.

[0053] Optionally, the layout module lays out the items to be displayed in the corresponding display area on the target page using the layout method based on the items to be displayed, the display area information, and the layout method in the menu display information, so as to present a menu view of the target element on the target page, including:

[0054] Determining coordinate data and shape attribute data according to the display area information;

[0055] Determine a window creation area based on the coordinate data and the shape attribute data, and create a target view window in the window creation area in the target page;

[0056] The items to be displayed are drawn on the target view window using the layout method, so as to realize the presentation of the menu view of the target element on the target page.

[0057] Optionally, the layout module determines the coordinate data and shape attribute data according to the display area information, including:

[0058] When the display area information includes specified coordinate data, the specified coordinate data is used as the coordinate data; when the display area information does not include specified coordinate data, a method is called according to the coordinates in the display area information to obtain the gesture end coordinates in the gesture data as the coordinate data;

[0059] When the display area information contains specified shape attribute data, the specified shape attribute data is used as the shape attribute data; when the display area information does not contain specified shape attribute data, a method is called according to the shape attribute in the display area information to obtain the gesture trajectory in the gesture data to determine the shape attribute data.

[0060] Optionally, before the layout module lays out the items to be displayed in the corresponding display area on the target page using the layout method, the layout module further includes:

[0061] confirming that a menu view of the target element does not exist in the target page; and,

[0062] If the menu view already exists, when the menu display information includes a display area reset method, call the display area reset method to obtain the gesture end coordinates in the gesture data, and determine the shape attribute data based on the display area information; determine the reset display area based on the gesture end coordinates and the shape attribute data; and use the layout method to layout the items to be displayed in the reset display area on the target page.

[0063] Optionally, before determining that a menu display instruction for the target element is triggered according to the gesture data, the acquisition module further includes:

[0064] confirming that there is no displayed menu view of the target element in the target page; and,

[0065] If a displayed menu view of the target element already exists in the target page, determine whether a menu closing instruction is triggered for the displayed menu view based on the gesture data; and if triggered, close the displayed menu view corresponding to the menu closing instruction.

[0066] Optionally, the obtaining module determining, according to the gesture data, whether a menu closing instruction is triggered for the displayed menu view includes:

[0067] Obtaining a gesture trajectory in the gesture data, and retrieving a second gesture instruction library of the target element;

[0068] If there is a menu closing instruction corresponding to the gesture trajectory in the second gesture instruction library, determining whether the menu closing instruction triggers closing of the displayed menu view;

[0069] If so, confirm that the gesture data triggers a menu closing instruction for the displayed menu view.

[0070] Optionally, after the layout module presents the menu view of the target element on the target page, the layout module further includes:

[0071] When other menu views exist in the target page, the coexistence attribute of each other menu view is obtained; and the other menu views whose coexistence attribute is negative are closed.

[0072] According to another aspect of an embodiment of the present invention, there is provided an electronic device for presenting a menu view, comprising:

[0073] one or more processors;

[0074] a storage device for storing one or more programs,

[0075] When the one or more programs are executed by the one or more processors, the one or more processors implement the menu view presentation method provided by the present invention.

[0076] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for presenting a menu view provided by the present invention is implemented.

[0077] One embodiment of the above invention has the following advantages or beneficial effects: because the corresponding target element is determined according to the sliding gesture, the menu display information of the target element is called when the menu display instruction of the target element is triggered, and then based on the items to be displayed, the display area information, and the layout method in the menu display information, the technical means of laying out the items to be displayed in the corresponding display area on the target page using the layout method is adopted, so the technical problems of poor customization capability and insufficient versatility of menu view display in the prior art are overcome, and the menu view of the target element can be presented in the specified display area on the specified target page, thereby achieving the effect of flexible display of the menu view.

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

[0079] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.

[0080] Figure 1 is a schematic diagram of the main process of a method for presenting a menu view according to a first embodiment of the present invention;

[0081] Figure 2 is a schematic diagram of a menu presentation effect in a menu view presentation method according to a second embodiment of the present invention;

[0082] Figure 3 is a schematic diagram of main modules of a menu view presentation device according to a third embodiment of the present invention;

[0083] Figure 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;

[0084] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0085] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0086] Figure 1 FIG. 1 is a schematic diagram of the main process of a method for presenting a menu view according to the first embodiment of the present invention. Figure 1 Shown, including:

[0087] Step S101: receiving a sliding gesture performed by a user on a target page, and analyzing the sliding gesture to obtain gesture data;

[0088] Step S102: determining a target element to be operated in the target page according to the gesture data; and if it is determined according to the gesture data that a menu display instruction for the target element is triggered, retrieving menu display information of the target element based on the menu display instruction;

[0089] Step S103: Based on the items to be displayed, the display area information, and the layout method in the menu display information, the items to be displayed are laid out in the corresponding display area on the target page using the layout method to present a menu view of the target element on the target page.

[0090] The present invention provides a method for presenting a menu view, which can determine the corresponding target element according to a sliding gesture, call the menu display information of the target element when the menu display instruction of the target element is triggered, and then based on the items to be displayed, display area information, and layout method in the menu display information, use the layout method to layout the items to be displayed in the corresponding display area on the target page, so as to present the menu view of the target element in the specified display area on the specified target page, thereby achieving the effect of flexible display of the menu view.

[0091] By pre-setting common method protocols for menu view presentation and applying them during development, the above process and effects can be achieved. Specifically, these protocols include: whether the view can respond to sliding gestures, how to configure the menu, how the view responds to sliding gestures, whether the menu can respond to click events, how to handle callbacks for menu state changes (displayed state, closed state, etc.), how to close the menu, etc.

[0092] The configuration for menu display can be achieved by calling the aforementioned general protocol, such as: "Whether the view can respond to sliding gestures" can be used to set the page view where the element is located and whether the element view can respond to sliding gestures, "Menu configuration method" can be used to configure menu display, "View response to sliding gestures" can be used to configure which sliding gesture (such as gestures in different directions) the menu is triggered by, "Whether the menu can respond to click events" can be used to configure whether the menu can trigger its closing instruction by being clicked, "Menu status change callback processing method" can be used by developers to obtain the menu status in some scenario requirements, and "Menu closing method" can be used to configure the method to trigger the menu closing.

[0093] In some practical applications, when adding a menu triggered by a sliding gesture to a view, the timing of adding the menu to different types of views corresponds to different life cycles; for example, in the iOS system, UIView needs to be created when the View is initialized, while other list-based UI components (such as UITableView and UICollectionView) need to be created when the list item is created.

[0094] In some embodiments, determining the operated target element in the target page according to the gesture data includes:

[0095] Retrieving page layout information of the target page;

[0096] Determining the coordinate range of each element in the target page according to the page layout information;

[0097] The coordinate range of the gesture start coordinates in the gesture data is determined, and the element corresponding to the coordinate range is used as the target element.

[0098] After receiving a slide gesture, the page layout information of the current page can be retrieved to obtain the coordinate ranges of each element on the current page. The slide gesture is then analyzed to obtain the gesture's starting coordinates. The gesture's starting coordinates can then be matched with the coordinate ranges of each element to determine the element corresponding to the gesture's starting coordinates as the target element. In other words, the element touched by the user's slide gesture's starting point can be considered the target element. This method can be used to determine the element being manipulated by a slide gesture.

[0099] In some embodiments, determining whether the gesture data triggers a menu display instruction for the target element is performed in the following manner, including:

[0100] Retrieving a gesture instruction library of the target element;

[0101] Obtaining a gesture trajectory in the gesture data, and determining whether a display instruction corresponding to the gesture trajectory exists in the gesture instruction library; if so, determining that the gesture data triggers a menu display instruction for the target element, and using the display instruction corresponding to the gesture trajectory in the gesture instruction library as the menu display instruction for the target element;

[0102] After determining the target element operated by the sliding gesture, based on the gesture instruction library of the target element, it can be determined whether there is an instruction corresponding to the gesture trajectory of the sliding gesture in the library, and whether the instruction is a menu display instruction; if so, it can be considered that the sliding gesture triggers the menu display of the target element, and then the information used for menu display can be called according to the menu display instruction to realize the presentation of the menu view in subsequent steps.

[0103] Furthermore, in some embodiments, the calling of the gesture instruction library of the target element includes: obtaining the type of the target element; calling an element gesture instruction library corresponding to the element type as the gesture instruction library of the target element; or,

[0104] The type of the target page is obtained; and a page gesture instruction library corresponding to the page type is retrieved as a gesture instruction library for the target element.

[0105] You can set a gesture command library for each element, or for a category of elements, or for elements on the same page, or for elements within the same application. Specifically, for example, you can set the "swipe right" gesture trajectory as the menu display command for category A elements, the "draw a circle" gesture trajectory as the menu display command for category B menus, and the "swipe up" and "swipe left" gesture trajectory as the menu display commands for category C elements. Gesture command libraries can be flexibly configured for elements in different application scenarios to meet various needs.

[0106] In some embodiments, the step of laying out the items to be displayed in the corresponding display area on the target page using the layout method based on the items to be displayed, the display area information, and the layout method in the menu display information, so as to present the menu view of the target element on the target page, includes:

[0107] Determine coordinate data and shape attribute data based on the display area information; determine a window creation area based on the coordinate data and the shape attribute data, and create a target view window in the window creation area in the target page; use the layout method to draw the items to be displayed on the target view window to realize the presentation of the menu view of the target element on the target page.

[0108] The above method can be used to first create a view window based on coordinate data and shape attribute data (such as shape, length, height and other information) (such as: using coordinate data as the starting point of the upper left corner of the view window, and creating a view window corresponding to the shape attributes based on the starting point), and then use the layout method (such as: list layout, tab layout, multi-panel layout, etc.), combined with the menu element configuration in the menu configuration method protocol, to draw the items to be displayed (which can be pictures, text, text windows, operable elements, etc.) on the target view window to realize the menu view of the target element on the target page, overcoming the technical problems in the prior art that the menu can only be used on a specified view and can only use the entire area of ​​the specified view to display the menu, thereby resulting in poor customization capabilities and insufficient versatility of the menu view display.

[0109] Furthermore, in some embodiments, determining the coordinate data and shape attribute data according to the display area information includes:

[0110] When the display area information contains specified coordinate data, the specified coordinate data is used as the coordinate data; when the display area information does not contain specified coordinate data, the gesture end coordinates in the gesture data are obtained according to the coordinate calling method in the display area information, as the coordinate data; when the display area information contains specified shape attribute data, the specified shape attribute data is used as the shape attribute data; when the display area information does not contain specified layout shape attribute data, the gesture trajectory in the gesture data is obtained according to the shape attribute calling method in the display area information to determine the shape attribute data.

[0111] For coordinate data, specific designated coordinate data can be directly configured in the display area information as coordinate data for menu display; or specific values ​​can be not set in the display area information, but a method for obtaining coordinate data can be set to determine the coordinate data, such as: calling the gesture end coordinates in the gesture data as coordinate data; in some practical applications, other methods for obtaining coordinate data can also be set, such as: according to the gesture trajectory in the gesture data, setting a certain coordinate in the trajectory as coordinate data for menu display.

[0112] Similarly, for shape attribute data, specific specified shape attribute data can be directly configured in the display area information as shape attribute data for menu display; or, instead of setting specific values ​​in the display area information, a method for obtaining shape attribute data can be set to determine the shape attribute data, such as calling the gesture trajectory in the gesture data to determine the shape attribute data based on the gesture trajectory. Specifically, different shapes can be configured for different gesture trajectories (such as a wavy trajectory can correspond to a rectangular shape, a circular trajectory can correspond to a circular shape, etc.), and the shape attribute data can also be determined based on the closed-loop shape formed by the gesture trajectory.

[0113] The above method can be used to flexibly configure the method for determining the coordinate data and shape attribute data used for menu display, so as to diversify the method for determining the display area of ​​the menu to meet the needs of various scenarios.

[0114] In some embodiments, before laying out the items to be displayed in the corresponding display area on the target page using the layout method, the method further includes:

[0115] confirming that a menu view of the target element does not exist in the target page; and,

[0116] If the menu view already exists, when the menu display information includes a display area reset method, call the display area reset method to obtain the gesture end coordinates in the gesture data, and determine the shape attribute data based on the display area information; determine the reset display area based on the gesture end coordinates and the shape attribute data; and use the layout method to layout the items to be displayed in the reset display area on the target page.

[0117] For example, when the gesture instruction library matches the corresponding instruction "open the b menu of element a" for the sliding gesture, if it is found that the b menu of element a already exists on the page, it can be determined whether the menu display information corresponding to the instruction includes a display area reset method; if not, the instruction can be ignored, that is, the b menu of element a will not be opened repeatedly; if it is included, a new display area can be determined according to the display area reset method to display the b menu of element a.

[0118] In some practical applications, such as in the IOS system, additional caching methods can be provided for list components such as UITableView and UICollectionView: the entire menu management object uses the system framework<objc / runtime.h> The provided method is cached in memory, so that menus that have been expanded within a preset time period can be cached; when the menu needs to be expanded again, the required menu object data can be directly retrieved from the cache through the method objc_getAssociatedObject, thereby reducing the overhead when repeatedly opening the menu and quickly responding to sliding gestures.

[0119] In some embodiments, before determining, according to the gesture data, that a menu display instruction for the target element is triggered, the method further includes:

[0120] Confirm that a displayed menu view of the target element does not exist in the target page; and, if a displayed menu view of the target element already exists in the target page, determine whether a menu closing instruction has been triggered for the displayed menu view based on the gesture data; and if triggered, close the displayed menu view corresponding to the menu closing instruction.

[0121] Furthermore, in some embodiments, determining, based on the gesture data, whether a menu closing instruction has been triggered for the displayed menu view includes:

[0122] Obtain a gesture trajectory in the gesture data, and retrieve a second gesture instruction library of the target element; if there is a menu closing instruction corresponding to the gesture trajectory in the second gesture instruction library, determine whether the menu closing instruction triggers the closing of the displayed menu view; if so, confirm that the gesture data triggers the menu closing instruction for the displayed menu view.

[0123] In some practical applications, there may be other displayed menus on the page. In this case, it can be determined whether the sliding gesture can trigger the closing of the displayed menu. If it can, the closing instruction of the displayed menu will be triggered first. The following example illustrates this:

[0124] After determining that the gesture trace's operating element is element a, it's determined that menu d for element a already exists on the current page. If, based on the target element's gesture command library and the second command library, a match is made between the gesture trace and the expanded menu, it can be determined that the gesture trace corresponds to either the open command for the unexpanded menu c or the close command for the expanded menu d. The close command for menu d is prioritized, meaning that this swipe gesture only triggers the close command for menu d. This method allows for orderly menu management and avoids confusion.

[0125] In some embodiments, after presenting the menu view of the target element on the target page, it also includes: when there are other menu views in the target page, obtaining the coexistence attributes of each other menu view; closing the other menu views whose coexistence attributes are no.

[0126] The menu's closing method protocol can be called to set the menu's closing logic, such as adding a coexistence attribute of "whether it can coexist with other menus" to the menu, wherein the coexistence attribute is yes, it means that the menu can coexist with other menus; if the coexistence attribute is no, then when other menus are triggered to open, the expanded menu with the coexistence attribute of no will be triggered to close. For menus with a coexistence attribute of yes, it may not be triggered to close by the "open action" of other menus, and other specified closing instructions can be set for it to implement its closing operation, such as: single-click gesture, double-click gesture, gesture with a specified trajectory, etc. By setting the coexistence attribute, multiple menus can be expanded simultaneously on the same page in some practical applications to meet the corresponding scenario requirements.

[0127] Figure 2 FIG. 1 is a schematic diagram of a menu presentation effect in a menu view presentation method according to a second embodiment of the present invention. Figure 2 shown, including:

[0128] Page view 200 , elements 201 , 202 , 203 , 204 , and 205 on the page, and displayed menu 202 of page element 201 , displayed menu 204 of page element 203 , displayed menu 206 of page element 205 , displayed menu 208 of page element 207 , and displayed menu 210 of page element 209 ;

[0129] The coexistence attributes of menus 202, 204, 205, 206, and 210 are all yes, so they can be presented in the page view 200 at the same time; in some scenarios, through the method of flexibly presenting menus in the present invention, the display contents in each menu can be compared at the same time, and there is no need to use the method in the prior art to open each menu one by one for comparison, thereby meeting the application requirements of the scenario.

[0130] Figure 3 3 is a schematic diagram of main modules of a menu view presentation device 300 according to a third embodiment of the present invention. Figure 3 As shown, the menu view presentation device 300 includes:

[0131] The receiving module 301 is configured to receive a sliding gesture performed by a user on a target page and analyze the sliding gesture to obtain gesture data;

[0132] an acquisition module 302 for determining a target element to be operated on the target page according to the gesture data; and, if it is determined according to the gesture data that a menu display instruction for the target element is triggered, retrieving menu display information for the target element based on the menu display instruction;

[0133] The layout module 303 is used to layout the items to be displayed in the corresponding display area on the target page using the layout method based on the items to be displayed, display area information, and layout method in the menu display information, so as to present the menu view of the target element on the target page.

[0134] The present invention provides a device for presenting a menu view, which can determine a corresponding target element according to a sliding gesture, call out the menu display information of the target element when a menu display instruction of the target element is triggered, and then, based on the items to be displayed, display area information, and layout method in the menu display information, use the layout method to layout the items to be displayed in the corresponding display area on the target page, so as to present the menu view of the target element in the specified display area on the specified target page, thereby achieving the effect of flexibly presenting the menu view.

[0135] By pre-setting common method protocols for menu view presentation and applying them during development, the above process and effects can be achieved. Specifically, these protocols include: whether the view can respond to sliding gestures, how to configure the menu, how the view responds to sliding gestures, whether the menu can respond to click events, how to handle callbacks for menu state changes (displayed state, closed state, etc.), how to close the menu, etc.

[0136] The configuration for menu display can be achieved by calling the aforementioned general protocol, such as: "Whether the view can respond to sliding gestures" can be used to set the page view where the element is located and whether the element view can respond to sliding gestures, "Menu configuration method" can be used to configure menu display, "View response to sliding gestures" can be used to configure which sliding gesture (such as gestures in different directions) the menu is triggered by, "Whether the menu can respond to click events" can be used to configure whether the menu can trigger its closing instruction by being clicked, "Menu status change callback processing method" can be used by developers to obtain the menu status in some scenario requirements, and "Menu closing method" can be used to configure the method to trigger the menu closing.

[0137] In some practical applications, when adding a menu triggered by a sliding gesture to a view, the timing of adding the menu to different types of views corresponds to different life cycles; for example, for UIView, it needs to be created when the View is initialized, while for other list-based UI components (such as UITableView and UICollectionView), it needs to be created when the list item is created.

[0138] In some embodiments, determining the operated target element in the target page according to the gesture data includes:

[0139] Retrieving page layout information of the target page;

[0140] Determining the coordinate range of each element in the target page according to the page layout information;

[0141] The coordinate range of the gesture start coordinates in the gesture data is determined, and the element corresponding to the coordinate range is used as the target element.

[0142] After receiving a slide gesture, the page layout information of the current page can be retrieved to obtain the coordinate ranges of each element on the current page. The slide gesture is then analyzed to obtain the gesture's starting coordinates. The gesture's starting coordinates can then be matched with the coordinate ranges of each element to determine the element corresponding to the gesture's starting coordinates as the target element. In other words, the element touched by the user's slide gesture's starting point can be considered the target element. This method can be used to determine the element being manipulated by a slide gesture.

[0143] In some embodiments, determining whether the gesture data triggers a menu display instruction for the target element is performed in the following manner, including:

[0144] Retrieving a gesture instruction library of the target element;

[0145] Obtaining a gesture trajectory in the gesture data, and determining whether a display instruction corresponding to the gesture trajectory exists in the gesture instruction library; if so, determining that the gesture data triggers a menu display instruction for the target element, and using the display instruction corresponding to the gesture trajectory in the gesture instruction library as the menu display instruction for the target element;

[0146] After determining the target element operated by the sliding gesture, based on the gesture instruction library of the target element, it can be determined whether there is an instruction corresponding to the gesture trajectory of the sliding gesture in the library, and whether the instruction is a menu display instruction; if so, it can be considered that the sliding gesture triggers the menu display of the target element, and then the information used for menu display can be called according to the menu display instruction to realize the presentation of the menu view in subsequent steps.

[0147] In some embodiments, the step of retrieving the gesture instruction library of the target element includes:

[0148] Obtain the type of the target element; retrieve the element gesture instruction library corresponding to the element type as the gesture instruction library for the target element; or,

[0149] The type of the target page is obtained; and a page gesture instruction library corresponding to the page type is retrieved as a gesture instruction library for the target element.

[0150] You can set a gesture command library for each element, or for a category of elements, or for elements on the same page, or for elements within the same application. Specifically, for example, you can set the "swipe right" gesture trajectory as the menu display command for category A elements, the "draw a circle" gesture trajectory as the menu display command for category B menus, and the "swipe up" and "swipe left" gesture trajectory as the menu display commands for category C elements. Gesture command libraries can be flexibly configured for elements in different application scenarios to meet various needs.

[0151] In some embodiments, the step of laying out the items to be displayed in the corresponding display area on the target page using the layout method based on the items to be displayed, the display area information, and the layout method in the menu display information, so as to present the menu view of the target element on the target page, includes:

[0152] Determining coordinate data and shape attribute data according to the display area information;

[0153] Determine a window creation area based on the coordinate data and the shape attribute data, and create a target view window in the window creation area in the target page;

[0154] The items to be displayed are drawn on the target view window using the layout method, so as to realize the presentation of the menu view of the target element on the target page.

[0155] The above method can be used to first create a view window based on coordinate data and shape attribute data (such as shape, length, height and other information) (such as: using coordinate data as the starting point of the upper left corner of the view window, and creating a view window corresponding to the shape attributes based on the starting point), and then use the layout method (such as: list layout, tab layout, multi-panel layout, etc.), combined with the menu element configuration in the menu configuration method protocol, to draw the items to be displayed (which can be pictures, text, text windows, operable elements, etc.) on the target view window to realize the menu view of the target element on the target page, overcoming the technical problems in the prior art that the menu can only be used on a specified view and can only use the entire area of ​​the specified view to display the menu, thereby resulting in poor customization capabilities and insufficient versatility of the menu view display.

[0156] In some embodiments, determining the coordinate data and shape attribute data according to the display area information includes:

[0157] When the display area information includes specified coordinate data, the specified coordinate data is used as the coordinate data; when the display area information does not include specified coordinate data, a method is called according to the coordinates in the display area information to obtain the gesture end coordinates in the gesture data as the coordinate data;

[0158] When the display area information contains specified shape attribute data, the specified shape attribute data is used as the shape attribute data; when the display area information does not contain specified shape attribute data, a method is called according to the shape attribute in the display area information to obtain the gesture trajectory in the gesture data to determine the shape attribute data.

[0159] For coordinate data, specific designated coordinate data can be directly configured in the display area information as coordinate data for menu display; or specific values ​​can be not set in the display area information, but a method for obtaining coordinate data can be set to determine the coordinate data, such as: calling the gesture end coordinates in the gesture data as coordinate data; in some practical applications, other methods for obtaining coordinate data can also be set, such as: according to the gesture trajectory in the gesture data, setting a certain coordinate in the trajectory as coordinate data for menu display.

[0160] Similarly, for shape attribute data, specific specified shape attribute data can be directly configured in the display area information as shape attribute data for menu display; or, instead of setting specific values ​​in the display area information, a method for obtaining shape attribute data can be set to determine the shape attribute data, such as calling the gesture trajectory in the gesture data to determine the shape attribute data based on the gesture trajectory. Specifically, different shapes can be configured for different gesture trajectories (such as a wavy trajectory can correspond to a rectangular shape, a circular trajectory can correspond to a circular shape, etc.), and the shape attribute data can also be determined based on the closed-loop shape formed by the gesture trajectory.

[0161] The above method can be used to flexibly configure the method for determining the coordinate data and shape attribute data used for menu display, so as to diversify the method for determining the display area of ​​the menu to meet the needs of various scenarios.

[0162] In some embodiments, before laying out the items to be displayed in the corresponding display area on the target page using the layout method, the method further includes:

[0163] confirming that a menu view of the target element does not exist in the target page; and,

[0164] If the menu view already exists, when the menu display information includes a display area reset method, call the display area reset method to obtain the gesture end coordinates in the gesture data, and determine the shape attribute data based on the display area information; determine the reset display area based on the gesture end coordinates and the shape attribute data; and use the layout method to layout the items to be displayed in the reset display area on the target page.

[0165] For example, when the gesture instruction library matches the corresponding instruction "open the b menu of element a" for the sliding gesture, if it is found that the b menu of element a already exists on the page, it can be determined whether the menu display information corresponding to the instruction includes a display area reset method; if not, the instruction can be ignored, that is, the b menu of element a will not be opened repeatedly; if it is included, a new display area can be determined according to the display area reset method to display the b menu of element a.

[0166] In some practical applications, additional caching methods can be provided for list components such as UITableView and UICollectionView: the entire menu management object can be managed using the system framework.<objc / runtime.h> The provided method is cached in memory, so that menus that have been expanded within a preset time period can be cached; when the menu needs to be expanded again, the required menu object data can be directly retrieved from the cache through the method objc_getAssociatedObject, thereby reducing the overhead when repeatedly opening the menu and quickly responding to sliding gestures.

[0167] In some embodiments, before determining, according to the gesture data, that a menu display instruction for the target element is triggered, the method further includes:

[0168] confirming that there is no displayed menu view of the target element in the target page; and,

[0169] If a displayed menu view of the target element already exists in the target page, determine whether a menu closing instruction is triggered for the displayed menu view based on the gesture data; and if triggered, close the displayed menu view corresponding to the menu closing instruction.

[0170] Furthermore, in some embodiments, determining, based on the gesture data, whether a menu closing instruction has been triggered for the displayed menu view includes:

[0171] Obtaining a gesture trajectory in the gesture data, and retrieving a second gesture instruction library of the target element;

[0172] If there is a menu closing instruction corresponding to the gesture trajectory in the second gesture instruction library, determining whether the menu closing instruction triggers closing of the displayed menu view;

[0173] If so, confirm that the gesture data triggers a menu closing instruction for the displayed menu view.

[0174] In some practical applications, there may be other displayed menus on the page. In this case, it can be determined whether the sliding gesture can trigger the closing of the displayed menu. If it can, the closing instruction of the displayed menu will be triggered first. The following example illustrates this:

[0175] After determining that the gesture trace's operating element is element a, it's determined that menu d for element a already exists on the current page. If, based on the target element's gesture command library and the second command library, a match is made between the gesture trace and the expanded menu, it can be determined that the gesture trace corresponds to either the open command for the unexpanded menu c or the close command for the expanded menu d. The close command for menu d is prioritized, meaning that this swipe gesture only triggers the close command for menu d. This method allows for orderly menu management and avoids confusion.

[0176] In some embodiments, after presenting the menu view of the target element on the target page, the method further includes:

[0177] When other menu views exist in the target page, the coexistence attribute of each other menu view is obtained; and the other menu views whose coexistence attribute is negative are closed.

[0178] The menu's closing method protocol can be called to set the menu's closing logic, such as adding a coexistence attribute of "whether it can coexist with other menus" to the menu, wherein the coexistence attribute is yes, it means that the menu can coexist with other menus; if the coexistence attribute is no, then when other menus are triggered to open, the expanded menu with the coexistence attribute of no will be triggered to close. For menus with a coexistence attribute of yes, it may not be triggered to close by the "open action" of other menus, and other specified closing instructions can be set for it to implement its closing operation, such as: single-click gesture, double-click gesture, gesture with a specified trajectory, etc. By setting the coexistence attribute, multiple menus can be expanded simultaneously on the same page in some practical applications to meet the corresponding scenario requirements.

[0179] Figure 4 An exemplary system architecture 400 is shown to which the method for presenting a menu view or the apparatus for presenting a menu view according to an embodiment of the present invention may be applied.

[0180] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0181] Users can use terminal devices 401, 402, 403 to interact with server 405 via network 404 to receive or send messages, etc. Various applications can be installed on terminal devices 401, 402, 403.

[0182] The terminal devices 401 , 402 , and 403 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0183] Server 405 may be a server that provides various services, such as a background management server that supports menu display commands issued by users using terminal devices 401, 402, and 403. The background management server may analyze and process received commands and other data, and feed back the processing results (e.g., display information corresponding to the commands) to the terminal device.

[0184] It should be noted that the menu view presentation method provided in the embodiment of the present invention is generally executed by the server 405 . Accordingly, the menu view presentation device is generally provided in the server 405 .

[0185] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0186] Reference below Figure 5 , which shows a schematic structural diagram of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0187] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the system 500 are also stored in the RAM 503. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0188] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 508 including a hard disk; and a communication section 509 including a network interface card such as a LAN card or a modem. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 510 as needed, so that computer programs read therefrom can be installed into the storage section 508 as needed.

[0189] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from a removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are performed.

[0190] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0191] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that 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 flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0192] The modules described in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, a processor may be described as including a receiving module, an acquisition module, and a layout module. The names of these modules do not, in some cases, limit the modules themselves.

[0193] As another aspect, the present invention 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 includes: step S101, receiving a sliding gesture operated by a user on a target page, parsing the sliding gesture to obtain gesture data; step S102, determining the target element being operated on the target page according to the gesture data; when it is determined according to the gesture data that a menu display instruction for the target element is triggered, retrieving the menu display information of the target element based on the menu display instruction; step S103, based on the items to be displayed, display area information, and layout method in the menu display information, using the layout method to layout the items to be displayed in the corresponding display area on the target page, so as to present the menu view of the target element on the target page.

[0194] According to the technical solution of the embodiment of the present invention, the corresponding target element is determined according to the sliding gesture, and the menu display information of the target element is called when the menu display instruction of the target element is triggered. Then, based on the items to be displayed, the display area information, and the layout method in the menu display information, the items to be displayed are laid out in the corresponding display area on the target page using the layout method. Therefore, the technical problems of poor customization capability and insufficient versatility of menu view display in the prior art are overcome, and the menu view of the target element can be presented in the specified display area on the specified target page, thereby achieving the effect of flexible display of the menu view.

[0195] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate 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 the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for presenting a menu view, characterized in that: include: Receiving a sliding gesture performed by a user on a target page, parsing the sliding gesture to obtain gesture data; wherein the sliding gesture is one of a gesture in different directions, a single-click gesture, a double-click gesture, and a gesture with a specified trajectory, and the gesture in different directions includes one of sliding right, sliding up, sliding down, and drawing a circle; Determining a target element to be operated in the target page according to the gesture data; in a case where it is determined according to the gesture data that a menu display instruction for the target element is triggered, retrieving menu display information of the target element based on the menu display instruction; wherein, determining whether the gesture data has triggered a menu display instruction for the target element is performed according to the following method, including: retrieving a gesture instruction library of the target element; obtaining a gesture trajectory in the gesture data, and determining whether there is a display instruction corresponding to the gesture trajectory in the gesture instruction library; if so, determining that the gesture data has triggered a menu display instruction for the target element, and using the display instruction corresponding to the gesture trajectory in the gesture instruction library as the menu display instruction for the target element; Based on the items to be displayed, display area information, and layout method in the menu display information, the items to be displayed are laid out in the corresponding display area on the target page using the layout method to present a menu view of the target element on the target page.

2. The method according to claim 1, characterized in that: The determining, according to the gesture data, a target element to be operated on the target page includes: Retrieving page layout information of the target page; Determining the coordinate range of each element in the target page according to the page layout information; The coordinate range of the gesture start coordinates in the gesture data is determined, and the element corresponding to the coordinate range is used as the target element.

3. The method according to claim 1, characterized in that The step of retrieving the gesture instruction library of the target element includes: Obtain the type of the target element; retrieve the element gesture instruction library corresponding to the element type as the gesture instruction library for the target element; or, The type of the target page is obtained; and a page gesture instruction library corresponding to the page type is retrieved as a gesture instruction library for the target element.

4. The method according to claim 1 or 2, characterized in that The method of laying out the items to be displayed in the corresponding display area on the target page using the layout method based on the items to be displayed, the display area information, and the layout method in the menu display information, so as to present the menu view of the target element on the target page, includes: Determining coordinate data and shape attribute data according to the display area information; Determine a window creation area based on the coordinate data and the shape attribute data, and create a target view window in the window creation area in the target page; The items to be displayed are drawn on the target view window using the layout method, so as to realize the presentation of the menu view of the target element on the target page.

5. The method according to claim 4, characterized in that The determining of coordinate data and shape attribute data according to the display area information includes: When the display area information includes specified coordinate data, the specified coordinate data is used as the coordinate data; when the display area information does not include specified coordinate data, a method is called according to the coordinates in the display area information to obtain the gesture end coordinates in the gesture data as the coordinate data; When the display area information contains specified shape attribute data, the specified shape attribute data is used as the shape attribute data; when the display area information does not contain specified shape attribute data, a method is called according to the shape attribute in the display area information to obtain the gesture trajectory in the gesture data to determine the shape attribute data.

6. The method according to claim 1 or 2, characterized in that Before laying out the items to be displayed in the corresponding display area on the target page using the layout method, the method further includes: confirming that a menu view of the target element does not exist in the target page; and, If the menu view already exists, when the menu display information includes a display area reset method, call the display area reset method to obtain the gesture end coordinates in the gesture data, and determine the shape attribute data based on the display area information; determine the reset display area based on the gesture end coordinates and the shape attribute data; and use the layout method to layout the items to be displayed in the reset display area on the target page.

7. The method according to claim 1, characterized in that Before determining, according to the gesture data, that a menu display instruction for the target element is triggered, the method further includes: confirming that there is no displayed menu view of the target element in the target page; and, If a displayed menu view of the target element already exists in the target page, determine whether a menu closing instruction is triggered for the displayed menu view based on the gesture data; and if triggered, close the displayed menu view corresponding to the menu closing instruction.

8. The method according to claim 7, characterized in that The determining, according to the gesture data, whether a menu closing instruction is triggered for the displayed menu view includes: Obtaining a gesture trajectory in the gesture data, and retrieving a second gesture instruction library of the target element; If there is a menu closing instruction corresponding to the gesture trajectory in the second gesture instruction library, determining whether the menu closing instruction triggers closing of the displayed menu view; If so, confirm that the gesture data triggers a menu closing instruction for the displayed menu view.

9. The method according to claim 1, characterized in that After the menu view of the target element is rendered on the target page, the following further comprises: When other menu views exist in the target page, the coexistence attribute of each other menu view is obtained; and the other menu views whose coexistence attribute is negative are closed.

10. A menu view presentation device, characterized in that: include: a receiving module, configured to receive a sliding gesture performed by a user on a target page, and analyze the sliding gesture to obtain gesture data; wherein the sliding gesture is one of a gesture in different directions, a single-click gesture, a double-click gesture, and a gesture with a specified trajectory; the gesture in different directions includes one of sliding right, sliding up, sliding down, and drawing a circle; an acquisition module, configured to determine a target element to be operated in the target page according to the gesture data; and in the case where it is determined according to the gesture data that a menu display instruction for the target element is triggered, retrieve menu display information of the target element based on the menu display instruction; wherein, determining whether the gesture data has triggered a menu display instruction for the target element is performed in accordance with the following method, including: retrieving a gesture instruction library of the target element; obtaining a gesture trajectory in the gesture data, and determining whether a display instruction corresponding to the gesture trajectory exists in the gesture instruction library; if so, determining that the gesture data has triggered a menu display instruction for the target element, and using the display instruction corresponding to the gesture trajectory in the gesture instruction library as the menu display instruction for the target element; A layout module is used to layout the items to be displayed in the corresponding display area on the target page using the layout method based on the items to be displayed, display area information, and layout method in the menu display information, so as to present the menu view of the target element on the target page.

11. An electronic device for presenting a menu view, 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 9.

12. 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 9 is implemented.

Citation Information

Patent Citations

  • Mobile terminal for displaying menu information accordig to trace of touch signal

    CN101957679A

  • Page control method and device and computer readable storage medium

    CN110764682A