Data processing method, plug-in, page display method, device and equipment

By constructing the skeleton elements of the skeleton screen based on the positional relationship between nodes, the poor usability of the skeleton screen generation solution in the existing technology in complex page scenarios is solved, and the rationality and user experience of the skeleton screen are improved.

CN118885240APending Publication Date: 2024-11-01BEIJING AMAP YUNXIN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410840974.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The existing skeleton screen generation scheme has poor usability in complex page scenarios and cannot effectively characterize the page structure, resulting in a decrease in user experience.

Method used

By obtaining the node array of the target page, the bone elements of the skeleton screen are constructed based on the positional relationship between nodes, including sorting and merging processing, and the skeleton screen material is generated closer to the page structure.

Benefits of technology

It improves the rationality and usability of the skeleton screen, expands the application scenarios, improves the user experience, and better meets the needs of complex pages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885240A_ABST
    Figure CN118885240A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method, a plug-in, a page display method, device and equipment, and the method comprises the steps: obtaining a node array of a target page, the node array comprises nodes used for constructing a skeleton screen of the target page; constructing skeleton elements of a skeleton screen of the target page according to the position relationship among the nodes in the node array; and generating a material of the skeleton screen based on the skeleton elements. According to the data processing method provided by the invention, the availability of the generated skeleton screen can be improved, the use scene of the skeleton screen is expanded, the use experience of a user is improved, and the use requirement of the user can be better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a data processing method, a plug-in, a page display method, a device and equipment. Background Art

[0002] The skeleton screen is a gray area that represents the outline of the page displayed on the display screen before the page to be loaded is completely rendered. After the page is loaded, the skeleton screen will be replaced with the loaded page. The display of the skeleton screen is crucial to improving the user experience.

[0003] The existing skeleton screen generation scheme usually traverses the page nodes, and then divides the nodes into different skeleton element categories according to the node attributes, and then generates the skeleton screen material accordingly. However, the existing skeleton screen generation scheme has the problems of limited available scenarios and poor usability, which cannot meet the user's usage needs. Summary of the invention

[0004] The present application provides a data processing method, plug-in, page display method, device and equipment, which can improve the rationality and usability of the generated skeleton screen during the skeleton screen generation process, expand the application scenarios of the skeleton screen generation solution provided by the present application, and thus better meet the user's usage needs.

[0005] In a first aspect, the present application provides a data processing method, the method comprising:

[0006] Acquire a node array of a target page, wherein the node array includes nodes used to construct a skeleton screen of the target page;

[0007] Constructing skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array;

[0008] Based on the skeleton elements, the material of the skeleton screen is generated.

[0009] Optionally, constructing skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array includes:

[0010] Sort the nodes in the node array according to the position attributes of the nodes;

[0011] Merging nodes adjacent to each other in the sorted node array until all adjacent nodes in the node array are traversed;

[0012] Create a skeleton element corresponding to the node in the node array after the merge process.

[0013] Optionally, the position attribute of the node includes: a first position attribute and a second position attribute, the first position attribute is used to represent the distance from the upper edge of the node to the upper edge of the target page, and the second position attribute is used to represent the distance from the left edge of the node to the left edge of the target page;

[0014] The step of sorting the nodes in the node array according to the position attributes of the nodes includes:

[0015] Sort the nodes in the node array according to the first position attributes of the nodes in ascending order;

[0016] If there are nodes with the same first position attribute, the nodes with the same first position attribute are sorted in ascending order of the second position attributes of the nodes.

[0017] Optionally, the merging of adjacent nodes in the sorted node array until all adjacent nodes in the node array are traversed includes:

[0018] Traverse the sorted node array and perform the following operations:

[0019] Step A: taking the first node in the sorted node array as a reference node;

[0020] Step B: determining whether to merge the reference node with its subsequent adjacent nodes according to the distance between the reference node and its subsequent adjacent nodes;

[0021] Step C: If it is determined that the reference node and its adjacent nodes are to be merged, then the reference node is merged with its adjacent nodes thereafter, and the merged node is used as a new reference node, and the process returns to step B until the last node of the node array is traversed;

[0022] Step D: If it is determined not to merge the reference node with the adjacent node behind it, the adjacent node behind the reference node is used as a new reference node, and the process returns to step B until the last node of the node array is traversed.

[0023] Optionally, determining whether to merge the reference node with its subsequent adjacent nodes according to the distance between the reference node and its subsequent adjacent nodes includes:

[0024] If the horizontal distance between the reference node and its subsequent adjacent nodes is less than a preset horizontal distance threshold, and the vertical distance between the reference node and its subsequent adjacent nodes is less than a preset vertical distance threshold, then determining to merge the reference node and its subsequent adjacent nodes;

[0025] If the lateral distance between the reference node and its subsequent adjacent nodes is greater than or equal to a preset lateral distance threshold, and / or the longitudinal distance between the reference node and its subsequent adjacent nodes is greater than or equal to a preset longitudinal distance threshold, it is determined not to merge the reference node and its subsequent adjacent nodes.

[0026] Optionally, the lateral distance between the reference node and its subsequent adjacent nodes is obtained based on the difference between the horizontal coordinate of the center point of the reference node and the horizontal coordinate of the center point of the subsequent adjacent nodes, and the longitudinal distance between the reference node and its subsequent adjacent nodes is obtained based on the difference between the vertical coordinate of the center point of the reference node and the vertical coordinate of the center point of the subsequent adjacent nodes.

[0027] Optionally, merging the reference node with its subsequent adjacent nodes includes:

[0028] Based on the edge lines of the reference node and the subsequent adjacent nodes, a new bounding box is obtained, wherein the new bounding box encloses the reference node and the subsequent adjacent nodes;

[0029] The new bounding box is used as the merged node.

[0030] Optionally, the method further includes:

[0031] The merging step is skipped for nodes of a preset type in the sorted node array.

[0032] Optionally, the step of creating a skeleton element corresponding to the node in the node array after the merging process includes:

[0033] Determining, according to the types of the nodes in the node array after the merging process, an interface processing strategy for the nodes in the node array after the merging process;

[0034] According to the nodes in the node array after the merging process and the interface processing strategy, skeleton elements corresponding to the nodes in the node array after the merging process are created.

[0035] Optionally, the node array of the target page is obtained, including:

[0036] Get the description file of the target page;

[0037] Traversing the description file to obtain the attributes of the nodes in the target document;

[0038] According to the attributes of the node, the node array of the target page is obtained.

[0039] In a second aspect, the present application provides a page display method, the method comprising:

[0040] In response to a display request of a target page, obtaining a material of a skeleton screen of the target page obtained by using the method described in any one of the first aspects;

[0041] Based on the material of the skeleton screen, generate the skeleton screen;

[0042] The skeleton screen is displayed.

[0043] In a third aspect, the present application provides a data processing plug-in, including:

[0044] An acquisition module, used for acquiring a node array of a target page, wherein the node array includes nodes for constructing a skeleton screen of the target page;

[0045] A construction module, used to construct skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array;

[0046] A generation module is used to generate materials of the skeleton screen based on the skeleton elements.

[0047] In a fourth aspect, the present application provides a page display device, comprising:

[0048] An acquisition module, configured to acquire, in response to a display request of a target page, a material of a skeleton screen of the target page obtained by using the method described in any one of the first aspects;

[0049] A generating module, used for generating the skeleton screen based on the material of the skeleton screen;

[0050] A display module is used to display the skeleton screen.

[0051] In a fifth aspect, the present application provides an electronic device, comprising: a processor and a memory; the processor is communicatively connected with the memory;

[0052] The memory stores computer instructions;

[0053] The processor executes the computer instructions stored in the memory to implement the method according to any one of the first aspect and the second aspect.

[0054] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspect and the second aspect.

[0055] In a seventh aspect, the present application provides a computer program product, comprising a computer program or instructions, which, when executed by a processor, implements the method as described in any one of the first and second aspects.

[0056] The data processing method, plug-in, page display method, device and equipment provided by the present application, after the electronic device obtains the nodes used to construct the skeleton screen of the target page in the prior art, it then constructs the skeleton elements of the skeleton screen of the target page based on the positional relationship between the nodes in the node array, that is to say, it no longer simply relies on the attributes of the nodes to classify the skeleton elements of the nodes, but constructs the skeleton elements of the skeleton screen of the target page based on the positional relationship between the nodes. Since the data processing method provided by the present application constructs the skeleton elements of the skeleton screen of the target page based on the positional relationship between the nodes, and the positional relationship is a basic attribute for the skeleton screen, it is equivalent to adjusting the skeleton screen generation method from the basic principle, thereby making the skeleton screen generated in the end more reasonable and closer to the structure of the target page, and at the same time, it also expands the application scenarios of the data processing method provided by the present application in the skeleton screen generation process, improves its usability, and can better meet the user's usage needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0058] Figure 1 A schematic diagram of a skeleton screen;

[0059] Figure 2 It is a schematic diagram of node position attributes;

[0060] Figure 3 A schematic diagram of a flow chart of a first data processing method provided in an embodiment of the present application;

[0061] Figure 4 A schematic diagram of a second data processing method provided in an embodiment of the present application;

[0062] Figure 5 A schematic diagram of a node location attribute provided in an embodiment of the present application;

[0063] Figure 6 A schematic diagram of a third data processing method provided in an embodiment of the present application;

[0064] Figure 7 A schematic diagram of a first data processing method provided in an embodiment of the present application;

[0065] Figure 8 A schematic diagram of a second data processing method provided in an embodiment of the present application;

[0066] Fig. 9 A flowchart of a fourth data processing method provided in an embodiment of the present application;

[0067] Fig.10 A flow chart of a page display method provided by this application;

[0068] Fig.11 A schematic diagram of the structure of a data processing plug-in provided in an embodiment of the present application;

[0069] Fig.12 A schematic diagram of the structure of a page display device provided in an embodiment of the present application;

[0070] Fig.13 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application.

[0071] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0073] The following is an explanation of some of the terms involved in this application:

[0074] Skeleton Screen: Also known as a loading placeholder. Figure 1 A schematic diagram of a skeleton screen is shown in FIG. Figure 1 As shown in the figure, the skeleton screen refers to the gray block that represents the general structure of the page displayed on the display screen before the page to be loaded is completely rendered. When the page data is loaded and rendered, the skeleton screen is replaced by the complete page data.

[0075] Bone elements: continue to refer to Figure 1 , which refers to the gray blocks in the skeleton screen that are used to represent the page structure.

[0076] Node: Also known as an element, it refers to a node in a page used to build a page structure, also known as a DOM node. When a page is described using an XML file, a node can be, for example, a node represented by a tag in the XML file. There are many types of nodes, such as images, text, buttons, cell cards, etc. Each node has its own position attribute, which is usually represented by the distance from the edge of the node to the edge of the page. For example, Figure 2 is a schematic diagram of node location attributes, such as Figure 2 As shown, the position attribute of a node on a page generally includes the distance from the top edge of the node to the top edge of the page (e.g. Figure 2 y / top as shown), the distance from the left edge of the node to the left edge of the page (as shown Figure 2 x / left as shown), the distance from the bottom edge of the node to the top edge of the page (as shown Figure 2 bottom), the distance from the right edge of the node to the left edge of the page (as shown in Figure 2 right), the coordinates of the center point of the node (as shown in Figure 2 (x, y) shown).

[0077] A headless browser is a browser without a graphical user interface. It accesses web pages by rendering the page in memory and then sending the result back to the user or program that requested it, without displaying the web page on the screen.

[0078] The timely and reasonable display of the skeleton screen is crucial to improving the user experience. While the user is waiting for the page to load, displaying the skeleton screen will give the user a better sensory experience. However, whether the skeleton screen structure fits the target page to be displayed will also affect the user experience. If the skeleton screen cannot represent the real structure of the page to be loaded, it will reduce the user experience.

[0079] In order to ensure that the structure of the displayed skeleton screen is closer to the page to be displayed, there is a skeleton screen generation solution in which developers manually design the skeleton screen. However, this implementation method will cause the problem of more human resources being occupied and low efficiency in skeleton screen generation. Moreover, in the process of manually generating the skeleton screen according to the page structure, there is often a lack of unified judgment standards. The skeleton screen is usually designed and generated based on the developer's own experience and aesthetics. The generated skeleton screen is often highly subjective and its rationality needs to be verified.

[0080] There are some solutions that automatically generate skeleton screens based on page description files. Usually, the page nodes are traversed, and then the nodes are identified as different types of skeleton elements according to node attributes (such as node size, type, etc.), and then integrated to generate the final skeleton screen material, such as description files and codes used to characterize the skeleton screen implementation logic. When the skeleton screen material is imported into the application software, the corresponding skeleton screen effect can be output first during the page loading process.

[0081] For example, the open source skeleton screen generation solution page-skeleton-webpack-plugin, in principle, uses the capabilities of the headless browser to obtain the DOM node of the page, and then identifies skeleton elements such as text blocks, image blocks, button blocks, etc. according to the attributes of the DOM node, and then generates skeleton screen materials based on this. Finally, the skeleton screen material is applied through the webpack plug-in, that is, the skeleton screen material is inserted into the application software, and then the corresponding skeleton screen is displayed before the page is loaded.

[0082] However, the above-mentioned method of automatically generating the skeleton screen only determines the category of the skeleton element corresponding to the node based on the attribute characteristics of the node, and then generates the corresponding skeleton screen according to the skeleton elements of different analogies. In this way, if the page structure is simple, the generated skeleton screen may be more in line with the actual structure of the page. However, for scenarios with complex page information and many and complex nodes, the solution will only stay at the node capture level, and the identified skeleton elements are numerous, which can only represent the node distribution and cannot abstract the expected effect, resulting in a large difference between the skeleton screen layout and the original page.

[0083] Some skeleton screen generation solutions will merge the identified nodes to obtain merged nodes. Then generate corresponding skeleton elements based on the merged nodes. However, the existing methods of merging nodes often only judge whether to merge nodes based on the node category, or merge nodes only in preset specific scenarios. In other words, the usability of the solution is still poor and cannot meet the skeleton screen generation requirements of most pages.

[0084] In summary, the existing skeleton screen generation solutions have limited available scenarios and poor usability, and cannot meet the user's usage needs, especially the usage needs in complex page scenarios.

[0085] The inventors consider that the main reason why the skeleton screen generated in the existing skeleton screen generation scheme has poor usability is that the existing skeleton screen generation scheme only classifies the nodes based on the attributes of the nodes and generates the corresponding skeleton elements of the skeleton screen, but does not consider the positional relationship between the nodes. However, the skeleton screen actually represents the page structure through the position of the skeleton elements. If it is possible to construct the skeleton elements of the skeleton screen based on the positional relationship between the nodes after the capture based on the node traversal, then the skeleton screen effect will be more in line with the original page and significantly improve the user experience.

[0086] In view of this, the present application provides a data processing method, which constructs the skeleton elements of the skeleton screen of the page according to the positional relationship between the nodes of the skeleton screen used to construct the page, and generates the final skeleton screen material accordingly, so that the skeleton screen of the finally generated page can be more in line with the actual structure of the page, while also expanding the available scenarios of the solution, improving the usability of the solution, and thus better meeting the user's usage needs.

[0087] The technical solution of the present application is described in detail below in conjunction with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The execution subject of the present application can be, for example, an electronic device, such as a computer, a server, etc.

[0088] Figure 3 The flowchart of the first data processing method provided in the embodiment of the present application is as follows. Figure 3 As shown, the method may include the following steps:

[0089] S101. Obtain a node array of a target page, where the node array includes nodes used to construct a skeleton screen of the target page.

[0090] The target page can be any page that can be displayed on a display device (such as a mobile phone, a computer, etc.). The nodes included in the node array can be, for example, any one or more of text nodes, image nodes, etc., which are specifically related to the target page architecture composition. In some scenarios, for example, the description file of the target page is an Extensible Markup Language (XML) file, or in a Hyper Text Markup Language (HTML) file scenario, the nodes can also be called Document Object Model (DOM) elements.

[0091] Optionally, the electronic device may obtain a node array of a target page sent by other electronic devices (eg, a mobile phone, a computer, a server, etc.).

[0092] Alternatively, the electronic device may first obtain a description file of the target page. The description file is a file used to describe the structural composition of the target page. On this basis, the present application does not limit the type of the description file, which may be an XML file, or an HTML file. The electronic device may, for example, obtain a description file of the target page sent by other electronic devices, or may obtain the description file of the target page from a storage medium storing the description file of the target page. The storage medium may be the storage medium of the electronic device itself, or may be other storage media.

[0093] Subsequently, the electronic device can traverse the description file to obtain the properties of the nodes in the target document; then, according to the properties of the nodes, obtain the node array of the target page. Here, traversing the description document can be, for example, traversing the description file starting from the root node of the target page, and the root node of the target page is the first node in the description file.

[0094] Alternatively, the electronic device may also traverse the nodes after the target node of the description file starting from the target node to obtain the attributes of the target node; then, according to the attributes of the target node, obtain the node array of the target page. The target node mentioned here may be, for example, any other node except the root node. The target node may be a node specified by the user. Exemplarily, the electronic device may obtain an instruction input by the user, which is used to determine the above-mentioned target node.

[0095] Optionally, the properties of the nodes in the target document may include, for example, the size (e.g., width, height), position, type, etc. of the nodes. The attribute requirements of the nodes that can be used to construct the skeleton screen defined by the skeleton screen of different target pages may be different, and are set according to the needs. Exemplarily, the electronic device may first classify the nodes according to the attributes of the nodes. For example, the categories may include general blocks, picture blocks, container blocks, button blocks, text blocks, etc. The classification criteria for nodes may be different under different requirements, and are determined specifically according to actual needs. The way in which the electronic device classifies the nodes according to the attributes of the nodes can refer to the prior art, which will not be repeated here.

[0096] Subsequently, the electronic device can obtain the node array of the target page according to the classification result of the node. Exemplarily, the electronic device can store node categories that can be used to construct the skeleton screen of the target page. The electronic device determines whether the node can be used to construct the skeleton screen of the target page according to the above classification result and the above stored node categories that can be used to construct the skeleton screen of the target page. If yes, the node is added to the node array of the target page.

[0097] S102: construct skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array.

[0098] The positional relationship between nodes in the node array may be, for example, the distance between nodes. The distance between nodes mentioned here may be, for example, the distance between the edges of the nodes and / or the distance between the center points of the nodes.

[0099] Optionally, the electronic device may merge nodes in the node array that are closer in position according to the positional relationship between the nodes in the node array, and construct skeleton elements of the skeleton screen of the target page according to the merged nodes.

[0100] Alternatively, the electronic device may screen the nodes in the node array according to the positional relationship between the nodes in the node array, and then select the nodes that are ultimately used to construct the skeleton screen, and construct the skeleton elements of the skeleton screen of the target page corresponding to the node. Exemplarily, the electronic device may, for example, remove the smaller nodes in the node array whose distance is less than a preset distance threshold, and only construct the skeleton elements of the skeleton screen of the target page based on the remaining nodes, so that the skeleton elements of the final skeleton screen are not too complicated, thereby improving the ornamental and usability of the skeleton screen finally generated, and thus improving the user experience. The present application does not limit the specific value of the above-mentioned preset distance threshold, and those skilled in the art may set it according to needs.

[0101] Alternatively, the electronic device may first sort the nodes in the node array according to the positional relationship between the nodes in the node array; then, merge the nodes in the sorted node array that are adjacent to each other, thereby constructing the skeleton elements of the skeleton screen of the target page. The specific implementation method may refer to the following embodiment, which will not be described in detail here.

[0102] S103. Generate materials for the skeleton screen based on the skeleton elements.

[0103] The materials of the skeleton screen are materials required for generating the skeleton screen of the target page, for example, they may be description files, or they may be codes. The specific presentation format is related to the type of the target page and is not limited here.

[0104] Optionally, the electronic device can directly add the corresponding generated skeleton elements to the preset skeleton screen material template to generate the skeleton screen material. The present application does not limit the specific composition of the skeleton screen material template, and those skilled in the art can set it according to requirements.

[0105] In this embodiment, after the electronic device obtains the nodes used to construct the skeleton screen of the target page in the prior art, it then constructs the skeleton elements of the skeleton screen of the target page based on the positional relationship between the nodes in the node array. That is to say, the skeleton elements of the nodes are no longer simply classified based on the attributes of the nodes, but the skeleton elements of the skeleton screen of the target page are constructed based on the positional relationship between the nodes. Since the data processing method provided by the present application constructs the skeleton elements of the skeleton screen of the target page based on the positional relationship between the nodes, and the positional relationship is a basic attribute for the skeleton screen, it is equivalent to adjusting the skeleton screen generation method from the basic principle, thereby making the skeleton screen finally generated more reasonable and closer to the structure of the target page. At the same time, it also expands the application scenarios of the data processing method provided by the present application in the skeleton screen generation process, improves its usability, and can better meet the user's usage needs.

[0106] The following is a specific example of how the electronic device constructs the skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array, that is, step S102 in the above embodiment. Figure 4 A flow chart of a second data processing method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, step S102 may include, for example, the following steps:

[0107] S201. Sort the nodes in the node array according to the position attributes of the nodes.

[0108] The present application does not limit which specific attributes the position attributes of a node include, for example, they may include the distance from the edge of the node to the edge of the target page, and / or the position coordinates of the center point of the node.

[0109] A possible implementation is Figure 5 A schematic diagram of a node location attribute provided in an embodiment of the present application, such as Figure 5 As shown, the position attribute of a node may include, for example, a first position attribute and a second position attribute, wherein the first position attribute is used to characterize the distance from the top edge of the node to the top edge of the target page, and the second position attribute is used to characterize the distance from the left edge of the node to the left edge of the target page. This application does not limit whether the node includes other position attributes in addition to the first position attribute and the second position attribute, for example, it may include Figure 2 The location properties are shown.

[0110] In this case, the electronic device can, for example, sort the nodes in the node array in the order of the first position attribute of the nodes from small to large. Some nodes may have the same first position attribute, for example, multiple nodes are arranged side by side horizontally at the same first position attribute position of the target page. The second position attributes of the multiple nodes with the same first position attributes are usually different (if the same, they will overlap). Therefore, in the sorting process, if there are nodes with the same first position attribute, the electronic device can sort the nodes with the same first position attribute in the order of the second position attribute of the nodes from small to large, so as to achieve the sorting of the nodes in the node array.

[0111] Another possible implementation method is to continue to refer to Figure 5 , the electronic device can be based on the location coordinates of the center point of the node (such as Figure 5 For example, the electronic device may first sort the nodes in the node array according to the ordinate of the position coordinate of the center point of the node (such as Figure 5 The nodes are sorted in descending order according to the y' coordinate shown in the figure; if there are nodes with the same ordinate, the electronic device can sort the nodes according to the ordinate of the node (such as Figure 5 The nodes with the same ordinate are sorted from small to large (the x' coordinate shown in the figure) to achieve the sorting of the nodes in the node array.

[0112] S202 , merging nodes adjacent to each other in the sorted node array until all adjacent nodes in the node array are traversed.

[0113] The adjacent positions mentioned here refer to the nodes that are adjacent in the sorting.

[0114] Optionally, the electronic device can, for example, determine in sequence whether adjacent nodes in a sorted node array meet a merging condition; if the merging condition is met, then merge the adjacent nodes, and limit the merge to at most one node; after the merge is completed, then sequentially determine whether the next node that has not been merged and the subsequent adjacent nodes meet the merging condition; if the merging condition is not met, then determine whether the next group of adjacent nodes meet the merging condition.

[0115] Alternatively, the electronic device may not limit the merging to at most one time for a node. That is to say, after merging adjacent nodes to obtain a merged node, the electronic device may, for example, use the merged node as a node in the sorting to determine whether the subsequent and adjacent nodes meet the merging conditions until all adjacent nodes in the node array are traversed.

[0116] For example, Figure 6A schematic diagram of a third data processing method provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device may, for example, traverse the sorted node array and perform the following operations for each node in the sorted node array: Figure 6 Steps shown:

[0117] Step A: Take the first node in the sorted node array as the reference node.

[0118] The reference node mentioned here is a node used for comparison with its subsequent adjacent nodes.

[0119] Step B: Determine whether to merge the reference node and its subsequent adjacent nodes according to the distance between the reference node and its subsequent adjacent nodes.

[0120] The distance between the reference node and the adjacent node thereafter mentioned here may be, for example, the lateral distance between the reference node and the adjacent node thereafter, and / or the longitudinal distance between the reference node and the adjacent node thereafter.

[0121] Optionally, the lateral distance between a reference node and its subsequent adjacent nodes can be obtained based on the difference between the horizontal coordinate of the center point of the reference node and the horizontal coordinate of the center point of the subsequent adjacent nodes, and the longitudinal distance between the reference node and its subsequent adjacent nodes can be obtained based on the difference between the vertical coordinate of the center point of the reference node and the vertical coordinate of the center point of the subsequent adjacent nodes.

[0122] Since the horizontal and vertical coordinates of the center point of the reference node and the horizontal and vertical coordinates of the center points of its subsequent adjacent nodes can represent the positions of the reference node and its subsequent adjacent nodes, under this implementation method, the electronic device can determine whether to merge the reference node and its subsequent adjacent nodes based on the relative position relationship between the reference node and its subsequent adjacent nodes, thereby improving the rationality of the node processing strategy.

[0123] In one possible implementation, the lateral distance between a reference node and its subsequent adjacent nodes may be the difference between the horizontal coordinate of the center point of the reference node and the horizontal coordinate of the center point of the subsequent adjacent nodes, and the longitudinal distance between the reference node and its subsequent adjacent nodes may be the difference between the vertical coordinate of the center point of the reference node and the vertical coordinate of the center point of the subsequent adjacent nodes.

[0124] Another possible implementation is Figure 7Schematic diagram of the first data processing method provided by the embodiment of the present application, wherein Top_1 is the distance between the upper edge of the reference node and the upper edge of the target page, Top_2 is the distance between the upper edge of the adjacent node after the reference node and the upper edge of the target page, left_1 is the distance between the left edge of the reference node and the left edge of the target page, and left_2 is the distance between the right edge of the adjacent node after the reference node and the right edge of the target page. Figure 7 As shown, the lateral distance between the reference node and the adjacent node behind it can be, for example, the horizontal coordinate of the center point of the reference node (such as Figure 7 x1) and the horizontal coordinates of the center points of the adjacent nodes (such as Figure 7 The difference between the length of the reference node and the length of the next adjacent node (as shown in Figure 7 The vertical distance between the reference node and its adjacent nodes (such as Figure 7 The y1 shown in FIG. 1 can be the ordinate of the center point of the reference node and the ordinate of the center point of the adjacent node thereafter (e.g. Figure 7 The difference between the width of the reference node and the width of the adjacent node (as shown in Figure 7 gapY shown).

[0125] Under this implementation method, the electronic device is equivalent to simultaneously considering the mutual relationship between the positions of the center points of the reference node and its subsequent adjacent nodes, as well as the influence of the side length on the relative position relationship between the reference node and its subsequent adjacent nodes, and can further accurately determine the relative position relationship between the reference node and its subsequent adjacent nodes, and thus more accurately determine whether to merge the reference node and its subsequent adjacent nodes.

[0126] A possible implementation method is, if the lateral distance between the reference node and the adjacent nodes behind it is less than a preset lateral distance threshold, and the longitudinal distance between the reference node and the adjacent nodes behind it is less than a preset longitudinal distance threshold, then it is determined that the reference node and the adjacent nodes behind it are merged. If the lateral distance between the reference node and the adjacent nodes behind it is greater than or equal to the preset lateral distance threshold, and / or the longitudinal distance between the reference node and the adjacent nodes behind it is greater than or equal to the preset longitudinal distance threshold, then it is determined not to merge the reference node and the adjacent nodes behind it. The present application does not limit the specific values ​​of the above-mentioned preset lateral distance threshold and the preset longitudinal distance threshold, and those skilled in the art can set them according to needs.

[0127] Through this implementation, the electronic device can comprehensively judge whether two adjacent nodes should be merged based on the horizontal distance between the reference node and the adjacent node behind it, as well as the vertical distance. And when the horizontal distance and the vertical distance both meet the conditions, it is determined to merge the reference node and the adjacent node behind it.

[0128] Another possible implementation is to determine to merge the reference node and its subsequent adjacent nodes if the lateral distance between the reference node and its subsequent adjacent nodes is less than a preset lateral distance threshold, or the longitudinal distance between the reference node and its subsequent adjacent nodes is less than a preset longitudinal distance threshold.

[0129] Optionally, if the reference node is a merged node, the electronic device may first determine whether the node after the reference node has an overlap with the reference node. If it is determined that there is an overlap, the reference node and the adjacent node after it are directly merged; if there is no overlap, the reference node and the adjacent node after it are determined to be merged based on the horizontal and vertical distances between the reference node and the adjacent node after it. Exemplarily, the electronic device may determine whether the reference node and the adjacent node after it overlap based on the horizontal and vertical coordinates of the center points and the side lengths of the reference node and the adjacent node after it.

[0130] If it is determined to merge the reference node and its subsequent adjacent nodes, execute step C.

[0131] If it is determined not to merge the reference node and its subsequent adjacent nodes, execute step D.

[0132] Step C: Merge the reference node and its adjacent nodes, and use the merged node as the new reference node, and return to execute step B until the last node of the node array is traversed.

[0133] Exemplarily, the electronic device may obtain a new bounding box based on the edge lines of the reference node and the subsequent adjacent nodes, where the new bounding box encloses the reference node and the subsequent adjacent nodes; and use the new bounding box as the merged node.

[0134] For example, the electronic device may extend the outermost edges of the reference node and its subsequent adjacent nodes in four directions, namely, up, down, left, and right, to obtain a new bounding box surrounding the reference node and its subsequent adjacent nodes as the merged node.

[0135] For example, Figure 7 For a schematic diagram showing that a reference node and its subsequent adjacent nodes can be merged, refer to Figure 7 ,exist Figure 7 In the positional relationship between the reference node and the adjacent nodes thereafter, the uppermost edge line of the edge lines of the reference node and the adjacent nodes thereafter is the upper edge line of the reference node, the rightmost edge line is the right edge line of the adjacent node, the lowermost edge line is the lower edge line of the adjacent node, and the leftmost edge line is the left edge line of the reference node. In this case, the electronic device can, for example, directly extend the left edge line and the upper edge line of the reference node, as well as the right edge line and the lower edge line of the adjacent nodes thereafter, to obtain a new bounding box (such as Figure 7The ABCD bounding box shown in FIG. 4 is used as the merged node.

[0136] For another example, Figure 8 This is a schematic diagram of the second data processing method provided by the present application, which is a schematic diagram taking the example of merging a reference node and its subsequent adjacent nodes. Figure 8 In the positional relationship between the reference node and the adjacent nodes thereafter, the uppermost edge line of the edge lines of the reference node and the adjacent nodes thereafter is the upper edge line of the reference node, the rightmost edge line is the right edge line of the reference node, the lowermost edge line is the lower edge line of the adjacent node, and the leftmost edge line is the left edge line of the adjacent node. In this case, the electronic device can, for example, directly extend the upper edge line and the right edge line of the reference node, as well as the left edge line and the lower edge line of the adjacent node thereafter, to obtain a new bounding box (such as Figure 7 The EFGH bounding box shown in the figure) is used as the merged node. Figure 7 and Figure 8 The positional relationship between the reference node and its subsequent adjacent nodes is only an example. The specific outermost edge line of the reference node and its subsequent adjacent nodes in the four directions of up, down, left and right is determined based on actual conditions and is not limited in this application.

[0137] This implementation method can make the merged nodes cover the nodes before the merger, while making the coverage of the merged nodes not too large, which can better represent the actual architecture of the target page and improve the usability of the skeleton screen of the target interface obtained thereby.

[0138] In another possible implementation, the electronic device may translate the leftmost edge of the reference node and its subsequent adjacent nodes to the left by a first preset distance, translate the topmost edge upward by a second preset distance, translate the rightmost edge to the right by a third preset distance, and translate the bottommost edge downward by a fourth preset distance, and then extend the translated edges respectively to obtain a new bounding box; and use the new bounding box as the merged node.

[0139] The above-mentioned first preset distance, second preset distance, third preset distance, and fourth preset distance may be equal or different, and the present application does not limit them. Those skilled in the art may set specific values ​​of the first preset distance, the second preset distance, the third preset distance, and the fourth preset distance as required.

[0140] Alternatively, the electronic device may first determine a node merging strategy based on the classification of the reference node and its subsequent adjacent nodes, and then merge the reference node and its subsequent adjacent nodes according to the determined node merging strategy. Exemplarily, the electronic device may store a mapping relationship between the classification of the reference node and its subsequent adjacent nodes and the node merging strategy, and the electronic device may determine the corresponding node merging strategy based on the classification of the reference node and its subsequent adjacent nodes and the above mapping relationship.

[0141] Through this implementation, the electronic device can flexibly match the corresponding node merging strategy according to the actual situation of the merged nodes, thereby improving the usability of the data processing method provided in the present application.

[0142] Step D: Use the adjacent node after the reference node as a new reference node, and return to execute step B until traversing to the last node in the node array.

[0143] In this step, the electronic device uses the adjacent node after the reference node as a new reference node, and returns to execute step B until traversing to the last node of the node array, so that all the nodes that can be merged in the node array can be merged.

[0144] In this implementation, the electronic device uses the first node in the sorted node array as the reference node, and determines whether to merge the reference node and its adjacent nodes based on the distance between the reference node and its adjacent nodes; if it is determined to merge the reference node and its adjacent nodes, then the reference node and its adjacent nodes are merged, and the merged node is used as a new reference node, and the process returns to step B until the last node of the node array is traversed; if it is determined not to merge the reference node and its adjacent nodes, then the adjacent node after the reference node is used as a new reference node, and the process returns to step B until the last node of the node array is traversed. Through this implementation, the electronic device can merge all adjacent nodes (including merged nodes) in the node array whose distances meet the requirements, that is, the distances between the skeleton elements finally obtained all meet the conditions that do not require merging, so that the skeleton screen represented by the final skeleton screen material can concisely and clearly abstract the architecture of the target page without causing visual complexity to the user, further improving the user experience.

[0145] Optionally, the electronic device can also skip the merging step for nodes of preset types in the sorted node array. The preset types of nodes mentioned here may include, for example, one or more of picture types, cell card types, and button types. In this implementation, the electronic device skips the merging step for nodes of specific preset types, and can flexibly determine the types of nodes that can be merged according to actual needs. This processing can improve the flexibility and usability of the data processing method provided by the present application. Subsequently, the electronic device can, for example, flexibly configure the above-mentioned preset types according to the user's instructions, and can flexibly configure the skeleton screen of the target page according to user needs to better meet the user's usage needs.

[0146] S203: Create skeleton elements corresponding to the nodes in the merged node array.

[0147] Exemplarily, the electronic device can determine the user interface (UI) processing strategy of the nodes in the merged node array according to the types of the nodes in the merged node array; then, based on the nodes in the merged node array and the interface processing strategy, create skeleton elements corresponding to the nodes in the merged node array.

[0148] The types of nodes in the above node array may include, for example, one or more of a picture type, a cell card type, a button type, and a general type.

[0149] The above interface processing strategy may be determined based on the User Experience (UE) design specification of the target page, and may include at least one of the following: rounded corner cutting, icon addition, size adjustment, and color adjustment.

[0150] Exemplarily, the electronic device may first determine the type of the node in the node array after the merge process. For example, if the node in the node array after the merge process is not a merged node, the type of the node may be the original type of the node. For example, if the node is of a picture type in the node array before the merge process, it is still of a picture type in the node array after the merge process. If the node in the node array after the merge process is a node obtained after merging, if the node obtained after merging is obtained by merging nodes of the same type, the type of the node obtained after merging may be the same as the type of the above-mentioned node of the same type. If the node obtained after merging is obtained by merging nodes of different types, the type of the node obtained after merging may be, for example, a general type.

[0151] For example, the electronic device may store a mapping relationship between the type of nodes in the merged node array and the interface processing strategy. The electronic device may determine the interface processing strategy corresponding to the node according to the type of nodes in the merged node array and the mapping relationship.

[0152] Subsequently, the electronic device creates skeleton elements corresponding to the nodes in the merged node array according to the nodes in the merged node array and the interface processing strategy. Exemplarily, the electronic device can adjust the interface display parameters (such as appearance parameters) of the nodes in the merged node array according to the interface processing strategy to obtain the skeleton elements. The specific implementation method can refer to the prior art and will not be repeated here.

[0153] In this embodiment, the electronic device first sorts the nodes in the node array according to the position attributes of the nodes; then, the nodes adjacent to each other in the sorted node array are merged until all adjacent nodes in the node array are traversed; then, the skeleton elements corresponding to the nodes in the merged node array are created. Through this implementation method, the electronic device can merge adjacent nodes in the node array, and then can reasonably simplify the architecture of the skeleton screen represented by the materials of the skeleton screen finally generated based on the position relationship between the nodes, and realize the abstract and rational display of the skeleton screen, which can not only reasonably simplify the display interface, but also meet the user's usage needs and improve the user experience.

[0154] Fig. 9 A flowchart of the fourth data processing method provided in this application is as follows: Fig. 9 As shown, the method may include the following steps:

[0155] S401. Obtain a node array of a target page, where the node array includes nodes used to construct a skeleton screen of the target page.

[0156] S402. Sort the nodes in the node array in the order of the distance from the upper edge of the node to the upper edge of the target page from small to large; if there are nodes with the same distance from the upper edge to the upper edge of the target page, sort the nodes with the same distance from the upper edge to the upper edge of the target page in the order of the distance from the left edge of the node to the left edge of the target page from small to large.

[0157] S403: Use the first node in the sorted node array as a reference node.

[0158] S404: Determine whether the reference node is a merged node.

[0159] If the reference node is a synthesized node, step S405 is executed.

[0160] If the reference node is not a synthesized node, execute step S406.

[0161] S405: Determine whether the reference node overlaps with its subsequent adjacent nodes.

[0162] If not, execute step S407.

[0163] If yes, execute step S409.

[0164] S406: Determine whether the reference node is a node of a preset type.

[0165] If yes, execute step S409.

[0166] If not, execute step S407.

[0167] S407: Determine whether to merge the reference node and its subsequent adjacent nodes according to the distance between the reference node and its subsequent adjacent nodes.

[0168] The distance between a reference node and its subsequent adjacent node includes the lateral distance between the reference node and its subsequent adjacent node, and the longitudinal distance between the reference node and its subsequent adjacent node. The lateral distance between the reference node and its subsequent adjacent node is the vertical distance between the right line of the reference node and the left line of the subsequent adjacent node, and the longitudinal distance between the reference node and its subsequent adjacent node is the vertical distance between the lower line of the reference node and the upper line of the subsequent adjacent node.

[0169] If the lateral distance between the reference node and its subsequent adjacent nodes is less than the preset lateral distance threshold, and the longitudinal distance between the reference node and its subsequent adjacent nodes is less than the preset longitudinal distance threshold, it is determined that the reference node and its subsequent adjacent nodes are to be merged, and step S408 is executed.

[0170] If the lateral distance between the reference node and its subsequent adjacent nodes is greater than or equal to a preset lateral distance threshold, and / or the longitudinal distance between the reference node and its subsequent adjacent nodes is greater than or equal to a preset longitudinal distance threshold, it is determined not to merge the reference node and its subsequent adjacent nodes, and step S409 is executed.

[0171] S408. Extend the left and top sides of the reference node, as well as the right and bottom sides of the subsequent adjacent nodes, to obtain a new bounding box, use the new bounding box as the merged node, and use the merged node as the new reference node, and return to execute step S404 until traversing to the last node in the node array.

[0172] S409: Use the adjacent node after the reference node as a new reference node, and return to execute step S404 until traversing to the last node of the node array.

[0173] S410. After traversing the above steps S404-S409 for all nodes in the node array, create skeleton elements corresponding to the nodes in the merged node array.

[0174] S411. Generate skeleton screen materials based on skeleton elements.

[0175] In this embodiment, the electronic device merges the nodes in the node array based on the lateral distance between adjacent nodes in the node array and the longitudinal distance to obtain a merged node array; then creates corresponding skeleton elements according to the nodes in the merged node array, thereby generating a skeleton screen material. Through this implementation method, it is possible to realize abstract processing of nodes based on the positional relationship between nodes, rather than only creating skeleton elements based on the type of nodes, that is, it is possible to merge the nodes used to create the skeleton screen from the bottom layer, thereby improving the usability of the skeleton screen represented by the skeleton screen material finally generated, improving the user experience, and thereby better meeting the user's usage needs.

[0176] The present application also provides a page display method, the execution subject of the page display method may be, for example, an electronic device, which may be the same as the execution subject in the above embodiment or different, for example, it may be a mobile phone, a computer, a tablet, etc. Fig.10 A flow chart of a page display method provided by this application, such as Fig.10 As shown, the method may include the following steps:

[0177] S301 . In response to a display request of a target page, obtain the material of the skeleton screen of the target page obtained by using the method of any one of the above embodiments.

[0178] Exemplarily, the electronic device may include a display interface, through which the electronic device may obtain a display request of a target page input by a user, for example, by obtaining a display request input by a user by clicking on the display interface. Subsequently, the electronic device may, for example, in response to the display request of the target page, obtain the material of the skeleton screen of the target page obtained by using any of the methods in the above embodiments from the storage medium of the electronic device; or, the electronic device may obtain the material of the skeleton screen from other electronic devices. For example, the electronic device may obtain the material of the skeleton screen from the cloud.

[0179] S302: Generate a skeleton screen based on the material of the skeleton screen.

[0180] In this step, the electronic device generates a skeleton screen according to the material of the skeleton screen, and then can display the skeleton screen before loading the target page. The specific implementation method can refer to the existing technology and will not be repeated here.

[0181] S303, display the skeleton screen.

[0182] In this step, the electronic device displays a skeleton screen before displaying the target page, and the skeleton screen is generated based on the material of the skeleton screen of the target page obtained by the method of any one of the above embodiments. Since the skeleton screen can better fit the architecture of the target page compared with other skeleton screens in the prior art, the electronic device can provide users with a better sensory experience when displaying the skeleton screen, and improve the usability and use effect of the generated skeleton screen as a whole.

[0183] Fig.11 This is a schematic diagram of the structure of a data processing plug-in provided in an embodiment of the present application. Fig.11 As shown, the data processing plug-in includes: an acquisition module 11, a construction module 12, and a generation module 13.

[0184] The acquisition module 11 is used to acquire a node array of a target page, wherein the node array includes nodes used to construct a skeleton screen of the target page.

[0185] The construction module 12 is used to construct the skeleton elements of the skeleton screen of the target page according to the position relationship between the nodes in the node array.

[0186] The generating module 13 is used to generate the material of the skeleton screen based on the skeleton elements.

[0187] Optionally, building module 12 is specifically used to sort the nodes in the node array according to the position attributes of the nodes; merge the adjacent nodes in the sorted node array until all adjacent nodes in the node array are traversed; and create skeleton elements corresponding to the nodes in the merged node array.

[0188] For example, the position attributes of the node include: a first position attribute and a second position attribute, the first position attribute is used to represent the distance from the upper edge of the node to the upper edge of the target page, and the second position attribute is used to represent the distance from the left edge of the node to the left edge of the target page; the construction module 12 is specifically used to sort the nodes in the node array according to the first position attributes of the nodes in ascending order; if there are nodes with the same first position attribute, the nodes with the same first position attribute are sorted according to the second position attributes of the nodes in ascending order.

[0189] Optionally, a construction module 12 is specifically used to traverse the sorted node array and perform the following operations: Step A: use the first node in the sorted node array as a reference node; Step B: determine whether to merge the reference node with its subsequent adjacent nodes based on the distance between the reference node and its subsequent adjacent nodes; Step C: if it is determined to merge the reference node and its subsequent adjacent nodes, then merge the reference node with its subsequent adjacent nodes, and use the merged node as a new reference node, and return to execute step B until traversing to the last node of the node array; Step D: if it is determined not to merge the reference node with its subsequent adjacent nodes, then use the adjacent node after the reference node as a new reference node, and return to execute step B until traversing to the last node of the node array.

[0190] For example, construction module 12 is specifically used to determine that the reference node and its subsequent adjacent nodes are to be merged if the lateral distance between the reference node and its subsequent adjacent nodes is less than a preset lateral distance threshold, and the longitudinal distance between the reference node and its subsequent adjacent nodes is less than a preset longitudinal distance threshold; if the lateral distance between the reference node and its subsequent adjacent nodes is greater than or equal to the preset lateral distance threshold, and / or the longitudinal distance between the reference node and its subsequent adjacent nodes is greater than or equal to the preset longitudinal distance threshold, then determine that the reference node and its subsequent adjacent nodes are not to be merged.

[0191] Optionally, the lateral distance between the reference node and its subsequent adjacent nodes is obtained based on the difference between the horizontal coordinate of the center point of the reference node and the horizontal coordinate of the center point of the subsequent adjacent nodes, and the longitudinal distance between the reference node and its subsequent adjacent nodes is obtained based on the difference between the vertical coordinate of the center point of the reference node and the vertical coordinate of the center point of the subsequent adjacent nodes.

[0192] Optionally, the construction module 12 is specifically configured to obtain a new bounding box based on the edge lines of the reference node and the subsequent adjacent nodes, wherein the new bounding box encloses the reference node and the subsequent adjacent nodes; and use the new bounding box as the merged node.

[0193] Optionally, construction module 12 is specifically used to determine the interface processing strategy of the nodes in the node array after the merge processing according to the types of the nodes in the node array after the merge processing; and create skeletal elements corresponding to the nodes in the node array after the merge processing according to the nodes in the node array after the merge processing and the interface processing strategy.

[0194] Optionally, the construction module 12 is further configured to skip the merging step for nodes of a preset type in the sorted node array.

[0195] Optionally, the acquisition module 11 is specifically used to acquire a description file of the target page; traverse the description file to acquire the attributes of the nodes in the target document; and acquire the node array of the target page according to the attributes of the nodes.

[0196] Optionally, the generating module 13 is specifically used to adapt the skeleton elements based on the display requirements of the display device to obtain the material of the skeleton screen.

[0197] The navigation system provided in the embodiment of the present application can execute the data processing method in the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail here. Fig.10 The division of the modules shown is only a schematic diagram, and the present application does not limit the division of the modules and the naming of the modules.

[0198] Fig.12 A schematic diagram of the structure of a page display device provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the page display device includes: an acquisition module 21, a generation module 22, and a display module 23.

[0199] The acquisition module 21 is used to obtain the material of the skeleton screen of the target page obtained by using the method described in any one of the first aspects in response to a display request of the target page.

[0200] The generating module 22 is used to generate the skeleton screen based on the material of the skeleton screen.

[0201] The display module 23 is used to display the skeleton screen.

[0202] The page display device provided in the embodiment of the present application can execute the page display method in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here. Fig.10 The division of the modules shown is only a schematic diagram, and the present application does not limit the division of the modules and the naming of the modules.

[0203] Fig.13 FIG. 1 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. Fig.13 As shown, the electronic device 100 may include: at least one processor 101 and a memory 102 .

[0204] The memory 102 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.

[0205] The memory 102 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0206] The processor 101 is used to execute the computer-executable instructions stored in the memory 102 to implement the data processing method and the page display method described in the aforementioned method embodiment. The processor 101 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0207] The navigation system 100 may also include a communication interface 103, so that it can communicate and interact with external devices through the communication interface 103. The external device may be, for example, an electronic device (e.g., a mobile phone, a navigator). In a specific implementation, if the communication interface 103, the memory 102 and the processor 101 are implemented independently, the communication interface 103, the memory 102 and the processor 101 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0208] Optionally, in a specific implementation, if the communication interface 103, the memory 102 and the processor 101 are integrated on a chip, the communication interface 103, the memory 102 and the processor 101 can communicate through an internal interface.

[0209] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used for the data processing method and page display method in the above-mentioned embodiments.

[0210] The present application also provides a computer program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of the navigation system can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the navigation system implements the data processing method and page display method provided by the various embodiments described above.

[0211] The term "plurality" in this article refers to two or more than two. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0212] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method, characterized in that: include: Acquire a node array of a target page, wherein the node array includes nodes used to construct a skeleton screen of the target page; Constructing skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array; Based on the skeleton elements, the material of the skeleton screen is generated.

2. The method according to claim 1, characterized in that The step of constructing the skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array includes: Sort the nodes in the node array according to the position attributes of the nodes; Merging nodes adjacent to each other in the sorted node array until all adjacent nodes in the node array are traversed; Create a skeleton element corresponding to the node in the node array after the merge process.

3. The method according to claim 2, characterized in that The position attribute of the node includes: a first position attribute and a second position attribute, wherein the first position attribute is used to represent the distance from the upper edge of the node to the upper edge of the target page, and the second position attribute is used to represent the distance from the left edge of the node to the left edge of the target page; The step of sorting the nodes in the node array according to the position attributes of the nodes includes: Sort the nodes in the node array according to the first position attributes of the nodes in ascending order; If there are nodes with the same first position attribute, the nodes with the same first position attribute are sorted in ascending order of the second position attributes of the nodes.

4. The method according to claim 2, characterized in that: The step of merging adjacent nodes in the sorted node array until all adjacent nodes in the node array are traversed includes: Traverse the sorted node array and perform the following operations: Step A: taking the first node in the sorted node array as a reference node; Step B: determining whether to merge the reference node with its subsequent adjacent nodes according to the distance between the reference node and its subsequent adjacent nodes; Step C: If it is determined that the reference node and its adjacent nodes are to be merged, then the reference node is merged with its adjacent nodes thereafter, and the merged node is used as a new reference node, and the process returns to step B until the last node of the node array is traversed; Step D: If it is determined not to merge the reference node with the adjacent node behind it, the adjacent node behind the reference node is used as a new reference node, and the process returns to step B until the last node of the node array is traversed.

5. The method according to claim 4, characterized in that The step of determining whether to merge the reference node with its subsequent adjacent nodes according to the distance between the reference node and the subsequent adjacent nodes includes: If the horizontal distance between the reference node and its subsequent adjacent nodes is less than a preset horizontal distance threshold, and the vertical distance between the reference node and its subsequent adjacent nodes is less than a preset vertical distance threshold, then determining to merge the reference node and its subsequent adjacent nodes; If the lateral distance between the reference node and its subsequent adjacent nodes is greater than or equal to a preset lateral distance threshold, and / or the longitudinal distance between the reference node and its subsequent adjacent nodes is greater than or equal to a preset longitudinal distance threshold, it is determined not to merge the reference node and its subsequent adjacent nodes.

6. The method according to claim 5, characterized in that The lateral distance between the reference node and its subsequent adjacent nodes is obtained based on the difference between the horizontal coordinate of the center point of the reference node and the horizontal coordinate of the center point of the subsequent adjacent nodes, and the longitudinal distance between the reference node and its subsequent adjacent nodes is obtained based on the difference between the vertical coordinate of the center point of the reference node and the vertical coordinate of the center point of the subsequent adjacent nodes.

7. The method according to any one of claims 4 to 6, characterized in that: The merging of the reference node with its subsequent adjacent nodes comprises: Based on the edge lines of the reference node and the subsequent adjacent nodes, a new bounding box is obtained, wherein the new bounding box encloses the reference node and the subsequent adjacent nodes; The new bounding box is used as the merged node.

8. The method according to claim 7, characterized in that The step of creating a skeleton element corresponding to the node in the node array after the merging process includes: Determining, according to the types of the nodes in the node array after the merging process, an interface processing strategy for the nodes in the node array after the merging process; According to the nodes in the node array after the merging process and the interface processing strategy, skeleton elements corresponding to the nodes in the node array after the merging process are created.

9. A page display method, characterized in that: The method comprises: In response to a display request of a target page, obtaining a material of a skeleton screen of the target page obtained by using the method according to any one of claims 1 to 8; Based on the material of the skeleton screen, generate the skeleton screen; The skeleton screen is displayed.

10. A data processing plug-in, characterized in that: include: An acquisition module, used for acquiring a node array of a target page, wherein the node array includes nodes for constructing a skeleton screen of the target page; A construction module, used to construct skeleton elements of the skeleton screen of the target page according to the positional relationship between the nodes in the node array; A generation module is used to generate materials of the skeleton screen based on the skeleton elements.

11. A page display device, characterized in that: include: An acquisition module, configured to, in response to a display request of a target page, acquire a material of a skeleton screen of the target page obtained by using the method according to any one of claims 1 to 8; A generating module, used for generating the skeleton screen based on the material of the skeleton screen; A display module is used to display the skeleton screen.

12. An electronic device, characterized in that: include: Processor and memory; The processor is communicatively connected to the memory; The memory stores computer instructions; The processor executes the computer instructions stored in the memory to implement the method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.

14. A computer program product, characterized in that The method comprises a computer program or an instruction, which, when executed by a processor, implements the method according to any one of claims 1 to 9.