Skeleton screen display method, skeleton screen display device, electronic equipment and storage medium

By using preset codes that support multi-end operation in skeleton screen development, a strong compatibility skeleton screen component is generated, which solves the problems of poor compatibility and low development efficiency in the existing technology, and achieves efficient multi-end operation and user experience promote.

CN119046548APending Publication Date: 2024-11-29WASP NEST (GUIZHOU) TOURISM GRP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411045402.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing skeleton screen development technology has problems such as poor cross-platform compatibility, low development efficiency and high maintenance costs. Especially in multi-terminal operation scenarios, multiple sets of code need to be written, resulting in cumbersome and redundancy.

Method used

Preset codes that support multi-end operation are adopted to generate the target skeleton screen components by obtaining the structural parameters of the interface to be loaded, and color and line styles are set according to the parameters to ensure that the skeleton screen is highly compatible on different platforms and reduce artificial writing steps.

Benefits of technology

It realizes cross-platform compatibility of the same skeleton screen code, is suitable for multi-terminal operation, improves development efficiency, reduces repetitive labor, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046548A_ABST
    Figure CN119046548A_ABST
Patent Text Reader

Abstract

The invention relates to a skeleton screen display method, a skeleton screen display device, electronic equipment and a storage medium. The skeleton screen display method comprises the steps that page loading is responded, a preset code is called, the preset code is used for generating a skeleton screen assembly corresponding to a to-be-loaded interface, and the preset code supports multi-terminal operation; obtaining a structure parameter corresponding to the display content of the to-be-loaded interface according to a first preset parameter through the preset code; and generating a skeleton screen assembly according to the structure parameters, and displaying the target skeleton screen assembly as a skeleton screen. According to the method and the device, cross-platform compatibility is realized by using the same code for generating the skeleton screen, the method and the device are suitable for multi-terminal operation, tedious steps of manually writing the skeleton screen are reduced, the development efficiency is improved, and repeated and redundant labor is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of application development technology, and in particular to a skeleton screen display method, a skeleton screen display device, an electronic device and a storage medium. Background Art

[0002] With the popularity of mobile applications and web pages, users have higher and higher requirements for page loading speed and experience. The current solutions are generally server-side rendering, increasing page loading (Loading), and adding a skeleton screen for the first page. The skeleton screen is a pre-loaded page structure that temporarily replaces the real content by displaying simple placeholder symbols, so that users can get a better interactive experience during the page loading process.

[0003] In the related technologies, improving the development efficiency of the skeleton screen and enhancing the maintainability of the skeleton screen are the research directions of the personnel in this field. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a skeleton screen display method, a skeleton screen display device, an electronic device and a storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a skeleton screen display method is provided, comprising: in response to page loading, calling a preset code, wherein the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded, and the preset code supports multi-terminal operation; through the preset code, obtaining structural parameters corresponding to the display content of the interface to be loaded according to first preset parameters; generating a target skeleton screen component according to the structural parameters, and displaying the target skeleton screen component as a skeleton screen.

[0006] In one embodiment, generating a target skeleton screen component according to the structural parameters includes: setting a display component according to the structural parameters, wherein the display component corresponds to the display content of the interface to be loaded; in response to a second preset parameter being set, setting the color style and / or line style of the display component according to the color style and / or line style set by the second preset parameter to obtain the target skeleton screen component.

[0007] In one implementation, displaying the target skeleton screen component as a skeleton screen includes: during page loading, setting a weight higher than a threshold for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

[0008] In one implementation, the method further includes: setting absolute positioning parameters for the root node of the target skeleton screen component so that the length and width of the target skeleton screen component are the same as those of the current page.

[0009] In one embodiment, the method further includes: stopping displaying the target skeleton screen component according to a third preset parameter, and displaying a loading interface being loaded or a loading interface having been loaded, wherein the third preset parameter is used to control the target skeleton screen component to stop displaying.

[0010] In one implementation, the structural parameters include at least one or more of the following: structural parameters corresponding to the image part of the interface to be loaded, structural parameters corresponding to the text part of the interface to be loaded, and structural parameters corresponding to the control part of the interface to be loaded.

[0011] In one embodiment, the method further includes: in response to the second preset parameter not being set, setting the color style of the skeleton screen to a default color style, and setting the line style of the skeleton screen to a default line style, to obtain the target skeleton screen component.

[0012] According to a second aspect of an embodiment of the present disclosure, a skeleton screen display device is provided, comprising: a calling unit, for calling a preset code in response to page loading, wherein the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded, and the preset code supports multi-terminal operation; an acquisition unit, for acquiring structural parameters corresponding to the display content of the interface to be loaded according to first preset parameters through the preset code; and a processing unit, for generating a target skeleton screen component according to the structural parameters, and displaying the target skeleton screen component as a skeleton screen.

[0013] In one embodiment, the processing unit generates a target skeleton screen component according to the second preset parameters and the structural parameters in the following manner: setting a display component according to the structural parameters, wherein the display component corresponds to the display content of the interface to be loaded; in response to setting a second preset parameter, setting the color style and / or line style of the display component according to the color style and / or line style set by the second preset parameter to obtain the target skeleton screen component.

[0014] In one embodiment, the processing unit displays the target skeleton screen component as a skeleton screen in the following manner: during page loading, a weight higher than a threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

[0015] In one implementation, the processing unit is further configured to: set absolute positioning parameters for the root node of the target skeleton screen component so that the length and width of the target skeleton screen component are the same as those of the current page.

[0016] In one embodiment, the processing unit is further used to: stop displaying the target skeleton screen component according to a third preset parameter, and display a loading interface being loaded or a loading interface after loading is completed, and the third preset parameter is used to control the target skeleton screen component to stop displaying.

[0017] In one implementation, the structural parameters include at least one or more of the following: structural parameters corresponding to the image part of the interface to be loaded, structural parameters corresponding to the text part of the interface to be loaded, and structural parameters corresponding to the control part of the interface to be loaded.

[0018] In one embodiment, the processing unit is further configured to: in response to the second preset parameter not being set, set the color style of the skeleton screen to a default color style, and set the line style of the skeleton screen to a default line style, to obtain the target skeleton screen component.

[0019] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to: execute the skeleton screen display method described in the first aspect or any one of the implementations of the first aspect.

[0020] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, wherein instructions are stored in the storage medium. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the skeleton screen display method described in the first aspect or any one of the embodiments of the first aspect.

[0021] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when loading a page, a preset code that supports multi-terminal operation is called, and the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded. Through the preset code, the structural parameters corresponding to the display content of the interface to be loaded are obtained according to the first preset parameters. According to the structural parameters, a target skeleton screen component is generated, and the target skeleton screen component is displayed as a skeleton screen. Through the present disclosure, the code of the same skeleton screen is made cross-platform compatible and suitable for multi-terminal operation, which reduces the tedious steps of manually writing skeleton screens, improves development efficiency, and reduces repetitive and redundant labor.

[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0024] Figure 1The figure is a flow chart of a skeleton screen display method according to an exemplary embodiment.

[0025] Figure 2 The present invention is a flowchart showing a method for generating a target skeleton screen component according to structural parameters according to an exemplary embodiment.

[0026] Figure 3 The invention is a flowchart showing a method for displaying a target skeleton screen component as a skeleton screen according to an exemplary embodiment.

[0027] Figure 4 The figure is a flow chart of a skeleton screen display method according to an exemplary embodiment.

[0028] Figure 5 The figure is a flow chart of a skeleton screen display method according to an exemplary embodiment.

[0029] Figure 6 The figure is a flow chart of a skeleton screen display method according to an exemplary embodiment.

[0030] Figure 7 The figure is a flowchart of a skeleton screen display method according to an exemplary embodiment of the present disclosure.

[0031] Figure 8 The figure is a block diagram of a skeleton screen display device according to an exemplary embodiment.

[0032] Fig. 9 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment.

[0033] Fig.10 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0034] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0035] The skeleton screen display method provided by the embodiment of the present disclosure is applied to a scenario in which a skeleton screen corresponding to an interface to be loaded is displayed during a page loading process of a device.

[0036] With the popularity of mobile applications and web pages, users have higher and higher requirements for page loading speed and visual experience during page loading. Optimizing performance, reducing page loading time, improving visual perception during page loading, and improving user experience are eternal topics in the front-end field. In the context of front-end and back-end separation and asynchronous rendering of data being widely used in pages, a large number of pages will inevitably have a short period of white screen when users visit due to page loading, affecting the user's visual experience during use. Based on this, the relevant technology needs to optimize the display of the white screen during page loading to improve the user's viewing experience.

[0037] In the related technology, the solutions for the white screen during page loading are generally: server-side rendering, adding a loading page, and adding a skeleton of the first screen of the page (skeleton screen). The skeleton screen is a preloaded page structure that temporarily replaces the real content by displaying simple placeholder symbols, so that users can have a better interactive experience during the page loading process. The advantage of the skeleton screen is that the display content of the skeleton screen corresponds to the display content of the interface to be loaded, which enables the user to understand the content to be displayed on the interface to be loaded and the layout of the display content, thereby giving the user sufficient information in advance, pre-acquiring the user's focus, and allowing the user to focus on the location of interest in advance.

[0038] In the related art, the general development method of the skeleton screen is: using the traditional development method, that is, the developer writes the skeleton screen page according to the content of the first screen, and the compiled skeleton screen cannot be applied to multiple terminals (multiple platforms). For different platforms (such as applets, browser pages [H5], etc.), developers need to write multiple sets of skeleton screen codes separately. Moreover, when the page content changes, the corresponding skeleton screen needs to be rewritten, which is somewhat invasive to the business code and has high subsequent maintenance costs. In summary, the skeleton screen development method in the related art has the defects of being cumbersome and redundant, and is not easy to expand and maintain.

[0039] In view of this, the present disclosure proposes a skeleton screen display method. When loading a page, a preset code that supports multi-terminal operation is called, and the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded. Through the preset code, the structural parameters corresponding to the display content of the interface to be loaded are obtained according to the first preset parameters; according to the structural parameters, a target skeleton screen component is generated, and the target skeleton screen component is displayed as a skeleton screen. Through the present disclosure, the code of the same skeleton screen is made cross-platform compatible and suitable for multi-terminal operation, which reduces the tedious steps of manually writing skeleton screens, improves development efficiency, and reduces repetitive and redundant labor.

[0040] Figure 1 FIG. 1 is a flowchart of a skeleton screen display method according to an exemplary embodiment. Figure 1As shown, the method includes steps S101 to S103.

[0041] In step S101, in response to page loading, a preset code is called, the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded, and the preset code supports multi-terminal operation.

[0042] In step S102, a structural parameter corresponding to the display content of the interface to be loaded is obtained according to a first preset parameter through a preset code.

[0043] In step S103, a target skeleton screen component is generated according to the structural parameters, and the target skeleton screen component is displayed as a skeleton screen.

[0044] In an embodiment of the present disclosure, when an electronic device loads a page, if it is determined that a skeleton screen is required during the page loading process, a preset code that supports multi-terminal operation is called, and a target skeleton screen component corresponding to the interface to be loaded is generated through the preset code. Among them, the preset code is a code compiled from a framework for developing multi-terminal programs. The preset code in the present disclosure can be run on different terminals (such as mini-programs, H5 pages, etc.) and generate a skeleton screen. In one example, the preset code used in the present disclosure to obtain the skeleton screen component is a skeleton screen hooks function written in the Taro framework.

[0045] In the disclosed embodiment, after the preset code is called, the preset code obtains the structural parameters corresponding to the display content of the interface to be loaded based on the first preset parameter customized by the user. The display content (or elements) of the interface to be loaded may include pictures, virtual controls (such as sliders, buttons) and text, etc. By customizing the first preset parameter, the user can control the structural parameters obtained by the preset code. In one example: the display content of the interface to be loaded may include pictures, virtual controls and text. Then, by setting the first preset parameter, the user can make the preset code only obtain the structural parameters corresponding to part of the display content of the interface to be loaded, such as only obtaining the structural parameters corresponding to the pictures and virtual controls, or only obtaining the virtual controls corresponding to the picture content and text content.

[0046] In an exemplary embodiment of the present disclosure, the preset code is a skeleton screen hooks function developed by a developer through the Taro framework, and the first preset parameter is a class name (class) or an identifier (id) passed in by the user. The skeleton screen hooks function uses the createSelectorQuery function (createSelectorQuery) provided by the Taro framework to traverse the structure of elements on the page (or Document Object Model, Document Object Model, DOM structure) to obtain the structural parameters corresponding to the class name or identifier (including but not limited to the position, size, and type of the element).

[0047] In the disclosed embodiment, after the structural parameters are obtained, a target skeleton screen component corresponding to the display content of the interface to be loaded is generated according to the obtained structural parameters. Since the structural parameters correspond to the display content of the interface to be loaded, the display content contained in the target skeleton screen component generated based on the structural parameters also corresponds to the display content of the interface to be loaded. The display content of the skeleton screen that is finally displayed corresponds to the display content of the interface to be loaded, which enables the user to understand the content to be displayed on the interface to be loaded and the layout of the display content, thereby providing the user with sufficient information in advance, obtaining the user's focus in advance, and allowing the user to focus on the position of interest in advance. In one example, the interface to be loaded contains text content, picture content and controls, and the parts of the skeleton screen corresponding to the text content, picture content and controls respectively display different placeholders, and the user can understand the content to be displayed on the interface to be loaded and the layout of each display content through the skeleton screen.

[0048] In an embodiment of the present disclosure, when a page is loaded, a preset code that supports multi-terminal operation is called, and the preset code is used to generate a target skeleton screen component corresponding to the interface to be loaded. Through the preset code, the structural parameters corresponding to the display content of the interface to be loaded are obtained according to the first preset parameters; according to the structural parameters, the target skeleton screen component is generated, and the target skeleton screen component is displayed as a skeleton screen. Through the present disclosure, developers can use the same skeleton screen code to achieve cross-platform compatibility, which is suitable for multi-terminal operation, reduces the tedious steps of manually writing skeleton screens, improves development efficiency, and reduces repetitive and redundant labor. It also allows users (users) to customize the display content of the skeleton screen based on personal needs, thereby enhancing the user experience.

[0049] It is understandable that when the skeleton screen is displayed, the overall color and line performance of the skeleton screen will also affect the user's visual perception. The present disclosure can set the lines and colors of the skeleton screen when it is displayed through the second preset parameter customized by the user. The following embodiment of the present disclosure describes a method for generating a target skeleton screen component according to the structural parameters.

[0050] Figure 2 FIG. 1 is a flow chart showing a method for generating a target skeleton screen component according to structural parameters according to an exemplary embodiment. Figure 2 As shown, the method includes step S201 to step S202.

[0051] In step S201, a display component is set according to the structural parameters, and the display component corresponds to the display content of the interface to be loaded.

[0052] In step S202, in response to the second preset parameter being set, the color style and / or line style of the display component is set according to the color style and / or line style set by the second preset parameter to obtain a target skeleton screen component.

[0053] In the embodiment of the present disclosure, when the user has personalized requirements for the display effect of the skeleton screen, the user can customize the color style and / or line style of the skeleton screen through the second preset parameter. Therefore, in the process of displaying the skeleton screen, the target skeleton screen component whose color style and / or line style corresponds to the user's required style is obtained in combination with the second preset parameter preset by the user, so that the skeleton screen finally displayed meets the user's requirements, thereby improving the user experience. In one example, the user can set the color style of the skeleton screen to green, blue, pink, etc. through the second preset parameter. In another example, the user can set the line style of the skeleton screen to dotted line, solid line, double line, etc. through the second preset parameter.

[0054] In an exemplary embodiment of the present disclosure, the preset code is the skeleton screen hooks function developed by the developer through the Taro framework. When the page is initialized (i.e., the skeleton screen needs to be displayed), the useSkeleton method (the hooks function encapsulated by the developer to generate the skeleton screen, the preset code) is called, the parameters required in useSkeleton are passed in, the skeleton screen component and skeleton screen content returned in useSkeleton are received, and the skeleton screen component is registered and used in the current page. The method of generating the target skeleton screen component is as follows:

[0055] 1onst{Skeleton,pageStructure}=useSkeleton({ / / match class name or id (elements with skeleton-element class name will be generated in the skeleton screen, Skeleton is the skeleton screen, pageStructure is the skeleton screen content)

[0056] 2className:'.skeleton-element', / / class name selector, used to specify the color of the skeleton screen

[0057] 3color:'#cccccc' / / Color of the skeleton screen

[0058] 4})

[0059] In the embodiment of the present disclosure, when the interface to be loaded has not been loaded or the loaded content is small, the skeleton screen is displayed on the current page so that the skeleton screen covers the loading interface to be loaded. The method of displaying the target skeleton screen component as the skeleton screen is described below in the embodiment of the present disclosure.

[0060] Figure 3 FIG. 1 is a flow chart showing a method for displaying a target skeleton screen component as a skeleton screen according to an exemplary embodiment. Figure 3 As shown, the method includes step S301 to step S302.

[0061] Step S301, generating a target skeleton screen component according to the second preset parameters and the structural parameters.

[0062] Step S302: during the page loading process, a weight higher than a threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

[0063] In the disclosed embodiment, after obtaining the target display component corresponding to the display content of the interface to be loaded and the layout, the target skeleton screen component is covered on other pages while the interface to be loaded is in the loading process, that is, a weight higher than the threshold is set for the root node of the target skeleton screen component, so that the target skeleton screen component is displayed on the top layer of the current page. Thus, skeleton screen display is realized.

[0064] In an exemplary embodiment of the present disclosure, in the generated skeleton screen component, according to the incoming page structure data, a for loop is used to dynamically create the structure (DOM structure) and style of the elements on the page. In the root node of the skeleton screen component, a higher weight value is given to ensure that the skeleton screen component can be covered on the normal page content.

[0065] In an exemplary embodiment of the present disclosure, the preset code is a skeleton screen hooks function developed by a developer through the Taro framework. Based on the skeleton screen hooks function, the method of generating a target skeleton screen component is as follows:

[0066] 1const MyPage=()=>{ / / Define a function component named MyPage

[0067] 2const[isLoading,setIsLoading]=useState(true); / / Use useState Hook to manage loading status. The initial setting is true to indicate that the page is loading.

[0068] 3const{Skeleton,pageStructure}=useSkeleton({ / / Use the custom useSkeleton Hook, pass in the configuration object, and return the Skeleton component and page structure. useSkeleton is a custom skeleton screen Hook function used to generate a skeleton screen

[0069] 4className:'.skeleton-element', / / Specify the class name of the skeleton screen element

[0070] 5color:'#cccccc' / / Specify the color of the skeleton screen

[0071] 6})

[0072] 7return( / / The return part of the component

[0073] 8<> / / Use Fragment to wrap all child elements to avoid additional DOM nodes

[0074] 9{isLoading&&<Skeleton pageStructure={pageStructure} / >} / / If isLoading is true, display the skeleton screen

[0075] 10<View className='real-content skeleton-element'> / / Content to be displayed after the network request data is returned

[0076] 11<Text className='text skeleton-element'> / / Here is the real content,

[0077] 12

[0078] / / End Fragment

[0079] 13

[0080] 14); / / End of component definition

[0081] 15}

[0082] It is understandable that different display devices have different length and width dimensions. For display devices with different length and width ratios, when the skeleton screen is displayed during page loading, the length and width dimensions of the skeleton screen component need to be adaptively adjusted to completely cover the page being loaded. The skeleton screen display in the present disclosure is further described below.

[0083] Figure 4 FIG. 1 is a flowchart of a skeleton screen display method according to an exemplary embodiment. Figure 4 As shown, the method includes step S401, step S402A and step S402B.

[0084] In step S401, a target skeleton screen component is generated according to the second preset parameters and the structural parameters.

[0085] In step S402A, an absolute positioning parameter is set for the root node of the target skeleton screen component so that the length and width of the target skeleton screen component are the same as those of the current page.

[0086] In step S402B, during the page loading process, a weight higher than a threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

[0087] Among them, step S402A and step S402B are steps executed synchronously.

[0088] In the disclosed embodiment, after obtaining the target display component whose content and layout correspond to the display content of the interface to be loaded, when the interface to be loaded is in the loading process, the target skeleton screen component is covered on other pages, that is, a weight higher than the threshold is set for the root node of the target skeleton screen component, so that the target skeleton screen component is displayed on the top layer of the current page. At the same time, the absolute positioning parameters are set for the root node of the target skeleton screen component (absolute positioning is added), so that the height and width of the target skeleton screen component are equal to the height and width of the device display screen, even if the length and width of the target skeleton screen component are the same as the length and width of the current page, to ensure that the target skeleton screen component can be completely covered on the content of the page currently being loaded, so as to realize the skeleton screen display.

[0089] In the embodiment of the present disclosure, when the loading progress of the interface to be loaded reaches a certain level, the display of the skeleton screen can be stopped, and the interface to be loaded can be displayed, so that the user can obtain information on the interface to be loaded. The skeleton screen display method in the present disclosure is further described below.

[0090] Figure 5 FIG. 1 is a flowchart of a skeleton screen display method according to an exemplary embodiment. Figure 5 As shown, the method includes step S501 to step S502.

[0091] In step S501, during the page loading process, a weight higher than a threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

[0092] In step S502, the target skeleton screen component is stopped from being displayed according to the third preset parameter, and a loading interface being loaded or a loading interface having been loaded is displayed. The third preset parameter is used to control the target skeleton screen component to stop being displayed.

[0093] It is understandable that when the loading progress of the interface to be loaded reaches a certain level, the interface to be loaded has already loaded part of the information that supports user browsing, such as the interface to be loaded containing controls, image content and text content. When the text content is loaded, the user is supported to browse the text, and when the image content is loaded, the user is supported to browse the image content. Based on this, the present disclosure is provided with a third preset parameter that supports user-defined settings. By setting the third preset parameter, the user can set the time node for stopping the display of the skeleton screen (target skeleton screen component), such as when the text content and / or the image content is loaded. That is, the skeleton screen is stopped, and the interface to be loaded (the loading interface to be loaded) with the completion of loading of part of the content (text content and / or image content) is displayed, so that the user can obtain information from the interface to be loaded with part of the content before the loading of the interface to be loaded is completed. Similarly, the user can also set it by setting the third preset parameter, stop displaying the skeleton screen (target skeleton screen component) after the loading of the interface to be loaded is completed, and display the loading interface to be loaded, so that the user can complete browsing the page content.

[0094] It is understandable that the interface to be loaded contains multiple types of display content (or elements), and users often focus on browsing some of the content. In this case, when the skeleton screen is displayed, only the corresponding display symbols can be displayed for the content that the user is interested in, so that the user can quickly locate the content of interest after the page is loaded. The following is a further explanation of the structural parameters in the present disclosure.

[0095] In one implementation of the disclosed embodiment, the structural parameters include at least one or more of the following: structural parameters corresponding to the image part of the interface to be loaded, structural parameters corresponding to the text part of the interface to be loaded, and structural parameters corresponding to the control part of the interface to be loaded.

[0096] In the embodiment of the present disclosure, after calling the preset code, the preset code obtains the structural parameters corresponding to the display content of the interface to be loaded based on the first preset parameter customized by the user. In view of the fact that the display content (or element) of the interface to be loaded may include pictures, virtual controls (such as sliders, buttons) and text, the structural parameters in the present disclosure may include structural parameters corresponding to the picture part of the interface to be loaded, structural parameters corresponding to the text part of the interface to be loaded, and structural parameters corresponding to the control part of the interface to be loaded). The user can control the structural parameters obtained by the preset code by customizing the first preset parameter. In one example: the display content of the interface to be loaded may include pictures, virtual controls and text. Then, by setting the first preset parameter, the user can make the preset code only obtain the structural parameters corresponding to the display content of the interface to be loaded, such as only obtaining the structural parameters corresponding to the pictures and virtual controls, or only obtaining the virtual controls corresponding to the picture content and text content.

[0097] In the embodiment of the present disclosure, if the user does not set the second preset parameter, the skeleton screen component is displayed in a default style. The skeleton screen display method in the present disclosure is further described below.

[0098] Figure 6 FIG. 1 is a flowchart of a skeleton screen display method according to an exemplary embodiment. Figure 6 As shown, the method includes step S601 to step S602.

[0099] In step S601, a display component is set according to the structural parameters, and the display component corresponds to the display content of the interface to be loaded.

[0100] In step S602, in response to the second preset parameter not being set, the color style of the skeleton screen is set to a default color style, and the line style of the skeleton screen is set to a default line style, to obtain a target skeleton screen component.

[0101] In the embodiment of the present disclosure, when the user has no personalized requirements for the display effect of the skeleton screen, that is, when the user customizes the color style and / or line style of the skeleton screen through the second preset parameter, the color style and line style of the skeleton screen are set to the default style, such as setting the background color of the skeleton screen to gray, and setting the lines of the skeleton screen to black solid lines by default.

[0102] In an exemplary embodiment of the present disclosure, Figure 7 As shown in the flowchart of the skeleton screen display method in the figure, the skeleton screen is generated and displayed in the following manner: In response to starting to generate the skeleton screen, the useSkeleton method (preset code) is called. The required parameters (first preset parameters, such as class name [class], identifier [id]) are passed in. With the help of the tool for obtaining element parameters in the Taro framework (createSelectorQuery method), the structure of the element (structural parameters, also known as dom structure) is captured according to the passed in parameters. Determine whether the color field (second preset parameter) is passed in. In the case of passing in the color field, according to the dom structure, a for loop is used to generate a skeleton screen component and content data (target skeleton screen component) of a custom color. In the case of not passing in the color field, according to the dom structure, a for loop is used to generate a skeleton screen component and content data (target skeleton screen component) of a default gray color. Add positioning to the root node of the skeleton screen component, give it a higher weight value, and cover it on other pages. Return the corresponding skeleton screen component and page structure data. Register and use the skeleton screen component in the page, and pass in the page structure data. Customize variables (third preset parameters) in the page to control the visibility of the skeleton screen component. End the display of the skeleton screen.

[0103] When loading a page, a preset code supporting multi-terminal operation is called, and the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded. Through the preset code, the structural parameters corresponding to the display content of the interface to be loaded are obtained according to the first preset parameters. According to the structural parameters, the skeleton screen component corresponding to the display content of the interface to be loaded is set. In the case where the second preset parameter is set, the color style and / or line style of the skeleton screen component is set according to the second preset parameter to obtain the target skeleton screen component. In the case where the second preset parameter is not set, the target skeleton screen component is obtained by setting the color style and / or line style of the skeleton screen component to the default style. After obtaining the target skeleton screen component, the absolute positioning parameters are set for the root node of the target skeleton screen component so that the length and width of the target skeleton screen component are the same as the length and width of the current page, and during the page loading process, the weight higher than the threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page, thereby completing the display of the skeleton screen. Further, during the loading process of the interface to be loaded, the target skeleton screen component is stopped from being displayed according to the third preset parameter, and the interface to be loaded being loaded or the interface to be loaded after loading is displayed. Through this disclosure, the code of the same skeleton screen can be cross-platform compatible and suitable for multi-terminal operation, reducing the cumbersome steps of manually writing the skeleton screen, improving development efficiency, and reducing repeated and redundant labor. It also allows users to customize the display content and display period of the skeleton screen based on personal needs, thereby improving the user experience.

[0104] Based on the same concept, the embodiment of the present disclosure also provides a skeleton screen display device 100 .

[0105] It is understandable that the skeleton screen display device 100 provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0106] Figure 8 is a block diagram of a skeleton screen display device 100 according to an exemplary embodiment. Figure 8 The device includes a calling unit 101, an acquiring unit 102 and a processing unit 103.

[0107] The calling unit 101 is used to call a preset code in response to page loading. The preset code is used to generate a skeleton screen component corresponding to the interface to be loaded, and the preset code supports multi-terminal operation.

[0108] The acquisition unit 102 is used to acquire the structural parameters corresponding to the display content of the interface to be loaded according to the first preset parameters through the preset code.

[0109] The processing unit 103 is used to generate a target skeleton screen component according to the second preset parameters and the structural parameters, and display the target skeleton screen component as a skeleton screen. The second preset parameters are used to set the display style of the skeleton screen.

[0110] In one embodiment, the processing unit 103 generates a target skeleton screen component according to the second preset parameter and the structural parameter in the following manner: a display component is set according to the structural parameter, and the display component corresponds to the display content of the interface to be loaded. In response to the second preset parameter being set, the color style and / or line style of the display component is set according to the color style and / or line style set by the second preset parameter to obtain the target skeleton screen component.

[0111] In one implementation, the processing unit 103 displays the target skeleton screen component as a skeleton screen in the following manner: during page loading, a weight higher than a threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

[0112] In one implementation, the processing unit 103 is further configured to set absolute positioning parameters for the root node of the target skeleton screen component so that the length and width of the target skeleton screen component are the same as those of the current page.

[0113] In one implementation, the processing unit 103 is further configured to: stop displaying the target skeleton screen component according to a third preset parameter, and display a loading interface being loaded or a loading interface having been loaded, wherein the third preset parameter is used to control the target skeleton screen component to stop displaying.

[0114] In one implementation, the structural parameters include at least one or more of the following: structural parameters corresponding to the image part of the interface to be loaded, structural parameters corresponding to the text part of the interface to be loaded, and structural parameters corresponding to the control part of the interface to be loaded.

[0115] In one implementation, the processing unit 103 is further configured to: in response to the second preset parameter not being set, set the color style of the skeleton screen to a default color style, and set the line style of the skeleton screen to a default line style, to obtain a target skeleton screen component.

[0116] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0117] Fig. 9 This is a schematic diagram of the structure of an application embodiment of an electronic device according to an embodiment of the present invention. Fig. 9 , which shows a schematic diagram of the structure of an electronic device suitable for implementing a terminal device or a server in an embodiment of the present application. Fig. 9 As shown, the electronic device includes a memory for storing a computer program and one or more processors for executing the computer program stored in the memory. In one example, the memory may be a read-only memory (ROM) and / or a random access memory (RAM).

[0118] In one example, one or more processors may be one or more central processing units (CPUs), and / or one or more graphics processing units (GPUs), etc. The processors may perform various appropriate actions and processes according to executable instructions stored in ROM or executable instructions loaded from the storage part to RAM. In one example, the electronic device may also include a communication unit, which may include but is not limited to a network card, which may include but is not limited to an IB (Infiniband) network card. The processor may communicate with the ROM and / or RAM to execute executable instructions, connect to the communication unit through a bus, and communicate with other target devices through the communication unit, thereby completing the operations corresponding to any method provided in the embodiments of the present application, for example, based on the time attenuation coefficient, the user activity is calculated; based on the number of recognitions of the contributed content, the user popularity is calculated; based on the user activity and user popularity, the user's knowledge contribution ability is calculated.

[0119] In addition, various programs and data required for the operation of the device can also be stored in the RAM. The CPU, ROM and RAM are connected to each other via a bus. In the case of RAM, the ROM is an optional module. The RAM stores executable instructions, or writes executable instructions into the ROM at runtime, and the executable instructions enable the processor to perform operations corresponding to any of the above methods of the present invention. The input / output (I / O) interface is also connected to the bus. The communication unit can be integrated or can be configured to have multiple submodules (e.g., multiple IB network cards) and be linked on the bus.

[0120] The following components are connected to the I / O interface: an input section including a keyboard, a mouse, etc.; an output section including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section including a hard disk, etc.; and a communication section including a network interface card such as a LAN card, a modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that a computer program read therefrom is installed into the storage section as needed.

[0121] If necessary, Fig. 9 The architecture shown is only an optional implementation method. In the specific practice, the above can be modified according to actual needs. Fig. 9 The number and type of components can be selected, deleted, added or replaced; different functional components can be set up by separate settings or integrated settings, for example, the GPU and CPU can be set up separately or the GPU can be integrated on the CPU, the communication unit can be set up separately or integrated on the CPU or GPU, etc. These replaceable implementations all fall within the protection scope disclosed in the present invention.

[0122] Fig.10 FIG. 1 is a schematic diagram showing a structure of an embodiment of an electronic device disclosed in the present invention. Fig.10 , which shows a schematic diagram of the structure of an electronic device suitable for implementing a terminal device or a server in an embodiment of the present application. Fig.10 As shown, the electronic device includes a processor and a memory. The electronic device may also include an input and output device. The memory and the input and output device are connected to the processor through a bus. Among them, the memory is used to store instructions executed by the processor; the processor is used to call the instructions stored in the memory and execute the method of associating tag content involved in the above embodiment.

[0123] In the disclosed embodiment, the processor may call the instructions stored in the memory to determine the tag to be associated; determine the circled content in the data content according to the semantic matching result between the tag to be associated and the word tag marked by the data content; and associate the circled content with the tag to be associated. The process of the electronic device executing the tag-associated content can refer to the implementation process of the tag-associated content method described in the above embodiment, which will not be repeated here.

[0124] The embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are run on a computer, the method of associating tags with content involved in the above embodiment is executed.

[0125] The embodiments of the present disclosure also provide a computer program product including instructions. When the computer program product including instructions is run on a computer, the computer is enabled to execute the method of associating tags with content involved in the above embodiments.

[0126] In one or more optional implementations, the disclosed embodiment further provides a computer-readable storage medium for storing computer-readable instructions, which, when executed, causes a computer to execute the method of associating tag content in any of the above possible implementations. In another optional example, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0127] Although operations are described in a particular order in the drawings, this should not be understood as requiring that the operations be performed in the particular order shown or in serial order, or that all shown operations be performed to achieve desired results. In certain circumstances, multitasking and parallel processing may be advantageous.

[0128] The methods and apparatus of the present disclosure can be implemented using standard programming techniques, using rule-based logic or other logic to implement various method steps. It should also be noted that the words "apparatus" and "module" used herein and in the claims are intended to include implementations using one or more lines of software code and / or hardware implementations and / or devices for receiving input.

[0129] Any steps, operations or procedures described herein may be performed or implemented using one or more hardware or software modules, either alone or in combination with other devices. In one embodiment, the software module is implemented using a computer program product including a computer-readable medium containing computer program code, which can be executed by a computer processor to perform any or all of the described steps, operations or procedures.

[0130] The foregoing description of the implementation of the present disclosure has been given for the purpose of illustration and description. The foregoing description is not exhaustive nor is it intended to limit the present disclosure to the exact form disclosed, and various variations and modifications may exist in accordance with the above teachings or may be obtained from the practice of the present disclosure. These embodiments are selected and described in order to illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can utilize the present disclosure in various embodiments and various modifications suitable for the specific purpose contemplated.

[0131] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes 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. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0132] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0133] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0134] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0135] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0136] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims

1. A skeleton screen display method, characterized in that: include: In response to page loading, a preset code is called, wherein the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded, and the preset code supports multi-terminal operation; Acquiring, by means of the preset code, structural parameters corresponding to the display content of the interface to be loaded according to the first preset parameters; A target skeleton screen component is generated according to the structural parameters, and the target skeleton screen component is displayed as a skeleton screen.

2. The method according to claim 1, characterized in that The step of generating a target skeleton screen component according to the structural parameters includes: Setting a display component according to the structural parameters, wherein the display component corresponds to display content of the interface to be loaded; In response to the second preset parameter being set, the color style and / or line style of the display component is set according to the color style and / or line style set by the second preset parameter to obtain the target skeleton screen component.

3. The method according to claim 2, characterized in that The step of displaying the target skeleton screen component as a skeleton screen includes: During the page loading process, a weight higher than a threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

4. The method according to claim 3, characterized in that: The method further comprises: An absolute positioning parameter is set for the root node of the target skeleton screen component so that the length and width of the target skeleton screen component are the same as those of the current page.

5. The method according to claim 3, characterized in that: The method further comprises: The target skeleton screen component is stopped from being displayed according to a third preset parameter, and a loading interface being loaded or a loading interface having been loaded is displayed. The third preset parameter is used to control the target skeleton screen component to stop being displayed.

6. The method according to claim 1, characterized in that The structural parameters include at least one or more of the following: The structural parameters corresponding to the picture part in the interface to be loaded, the structural parameters corresponding to the text part in the interface to be loaded, and the structural parameters corresponding to the control part in the interface to be loaded.

7. The method according to claim 2, characterized in that The method further comprises: In response to the second preset parameter not being set, the color style of the skeleton screen is set to a default color style, and the line style of the skeleton screen is set to a default line style, to obtain the target skeleton screen component.

8. A skeleton screen display device, characterized in that: include: A calling unit, configured to call a preset code in response to page loading, wherein the preset code is used to generate a skeleton screen component corresponding to the interface to be loaded, and the preset code supports multi-terminal operation; An acquisition unit, configured to acquire, through the preset code and according to the first preset parameter, a structural parameter corresponding to the display content of the interface to be loaded; The processing unit is used to generate a target skeleton screen component according to the structural parameters, and display the target skeleton screen component as a skeleton screen.

9. The device according to claim 8, characterized in that The processing unit generates a target skeleton screen component according to the second preset parameter and the structural parameter in the following manner: Setting a display component according to the structural parameters, wherein the display component corresponds to display content of the interface to be loaded; In response to the second preset parameter being set, the color style and / or line style of the display component is set according to the color style and / or line style set by the second preset parameter to obtain the target skeleton screen component.

10. The device according to claim 9, characterized in that The processing unit displays the target skeleton screen component as a skeleton screen in the following manner: During the page loading process, a weight higher than a threshold is set for the root node of the target skeleton screen component so that the target skeleton screen component is displayed at the top layer of the current page.

11. The device according to claim 10, characterized in that The processing unit is also used for: An absolute positioning parameter is set for the root node of the target skeleton screen component so that the length and width of the target skeleton screen component are the same as those of the current page.

12. The device according to claim 11, characterized in that The processing unit is also used for: The target skeleton screen component is stopped from being displayed according to a third preset parameter, and a loading interface being loaded or a loading interface having been loaded is displayed. The third preset parameter is used to control the target skeleton screen component to stop being displayed.

13. The device according to claim 8, characterized in that The structural parameters include at least one or more of the following: The structural parameters corresponding to the picture part in the interface to be loaded, the structural parameters corresponding to the text part in the interface to be loaded, and the structural parameters corresponding to the control part in the interface to be loaded.

14. The device according to claim 9, characterized in that The processing unit is also used for: In response to the second preset parameter not being set, the color style of the skeleton screen is set to a default color style, and the line style of the skeleton screen is set to a default line style, to obtain the target skeleton screen component.

15. An electronic device, characterized in that: include: processor: a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the skeleton screen display method according to any one of claims 1 to 7.

16. A storage medium, characterized in that: The storage medium stores instructions. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the skeleton screen display method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Framework screen page code generation method and device, server and storage medium

    CN110990014A

  • Application program processing method, device and equipment

    CN111552473A

  • Method and device for generating page skeleton screen

    CN115145569A

  • Page processing method, device, apparatus and storage medium

    TW202141300A