A view construction method, apparatus, electronic device, and readable storage medium

By constructing a 3D view of the target device, the problem of developers struggling to locate user interface issues is solved, enabling them to quickly understand the user interface situation and improve the efficiency of problem location.

CN115509525BActive Publication Date: 2026-04-03BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Because developers are unfamiliar with the specifics of the user's device, they often struggle to quickly pinpoint the causes of issues such as page misalignment and black screens in the user interface.

Method used

By determining the pages and page attributes displayed on the target device, a 3D view is constructed, including the corresponding arrangement order and labeling information of the pages. The view set and the initial hierarchy information and attributes of the views are determined. Based on this information, a 3D view of the target device is constructed, avoiding view overlap and rendering.

Benefits of technology

This enables developers to quickly understand the specifics of the user interface, improves problem localization efficiency, and quickly finds issues such as page misalignment and black screens.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509525B_ABST
    Figure CN115509525B_ABST
Patent Text Reader

Abstract

This application provides a view construction method, apparatus, electronic device, and readable storage medium, belonging to the field of computer technology. This application involves: determining a page displayed on a target device and its corresponding page attributes, the page attributes including the page's arrangement order and tagging information; determining a set of views corresponding to the page and initial hierarchy information and view attributes for each view in the set; for each view, determining corresponding target hierarchy information based on the arrangement order and the initial hierarchy information; and determining corresponding rendering information based on the tagging information and the view attributes; and constructing a three-dimensional view corresponding to the target device based on the target hierarchy information and rendering information for all views.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a view construction method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] A user interface (UI) is the medium through which a system and a user interact and exchange information. It converts information from its internal form to a form that is acceptable to humans. The user interface is software designed to facilitate interaction and communication between the user and the hardware, aiming to enable users to operate the hardware conveniently and efficiently to achieve two-way interaction and complete the tasks they wish to accomplish with the help of the hardware.

[0003] In practical applications, when user interfaces encounter problems such as page misalignment and black screens, the solution is generally as follows: the user reports the problem to the developers, who then investigate the cause of the problem based on the user's feedback and resolve the issue accordingly.

[0004] However, because developers do not understand the specific situation on the user's end (such as which pages are opened and the corresponding control logic of each page), it is difficult to quickly locate the cause of the problem on the user's end. Summary of the Invention

[0005] To address the aforementioned technical problem of difficulty in quickly locating the cause of user-side issues due to developers' lack of understanding of the specific circumstances of the user-side, this application provides a view construction method, apparatus, electronic device, and readable storage medium.

[0006] Firstly, a view construction method is provided, the method comprising:

[0007] Determine the page displayed on the target device and the page attributes corresponding to the page, wherein the page attributes include the arrangement order and tag information corresponding to the page;

[0008] Determine the view set corresponding to the page, and the initial hierarchy information and view attributes corresponding to each view in the view set;

[0009] For each view, the corresponding target level information is determined based on the arrangement order and the initial level information corresponding to the view, and the corresponding rendering information is determined based on the tag information and the view attribute corresponding to the view;

[0010] Based on the target hierarchy information and rendering information corresponding to all the views, a 3D view corresponding to the target device is constructed.

[0011] In one possible implementation, constructing a 3D view corresponding to the target device based on the target hierarchy information and rendering information corresponding to all the views includes:

[0012] Determine the initial hierarchical structure based on the target hierarchical information corresponding to all the views;

[0013] Based on the initial hierarchical structure, a target hierarchical structure is constructed, wherein the target hierarchical structure contains multiple target layers, and there is no overlapping area between the views contained in each target layer;

[0014] The 3D view is constructed based on the target hierarchy and the rendering information corresponding to each view.

[0015] In one possible implementation, the initial hierarchy includes multiple initial layers, each of which contains at least one of the views.

[0016] The construction of the target hierarchical structure based on the initial hierarchical structure includes:

[0017] Among the multiple initial layers, the initial layer containing at least two views is identified as the layer to be confirmed;

[0018] For each layer to be confirmed, at least two views in the layer to be confirmed are combined in pairs to obtain at least one combination;

[0019] For each of the aforementioned combinations, if two views in the combination overlap, one of the views in the combination is placed on a newly created additional layer;

[0020] Based on the initial hierarchical structure and the additional layers, the target hierarchical structure is constructed, and the initial layer and the additional layers are used as the target layers.

[0021] In one possible implementation, the method further includes:

[0022] For each of the combinations, a first position of the first view in the combination on the page is determined, and a second position of the second view in the combination on the page is determined;

[0023] If there is an overlapping area between the first position and the second position, it is determined that the two views in the combination overlap.

[0024] In one possible implementation, constructing the 3D view based on the target hierarchy and the rendering information corresponding to each view includes:

[0025] Determine the number of all target layers in the target hierarchy, and the target hierarchy corresponding to each target layer;

[0026] For each target layer, based on preset reference coordinate points, layer spacing, number of layers, and target level corresponding to the target layer, the position of the target layer in a preset three-dimensional space is determined, and the target layer is rotated according to a preset rotation matrix to obtain the pose of the target layer in the preset three-dimensional space;

[0027] According to the position and posture corresponding to each target layer, the target layer is placed in the preset three-dimensional space, and the view contained in the target layer is rendered based on the rendering information corresponding to each target layer to obtain the three-dimensional view.

[0028] In one possible implementation, determining the corresponding target hierarchy information based on the arrangement order and the initial hierarchy information corresponding to the view includes:

[0029] Based on the arrangement order of the page, determine the reference page that precedes the page, and determine the number of levels corresponding to the reference page;

[0030] The target level information is determined based on the initial level information and the number of levels corresponding to the view.

[0031] In one possible implementation, before determining the page displayed by the target device and the page attributes corresponding to the page, the method further includes:

[0032] Detect whether a screenshot event has occurred on the target device;

[0033] When a screenshot event is detected on the target device, the step of determining the page displayed on the target device and the page attributes corresponding to the page is executed, wherein the page attributes include the arrangement order and tag information of the page.

[0034] Secondly, a view construction apparatus is provided, the apparatus comprising:

[0035] The first determining module is used to determine the page displayed by the target device and the page attributes corresponding to the page, wherein the page attributes include the arrangement order and marking information corresponding to the page;

[0036] The second determining module is used to determine the view set corresponding to the page and the initial hierarchical information and view attributes corresponding to each view in the view set;

[0037] The third determining module is used to determine the corresponding target level information for each view based on the arrangement order and the initial level information corresponding to the view, and to determine the corresponding rendering information based on the marking information and the view attribute corresponding to the view.

[0038] A construction module is used to construct a 3D view corresponding to the target device based on the target hierarchy information and rendering information corresponding to all the views.

[0039] In one possible implementation, the building module is specifically used for:

[0040] Determine the initial hierarchical structure based on the target hierarchical information corresponding to all the views;

[0041] Based on the initial hierarchical structure, a target hierarchical structure is constructed, wherein the target hierarchical structure contains multiple target layers, and there is no overlapping area between the views contained in each target layer;

[0042] The 3D view is constructed based on the target hierarchy and the rendering information corresponding to each view.

[0043] In one possible implementation, the initial hierarchy includes multiple initial layers, each of which contains at least one of the views.

[0044] The building module is also used for:

[0045] Among the multiple initial layers, the initial layer containing at least two views is identified as the layer to be confirmed;

[0046] For each layer to be confirmed, at least two views in the layer to be confirmed are combined in pairs to obtain at least one combination;

[0047] For each of the aforementioned combinations, if two views in the combination overlap, one of the views in the combination is placed on a newly created additional layer;

[0048] Based on the initial hierarchical structure and the additional layers, the target hierarchical structure is constructed, and the initial layer and the additional layers are used as the target layers.

[0049] In one possible implementation, the apparatus further includes a fourth determining module, configured to:

[0050] For each of the combinations, a first position of the first view in the combination on the page is determined, and a second position of the second view in the combination on the page is determined;

[0051] If there is an overlapping area between the first position and the second position, it is determined that the two views in the combination overlap.

[0052] In one possible implementation, the building module is further configured to:

[0053] Determine the number of all target layers in the target hierarchy, and the target hierarchy corresponding to each target layer;

[0054] For each target layer, based on preset reference coordinate points, layer spacing, number of layers, and target level corresponding to the target layer, the position of the target layer in a preset three-dimensional space is determined, and the target layer is rotated according to a preset rotation matrix to obtain the pose of the target layer in the preset three-dimensional space;

[0055] According to the position and posture corresponding to each target layer, the target layer is placed in the preset three-dimensional space, and the view contained in the target layer is rendered based on the rendering information corresponding to each target layer to obtain the three-dimensional view.

[0056] In one possible implementation, the third determining module is specifically used for:

[0057] Based on the arrangement order of the page, determine the reference page that precedes the page, and determine the number of levels corresponding to the reference page;

[0058] The target level information is determined based on the initial level information and the number of levels corresponding to the view.

[0059] In one possible implementation, the device further includes a detection module for:

[0060] Detect whether a screenshot event has occurred on the target device;

[0061] When a screenshot event is detected on the target device, the step of determining the page displayed on the target device and the page attributes corresponding to the page is executed, wherein the page attributes include the arrangement order and tag information of the page.

[0062] Thirdly, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0063] Memory, used to store computer programs;

[0064] When a processor executes a program stored in memory, it implements any of the steps described in the first aspect.

[0065] Fourthly, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the methods described in the first aspect.

[0066] Fifthly, a computer program product containing instructions is provided that, when run on a computer, causes the computer to execute any of the view construction methods described above.

[0067] Beneficial effects of the embodiments in this application:

[0068] This application provides a view construction method, apparatus, electronic device, and readable storage medium. The method involves: first, determining the pages displayed on the target device and their corresponding page attributes, including the page arrangement order and tagging information; then, determining the view set corresponding to the page and the initial hierarchy information and view attributes for each view in the view set; further, for each view, determining the corresponding target hierarchy information based on the arrangement order and the initial hierarchy information, and determining the corresponding rendering information based on the tagging information and the view attributes; finally, constructing a 3D view of the target device based on the target hierarchy information and rendering information for all views. Thus, when the user interface of the target device exhibits problems such as page misalignment or black screens, a corresponding 3D view can be constructed based on the pages displayed on the target device and their page attributes. This allows users to understand the specific situation of the target device from the 3D view (such as which pages are open and the control logic corresponding to each page), thereby quickly locating the problem and improving the efficiency of problem finding.

[0069] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0070] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0071] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0072] Figure 1 A flowchart illustrating a view construction method provided in an embodiment of this application;

[0073] Figure 2A flowchart illustrating another view construction method provided in this application embodiment;

[0074] Figure 3 A flowchart illustrating another view construction method provided in this application embodiment;

[0075] Figure 4 An example of a three-dimensional view provided for an embodiment of this application;

[0076] Figure 5 This is a schematic diagram of the structure of a view construction device provided in an embodiment of this application;

[0077] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0078] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0079] The view construction method provided in this application will be explained and described below with reference to the accompanying drawings and specific embodiments. The embodiments do not constitute a limitation on the embodiments of this application.

[0080] See Figure 1 This is a flowchart illustrating an embodiment of a view construction method provided in this application. Figure 1 As shown, the process may include the following steps:

[0081] S101, determine the page displayed on the target device and the page attributes corresponding to the page, wherein the page attributes include the arrangement order and tag information corresponding to the page.

[0082] The aforementioned target devices refer to devices that can be used to display user interfaces, such as mobile phones and tablets.

[0083] The above page is the application page currently open on the target device.

[0084] The page attributes mentioned above refer to the attribute information corresponding to the page, including the page's arrangement order and tag information. The arrangement order refers to the order in which each page is listed among all currently opened pages; generally, pages accessed more recently appear earlier in the arrangement. Tag information refers to information used to identify the page, such as whether the page is the currently active page (KeyWindow) and the page's root view controller (rootVC).

[0085] In one embodiment, determining the page displayed by the target device and the corresponding page attributes may specifically include: sending a page retrieval instruction to the target device, so that the target device can determine the currently opened page and the corresponding page attributes according to the instructions of the page retrieval instruction, and provide feedback based on the currently opened page and the corresponding page attributes.

[0086] In practical applications, when devices experience issues such as page misalignment or black screens, users typically take screenshots and provide feedback to developers. Therefore, in one embodiment, it is possible to detect in real time whether a screenshot event has occurred on the target device. Upon detection of a screenshot event, the steps of determining the page displayed on the target device and its corresponding page attributes, including the page's arrangement order and tagging information, are executed. Thus, the method for constructing a 3D view provided in this application embodiment can be automatically executed upon the occurrence of a screenshot event, without requiring manual user intervention.

[0087] Therefore, optionally, the page retrieval command can also be used to instruct the target device to send back the screenshot image corresponding to the screenshot event, so that developers can easily view the screen display.

[0088] S102, determine the view set corresponding to the page and the initial hierarchy information and view attributes corresponding to each view in the view set.

[0089] The above view set contains all the views that make up the corresponding page.

[0090] Initial hierarchy information refers to the hierarchy of the corresponding view on the page, such as the first level, the second level, etc.

[0091] View properties include basic properties and logical properties. Basic properties include the position and display format (such as showing or hiding) of each view on the page. Logical properties include the relationship between VCs (View Controls).

[0092] In one embodiment, the page retrieval instruction is further used to instruct the target device to return the view set corresponding to the page, as well as the initial hierarchy information and view attributes corresponding to each view in the view set.

[0093] To facilitate transmission, the target device can store the view and its corresponding view attributes according to the initial hierarchy information of each view to obtain the logical tree of the page. Then, the logical tree is serialized into a string (such as a JSON string) and fed back, so as to achieve the purpose of feeding back the view set and the initial hierarchy information and view attributes of each view in the view set to the destination.

[0094] Thus, upon receiving the string, it can be parsed to obtain the view set corresponding to the page, as well as the initial hierarchy information and view attributes of each view in the view set.

[0095] In practical applications, after receiving a string, it can be stored in a pre-defined database (such as Elasticsearch). This allows developers to conveniently parse the string at a later time, eliminating the need for direct parsing upon receipt. Furthermore, the device ID of the target device that returned the string can be recorded during storage, enabling developers to easily find the corresponding string based on the device ID.

[0096] 103. For each of the views, determine the corresponding target level information based on the arrangement order and the initial level information corresponding to the view, and determine the corresponding rendering information based on the tag information and the view attribute corresponding to the view.

[0097] Rendering information is used to render the corresponding view when building the 3D view later.

[0098] For example, the marking information is used to mark the corresponding view during rendering; the position in the view properties is used to determine the rendering position; the display format (such as show or hide) in the view properties is used to determine whether the view is shown or hidden during rendering; and the VC affiliation in the view properties is used to mark the affiliation in the corresponding view. In this way, users can easily understand the information of all views intuitively through the constructed 3D view.

[0099] Initial hierarchy information refers to the view's hierarchy within its corresponding page.

[0100] Target hierarchy information refers to the view's hierarchy among all pages.

[0101] In one embodiment, when the number of pages is one, the initial hierarchy information of the view is determined as the target hierarchy information.

[0102] In another embodiment, when the number of pages is at least two, the specific implementation of determining the corresponding target level information based on the arrangement order and the initial level information corresponding to the view may include: determining a reference page sorted before the page based on the arrangement order corresponding to the page, determining the level number corresponding to the reference page, and determining the target level information based on the initial level information corresponding to the view and the level number.

[0103] For example, there are two pages, page one (first) and page two (second). Page one and page two each contain three layers of views. For page one, there are no other pages preceding it. Therefore, the initial and target layer information of the first, second, and third layers of views on page one are the same, namely, layer 1, layer 2, and layer 3, respectively. For page two, there is page one (which contains three layers of views) preceding it. Therefore, the target layer information of the first layer of views on page two is layer 4 (i.e., 1 plus 3), the target layer information of the second layer of views on page two is layer 5 (i.e., 2 plus 3), and the target layer information of the third layer of views on page two is layer 6 (i.e., 3 plus 3).

[0104] S104, Based on the target hierarchy information and rendering information corresponding to all the views, construct a three-dimensional view corresponding to the target device.

[0105] In this embodiment, the spatial structure relationship between all views can be determined by the target hierarchy information corresponding to each view, and each view can be rendered by the rendering information. Therefore, a three-dimensional view corresponding to the target device can be constructed based on the target hierarchy information and rendering information corresponding to all views, so that developers can intuitively understand the specific situation of the user interface.

[0106] As for the specific method of constructing the 3D view corresponding to the target device, it will be discussed later. Figure 2 The embodiments shown are described in detail, but will not be elaborated upon here.

[0107] In this embodiment, firstly, the pages displayed on the target device and their corresponding page attributes are determined. Page attributes include the page's arrangement order and tagging information. Then, the view set corresponding to the page and the initial hierarchy information and view attributes of each view in the view set are determined. Next, for each view, the corresponding target hierarchy information is determined based on the arrangement order and the initial hierarchy information, and the corresponding rendering information is determined based on the tagging information and the view's corresponding view attributes. Finally, based on the target hierarchy information and rendering information of all views, a 3D view corresponding to the target device is constructed. Thus, when the user interface of the target device experiences problems such as page misalignment or black screens, a corresponding 3D view can be constructed based on the pages displayed on the target device and their page attributes. This allows users to understand the specific situation of the target device from the 3D view (such as which pages are open and the control logic corresponding to each page), thereby quickly locating the problem and improving the efficiency of problem finding.

[0108] See Figure 2 This is a flowchart illustrating another embodiment of a view construction method provided by the present invention. Figure 2The process shown above Figure 1 Based on the illustrated process, this section describes how to construct a 3D view corresponding to the target device based on the target hierarchy information and rendering information corresponding to all the views. For example... Figure 2 As shown, the process may include the following steps:

[0109] S201, determine the initial hierarchical structure based on the target hierarchical information corresponding to all the views.

[0110] S202, Based on the initial hierarchical structure, a target hierarchical structure is constructed, wherein the target hierarchical structure contains multiple target layers, and there is no overlapping area between each view contained in the target layer.

[0111] S203, Based on the target hierarchical structure and the rendering information corresponding to each view, construct the three-dimensional view.

[0112] The following provides a unified explanation of S201-S203;

[0113] The initial hierarchy refers to the hierarchy structure built based on the original hierarchical relationship of the views. Taking page one and page two in the example above, the initial hierarchy structure built based on all the views corresponding to page one and page two includes views 1-6, that is, 6 layers.

[0114] In practical applications, the initial hierarchical structure contains multiple initial layers (i.e., the 6 layers in the example above), and each initial layer contains at least one view. To avoid multiple views on the same layer from obscuring each other, in one embodiment, the specific implementation of constructing the target hierarchical structure based on the initial hierarchical structure may include:

[0115] Among the multiple initial layers, the initial layer containing at least two views is determined as the layer to be confirmed; for each layer to be confirmed, the at least two views in the layer to be confirmed are combined in pairs to obtain at least one combination; for each combination, if the two views in the combination overlap, one of the views in the combination is placed on a newly created additional layer; based on the initial hierarchical structure and the additional layer, the target hierarchical structure is constructed, and the initial layer and the additional layer are used as the target layer.

[0116] It should be noted that when the target device returns a string corresponding to the logic tree, there must be at least two views on the same layer, that is, two views with the same parent node.

[0117] Specifically, the following steps can be used to determine whether two views in each combination overlap: for each combination, determine a first position of the first view in the combination on the page, and a second position of the second view in the combination on the page; if there is an overlapping area between the first position and the second position, it is determined that the two views in the combination overlap.

[0118] It is understandable that the first position is a set of coordinates and the second position is also a set of coordinates. If there are repeated coordinates in the two sets of coordinates, it means that there is an overlapping area between them; otherwise, there is no overlapping area.

[0119] Continuing with the example of pages one and two above, assuming that there are overlapping views a and b in the 6th layer, we can create a new additional layer as the 7th layer and place view a or b on the 7th layer.

[0120] pass Figure 2 The described embodiment determines an initial hierarchical structure based on the target hierarchical information corresponding to all views, and constructs a target hierarchical structure based on the initial hierarchical structure. The target hierarchical structure contains multiple target layers, and there are no overlapping areas between views within each target layer. Finally, a 3D view is constructed based on the target hierarchical structure and the rendering information corresponding to each view. This avoids overlapping views in the constructed 3D view, making the 3D view clearer and easier for developers to view.

[0121] See Figure 3 This is a flowchart illustrating another embodiment of a view construction method provided by the present invention. Figure 3 The process shown above Figure 2 Based on the illustrated process, the construction of the 3D view is described using the target hierarchical structure and the rendering information corresponding to each view. For example... Figure 3 As shown, the process may include the following steps:

[0122] S301, determine the number of all target layers in the target hierarchy structure, and the target hierarchy corresponding to each target layer.

[0123] S302, for each target layer, based on preset reference coordinate points, layer spacing, number of layers and target level corresponding to the target layer, determine the position of the target layer in a preset three-dimensional space, and rotate the target layer according to a preset rotation matrix to obtain the posture of the target layer in the preset three-dimensional space.

[0124] S303, according to the position and posture corresponding to each target layer, the target layer is placed in the preset three-dimensional space, and the view contained in the target layer is rendered based on the rendering information corresponding to each target layer to obtain the three-dimensional view.

[0125] The following provides a unified explanation of S301-S303;

[0126] In this embodiment of the application, reference coordinates (generally center point coordinates), layer spacing (i.e., the spacing between each target layer), horizontal rotation angle a (with the vertical y-axis as the axis), and vertical rotation angle b (with the horizontal x-axis as the axis) can be preset.

[0127] Taking the reference coordinates as the center point coordinates as an example, the position of each target layer in the preset three-dimensional space (such as the space container View) is calculated as follows: For each target layer, the target layer is first placed in the preset three-dimensional space by aligning the center point with the center point coordinates (wherein, when constructing the three-dimensional view with the space container View, the target layer is placed in the preset three-dimensional space through the corresponding layer container). Then, the target layer is translated by a distance z. Then, the target layer is rotated according to the horizontal rotation angle a and the vertical rotation angle b to obtain the position and orientation of the target layer in the preset three-dimensional space.

[0128] Where z = (num - n / 2) * d, num is the layer level of the target layer (e.g., layer 1, layer 6, etc.), n is the number of layers, and d is the layer spacing. It should be noted that when z is a positive number, it moves forward by z distances; when z is a negative number, it moves backward by z distances.

[0129] After determining the position and pose of each target layer, the target layer can be placed in the preset 3D space according to its position and pose. Simultaneously, for each view on each target layer, it is rendered according to the rendering information corresponding to that view, resulting in... Figure 4 The three-dimensional view shown.

[0130] pass Figure 3 The described embodiment determines the position and orientation of each target layer in a preset 3D space based on the target hierarchy structure. Then, each layer is placed in the preset 3D space according to its position and orientation, and each view is rendered according to the corresponding rendering information to obtain the corresponding 3D view. This allows users to understand the specific details of the page opened on the target device (such as the included views and their attributes) from the 3D view, thereby quickly locating problems on the target device and improving the efficiency of problem finding.

[0131] Based on the same technical concept, embodiments of this application also provide a view construction apparatus, such as... Figure 5 As shown, the device includes:

[0132] The first determining module 501 is used to determine the page displayed by the target device and the page attributes corresponding to the page, wherein the page attributes include the arrangement order and marking information corresponding to the page;

[0133] The second determining module 502 is used to determine the view set corresponding to the page and the initial hierarchical information and view attributes corresponding to each view in the view set;

[0134] The third determining module 503 is used to determine the corresponding target level information for each view based on the arrangement order and the initial level information corresponding to the view, and to determine the corresponding rendering information based on the marking information and the view attribute corresponding to the view.

[0135] The construction module 504 is used to construct a three-dimensional view corresponding to the target device based on the target hierarchy information and the rendering information corresponding to all the views.

[0136] In one possible implementation, the building module is specifically used for:

[0137] Determine the initial hierarchical structure based on the target hierarchical information corresponding to all the views;

[0138] Based on the initial hierarchical structure, a target hierarchical structure is constructed, wherein the target hierarchical structure contains multiple target layers, and there is no overlapping area between the views contained in each target layer;

[0139] The 3D view is constructed based on the target hierarchy and the rendering information corresponding to each view.

[0140] In one possible implementation, the initial hierarchy includes multiple initial layers, each of which contains at least one of the views.

[0141] The building module is also used for:

[0142] Among the multiple initial layers, the initial layer containing at least two views is identified as the layer to be confirmed;

[0143] For each layer to be confirmed, at least two views in the layer to be confirmed are combined in pairs to obtain at least one combination;

[0144] For each of the aforementioned combinations, if two views in the combination overlap, one of the views in the combination is placed on a newly created additional layer;

[0145] Based on the initial hierarchical structure and the additional layers, the target hierarchical structure is constructed, and the initial layer and the additional layers are used as the target layers.

[0146] In one possible implementation, the apparatus further includes a fourth determining module, configured to:

[0147] For each of the combinations, a first position of the first view in the combination on the page is determined, and a second position of the second view in the combination on the page is determined;

[0148] If there is an overlapping area between the first position and the second position, it is determined that the two views in the combination overlap.

[0149] In one possible implementation, the building module is further configured to:

[0150] Determine the number of all target layers in the target hierarchy, and the target hierarchy corresponding to each target layer;

[0151] For each target layer, based on preset reference coordinate points, layer spacing, number of layers, and target level corresponding to the target layer, the position of the target layer in a preset three-dimensional space is determined, and the target layer is rotated according to a preset rotation matrix to obtain the pose of the target layer in the preset three-dimensional space;

[0152] According to the position and posture corresponding to each target layer, the target layer is placed in the preset three-dimensional space, and the view contained in the target layer is rendered based on the rendering information corresponding to each target layer to obtain the three-dimensional view.

[0153] In one possible implementation, the third determining module is specifically used for:

[0154] Based on the arrangement order of the page, determine the reference page that precedes the page, and determine the number of levels corresponding to the reference page;

[0155] The target level information is determined based on the initial level information and the number of levels corresponding to the view.

[0156] In one possible implementation, the device further includes a detection module for:

[0157] Detect whether a screenshot event has occurred on the target device;

[0158] When a screenshot event is detected on the target device, the step of determining the page displayed on the target device and the corresponding page attributes, whereby the page attributes include the page's arrangement order and tagging information, is executed. In this embodiment, firstly, the page displayed on the target device and its corresponding page attributes are determined, including the page's arrangement order and tagging information. Then, the view set corresponding to the page and the initial hierarchy information and view attributes of each view in the view set are determined. Furthermore, for each view, the corresponding target hierarchy information is determined based on the arrangement order and the initial hierarchy information, and the corresponding rendering information is determined based on the tagging information and the view attributes. Finally, a 3D view corresponding to the target device is constructed based on the target hierarchy information and rendering information of all views. Thus, when the user interface of the target device experiences problems such as page misalignment or a black screen, a corresponding 3D view can be constructed based on the page displayed on the target device and its page attributes. This allows the user to understand the specific situation of the target device from the 3D view (such as which pages are open and the control logic corresponding to each page), thereby quickly locating the problem and improving the efficiency of problem finding.

[0159] Based on the same technical concept, this application also provides an electronic device, as shown in FIG.*, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0160] Memory 113 is used to store computer programs;

[0161] When processor 111 executes a program stored in memory 113, it performs the following steps:

[0162] Determine the page displayed on the target device and the page attributes corresponding to the page, wherein the page attributes include the arrangement order and tag information corresponding to the page;

[0163] Determine the view set corresponding to the page, and the initial hierarchy information and view attributes corresponding to each view in the view set;

[0164] For each view, the corresponding target level information is determined based on the arrangement order and the initial level information corresponding to the view, and the corresponding rendering information is determined based on the tag information and the view attribute corresponding to the view;

[0165] Based on the target hierarchy information and rendering information corresponding to all the views, a 3D view corresponding to the target device is constructed.

[0166] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0167] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0168] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0169] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0170] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described view construction methods.

[0171] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the view construction methods described above.

[0172] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0173] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0174] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A view construction method, characterized in that, The method includes: Determine the page displayed on the target device and the page attributes corresponding to the page, wherein the page attributes include the arrangement order and tag information corresponding to the page; Determine the view set corresponding to the page, and the initial hierarchy information and view attributes corresponding to each view in the view set; For each view, the corresponding target level information is determined based on the arrangement order and the initial level information corresponding to the view, and the corresponding rendering information is determined based on the tag information and the view attribute corresponding to the view; Based on the target hierarchy information and rendering information corresponding to all the views, construct a 3D view corresponding to the target device; The step of constructing a 3D view corresponding to the target device based on the target hierarchy information and rendering information corresponding to all the views includes: Determine the initial hierarchical structure based on the target hierarchical information corresponding to all the views; Based on the initial hierarchical structure, a target hierarchical structure is constructed, wherein the target hierarchical structure contains multiple target layers, and there is no overlapping area between the views contained in each target layer; The 3D view is constructed based on the target hierarchy and the rendering information corresponding to each view; The initial hierarchical structure contains multiple initial layers, and each initial layer contains at least one of the views. The construction of the target hierarchical structure based on the initial hierarchical structure includes: Among the multiple initial layers, the initial layer containing at least two views is identified as the layer to be confirmed; For each layer to be confirmed, at least two views in the layer to be confirmed are combined in pairs to obtain at least one combination; For each of the aforementioned combinations, if two views in the combination overlap, one of the views in the combination is placed on a newly created additional layer; Based on the initial hierarchical structure and the additional layers, the target hierarchical structure is constructed, and the initial layer and the additional layers are used as the target layers.

2. The method according to claim 1, characterized in that, The method further includes: For each of the combinations, a first position of the first view in the combination on the page is determined, and a second position of the second view in the combination on the page is determined; If there is an overlapping area between the first position and the second position, it is determined that the two views in the combination overlap.

3. The method according to claim 1, characterized in that, The process of constructing the 3D view based on the target hierarchy and the rendering information corresponding to each view includes: Determine the number of all target layers in the target hierarchy, and the target hierarchy corresponding to each target layer; For each target layer, based on preset reference coordinate points, layer spacing, number of layers, and target level corresponding to the target layer, the position of the target layer in a preset three-dimensional space is determined, and the target layer is rotated according to a preset rotation matrix to obtain the pose of the target layer in the preset three-dimensional space; According to the position and posture corresponding to each target layer, the target layer is placed in the preset three-dimensional space, and the view contained in the target layer is rendered based on the rendering information corresponding to each target layer to obtain the three-dimensional view.

4. The method according to claim 1, characterized in that, The step of determining the corresponding target level information based on the arrangement order and the initial level information corresponding to the view includes: Based on the arrangement order of the page, determine the reference page that precedes the page, and determine the number of levels corresponding to the reference page; The target level information is determined based on the initial level information and the number of levels corresponding to the view.

5. The method according to claim 1, characterized in that, Before determining the page displayed on the target device and the page attributes corresponding to the page, the method further includes: Detect whether a screenshot event has occurred on the target device; When a screenshot event is detected on the target device, the step of determining the page displayed on the target device and the page attributes corresponding to the page is executed, wherein the page attributes include the arrangement order and tag information of the page.

6. A view construction apparatus, characterized in that, The device includes: The first determining module is used to determine the page displayed by the target device and the page attributes corresponding to the page, wherein the page attributes include the arrangement order and marking information corresponding to the page; The second determining module is used to determine the view set corresponding to the page and the initial hierarchical information and view attributes corresponding to each view in the view set; The third determining module is used to determine the corresponding target level information for each view based on the arrangement order and the initial level information corresponding to the view, and to determine the corresponding rendering information based on the marking information and the view attribute corresponding to the view. The construction module is used to construct a 3D view corresponding to the target device based on the target hierarchy information and rendering information corresponding to all the views; Specifically, the construction module is used for: Determine the initial hierarchical structure based on the target hierarchical information corresponding to all the views; Based on the initial hierarchical structure, a target hierarchical structure is constructed, wherein the target hierarchical structure contains multiple target layers, and there is no overlapping area between the views contained in each target layer; The 3D view is constructed based on the target hierarchy and the rendering information corresponding to each view; The initial hierarchical structure contains multiple initial layers, and each initial layer contains at least one of the views. The building module is also used for: Among the multiple initial layers, the initial layer containing at least two views is identified as the layer to be confirmed; For each layer to be confirmed, at least two views in the layer to be confirmed are combined in pairs to obtain at least one combination; For each of the aforementioned combinations, if two views in the combination overlap, one of the views in the combination is placed on a newly created additional layer; Based on the initial hierarchical structure and the additional layers, the target hierarchical structure is constructed, and the initial layer and the additional layers are used as the target layers.

7. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Webpage loading method, device thereof and intelligent equipment

    CN111857855A

  • Simulating three-dimensional views using depth relationships among planes of content

    US9437038B1