Functional scene recognition method and electronic equipment
By automatically identifying the scene characteristics of the functional nodes and matching them with the preset scene characteristics, the difficulty of page feature recognition of electronic devices when display parameters change is solved, and fast and accurate functional scene recognition and adapting page layout is achieved, improving user experience.
Patent Information
- Application Number
- CN202410080171.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, when the display parameters of the electronic device change, it is necessary to manually identify the feature information of each application page, which leads to a large workload for developers and it is difficult to quickly and accurately identify the page features.
By obtaining the pending data of the functional node, determining its scene characteristics, and matching it with the target preset functional scene characteristics, automatically identifying the functional scenarios corresponding to the functional nodes, using AI technology to adaptively analyze page data, and formulating an adaptive page layout strategy.
It improves the accuracy and efficiency of functional scene recognition, ensures the consistency and integrity of page content under different display parameters, and reduces the workload of manual recognition.
Smart Images

Figure CN120372340A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to a function scenario recognition method and an electronic device. Background Art
[0002] With the continuous development of electronic technology, the types of electronic devices are increasing, and the differences in the display screens of electronic devices are becoming more and more obvious. For example, an electronic device can be a straight mobile phone, a folding screen mobile phone, or a tablet computer, etc. The display parameters of the display screens of different electronic devices, such as size or resolution, may be different. Under different display parameters, even for the same page, the content displayed on the screen may be different. For example, the screen size of a folding screen mobile phone in the folded state is different from that in the unfolded state. Therefore, the number of application icons that can be displayed on the screen in the folded state is different from the number of application icons that can be displayed on the screen in the unfolded state.
[0003] To ensure that the electronic device can completely display the page content of the page, or to ensure the integrity and consistency of the page content displayed on the screen when the display parameters of the display screen of the electronic device change, it is usually necessary to manually identify the characteristic information of the page of each application program. For example, when the page is displayed on the screen, the characteristic information of each display area, such as the size, position, corresponding function scenario of the display area, and the number, size, position, etc. of the display elements (such as icons, text, etc.) included in the display area. Thus, developers can formulate a page layout plan based on the characteristic information of the page and apply the page layout plan to the electronic device. The electronic device can control the display screen to display based on the page layout plan. For each different page, it is necessary to separately manually identify the characteristic information of the page, which increases the workload of developers.
[0004] Therefore, how to quickly and accurately identify the characteristic information of the page is a technical problem to be solved urgently. Summary of the Invention
[0005] Embodiments of the present application provide a function scenario recognition method and an electronic device, which can improve the efficiency and accuracy of recognizing the function scenario corresponding to the function node in the page.
[0006] In a first aspect, an embodiment of the present application provides a method for identifying a functional scenario. This method can be executed by an electronic device, or by a device matching the electronic device, such as being executed by a processor, a chip, or a chip system, etc. The method may include: in response to the completion information of functional node identification, obtaining the to-be-processed data of the functional nodes in the to-be-processed page; the to-be-processed data includes one or more data fields of the functional nodes; the display area corresponding to the functional nodes on the screen includes the functional nodes and N sub-elements included in the functional nodes, where N is an integer greater than or equal to 0; based on the to-be-processed data of the functional nodes, determining the scenario features of the functional nodes; if the scenario features of the functional nodes match the target preset functional scenario features, determining that the functional scenario corresponding to the functional nodes is the target preset functional scenario corresponding to the target preset scenario features; the target preset functional scenario is one of the preset functional scenarios; if there is no matching preset scenario feature for the scenario features of the functional nodes in the preset functional scenarios, determining that the functional scenario corresponding to the functional nodes is a no-category scenario.
[0007] It can be seen that the present application can determine the scenario features of the functional nodes from the to-be-processed data of the functional nodes in the to-be-processed page, and by comparing the scenario features of the functional nodes with the target preset scenario features, when the scenario features of the functional nodes match the target preset scenario features, it can be determined that the functional scenario corresponding to the functional nodes is the target preset functional scenario, or it can be determined that the functional scenario corresponding to the functional nodes is a no-category scenario. Based on this, the functional scenario corresponding to the functional nodes can be automatically determined, improving the accuracy and efficiency of functional scenario identification.
[0008] In a possible implementation, the scenario features of the functional nodes include the hierarchical features of the functional nodes, the sliding features, and the first node features of each sub-element included in the functional nodes; the first node features of a sub-element include at least one of the sub-element hierarchy, the click feature, the node size, the node range, and the node attributes.
[0009] It can be seen that the present application can automatically determine the scenario features corresponding to the functional nodes based on the above multiple features of the functional nodes, improving the accuracy of functional scenario identification.
[0010] In a possible implementation, the method may further include: in response to the sliding feature of the function node being non-slidable and the child elements of the function node satisfying a first condition, determining that the scene feature of the function node matches a first preset scene feature; wherein, the target preset scene feature is the first preset scene feature, and the target preset function scene is the first preset function scene corresponding to the first preset scene feature; the first sub-elements are the sub-elements of the function node that satisfy the first condition, and the first sub-elements of the function node satisfying the first condition include: the click features of the first sub-elements are all clickable; the sub-node levels of the first sub-elements are n levels greater than the level feature, where n is an integer greater than or equal to 1; the number of the first sub-elements is greater than or equal to a second preset number; the node sizes of the first sub-elements are the same, and the spacing distances between the first sub-elements are equal; the spacing distances between the first sub-elements are determined based on the node ranges of the first sub-elements; there are first sub-elements among the first sub-elements whose node attributes are text attributes or picture attributes.
[0011] It can be seen that by comparing the scene feature of the function node with the first preset scene feature, it can be determined whether the function scene corresponding to the function node is the first preset function scene, which can improve the accuracy of function scene recognition.
[0012] In a possible implementation, the method may further include: the scene feature of the function node includes the node width of the function node; in response to the node width of the function node being equal to half of the screen width, determining that the scene feature of the function node matches a second preset scene feature; wherein, the target preset scene feature is the second preset scene feature, and the target preset function scene is the second preset function scene corresponding to the second preset scene feature.
[0013] It can be seen that based on the size relationship between the node width of the function node and the screen width, it can be determined whether the function scene corresponding to the function node is the first preset function scene, which can improve the accuracy of function scene recognition.
[0014] In a possible implementation, the scene feature of the function node includes the node width, node height, node attribute, sliding feature, level feature of the function node, and the second node features of each sub-element included in the function node; the second node features of a sub-element include at least one of the node level, node width, node height of the sub-element, the number of sub-nodes of the sub-element, and the position feature of the sub-element.
[0015] It can be seen that the scene feature corresponding to the function node can be determined based on the scene feature of the function node and the second node features of each sub-element included in the function node, which is beneficial to ensuring the accuracy of function scene recognition.
[0016] In a possible implementation, the method may further include: in response to the sliding feature of the function node being non-slidable, the node attribute of the function node being a preset node attribute, and the child elements of the function node satisfying a second condition, determining that the scene feature of the function node matches a second preset scene feature; the target preset scene feature being the second preset scene feature, and the target preset function scene being a second preset function scene corresponding to the second preset scene feature; wherein, the second child element is a child element of the function node that satisfies the second condition; the second child element of the function node satisfying the second condition includes: the second child element has a node level that is 1 greater than the level feature; the node widths of the second child elements are equal, and the node widths of the second child elements are included in a preset width range; there is a child element in the second child element whose node height is less than a preset height; the number of child nodes of the second child element is a first preset number; the position feature of the second child element indicates that the second child element is arranged in a k-row and p-column arrangement, where k and p are integers greater than or equal to 2.
[0017] It can be seen that by comparing the scene feature of the function node with the second preset scene feature, it can be determined whether the function scene corresponding to the function node is the second preset function scene, which can improve the accuracy of function scene recognition.
[0018] In a possible implementation, the method may further include: inputting the scene feature of the function node into a preset classifier to obtain a scene recognition list corresponding to the function node output by the preset classifier, where the scene recognition list includes the matching results of the function node for multiple preset function scenes; wherein, the preset classifier is used to perform a matching process between the scene feature of the function node and multiple preset function scene features.
[0019] It can be seen that the scene feature of the function node can be matched with the preset scene features of multiple preset function scenes, thereby improving the efficiency of function scene recognition.
[0020] In a possible implementation, the method may further include: based on the function scene corresponding to the function node, adjusting the display area corresponding to the function node on the screen to obtain a target page corresponding to the page to be processed; the target page being a page adapted to the screen; in response to the startup indication information of the application, displaying the target page on the screen.
[0021] It can be seen that based on the function scene corresponding to the function node, the display area corresponding to the function node on the screen can be adjusted, which is beneficial to obtaining a target page adapted to the screen.
[0022] In a second aspect, an embodiment of the present application provides an electronic device, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute the method described in the first aspect or any one implementation manner of the first aspect.
[0023] In a third aspect, an embodiment of the present application provides a chip system, which includes at least one processor, a memory, and an interface circuit. The memory, the interface circuit, and the at least one processor are interconnected by lines, and program instructions are stored in at least one memory; when the program instructions are executed by the processor, the chip system is caused to execute the method described in the first aspect or any one implementation manner of the first aspect.
[0024] In a fourth aspect, an embodiment of the present application provides a computer program product containing instructions. When the computer program product runs on an electronic device, the electronic device is caused to execute the method described in the first aspect or any one implementation manner of the first aspect.
[0025] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions. When the instructions run on an electronic device, the electronic device is caused to execute the method described in the first aspect or any one implementation manner of the first aspect. Description of the Drawings
[0026] Figure 1A is a schematic diagram of an application interface provided by an embodiment of the present application;
[0027] Figure 1B is a schematic diagram of another application interface provided by an embodiment of the present application;
[0028] Figure 1C is a schematic diagram of yet another application interface provided by an embodiment of the present application;
[0029] Figure 1D is a schematic diagram of yet another application interface provided by an embodiment of the present application;
[0030] Figure 2 is a schematic flowchart of a process for formulating a page layout strategy provided by an embodiment of the present application;
[0031] Figure 3 is a schematic structural diagram of an AI processing system provided by an embodiment of the present application;
[0032] Figure 4 is a schematic flowchart of a method for identifying a functional scenario provided by an embodiment of the present application;
[0033] Figure 5 It is a schematic diagram of a functional node provided by an embodiment of the present application;
[0034] Figure 6 It is a schematic diagram of a JSON file corresponding to a page to be processed provided by an embodiment of the present application;
[0035] Figure 7A It is a schematic diagram of an XML file corresponding to a page to be processed provided by an embodiment of the present application;
[0036] Figure 7B It is a schematic structural diagram of a view tree provided by an embodiment of the present application;
[0037] Figure 7C It is a schematic diagram of a functional node file of a page to be processed provided by an embodiment of the present application;
[0038] Figure 8A It is a schematic diagram of a functional node corresponding to a page to be processed provided by an embodiment of the present application;
[0039] Figure 8B It is a schematic diagram of a functional scenario corresponding to a page to be processed provided by an embodiment of the present application;
[0040] Figure 9 It is a flowchart of a scenario recognition classifier for determining a functional scenario provided by an embodiment of the present application;
[0041] Figure 10 It is a schematic diagram of another application interface provided by an embodiment of the present application;
[0042] Figure 11 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application;
[0043] Figure 12 It is a schematic software structure diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0044] Next, embodiments of the present application will be described in conjunction with the accompanying drawings in the embodiments of the present application.
[0045] Terms such as "first", "second", "third", and "fourth" in the specification, claims, and accompanying drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0046] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expression refers to any combination of these items, including any combination of single item (s) or plural items (s). For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a, b, and c", where a, b, and c can be single or multiple.
[0047] Referring to "embodiment" herein means that the specific features, structures, or characteristics described in connection with the embodiment can be included in at least one embodiment of this application. The phrase appearing in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0048] The terms "component", "module", "system", etc. used in this specification are used to represent computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, an application running on a computing device and the computing device can both be components. One or more components can reside in a process and / or an execution thread, and the components can be located on one computer and / or distributed between two or more computers. In addition, these components can execute from various computer-readable media on which various data structures are stored. The components can communicate, for example, through local and / or remote processes according to signals having one or more data packets (such as data from two components interacting with each other from a local system, a distributed system, and / or a network, such as the Internet interacting with other systems through signals).
[0049] The user interface (UI) generally refers to the operation interface provided by a display device to the user. Display elements such as graphics and text can be displayed in the user interface. There can be a certain interaction method between the display device and the user. For example, the display device can respond to operations such as clicks, touches, and swipes on the display elements to perform display or information transmission. For example, the display device can transmit an instruction to a player in an electronic device to play music corresponding to the instruction. Among them, the electronic device can include a mobile phone, a tablet computer, etc., and the display device can include a mobile phone screen, a tablet computer screen, etc.
[0050] The user interface can include the user interface in an application (abbreviated as an app), the operation interface of an intelligent driving device, the main screen interface of a mobile phone, etc. In the embodiments of this application, the user interface in an application is taken as an example for illustration.
[0051] The user interface (abbreviated as a page) corresponding to any application can include one or more of multiple pages such as a loading page, a guiding page, a home page, and a content page. Usually, an application icon of the application can be displayed on the electronic device. When the electronic device detects a trigger operation (such as a click) on the application icon and responds to the trigger operation, the loading page of the application can be displayed. Among them, the loading page refers to the first page displayed after the application is opened. Usually, the loading page can be composed of a solid color or gradient background, a trademark (logo), copyright information, etc. The loading page is usually only displayed for a short period of time, such as 2 - 3 seconds. After the loading page is loaded, the guiding page is usually displayed. The guiding page generally includes several continuously displayed pages with a unified style, which are used to display the main functions and features of the application before it is officially used, or to introduce the new functions of the new version after the application is updated. The guiding page is usually displayed when the application is opened for the first time after being downloaded. If the application is not opened for the first time, after the loading page is loaded, the home page of the application can be directly displayed. The home page of the application is usually the most important page in the application, and some or all of the functions that the application can achieve can be displayed on the home page. For example, assuming the application is a shopping application, its home page can be as Figure 1A shown. The home page of the shopping application can be composed of the content of multiple parts such as a search bar at the top, multiple horizontal selection areas, multiple vertical product bars, and a navigation bar at the bottom. Among them, the horizontal and vertical directions can be as Figure 1A marked. For example, the multiple horizontal product bars can be composed of 8 components such as a "recharge center" and a "platform subsidy", and 4 components such as "flash sale" and "live broadcast"; the multiple vertical product bars can include components such as pictures and text information (such as prices) of multiple products. Through the home page, the content page can be further displayed. Usually, the content page can include various different functional types such as a list page, a detail page, a personal center page, a settings page, and a chat page. For example, when a detection is made for an object such as Figure 1AA trigger operation of the icon of any product in the multiple product columns shown can display a content page of the detail page function type in response to the trigger operation. The content page can be used to display the detailed information of the product, such as the product title, product price, product detail picture, monthly sales volume and other information.
[0052] Different electronic devices have different display parameters such as screen size, display ratio (such as aspect ratio) used to constrain the display effect of the page; and for the same electronic device, such as a foldable screen mobile phone, the screen size is different in the folded state and the unfolded state, resulting in different display effects of the same application (APP) page in the two screen states of the same electronic device. For example, a page can display complete information in the folded state of the mobile phone interface, but when the mobile phone is unfolded, the page may have a problem of reduced display information in the unfolded state of the mobile phone interface.
[0053] The folding methods of foldable screen mobile phones include folding inside out, folding up and down, etc.
[0054] For example, if the electronic device is a foldable screen mobile phone that folds inward and outward, and is in the folded state, the homepage of the shopping application page displayed by the foldable screen mobile phone may display the following: Figure 1A When the foldable screen phone switches to the unfolded state, the screen size increases, and accordingly, the size of each display element on the page also increases based on a certain ratio. For example, suppose Figure 1A The size of the display element "Recharge Center" shown is 50 pixels × 50 pixels. In the expanded screen, Figure 1B As shown in FIG. 1 , the size of the “recharge center” can be increased to 80 pixels × 80 pixels. Figure 1B The size of each display element shown in the figure has also increased to a certain extent. Since the width and height (also called length) of each display element in the page are increased in the expanded state, while the height of the screen in the expanded state does not change, only the width changes, the screen in the expanded state may not be enough to display all the enlarged display elements, resulting in the lack of some content on the page in the expanded state, such as Figure 1B As shown, there may be a lack of multiple vertical product columns, resulting in a reduction in the displayed content of the homepage. If the size of each display element on the page remains unchanged after the foldable screen phone is switched to the unfolded state, more blank areas will appear on the left and right sides of the page, wasting display space.
[0055] If the electronic device is a foldable screen mobile phone that is folded in half and in an unfolded state, the following may be displayed: Figure 1A When a foldable screen phone switches to the folded state, the height of the phone screen decreases, while the width remains unchanged, thereby reducing the screen size. In one case, the size of the displayed elements in the page can remain unchanged. If the screen size is smaller than the original size, the screen size will be smaller than the original size.Figure 1A The sizes of the display elements shown in the figure remain unchanged. Due to the limitation that the screen size in the folded state is smaller than that in the unfolded state, the screen cannot display the following Figure 1A The complete content of the page shown results in a reduction in the amount of information on the application page, such as Figure 1C As shown, the page displayed in the folded state lacks multiple vertical product columns.
[0056] For example, if the electronic device is a tablet computer, the display effect of the shopping application page on the mobile phone can be as follows: Figure 1A The same shopping app page can be displayed on a tablet as shown in Figure 1D As shown in the figure. Since the screen size of a mobile phone is smaller than that of a tablet computer, if the size of each display element in the page remains unchanged, the page displayed on the tablet computer may include the following: Figure 1D However, there are many blank areas on the left and right sides of the tablet computer, which reduces the displayed content of the homepage and wastes a lot of display space.
[0057] To ensure that the same page can be displayed on the display devices of different electronic devices Figure 1A The complete content shown, consistent and complete page content, and ensuring that the same page can display consistent content in different states of the same foldable screen mobile phone (such as folded state and unfolded state) to avoid loss of information. Customized page layout strategies can be formulated according to the display parameters of the application and electronic device (such as screen size, aspect ratio, etc.) to ensure that the display effect of the electronic device can be adapted to the application page. For example, the same content can be displayed in both the folded state and the unfolded state of the foldable screen mobile phone, and the amount of information contained is the same, thereby improving the user experience.
[0058] For example, see Figure 2 , Figure 2 A schematic diagram of the process of formulating page layout strategies for each application is shown. Figure 2 As shown, first, for each application, the developer can analyze and understand the structure of the page view, the size of the view and other information based on the application's page data; based on the information obtained from the analysis, the developer can adjust the page layout strategy of each application, such as determining the position and size of each display element in the page, and the developer can debug and adjust the page layout strategy to obtain the target page layout strategy; after completing the policy debugging, the configuration can be issued, that is, the page layout strategy corresponding to each application can be configured in the electronic device, so that the electronic device can display the page corresponding to each application based on the page layout strategy.
[0059] Among them, a view is an object drawn on the screen for interacting with users. Usually, a page of an application includes multiple views, and each view can represent the same or different content. For example, as Figure 1A shown, the top navigation bar can be composed of one view; for another example, Figure 1A shown, multiple horizontal product bars can form one view, and "Recharge Center", "Platform Subsidy", "Online Supermarket", etc. can also be views. The structure in a view can refer to the structural relationship between each view; for example, the structural relationship can mean that one view is a child element or a parent element of another view; for example, as Figure 1A shown, the bottom navigation bar at the bottom is the parent element of "Message" in the bottom navigation bar; "Message" is a child element of the bottom navigation bar. The size of a view can be used to indicate the size of a rectangular area occupied by the view on the screen, and the unit of size can be pixels. For example, the size of the bottom navigation bar can be 800×200, indicating that the bottom navigation bar occupies a rectangular area on the screen with a width of 800 pixels and a height of 200 pixels.
[0060] Usually, electronic devices such as smart phones and tablets lack management tools such as a third-party access engine for restricting and managing the pages of third-party applications, making it difficult to require third-party applications to input application data into the electronic device according to a unified standard, and it is also difficult to require third-party applications to independently set and input various constraint conditions for the electronic device. Therefore, developers need to analyze each application separately, identify the constraint conditions of each application, and formulate a matching layout strategy based on the constraint conditions of each application. This method is cumbersome, has limited generality, low engineering feasibility, and moreover, when the application is updated, developers also need to maintain it, resulting in excessive manpower input and low practicality.
[0061] Based on this, the embodiments of the present application provide a function scenario recognition method, which can be applied to an electronic device, enabling the electronic device to accurately identify the function scenario corresponding to a function node based on artificial intelligence (AI) technology, and thus can formulate a page layout adapted to the electronic device based on the function scenario corresponding to each function node.
[0062] Please refer to Figure 3 , Figure 3Schematic diagram of the structure of an AI processing system provided by an embodiment of this application. The AI processing system may include multiple modules such as a data understanding module, a scene recognition module, a planning algorithm module, and a decision-making strategy module. The AI processing system may receive input data, and the input data may include data such as device information, application data, and constraint conditions of an electronic device. Among them, the application data may include data in the page corresponding to the application, such as data including text, images, etc. in the page. The constraint conditions are used to describe the mutual positional relationship between each view in the page. During the process of the electronic device displaying the page, it may solve based on the constraint conditions in real time to determine the layout scheme in the current display area on the screen.
[0063] The data understanding module may be used to analyze the input data and determine information such as position information, relationship structure, and element characteristics from the input data. The position information may refer to the position information of the electronic device; the relationship structure may be a data structure in the application data, etc.; the element characteristics may be data characteristics in the application data, such as characteristics such as data attributes and data storage methods.
[0064] The planning algorithm module may be used to determine constraint conditions, perform high-performance solving, and determine evaluation criteria based on the processing results of the data understanding module. Among them, the constraint conditions are used to describe the mutual positional relationship between each view in the page. High-performance solving means that during the process of the electronic device displaying the page, it can solve based on the constraint conditions in real time to determine the layout scheme in the current display area on the screen. The evaluation criteria refer to the evaluation conditions used to evaluate the layout scheme in the current display area.
[0065] The scene recognition module may be used to perform function node recognition and function scene recognition on each application. Among them, based on the processing results of the data understanding module and the recognition algorithm determined by the planning algorithm module, the function node recognition can recognize each function node in the application; the function scene recognition refers to, based on the recognized function nodes, recognizing the specific function scenes corresponding to each function node, such as various function scenes such as a search bar, a vertical list, and a waterfall flow.
[0066] The decision-making strategy module may be used to perform zoom adjustment and add candidate elements to the display interfaces corresponding to each application based on the processing results of the planning algorithm module, and determine the layout strategy of each application based on the original strategy in the electronic device.
[0067] The AI processing system may output information such as the layout strategies and position information of each application obtained after being processed by the above multiple modules to the processor in the electronic device. Based on the layout strategies, position information, etc. of each application, the processor may perform rendering and drawing, so as to obtain the display interfaces adapted to each application.
[0068] Based on such as Figure 3The AI processing system shown can utilize AI technology to adaptively analyze the data of the page corresponding to the application, adaptively identify functional nodes, and can identify the functional scenarios corresponding to the functional nodes, thereby facilitating the layout of the page layout based on the functional scenarios and improving the display effect of the page.
[0069] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of a functional scenario recognition method provided by an embodiment of this application. This method can be executed by an electronic device, or by a processor in the electronic device, or can also be executed by a chip or chip system with processor functions, etc. As Figure 4 shown, the functional scenario recognition method may include but is not limited to the following steps:
[0070] S401, Obtain the data to be recognized of each functional node in the page to be processed.
[0071] The page to be processed refers to any page corresponding to the application to be processed. The application to be processed can be any type of application. For example, the application to be processed can be a shopping application, a map application, an audio and video playback application, etc., and this application does not make any limitations in this regard. The pages corresponding to the application to be processed may include multiple types of pages such as a loading page, a guiding page, a home page, and a content page. For example, the page to be processed can be the home page of a shopping application as Figure 1A shown. Among them, the number of pages to be processed can be one or more.
[0072] A functional node can also be called a functional module, a display module, etc. A functional node occupies a certain area in the page to be processed and is used to display the page content represented by the data field of the functional node. Essentially, a functional node is a node that meets specific conditions. This node may include one or more sub-nodes, that is, a functional node may include one or more sub-nodes. In other words, a functional node may include one or more views. If a node is a functional node, then this node can be called the node corresponding to the functional node. Among them, the specific conditions refer to the conditions for determining whether a node is a functional node, which can be set based on different application scenarios, and this application does not make any limitations in this regard.
[0073] Generally, a page to be processed may include multiple functional nodes. For example, as Figure 1A shown, for the home page of a shopping application, the search bar at the top, the navigation bar at the bottom, etc. can all be functional nodes.
[0074] The data to be recognized for a functional node refers to the data fields of that functional node. If the functional node includes sub-nodes, the data to be recognized for that functional node may also include the data fields of the sub-nodes. These data fields can be stored in the data format of a JS key-value pair data (JavaScript object notation, JSON) file. The JSON file corresponding to the page to be processed may include the data to be recognized for each functional node in the page to be processed, that is, the data fields of the nodes included in each functional node.
[0075] Optionally, after determining the functional nodes included in the page to be processed, the electronic device may generate a functional node recognition completion message, and in response to the functional node recognition completion message, execute S401.
[0076] Exemplarily, the JSON file corresponding to any one functional node in the page to be processed may be as Figure 6 shown, including multiple data fields as Figure 6 shown, including node identity identifier (node_indexId), node identifier (node_id), level (index), node attribute (class), body text (text), content description (content-desc), range (bounds), node width (width), node height (height), number of sub-nodes (son_nums), click attribute (clickable), scroll attribute (scrollable), and position attribute (loc). Figure 6 In it, the node with the node identity identifier of 25 identifies the functional node, and the 9 sub-nodes with the node identity identifiers of 26 - 34 are the sub-nodes of this functional node. The data fields included in each sub-node may include, but are not limited to, data fields such as node identity identifier, node identifier, level, node attribute, range, click attribute, scroll attribute, etc. For the sake of concise description, Figure 6 the data fields included in each sub-node are not shown in detail in it.
[0077] Among them, the node identity identifier (node_indexId) is the unique identity identifier of each node in the page to be processed. Based on the natural order of the arrangement of each node in the page to be processed, each node may correspond to a node identity identifier in sequence. For example, in the XML as Figure 7A shown, in order, node ① is the first node in the page to be processed, then the node identity identifier of node ① can be expressed as node_indexId: "index: id / 1"; nodes ② - ④ are the second, third, and fourth nodes in the page to be processed in sequence. For example, then the node identity identifier of node ③ can be expressed as node_indexId: "index: id / 3".
[0078] Node identifier refers to the resource identifier (resource-id), which can be used to locate the node. Based on the resource-id of the node, the position of the node can be found in the page to be processed, and thus the data fields of the node can be obtained. For example, resource-id = "android:id / content" means that by inputting "android:id / content", the node can be found in the page to be processed. Resource-id = "null" means that the resource identifier of the node is empty. Among them, the resource identifiers of different nodes may be the same or different. If there are multiple nodes with the same resource identifier, assuming they are all "android:id / content", then by searching for "android:id / content" in the page to be processed, all nodes with the resource identifier "android:id / content" can be filtered out.
[0079] Level is used to describe the level of the nodes included in the functional node, that is, the level of the view. The levels of different nodes may be the same or different. For example, different levels of two nodes mean that the levels of these two nodes are different; the same levels of two nodes mean that these two nodes are nodes at the same level. Based on the levels of multiple nodes, the structural relationship between each node can be determined. For example, index = "0" means that the node is a view with the largest level; index = "1" means that the node is the next-level node of the node with the largest level, indicating that this node is the child node of the node with level 0.
[0080] Node attribute is used to indicate the node attribute of the node. For example, class = "android.widget.FrameLayout" means that the attribute of the node is the frame layout (also called component) of the application plug-in in the Android system. Another example, class = "android.widget.TextView" means that the attribute of the node is the text attribute, and the content included in this node is mainly text content, such as can be used to introduce the detailed information of the product (such as origin, production date, etc.). Class = "android.widget.ImageView" means that the attribute of the node is the picture attribute, and the content included in this node is mainly pictures, for example, it can be the detailed picture of the product.
[0081] Body text is used to represent the text content included in the node. For example, text = "Reduce 50 for every 300 full" can mean that the text "Reduce 50 for every 300 full" is displayed at the position where the node belongs in the page to be processed; text = "null" can mean that no text content is displayed at the position where the node belongs.
[0082] Content description is a short text description used to describe components in the application to be processed, such as buttons, images, and text fields. It is usually used in accessibility services to help users identify and operate these components. For example, content-desc = "This is a button" indicates that the component formed by this node is a button. Another example is content-desc = "null", which means that this node has no text description.
[0083] Range, used to indicate the coordinate and size information of the functional node represented by this node. For example, bounds = "[0, 0][1122, 91]" means that the coordinates (starting coordinates) of the pixel at the upper left corner of this node are [0, 0], and the coordinates (ending coordinates) of the pixel at the lower right corner of this node are [1122, 91]. The rectangular area enclosed by the pixel at the upper left corner and the pixel at the lower right corner is the range of this node. Based on the coordinates of the pixel at the upper left corner and the coordinates of the pixel at the lower right corner, the size (width × height) of this node, that is, this functional node, can be determined to be 1122 pixels × 91 pixels.
[0084] Node width and node height respectively represent the width and length of the area occupied by the functional node on the screen. The units of node width and node height are both pixels. Usually, node width and node height can be determined based on the range of the functional node.
[0085] Number of child nodes refers to the number of child nodes included in this functional node. The child nodes included in the functional node are not functional nodes. The data fields of the child nodes included in the functional node can be obtained from the page data file of the page to be processed based on the node identity identifier of this functional node.
[0086] Click property is used to indicate whether the node is clickable. When this node is a functional node, it can indicate whether this functional node is clickable. For example, clickable = "true" means that this node is clickable. In response to a click operation on the screen area where this node belongs, a specific function can be triggered. For example, clicking on the Figure 1A "Recharge Center" as shown, the electronic device can display an interface for recharging the phone bill; clickable = "false" means that this node cannot be clicked. In other words, when a click operation on the screen area where this node belongs is received, no other operations will be triggered, such as displaying another interface, etc.
[0087] The scrollable attribute is used to indicate whether a node is scrollable. When the node is a functional node, it can indicate whether the functional node is clickable. For example, scrollable = "true" indicates that the node is scrollable. For instance, when a swipe operation on the screen area where the node is located is detected, in response to this swipe operation, hidden components, pictures, or text can be scrolled and displayed, which can be referred to as candidate elements. scrollable = "false" indicates that the node is not scrollable, which can mean that the node does not contain candidate elements.
[0088] The position attribute refers to the combined vector of the coordinates (starting coordinates) of the pixels at the upper left corner and the coordinates (ending coordinates) of the pixels at the lower right corner of the rectangular area occupied by the node on the screen, which can be used to determine the position of the node. For example, if the coordinates of the pixels at the upper left corner of the node are [36, 542] and the coordinates of the pixels at the lower right corner are [1086, 1102], then the position attribute of the node can be expressed as "loc": "[36, 542, 1086, 1102]".
[0089] Optionally, the functional nodes in the page to be processed can be determined based on the page data file of the page to be processed. The page data file of the page to be processed can be an Extensible Markup Language (XML) file. After determining the functional nodes in the page to be processed, the data fields included in each functional node can be output in the form of a JSON file.
[0090] Exemplarily, a page data file (taking an XML file as an example) of a page to be processed can be as Figure 7A shown, and it includes a total of 4 nodes, namely node ① to node ④, and each node represents a view. The data fields included in each node can be as Figure 7A shown. The electronic device can determine information such as the relationship structure, size, and position of each view in the page to be processed based on the XML file of the page to be processed, so as to determine the functional nodes in the page to be processed. In other words, the XML file of the page to be processed can include all the views included in the page to be processed, that is, the data of all nodes. A node can include multiple data fields, and each data field can represent an attribute of a node.
[0091] Among them, the page layout of the page to be processed can form a tree structure, which can be called a view tree. The root node in the view tree is the starting point of the view tree, and the "leaves" or "branches" extending from the root node can be defined as nodes, and a node can represent a view. Exemplarily, as Figure 7A shown, the view tree corresponding to the XML file can be as Figure 7BAs shown in the figure, in the view tree, node ① is the root node, and the hierarchical index of node ① is 0; nodes ② and ④ are the child nodes of node ①, and the hierarchical index is 1, indicating that the distance between node ② and the root node ④ is 1; node ③ is the child node of node ②, and the hierarchical index is 2. From Figure 7B it can be seen that nodes ② and ④ are nodes at the same level. Among them, each node includes multiple data fields as included in node ①. For the sake of concise description, Figure 7A the data fields included in each node are not fully shown. Based on this, the level of a functional node also refers to the distance between the node in the functional node and the root node in the view tree to which the node belongs.
[0092] The page layout of the page to be processed can be stored in the data format of an XML file. After determining the functional nodes in the page to be processed, a functional node file of the page to be processed can be obtained. The functional node file can be output in the data format of a JSON file. The functional node file of the page to be processed includes the data fields of all functional nodes in the page to be processed. In other words, the data fields of the functional nodes in the functional node file are the data fields determined as functional nodes in the XML file.
[0093] Exemplarily, the functional node file of the page to be processed can be as Figure 7C shown. As Figure 7C shown, the nodes with node identity identifiers (node_indexId) of 18, 124, 191, 265, 369, 384, and 403 each represent a functional node. For example, for the functional node with a node identity identifier of 18, in addition to the node identity identifier, it may also include data fields such as package name (package), node identifier (node_id), node attribute (class), range (bounds), and location attribute (loc). In the same page to be processed, the package names of all functional nodes are the same.
[0094] It can be seen that generally, the functional node file of the page to be processed may only include the data fields of the functional nodes and does not include the data fields of the non-functional nodes in the page to be processed. Therefore, the data to be processed for each functional node in the page to be processed is determined based on the functional node file and the page data file. For example, the data fields of the functional nodes can be obtained from the functional node file, and based on the node identity identifier of the functional node, the data fields of the child nodes included in the functional node can be obtained from the page data file.
[0095] S402. Based on the data to be recognized for each functional node, obtain the scene features of each functional node in the page to be processed.
[0096] For any functional node, the scene features of the functional node may include the features to be recognized in multiple aspects as shown in Table 1. The scene features as shown in Table 1 can be obtained based on the data to be recognized of the functional node. In addition to the respective scene features as shown in Table 1, the scene features of the functional node may further include the node features of each sub-element included in the functional node. For example, one or more of the node features such as the number of sub-elements, the node attribute (class) of the sub-element, the click attribute (clickable) of the sub-element, the level (index) of the sub-element, the node range (bounds) of the sub-element, the node width and node height of the sub-element, the position attribute (loc) of the sub-element, and the number of sub-nodes of the sub-element.
[0097] Table 1 Scene Features and Their Meanings and Specific Applications
[0098] Scene features Meaning Specific applications Attribute features Node attribute (node_class) Indicates the attributes of functional nodes Click features Click attribute (clickable) Indicates whether the functional node is clickable Size features Width / height attribute (width / height) Indicates the width / height of the functional node Hierarchy features Hierarchy (index) Indicates the distance from the root node in the view tree Swipe features Swipe attribute (scrollable) Indicates whether the functional node is swipeable and whether it includes candidate elements Connection features Size and position relationships between child elements Indicates the size and position relationships of each child element Row and column features Number of rows and columns of child elements Indicates the number of layers and structure of the functional node
[0099] Among them, the sub-elements included in the functional node refer to the components (which can be called views) included in the functional node. A functional node may include multiple sub-elements, and each sub-element is a view, which can also be called a node. In other words, a functional node may include multiple sub-nodes, and each of the sub-elements included in the functional node is not the functional node. The features to be recognized as shown in Table 1 can be determined based on the data fields of the node corresponding to the functional node.
[0100] The attribute feature can be determined based on the node attribute (node_class) of the functional node. For example, if the node attribute is node_class = "android.widget.FrameLayout", it can indicate that the layout method of the functional node is a frame layout. A frame layout is a common application plug-in (or called a component), that is, a layout method of a view in the Android system; node_class = “android.widget.TextView” indicates that the node attribute of the functional node is a text attribute, and the text attribute is used to indicate that the functional node mainly includes text content; node_class = “android.widget.ImageView” indicates that the node attribute of the functional node is a picture attribute, which can indicate that the functional node mainly includes a picture.
[0101] The click feature can be determined based on the value of the data field clickable corresponding to the functional node. For example, clickable = “true” indicates that the click feature of the functional node is clickable, such as Figure 5The function node 1 shown, when a click operation on "Search" is detected, can jump to the interface for displaying search results. clickable = "false" indicates that the click feature of the function node is non-clickable. For example, if the function node is a module for displaying the text description of a product, when a click operation on this function node is detected, it cannot jump to other interfaces. Among them, the sub-elements included in the function node also include the data field clickable, and the click feature of the sub-element is used to indicate the click attribute of the sub-element.
[0102] The size feature, that is, the node width (width) and node height (height) of the function node, is used to describe the size of the function node. The hierarchical feature can be determined based on the data field index of the node corresponding to the function node.
[0103] The sliding feature can be determined based on the data field scrollable of the node corresponding to the function node. If scrollable = "true", it means it can be scrolled. In other words, when a sliding operation on this function node is received, other candidate elements included in the function node can be displayed, that is, sub-elements that belong to this function node but are not displayed on the page to be processed. For example, in Figure 5 the function node 2 shown, if a sliding operation on the function node 2 is received, such as a sliding operation to the right, then the candidate elements included in the function node 2 can be displayed, that is, in Figure 5 the page shown are the displayed components, such as components like "Open Membership" and "Home Appliances & Furniture". Among them, the candidate elements are not function nodes. If scrollable = "false", it means it cannot be scrolled.
[0104] The connection feature refers to the size and position relationship between each sub-element included in the function node, and can be determined based on the data to be processed (such as data fields like bounds and index) of each sub-element (i.e., sub-nodes) included in the function node. A function node can include multiple sub-elements, and these sub-elements can be multiple sub-elements with equal size and evenly arranged (such as the spacing between each sub-element is equal). In this case, it can be said that the sub-elements in the function node are "successively closely connected". As Figure 5 in the function node 2 shown, sub-elements such as "Platform Subsidy" and "Recharge Center" are components with equal size and evenly arranged. The sizes of each sub-element included in the function node can be different from each other, or some sub-elements have the same size while some sub-elements have different sizes from each other. For example, Figure 5 in the function node 4 shown, the 2 sub-elements included in the function node 4 have different sizes. Among them, the spacing between each sub-element can refer to the left-right distance or the up-down distance, and this application does not make a limitation on this.
[0105] Row-column feature refers to the number of rows and columns of the sub-elements included in a functional node, which can be determined based on data fields such as the bounds of the child nodes included in the functional node. For example, as Figure 5 shown, the functional node 2 includes sub-elements with 2 rows and 2 columns, which can indicate that the number of layers of this functional node is 2 layers.
[0106] S403. Based on the scenario features of each functional node and multiple preset scenario features, determine the functional scenario corresponding to each functional node.
[0107] Functional scenario refers to a name given to a functional node based on features such as the position and function of the functional node in the page to be processed, and can be used to classify the functional node. Functional scenario can also be called node usage scenario, node application scenario, etc. Different functional scenarios can be defined based on the type of the application to be processed or the page to be processed. For example, in the embodiments of the present application, some typical functional scenarios can be defined, which can be called preset functional scenarios, and can include multiple typical functional scenarios such as top navigation bar, top search bar, horizontal navigation bar, horizontal treasure box, horizontal treasure box, product waterfall flow, bottom navigation bar, etc., as well as functional scenarios without categories. Among them, the functional scenario without category refers to other functional scenarios that do not belong to the above multiple typical functional scenarios.
[0108] Specifically, the preset scenario features of each preset functional scenario can refer to the content in Table 2. For each functional node, the scenario features of the functional node can be compared with the preset scenario features of each preset functional scenario shown in Table 2, so as to determine the functional scenario corresponding to the functional node. For example, assume that the scenario features of a functional node match the preset scenario features of a certain functional scenario (which can be called the target preset functional scenario) among the multiple preset functional scenarios shown in Table 2, then it can be determined that the functional scenario corresponding to the functional node is the target preset functional scenario.
[0109] Table 2 Preset Functional Scenarios and Preset Scenario Features
[0110]
[0111] Exemplarily, as Figure 8A shown, the functional scenario corresponding to the page to be processed can be as Figure 8B shown. As Figure 8A shown, the home page of a shopping application may include 8 functional nodes such as functional node 1 - functional node 8. Based on the preset scenario recognition rules, the functional scenario corresponding to each functional node can be determined, as Figure 8B shown.
[0112] Based on the preset scenario features of each preset functional scenario shown in Table 2, functional scenario recognition rules can be formulated. The functional scenario recognition rules can include recognition conditions corresponding to each preset functional scenario shown in Table 2. The electronic device can be configured with preset scenario recognition rules. By comparing the scenario features of the functional node with the preset scenario features, the functional scenario corresponding to the functional node can be determined.
[0113] Taking the two typical preset functional scenarios of the bottom navigation bar and the product waterfall flow as examples, the present application embodiment illustrates the preset scenario recognition rules.
[0114] For any functional node, the scenario features of the functional node can be compared with the preset functional scenario features of the bottom navigation bar, a preset functional scenario, so as to determine whether the functional scenario corresponding to the functional node is the bottom navigation bar. Before making the determination, the first node features of the child elements of the functional node can be obtained. The first node features of a child element can include one or more features such as the child element level, click feature, node size, node range, node attribute, etc.
[0115] If the scenario features of the functional node can simultaneously meet the following conditions (that is, the scenario features of the functional node are the same as the following preset scenario features of the bottom navigation bar), it can be regarded that the scenario features of the functional node match the preset scenario features of the bottom navigation bar, and then it can be determined that the functional scenario corresponding to the functional node is the bottom navigation bar:
[0116] (1) The sliding feature of the functional node is non-slidable. In other words, the functional node does not contain candidate elements;
[0117] (2) The child elements of the second layer are all clickable child elements; or, the clickable child elements have the same level;
[0118] (3) The number of clickable child elements with the same level is greater than or equal to 4;
[0119] (4) The clickable child elements with the same level have the same size and equal spacing;
[0120] (5) There are child elements including text content or picture content.
[0121] Among them, the sub-elements of the second layer refer to the sub-nodes whose sub-element hierarchy (i.e., the data field index of the sub-element) is 1 greater than the index of this function node. For example, if the index of this function node is 1, then the index of the sub-elements of the second layer of this function node is 2. Optionally, the sub-elements of the second layer of this function node can be called the first sub-elements. A clickable sub-element refers to a sub-node whose click attribute is clickable, that is, the value of the data field clickable is "true". Optionally, the above condition (3) can also be expressed as: the number of clickable sub-elements at the same level is greater than or equal to a second preset number. The second preset number can be any positive integer and can be modified according to application requirements, and this application does not limit it.
[0122] The sliding feature of a function node refers to the sliding feature (scrollable) shown in Table 1, which is determined by the value of the data field scrollable of the node corresponding to this function node. If scrollable = "false", it means that the sliding feature of this function node is non-scrollable.
[0123] The size of a sub-element is determined by the data field bounds of the sub-node. For example, if bounds = "[110, 10][1122, 91]", the size (width × height) of this sub-element can be determined to be 1012 pixels × 81 pixels. Similarly, based on the bounds of multiple sub-elements included in this function node and the sizes of multiple sub-elements calculated based on the bounds, the spacing distance between each sub-element can be determined.
[0124] Whether a sub-element includes text content or picture content can be determined based on the node attributes of the sub-node. For example, if the node attribute node_class of the sub-node = "android.widget.TextView" indicates that the node attribute of this sub-node is a text attribute, it can indicate that this sub-element includes text content; node_class = "android.widget.ImageView" indicates that the node attribute of this sub-node is a picture attribute, it can indicate that this sub-element includes picture content.
[0125] Exemplarily, as Figure 8A shown in the function node 8, the sub-elements it includes are five sub-elements: "Home", "Explore", "Messages", "Shopping Cart", and "Me". When a click operation on any one of the sub-elements is detected, the electronic device can respond to this click operation and jump to the corresponding interface. The sizes of the above five sub-elements are the same and the spacing distances are equal. Moreover, each sub-element includes text content. Therefore, the function node 8 conforms to the characteristics of a bottom navigation bar, and it can be determined that the function scenario corresponding to the function node 8 is a bottom navigation bar.
[0126] For any functional node, the scene features of the functional node can be compared with the preset functional scene features of a preset functional scene of a product waterfall flow, so as to determine whether the functional scene corresponding to the functional node is a product waterfall flow. Before making a determination, the second node features of the child elements of the functional node can be obtained. The second node features of a child element can include one or more of the node hierarchy of the child element, the node width, the node height of the child element, the number of child nodes of the child element, and the position features of the child element.
[0127] If the functional node simultaneously meets the following condition (1) or condition (2), in other words, if the scene features of the functional node match the features represented by the following condition (1) or match the features represented by condition (2), then it can be determined that the functional scene corresponding to the functional node is a product waterfall flow:
[0128] (1) The width of the functional node is equal to one-half of the screen width.
[0129] The width of the functional node can be determined by the data field bounds. If the width of a functional node is equal to one-half of the screen width, then the functional node can be determined as a candidate node.
[0130] Exemplarily, assume that in the page as shown in Figure 8A Two regions shown as A and B are regarded as two functional nodes, that is, the functional nodes in the page include functional nodes 1-6, A, B, and functional node 8. The width of A is equal to one-half of the screen width, and the width of B is equal to one-half of the screen width. Therefore, it can be determined that the functional scenes corresponding to A and B are both product waterfall flows.
[0131] (2) The following conditions are simultaneously met:
[0132] 1) The sliding feature of the functional node is slidable, in other words, there are candidate elements in the functional node.
[0133] 2) The node attribute of the functional node is a preset node attribute.
[0134] Among them, the preset node attribute can be a RecyclerView (RecyclerView), for example, it can be expressed as node_class = "android.recyclerview.widget.RecyclerView".
[0135] 3) The node widths of all child elements in the second layer are equal, and the node width of each child element is within a preset width range.
[0136] Among them, the preset width range can be set and modified based on the actual application scenario. For example, the preset width range can be W represents the width of the functional node.
[0137] 4) There are child elements in the second layer whose node height is less than the preset height.
[0138] 5) The number of child nodes of the child elements in the second layer is 1 (son_nums = 1).
[0139] Among them, the number of child nodes of the child elements in the second layer can be called the first preset number. Optionally, the first preset number can be set to any positive integer, such as 2, and this application does not limit it.
[0140] 6) All child elements in the second layer have k rows and p columns, where k and p are integers greater than or equal to 2.
[0141] Among them, the child elements in the second layer refer to the child nodes whose index is 1 greater than the index of the functional node. Optionally, the child elements in the second layer can be called the second child elements. The node features such as the node height, node width, number of child nodes, and position attribute of each child element in the second layer can be included in the data to be recognized of the functional node. Optionally, the node features of each child element can be obtained from the page data file of the page to be processed based on the node identity identifier of the functional node.
[0142] Based on the value of the sliding feature of the functional node, the sliding feature of the functional node can be determined. If the sliding feature of the functional node is expressed as scrollable = "true", then the sliding feature of the functional node can be determined to be slidable. Exemplarily, as Figure 8A shown in the functional node 7, in response to an operation of swiping down on the area corresponding to the functional node 7, the electronic device can display a hidden product bar.
[0143] The position attribute (loc) of any child element can be expressed as loc: "[a, b, c, d]", where [a, b] represents the coordinates of the pixels at the upper left corner of the child element (starting coordinates); [c, d] represents the coordinates of the pixels at the lower right corner of the child element (ending coordinates). loc[a] of a child element represents the first coordinate value (a) in its position attribute, that is, the abscissa value of the starting coordinate; loc[c] represents the third coordinate value (c) in its position attribute, that is, the abscissa value of the ending coordinate. Based on the number of values of loc[a] and loc[c] of all child elements in the second layer, the number of rows and columns of the arrangement of child elements in the second layer can be described. For example, if the values of loc[a] in the position attributes (loc) of all child elements in the second layer only include 2 different values, and the values of loc[c] only include 2 different values, it can be indicated that the child elements in the second layer have 2 rows and 2 columns, and each column of child elements is vertically aligned. Exemplarily, as Figure 8A shown in, assuming that the functional nodes in the page include functional nodes 1 - 8, asFigure 8A As shown, the second layer of the functional node 7 may include Figure 8A two columns of subelements as shown by A and B in
[0144] Optionally, the position attributes of all subelements in the second layer may also be referred to as the position characteristics of the subelements. By the number of values of loc[a] and loc[c], the number of rows and columns of the arrangement of subelements in the second layer can be described. For example, as described in condition 6) above, it can indicate that the subelements in the second layer are two rows and two columns.
[0145] The node height is less than the preset height, which can indicate that the difference obtained by subtracting lod[b] from loc[d] of the node is less than the preset height. The preset height is a preset pixel value. Usually, the preset height can be set to 0 pixels or 2 pixels, etc. For example, if the node height of a subelement is 0, it means that loc[b] and loc[d] of the subelement are equal, and the subelement may be a horizontal dividing line. Among them, the subelements with a node height less than the preset height can be dividing lines.
[0146] Exemplarily, as Figure 8A shown, the page includes a total of 8 functional nodes from functional node 1 to functional node 8. Among them, the functional node 7 can simultaneously meet all the conditions in the above condition (2), that is, the scene characteristics of the functional node 7 conform to the preset scene characteristics of the commodity waterfall flow. Therefore, it can be determined that the functional scene corresponding to the functional node 7 is the commodity waterfall flow.
[0147] In a possible implementation manner, a scene recognition classifier may be configured in the electronic device to determine the functional scene corresponding to each functional node by means of multi-classification, that is, comparing the to-be-recognized attributes of the functional node with the scene characteristics of all functional scenes shown in Table 2, so as to quickly and accurately determine the functional scene corresponding to the functional node.
[0148] Exemplarily, the process of the scene recognition classifier determining the functional scene can refer to Figure 9 . As Figure 9 shown, the scene characteristics of the functional node can be input into the scene recognition classifier. The scene recognition classifier can, based on the preset scene recognition rules, compare the scene characteristics of the functional node with the preset scene characteristics of the preset functional scenes shown in Table 2. If the scene characteristics of the functional node conform to the scene characteristics of a certain typical functional scene in the preset scene recognition rules, the functional scene can be marked as true in the recognition result of the typical scene, otherwise marked as false. As Figure 9As shown, assuming that the scene features of the function node conform to the preset scene features of the bottom navigation bar, it can be determined that the function scene of the function node is the bottom navigation bar. In the scene recognition result of the typical scene, mark the bit corresponding to the bottom navigation bar as true, and mark the bits corresponding to other function scenes as false. Further, if there is a "true" in the recognition result of the typical scene, a recognition list of the typical scene can be generated. In this recognition list, indicate that the function scene corresponding to the function node is the function scene corresponding to "true", such as the bottom navigation bar. Optionally, if all are "false" in the recognition result of the typical scene, it means that the attribute to be recognized of the function node does not conform to the scene features of any function scene in the typical function scenes. Therefore, it can be determined that the function scene corresponding to the function node is no category. Based on this, the recognition result of the function node can be obtained, and the function scene corresponding to the function node can be output.
[0149] In a possible implementation manner, the preset scene recognition rule in the electronic device can be based on statistics of the business logics of multiple types of application programs, such as counting the function nodes included in the pages corresponding to each application program, and counting the features of each function node, so as to determine multiple function scenes as shown in Table 2 and the scene features of each function scene.
[0150] Optionally, the function scenes corresponding to each function node in the page corresponding to each application program obtained by statistics can be stored in the JSON file corresponding to the page in the form of tags. For example, assuming that in the recognized application program, the function scene corresponding to function node a in a page is the top navigation bar, then the function scene corresponding to function node a can be marked as the top navigation bar in the JSON file corresponding to this page. For example, it can be expressed as "function node a - top navigation bar". Based on this, developers can formulate preset scene recognition rules through each function node and its corresponding tag, and check whether the recognition results of the function scenes corresponding to each function node in the page to be processed are accurate.
[0151] Optionally, after determining the function scenes corresponding to all function nodes in the page to be processed, a scene recognition list corresponding to the page to be processed can be generated. Assume that the page to be processed is as Figure 8A shown, and it includes function node 1 - function node 8 in total. The function scene corresponding to each function node can be as Figure 8B shown. Exemplarily, the scene recognition list corresponding to the page to be processed can be as shown in Table 3. Optionally, the scene recognition list can also be in other forms, and this application does not limit this.
[0152] Table 3 Scene Recognition List
[0153] Functional node Functional scene Functional node 1 Top navigation bar Functional node 2 Top search bar Functional node 3 Horizontal navigation bar Functional node 4 No category Functional node 5 Horizontal treasure box Functional node 6 Horizontal product bar Functional node 7 Product waterfall flow Functional node 8 Bottom navigation bar
[0154] It can be seen that based on the preset scenario recognition rules, this application can determine the function scenarios corresponding to each function node in the page to be processed, improving the efficiency and accuracy of function scenario recognition, facilitating the formulation of a reasonable page layout strategy for the page to be processed, thereby enhancing the adaptability of the electronic device to display various pages to be processed, enabling the page to be processed to display the content expected by the application to be processed on electronic devices with different screen sizes. For example, the same page to be processed has the same page layout and displays the same content on a mobile phone screen and a tablet computer screen, thus ensuring that the page to be processed does not lack information when displayed on different electronic devices. In addition, the method of determining the function scenarios corresponding to each function node based on the preset scenario recognition rules is executed by the electronic device, which can significantly reduce the workload of manual recognition by developers and improve the accuracy and efficiency of function scenario recognition.
[0155] S404. Based on the function scenarios corresponding to each function node, adjust the page layout of the page to be processed to obtain a target page, and display the target page.
[0156] Based on the Figure 3 shown AI processing system, according to the function scenarios corresponding to each function node and information such as the screen size of the electronic device, a page layout strategy corresponding to the page to be processed can be generated. The page layout strategy can be used to adjust the page layout of the page to be processed on the screen of the electronic device. For example, adjust the size and position of the display areas corresponding to each function node on the screen, and adjust the spacing distance between each function node, etc. During this process, devices such as the image processor in the electronic device can perform operations such as rendering and drawing based on the page layout strategy, thereby obtaining the target page. The target page displayed on the screen can include all the function scenarios that the page to be processed needs to display, thus ensuring the content consistency and integrity of the page to be processed when displayed on the electronic device.
[0157] Exemplarily, the page to be processed of a shopping application shown Figure 8B is a schematic diagram showing the display in the folded state of a folding-screen mobile phone. After determining the function scenarios corresponding to each function node in the page to be processed and adjusting the page layout of the page to be processed, the target page shown Figure 10 can be displayed in the unfolded state of the folding-screen mobile phone. Figure 10 The content included in the page shown Figure 8B is the same as the content included in the page shown
[0158] An exemplary electronic device provided by an embodiment of the present application will be introduced below. Please refer to Figure 11 , Figure 11 which shows a schematic structural diagram of the electronic device 100.
[0159] The embodiments will be specifically described below taking the electronic device 100 as an example. It should be understood that the electronic device 100 may have more or fewer components than those Figure 11 shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0160] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0161] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0162] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0163] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0164] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus can improve the efficiency of the system.
[0165] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0166] It can be understood that the interface connection relationships among the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0167] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0168] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), a flexible light-emitting diode (FLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0169] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0170] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera photosensitive element. The optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
[0171] The camera 193 is used to capture static images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB or YUV. In some embodiments, the electronic device 100 may include other cameras.
[0172] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0173] The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0174] The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission pattern between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as: image recognition, face recognition, speech recognition, text understanding, etc.
[0175] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.
[0176] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, applications required for at least one function (such as face recognition function, fingerprint recognition function, mobile payment function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as face information template data, fingerprint information template, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0177] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. Such as music playback, recording, etc.
[0178] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiment of the present invention, taking the Android system with a layered architecture as an example, the software structure of the electronic device 100 is exemplarily described.
[0179] Figure 12 It is the software structure block diagram of the electronic device 100 in the embodiment of the present invention.
[0180] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom are the application layer, the application framework layer (framework), the system runtime layer, the hardware abstraction layer (HAL), and the kernel layer (kernel).
[0181] The application layer may include a series of application packages.
[0182] Such as Figure 12 shown, the application packages may include system user interface (system UI), camera, calendar, WLAN, music, short message, gallery, call, map, Bluetooth, video and other applications (which can also be called apps), and as Figure 3The AI processing system shown. Among them, the system UI is used to display the interface of the electronic device 100, such as displaying the signal icon corresponding to the SIM card, displaying the call interface, etc. In the embodiments of the present application, the system UI can be used to display various application interfaces such as Figure 1A - Figure 1D , Figure 10 and so on. The AI processing system can receive the input file of the page to be processed of any application in the application layer, and determine the function nodes in the page to be processed based on the input file.
[0183] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0184] Such as Figure 12 shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.
[0185] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0186] The content provider is used to store and obtain data, and make this data accessible to application programs. The data may include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.
[0187] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build application programs. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
[0188] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of call status (including answering, hanging up, etc.).
[0189] The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, and so on.
[0190] The notification manager enables an application to display notification information in the status bar. It can be used to convey messages of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that a download is completed, a message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or a scroll bar text, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialogue interface. For example, it can prompt text information in the status bar, emit a prompt tone, vibrate the electronic device, blink the indicator light, etc.
[0191] The system runtime layer is divided into two parts, namely the C / C++ library and the Android runtime library. The Android runtime includes the runtime environment, which usually includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The C / C++ library mainly includes the multimedia library (media framework), the surface manager, the 3D graphics processing library (e.g., OpenGL ES), the 2D (two-dimensional) graphics engine (e.g., SGL), etc.
[0192] Among them, the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D image engine is the drawing engine for 2D drawing. In the embodiments of the present application, the 3D graphics engine and the 2D image engine can be used to render and draw the interfaces of each application.
[0193] The hardware abstraction layer is used to isolate the application framework layer from the kernel layer, avoiding the Android system's excessive dependence on the kernel layer, so that the development of the application framework layer can be carried out without considering the driver. The hardware abstraction layer can include multiple functional nodes. For example, modules such as the display HAL, the camera HAL, the audio HAL, the sensor HAL, etc.
[0194] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes the display driver, the camera driver, the shared memory driver, the audio driver, and the sensor driver. In the embodiments of the present application, the display driver can be used to display the interface of the application.
[0195] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0196] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps may be implemented in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0197] In several embodiments provided by this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.
[0198] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0199] In addition, each functional unit in the embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0200] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc., specifically, the processor in the computer device) to execute all or part of the steps of the above methods in various embodiments of this application. Among them, the aforementioned storage medium can include: various media that can store program codes, such as USB flash drives, mobile hard disks, magnetic disks, optical discs, read-only memory (ROM), or random access memory (RAM).
[0201] As mentioned above, the above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of this application.
Claims
1. A method for identifying functional scenarios, characterized in that, The method includes: In response to the completion information of function node recognition, obtaining the to-be-processed data of the function nodes in the to-be-processed page; the to-be-processed data includes one or more data fields of the function nodes; the display area corresponding to the function nodes on the screen includes the function nodes and N sub-elements included in the function nodes, where N is an integer greater than or equal to 0; Based on the to-be-processed data of the function nodes, determining the scene features of the function nodes; If the scene features of the function nodes match the target preset scene features, determining that the function scene corresponding to the function nodes is the target preset function scene corresponding to the target preset scene features; the target preset function scene is one of the preset function scenes; If there are no matching preset scene features for the scene features of the function nodes in the preset function scenes, determining that the function scene corresponding to the function nodes is a scene without a category.
2. The method according to claim 1, wherein The scene features of the function nodes include the hierarchical features, sliding features of the function nodes, and the first node features of each sub-element included in the function nodes; The first node features of a sub-element include at least one of the sub-element hierarchy, click feature, node size, node range, and node attribute.
3. The method according to claim 2, wherein The method further includes: In response to the sliding feature of the function node being non-slidable and the sub-elements of the function node satisfying the first condition, determining that the scene features of the function node match the first preset scene features; Wherein, the target preset scene features are the first preset scene features, and the target preset function scene is the first preset function scene corresponding to the first preset scene features; the first sub-element is the sub-element of the function node that satisfies the first condition, and the first sub-element of the function node satisfying the first condition includes: The click features of the first sub-elements are all clickable; The sub-node hierarchy of the first sub-elements is n greater than the hierarchical features, where n is an integer greater than or equal to 1; The number of the first sub-elements is greater than or equal to the second preset number; The node sizes of the first sub-elements are the same, and the spacing distances between the first sub-elements are equal; the spacing distances between the first sub-elements are determined based on the node ranges of the first sub-elements; There are first sub-elements with node attributes of text attribute or picture attribute among the first sub-elements.
4. The method according to claim 1, characterized in that The method further includes: The scene features of the function nodes include the node width of the function nodes; In response to the node width of the function node being equal to half of the screen width, determining that the scene features of the function node match the second preset scene features; Wherein, the target preset scene features are the second preset scene features, and the target preset function scene is the second preset function scene corresponding to the second preset scene features.
5. The method according to claim 1, characterized in that, The scene features of the function node include the node width, node height, node attributes, sliding features, hierarchical features of the function node, and the second node features of each sub-element included in the function node; the second node features of a sub-element include at least one of the node hierarchy, node width, node height of the sub-element, number of sub-nodes of the sub-element, and position features of the sub-element.
6. The method according to claim 5, characterized in that, The method further includes: In response to the sliding feature of the function node being non-slidable, the node attribute of the function node being a preset node attribute, and the sub-elements of the function node satisfying a second condition, determining that the scene features of the function node match second preset scene features; the target preset scene features are the second preset scene features, and the target preset function scene is the second preset function scene corresponding to the second preset scene features; Wherein, the second sub-element is the sub-element of the function node that satisfies the second condition; the second sub-element of the function node satisfying the second condition includes: The second sub-element has a node hierarchy that is 1 greater than the hierarchical feature; The node widths of the second sub-elements are equal, and the node width of the second sub-element is included in a preset width range; There is a sub-element in the second sub-element whose node height is less than a preset height; The number of sub-nodes of the second sub-element is a first preset number; The position feature of the second sub-element indicates that the second sub-element is arranged in an arrangement of k rows and p columns, where k and p are integers greater than or equal to 2.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: Inputting the scene features of the function node into a preset classifier to obtain a scene recognition list output by the preset classifier for the function node, where the scene recognition list includes the matching results of the function node for multiple preset function scenes; Wherein, the preset classifier is used to perform matching processing on the scene features of the function node and multiple preset function scene features.
8. The method according to any one of claims 1 to 6, characterized in that The method further includes: Based on the function scene corresponding to the function node, adjusting the display area corresponding to the function node on the screen to obtain a target page corresponding to the page to be processed; the target page is a page adapted to the screen; In response to the startup instruction information of the application, displaying the target page on the screen.
9. An electronic device, characterized in that, Includes: A memory and a processor; wherein: The memory is used to store a computer program, and the computer program includes program instructions; The processor is used to call the program instructions to cause the electronic device to execute the method according to any one of claims 1-8.
10. A chip system, characterized in that, The chip system includes at least one processor, a memory, and an interface circuit. The memory, the interface circuit, and the at least one processor are interconnected by lines. Program instructions are stored in the at least one memory; when the program instructions are executed by the processor, the chip system executes the method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Webpage adaptive adjustment method and system
CN105159960A
Page display method, front-end server and online banking system
CN107895035A
Interface function identification method and device for application and electronic equipment
CN109271228A
Interface layout method, device and system
CN111399789A
Page self-adaption method applied to government affair service terminal
CN112486488A