CN114253624A - Page loading method, device and container - Google Patents

Page loading method, device and container Download PDF

Info

Publication number
CN114253624A
CN114253624A CN202111424403.5A CN202111424403A CN114253624A CN 114253624 A CN114253624 A CN 114253624A CN 202111424403 A CN202111424403 A CN 202111424403A CN 114253624 A CN114253624 A CN 114253624A
Authority
CN
China
Prior art keywords
page
loading
error
target application
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111424403.5A
Other languages
Chinese (zh)
Inventor
司德鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202111424403.5A priority Critical patent/CN114253624A/en
Publication of CN114253624A publication Critical patent/CN114253624A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The invention provides a page loading method, a page loading device and a container, wherein the method comprises the following steps: monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application; and if the loading duration is greater than the set loading time and/or the data request result is wrong, determining that the loading state of the H5 page is a wrong state, and loading a wrong feedback page corresponding to the wrong state. The page loading method, the page loading device and the page loading container provided by the invention not only avoid the phenomenon of long-time white screen caused by loading errors of the H5 page, but also avoid the phenomena of page jumping, layout dislocation and the like caused by repeatedly refreshing the UI page by the target application, so that a user can know the loading condition of the H5 page, the waiting time of the user is saved, the use efficiency of the target application is improved, and the use experience of the user is improved.

Description

Page loading method, device and container
Technical Field
The invention relates to the technical field of internet application, in particular to a page loading method, a page loading device and a page loading container.
Background
With the release of HyperText Markup Language version 5 (HTML 5 or H5), H5 technology is adopted in front-end scenes of more and more applications. The H5 technology is mainly developed in the future in the field of mobile terminal Internet. At the present stage, the application experience of the mobile terminal browser is poor and the web page standards are not uniform, so that the development of the mobile terminal web page is hindered. The H5 technology can solve the two problems, and the development of the whole mobile terminal webpage is promoted integrally.
When the H5 runs on an Android (Android) phone, an iOS phone, or a browser, when a User first enters an H5 page, because the current H5 page needs to wait for a data request, a UI (User Interface) page is displayed until the data request is successful. If the step of displaying the UI page is not performed easily because of request failure, container incompatibility or other unknown problems, a long time of blank screen is caused, and the user experience is very poor.
Disclosure of Invention
The invention provides a page loading method, a page loading device and a page loading container, which are used for solving the technical problems that long-time white screen is easily caused when an H5 page is loaded in the prior art, and user experience is poor.
The invention provides a page loading method, which comprises the following steps:
monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application;
and if the loading duration is greater than the set loading time and/or the data request result is wrong, determining that the loading state of the H5 page is a wrong state, and loading a wrong feedback page corresponding to the wrong state.
According to the page loading method provided by the invention, the loading of the error feedback page corresponding to the error state comprises the following steps:
determining an error type of the error condition;
and determining an error feedback page corresponding to the error state based on the error type, a preset error type and an error feedback page corresponding to the preset error type.
According to the page loading method provided by the invention, the loading of the error feedback page corresponding to the error state comprises the following steps:
and sending the error state to a development background of the target application.
According to the page loading method provided by the invention, the loading of the error feedback page corresponding to the error state comprises the following steps:
if the error status disappears, the error feedback page is switched to the H5 page.
According to the page loading method provided by the invention, the monitoring of the loading state of the H5 page comprises the following steps:
receiving an initialization command sent by a target application based on a middleware initialization interface;
and executing the initialization command, and sending initialization success information to the target application.
The invention provides a page loading device, comprising:
the monitoring unit is used for monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application;
and the loading unit is used for determining that the loading state of the H5 page is an error state and loading an error feedback page corresponding to the error state if the loading duration is greater than the set loading time and/or the data request result is erroneous.
The present invention provides a container comprising:
the middleware executes the page loading method;
and the page module is connected with the middleware and used for loading the H5 page corresponding to the target application.
According to the container provided by the invention, the middleware stores a plurality of preset error types and an error feedback page corresponding to each preset error type.
The invention provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the steps of the page loading method when executing the program.
The invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the page loading method.
According to the page loading method, the page loading device and the page loading container, the loading state of the H5 page corresponding to the target application is monitored according to the loading duration and/or the data request result, if the H5 page has the error state, the error feedback page corresponding to the error state is loaded, so that the terminal can display the error feedback page corresponding to the H5 page to the user under the condition that the H5 page cannot be normally displayed, the phenomenon of long-time screen blank caused by the loading error of the H5 page is avoided, the phenomena of page jump, layout dislocation and the like caused by the repeated refreshing of the UI page by the target application are also avoided, the user can know the loading condition of the H5 page, the waiting time of the user is saved, the use efficiency of the target application is improved, and the use experience of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a page loading method provided by the present invention;
FIG. 2 is a timing diagram illustrating a page loading method according to the present invention;
FIG. 3 is a schematic structural diagram of a page loading apparatus provided in the present invention;
FIG. 4 is a schematic structural view of a container provided by the present invention;
FIG. 5 is a schematic diagram of the operation of the vessel provided by the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When loading of an H5 page of a certain application is wrong, a display interface of the terminal has a long-time white screen problem. At this point, the user cannot know what is happening with the application, what reason, and how the solution should be. In the prior art, in order to solve the loading error of the H5 page, a mode of skipping a data request and directly refreshing a UI page is generally adopted, and in this mode, a display interface of a terminal may jump due to inconsistent display of two UI pages or a layout of the UI page may be misaligned, which results in poor user experience of a user.
The page loading method, device and container provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings by specific embodiments and application scenarios thereof. The page loading method can be applied to the terminal, and can be specifically executed by hardware or software in the terminal. The execution main body of the page loading method can be a terminal or a control device of the terminal and the like.
The terminal includes, but is not limited to, a mobile phone or other portable communication device such as a tablet computer having a touch sensitive surface (e.g., a touch screen display and/or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.
Fig. 1 is a schematic flow chart of a page loading method provided by the present invention, and as shown in fig. 1, the method includes:
step 110, monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application;
step 120, if the loading duration is greater than the set loading time and/or the data request result is erroneous, determining that the loading state of the H5 page is an error state, and loading an error feedback page corresponding to the error state.
Specifically, the target Application is an Application (App) operated by the user on an interface of the terminal. The H5 page is a page that the target application displays to the user based on the H5 technique in response to the user's operation. For example, the target application may be a shopping-like application installed on a tablet by a user. The H5 page may be an item purchase page that the shopping-like application presents to the user. For another example, the target application may be an information application installed on a mobile phone by a user. The H5 page may be a news story page that the information-based application presents to the user.
The loading of the H5 page includes steps such as web requests and page rendering. The network request is a request for the target application to send related data and the like to the server through the network. The server sends the H5 file containing the relevant data to the target application in response to the network request of the target application. And the target application analyzes the received H5 file, and performs page rendering to obtain an H5 page. For example, the target application parses the H5 file, and constructs a DOM (Document Object Model) tree; analyzing CSS (Cascading Style Sheets) files to construct CSSOM (CSS Object Model) trees; combining the DOM tree and the CSSOM tree to generate a rendering tree; and calculating the layout of the rendering tree, and rendering the layout onto a screen of the terminal, thereby realizing the loading of the H5 page.
If loading of the H5 page corresponding to the target application is wrong, the H5 page may have long-time white screen, page bouncing, UI page layout dislocation, and the like, so that the user cannot obtain any useful information.
The loading of the H5 page corresponding to the target application may be monitored. The monitored content may include loading duration and/or data request result, etc. The loading duration is the time required by loading the H5 page, and the data request result is whether the corresponding loaded file can be requested or not when the H5 page is loaded.
If the loading duration is less than the set loading time and the data request result is normal, the H5 page is loaded normally, and the H5 page after normal loading can be displayed on the interface of the terminal.
If the loading duration is longer than the set loading time, the network request time is too long when the H5 page loads data, which causes the loading error of the H5 page; if the data request result is wrong, the fact that the requested file does not exist when the H5 page loads data is indicated, and the H5 page loading error is caused; that is, the load status of the H5 page is an error status. At this time, the error feedback page corresponding to the error state should be loaded. The error status indicates that the H5 page cannot be loaded normally. For example, the error status may include a data request failure corresponding to the H5 page, an error in the container in which the H5 page is located, and so on. At this time, an error feedback page corresponding to the error state may be loaded. The error feedback page is a page for performing error information feedback to the user after an error state occurs. The display information in the error feedback page may include a cause of error state generation, an operation suggestion after the error state, and the like.
The error feedback page and the error state have a correspondence. For example, if the error state is poor network communication quality, an error feedback page corresponding to the poor network communication quality may be loaded, the display information in the error feedback page may include an indication that the current network communication quality is poor to the user, and the operation suggestion may be to move to a location where the network communication quality is better, change a connected network, continue to wait for network refresh, and the like. If the error state is that the requested data does not exist, an error feedback page corresponding to the requested data does not exist may be loaded, the display information in the error feedback page may include a suggestion indicating to the user that the requested data does not exist, and the operation suggestion may be a suggestion of exiting the target application, jumping to another operation page in the target application, and the like.
The execution subject of the above method may be middleware (middleware). Middleware is a type of computer software that connects software components and applications, including a set of services to facilitate the interaction of multiple applications running on one or more terminals over a network, and is typically used to support and simplify those complex distributed applications, including WEB servers, transaction monitors, and message queue software.
The middleware provides a platform running environment for the target application supported by the middleware, and the environment shields the interface difference between the bottom layer communication and realizes the interoperation. The purpose of the middleware is to serve target applications, and provide an interoperation mechanism between different services of an application layer. It provides uniform platform and running environment for upper layer target Application, and packages different operation systems to provide API Interface (Application Programming Interface), and provides uniform standard Interface for target Application.
According to the page loading method provided by the embodiment of the invention, the loading state of the H5 page corresponding to the target application is monitored according to the loading duration and/or the data request result, if the H5 page has the error state, the error feedback page corresponding to the error state is loaded, so that the terminal can display the error feedback page corresponding to the H5 page to the user under the condition that the H5 page cannot be normally displayed, the long-time white screen phenomenon caused by the loading error of the H5 page is avoided, the phenomena of page jumping, layout dislocation and the like caused by the repeated refreshing of the UI page by the target application are also avoided, the user can know the loading condition of the H5 page, the waiting time of the user is saved, the use efficiency of the target application is improved, and the use experience of the user is improved.
Based on the above embodiment, step 120 includes:
determining an error type of the error condition;
and determining an error feedback page corresponding to the error state based on the error type, the preset error type and the error feedback page corresponding to the preset error type.
Specifically, the error type of the error state is a kind of error occurring when the page is loaded. The error types may include data request failures, network communication errors, software code errors, path errors, and the like. The error type of the error state can be set before the method is applied, and can also be obtained after summary and summarization according to various errors occurring in the use process of the target application.
The preset error type is a preset error type of an error state of the H5 page. Since various error states may occur in the use process of the target application, when the target application is prompted to a user, in order to improve the pertinence and efficiency of the prompting, a preset error type and an error feedback page corresponding to the preset error type may be built in a memory of the terminal.
When an error state occurs in the H5 page during the running process of the target application, an error type of the error state may be obtained, and the error type may be matched with a preset error type. And when the error type is the same as a certain preset error type, taking the error feedback page corresponding to the preset error type as the error feedback page of the error type.
For example, in the starting process of the target application, due to the fact that a network fails, an error state occurs in an H5 page corresponding to the starting interface, and the page cannot be displayed normally. The loading of the H5 page corresponding to the target application is monitored, the error type of the H5 page is monitored to be a network communication error, at the moment, the network communication error is matched with a plurality of preset error types built in the terminal by the terminal, an error feedback page corresponding to the network communication error in the preset error types is used as a target page, and the loading is carried out in the terminal. Through the error feedback page, the user can know that the use of the current target application is influenced because the current network communication quality is poor. The error feedback page also comprises operation suggestions, and the user can switch the network connected with the terminal or move to a place with better network communication quality according to the operation suggestions.
According to the page loading method provided by the embodiment of the invention, the preset error type and the error feedback page corresponding to the preset error type can be pre-built in the terminal, so that when the H5 page has an error state, the terminal can rapidly determine the error feedback page corresponding to the error state and display the error feedback page to a user, the waiting time of the user is saved, and the use efficiency of the target application is improved.
Based on any of the above embodiments, step 120 includes:
and sending the error state to a development background of the target application.
Specifically, various error states may occur in the use process of the target application, and after an error feedback page corresponding to the error state is displayed to a user, the error states can be used as analysis data and sent to a development background of the target application, so that the development background can timely repair running errors occurring in the target application.
The error status and/or information related to the error status may be sent to a development background of the target application. The related information may include terminal information, operating system information, network connection information, and the like, where the target application is located.
For example, the target application is an information application installed on a mobile phone by a user. And the user operates the target application on the mobile phone. When the user clicks one news link of the display interface of the target application, an error state occurs in the loading process of the H5 page corresponding to the news link. The middleware in the mobile phone monitors an event that an error state occurs in an H5 page corresponding to a target application, selects a corresponding error feedback page from a mobile phone memory to load according to an error type corresponding to the error state, and prompts a user after loading. Meanwhile, the middleware sends the relevant information when the error state occurs, including the error state occurrence time, the model of the mobile phone, the type of the operating system of the mobile phone, the version number of the operating system of the mobile phone and the like, to the development background of the target application, so that the development background collects and sorts the error state occurring in the target application, and generates an error state report, so that developers can repair possible problems of the target application in time.
According to the page loading method provided by the embodiment of the invention, the error state is sent to the development background of the target application, so that the development background can know the use condition of the monitored target application, possible problems in the target application are timely repaired, and the use experience of the target application is improved.
Based on any of the above embodiments, step 120 includes:
if the error condition disappears, the error feedback page is switched to the H5 page.
Specifically, the H5 page has an error state, which may be generated for many reasons, and some error states may disappear in a short time, at which time the error feedback page may be switched to the H5 page.
For example, the target application is a shopping application installed on a mobile phone by a user. And the user operates the target application on the mobile phone. When the user clicks one item purchasing link of the display interface of the target application, an error state occurs in the loading process of the H5 page corresponding to the purchasing link, and the possible reason is that the network communication quality is poor. And the middleware monitors an event that an error state occurs in the H5 page corresponding to the target application, selects a corresponding error feedback page from a mobile phone memory for loading, and prompts a user after loading. In the loading process of the error feedback page or the display process of the error feedback page, the network communication quality is enhanced, and when the middleware detects that the error state disappears, the error feedback page is switched to the H5 page. For the user, although the page of the target application has the error feedback page, the page is switched to the H5 page quickly, and the use experience of the user is not greatly influenced.
According to the page loading method provided by the embodiment of the invention, if the error state disappears, the error feedback page is switched to the H5 page, so that the operation of the user on the target application is continued, the target application is prevented from being quitted or restarted, and the use experience of the target application is improved.
Based on any of the above embodiments, step 110 may be preceded by:
receiving an initialization command sent by a target application based on a middleware initialization interface;
and executing the initialization command, and sending initialization success information to the target application.
Specifically, when the execution subject of the method is middleware, the middleware may be initialized simultaneously when the target application is initialized.
The middleware can provide a middleware initialization interface to the target application by providing an API. When the target application is initialized, the target application sends an initialization command to the middleware through the middleware initialization interface. And the middleware receives and executes the initialization command, and sends initialization success information to the target application after the initialization is finished.
The time to initialize the middleware may be determined according to the requirements of the target application. For example, when the target application initializes, an initialization command may be sent to the middleware; an initialization command may also be sent to the middleware before the target application loads the H5 page.
According to the page loading method provided by the embodiment of the invention, the initialization of the middleware is determined according to the target application, so that the condition that the middleware runs in the background of the terminal for a long time to occupy the system resources of the terminal is avoided, and the use experience of the target application is improved.
Based on any of the above embodiments, fig. 2 is a timing diagram of the page loading method provided by the present invention, and as shown in fig. 2, the loading of the H5 page depends on the middleware. When the H5 page initializes, the middleware provides an API interface to the target application. And the target application acquires the successful initialization of the middleware and starts monitoring by using an API (application programming interface) provided by the middleware. The middleware can monitor the loading of the H5 page in the target application, and when the H5 request fails, the H5 container reports errors, unknown problems and the like occur, the target application reports the errors to the middleware, the middleware collects the errors, and a series of processing is performed. The specific logic is as follows:
the target application firstly introduces the middleware, calls an initialization API (application programming interface) of the middleware after the initialization is successful, and sends the initialization success to the target application and starts monitoring after the initialization API of the middleware is triggered.
And after the middleware is initialized successfully. When the target application loads the H5 page, H5 request failure, H5 container error report and unknown problems occur, errors are reported to the middleware, and the middleware collects and summarizes the errors.
The middleware induces error information, on one hand, dynamically adjusts the current UI (user interface) to feed back some necessary error information to the user, and increases user experience; on the other hand, error information is reported to the development background through an internal interface request, so that developers in the development background can repair problems in time.
Based on any of the above embodiments, fig. 3 is a schematic structural diagram of a page loading apparatus provided by the present invention, and as shown in fig. 3, the apparatus includes:
the monitoring unit 310 is configured to monitor a loading state of an H5 page based on a loading duration and/or a data request result of the H5 page corresponding to the target application;
the loading unit 320 is configured to determine that the loading state of the H5 page is an error state and load an error feedback page corresponding to the error state if the loading duration is greater than the set loading time and/or the data request result is erroneous.
Specifically, the target Application is an Application (App) operated by the user on an interface of the terminal. The H5 page is a page that the target application displays to the user based on the H5 technique in response to the user's operation. For example, the target application may be a shopping-like application installed on a tablet by a user. The H5 page may be an item purchase page that the shopping-like application presents to the user. For another example, the target application may be an information application installed on a mobile phone by a user. The H5 page may be a news story page that the information-based application presents to the user.
The loading of the H5 page includes steps such as web requests and page rendering. The network request is a request for the target application to send related data and the like to the server through the network. The server sends the H5 file containing the relevant data to the target application in response to the network request of the target application. And the target application analyzes the received H5 file, and performs page rendering to obtain an H5 page. For example, the target application parses the H5 file, and constructs a DOM (Document Object Model) tree; analyzing CSS (Cascading Style Sheets) files to construct CSSOM (CSS Object Model) trees; combining the DOM tree and the CSSOM tree to generate a rendering tree; and calculating the layout of the rendering tree, and rendering the layout onto a screen of the terminal, thereby realizing the loading of the H5 page.
If loading of the H5 page corresponding to the target application is wrong, the H5 page may have long-time white screen, page bouncing, UI page layout dislocation, and the like, so that the user cannot obtain any useful information.
The monitoring unit 310 is configured to monitor loading of the H5 page corresponding to the target application. The monitored content may include loading duration and/or data request results.
And if the H5 page is normally loaded, displaying the normally loaded H5 page on an interface of the terminal.
The loading unit 320 is configured to load the error feedback page corresponding to the error state if the H5 page has the error state. The error state is an error in which the H5 page cannot be loaded normally. For example, the error status may include a data request failure corresponding to the H5 page, an error reported by the container in which the H5 page resides, or other unknown error.
At this time, an error feedback page corresponding to the error state may be loaded. The error feedback page is a page for performing error information feedback to the user after an error state occurs. The display information in the error feedback page may include a cause of error state generation, an operation suggestion after the error state, and the like.
The error feedback page and the error state have a correspondence. For example, if the error state is poor network communication quality, an error feedback page corresponding to the poor network communication quality may be loaded, the display information in the error feedback page may include an indication that the current network communication quality is poor to the user, and the operation suggestion may be to move to a location where the network communication quality is better, change a connected network, continue to wait for network refresh, and the like. If the error state is that the requested data does not exist, an error feedback page corresponding to the requested data does not exist may be loaded, the display information in the error feedback page may include a suggestion indicating to the user that the requested data does not exist, and the operation suggestion may be a suggestion of exiting the target application, jumping to another operation page in the target application, and the like.
The page loading device may be middleware (middleware). Middleware is a type of computer software that connects software components and applications, including a set of services to facilitate the interaction of multiple applications running on one or more terminals over a network, and is typically used to support and simplify those complex distributed applications, including WEB servers, transaction monitors, and message queue software.
The middleware provides a platform running environment for the target application supported by the middleware, and the environment shields the interface difference between the bottom layer communication and realizes the interoperation. The purpose of the middleware is to serve target applications, and provide an interoperation mechanism between different services of an application layer. It provides uniform platform and running environment for upper layer target Application, and packages different operation systems to provide API Interface (Application Programming Interface), and provides uniform standard Interface for target Application.
The page loading device provided by the embodiment of the invention monitors the loading state of the H5 page corresponding to the target application according to the loading duration and/or the data request result, and loads the error feedback page corresponding to the error state if the H5 page has the error state, so that the terminal can display the error feedback page corresponding to the H5 page to the user under the condition that the H5 page cannot be normally displayed, thereby avoiding the long-time white screen phenomenon caused by the loading error of the H5 page, avoiding the phenomena of page jump, layout dislocation and the like caused by the repeated refreshing of the UI page by the target application, enabling the user to know the loading condition of the H5 page, saving the waiting time of the user, improving the use efficiency of the target application and improving the use experience of the user.
Based on any embodiment above, the loading unit includes:
a feedback page determining unit for determining an error type of the error state; and determining an error feedback page corresponding to the error state based on the error type, the preset error type and the error feedback page corresponding to the preset error type.
Based on any embodiment above, still include:
and the information collection unit is used for sending the error state to a development background of the target application.
Based on any embodiment above, still include:
and the page switching unit is used for switching the error feedback page to the H5 page if the error state disappears.
Based on any embodiment above, still include:
the initialization unit is used for receiving an initialization command sent by a target application based on a middleware initialization interface; and executing the initialization command, and sending initialization success information to the target application.
Based on any of the above embodiments, fig. 4 is a schematic structural diagram of the container provided by the present invention, and as shown in fig. 4, the container 400 includes:
middleware 410 that executes the above-described page loading method;
and the page module 420 is connected with the middleware 410 and is used for loading the H5 page corresponding to the target application.
Specifically, the target Application is an Application (App) operated by the user on an interface of the terminal. The H5 page is a page that the target application displays to the user based on the H5 technique in response to the user's operation. For example, the target application may be a shopping-like application installed on a tablet by a user. The H5 page may be an item purchase page that the shopping-like application presents to the user. For another example, the target application may be an information application installed on a mobile phone by a user. The H5 page may be a news story page that the information-based application presents to the user.
The target application may be loaded through the container for H5 pages when running on the terminal.
Middleware 410 is a type of computer software that interfaces software components and applications, including a set of services to facilitate the interaction of multiple applications running on one or more terminals over a network, and is generally used to support and simplify those complex distributed applications, including WEB servers, transaction monitors, and message queuing software.
Fig. 5 is a schematic operation diagram of the container provided by the present invention, and as shown in fig. 5, the middleware and the page module are both inside the container, and the data source is obtained from the database of the server. The page module and the middleware can operate only by depending on the container, and data is transferred and circulated through the middleware, so that the middleware can eliminate the difference problem caused by different systems and containers; and when an error occurs, the error information is finally fed back to the user information to be executed by the page module, and the middleware feeds back the error information to the database.
The container provided by the embodiment of the invention comprises the middleware and the page module, wherein the middleware monitors the loading of the H5 page in the page module, so that the terminal can load the corresponding error feedback page to the H5 page displayed by the user under the condition that the H5 page cannot be normally displayed, the long-time screen blank phenomenon caused by the loading error of the H5 page is avoided, the phenomena of page jumping, layout dislocation and the like caused by repeatedly refreshing the UI page by the target application are also avoided, the user can know the loading condition of the H5 page, the waiting time of the user is saved, the use efficiency of the target application is improved, and the use experience of the user is improved.
Based on any of the above embodiments, the middleware stores a plurality of preset error types and an error feedback page corresponding to each preset error type.
Specifically, the preset error type is a preset error type in which an error state occurs in the H5 page. Since various error states may occur in the use process of the target application, when the target application is prompted to a user, in order to improve the pertinence and efficiency of the prompting, a preset error type and an error feedback page corresponding to the preset error type may be stored in the middleware.
When an error state occurs in the H5 page during the running process of the target application, an error type of the error state may be obtained, and the error type may be matched with a preset error type. And when the error type is the same as a certain preset error type, taking the error feedback page corresponding to the preset error type as the error feedback page of the error type.
For example, in the starting process of the target application, due to the fact that a network fails, an error state occurs in an H5 page corresponding to the starting interface, and the page cannot be displayed normally. The loading of the H5 page corresponding to the target application is monitored, the error type of the H5 page is monitored to be a network communication error, at the moment, the terminal control middleware matches the network communication error with a plurality of preset error types built in the terminal, and an error feedback page corresponding to the network communication error in the preset error types is used as a target page to be loaded in the terminal. Through the error feedback page, the user can know that the use of the current target application is influenced because the current network communication quality is poor. The error feedback page also comprises operation suggestions, and the user can switch the network connected with the terminal or move to a place with better network communication quality according to the operation suggestions.
The container provided by the embodiment of the invention can be internally provided with the preset error type and the error feedback page corresponding to the preset error type in the middleware in advance, so that when the H5 page has an error state, the terminal can control the middleware to quickly determine the error feedback page corresponding to the error state and display the error feedback page to a user, the waiting time of the user is saved, and the use efficiency of the target application is improved.
Based on any of the above embodiments, fig. 6 is a schematic structural diagram of an electronic device provided by the present invention, and as shown in fig. 6, the electronic device may include: a Processor (Processor)610, a communication Interface (Communications Interface)620, a Memory (Memory)630 and a communication Bus (Communications Bus)640, wherein the Processor 610, the communication Interface 620 and the Memory 630 complete communication with each other through the communication Bus 640. The processor 610 may call logical commands in the memory 630 to perform the following method:
monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application; and if the loading duration is longer than the set loading time and/or the data request result is wrong, determining that the loading state of the H5 page is the wrong state, and loading the error feedback page corresponding to the wrong state.
In addition, the logic commands in the memory 630 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic commands are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of commands for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The processor in the electronic device provided in the embodiment of the present invention may call a logic instruction in the memory to implement the method, and the specific implementation manner of the method is consistent with the implementation manner of the method, and the same beneficial effects may be achieved, which is not described herein again.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the method provided in the foregoing embodiments when executed by a processor, and the method includes:
monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application; and if the loading duration is longer than the set loading time and/or the data request result is wrong, determining that the loading state of the H5 page is the wrong state, and loading the error feedback page corresponding to the wrong state.
When the computer program stored on the non-transitory computer readable storage medium provided in the embodiments of the present invention is executed, the method is implemented, and the specific implementation manner of the method is consistent with the implementation manner of the method, and the same beneficial effects can be achieved, which is not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes commands for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A page loading method is characterized by comprising the following steps:
monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application;
and if the loading duration is greater than the set loading time and/or the data request result is wrong, determining that the loading state of the H5 page is a wrong state, and loading a wrong feedback page corresponding to the wrong state.
2. The page loading method according to claim 1, wherein the loading of the error feedback page corresponding to the error state previously comprises:
determining an error type of the error condition;
and determining an error feedback page corresponding to the error state based on the error type, a preset error type and an error feedback page corresponding to the preset error type.
3. The page loading method according to claim 1, wherein the loading of the error feedback page corresponding to the error state comprises:
and sending the error state to a development background of the target application.
4. The page loading method according to claim 1, wherein the loading of the error feedback page corresponding to the error state comprises:
if the error status disappears, the error feedback page is switched to the H5 page.
5. The page loading method according to any one of claims 1 to 4, wherein said monitoring the loading status of said H5 page comprises:
receiving an initialization command sent by a target application based on a middleware initialization interface;
and executing the initialization command, and sending initialization success information to the target application.
6. A page loading apparatus, comprising:
the monitoring unit is used for monitoring the loading state of the H5 page based on the loading duration and/or the data request result of the H5 page corresponding to the target application;
and the loading unit is used for determining that the loading state of the H5 page is an error state and loading an error feedback page corresponding to the error state if the loading duration is greater than the set loading time and/or the data request result is erroneous.
7. A container, comprising:
middleware that executes the page loading method according to any one of claims 1 to 5;
and the page module is connected with the middleware and used for loading the H5 page corresponding to the target application.
8. The container according to claim 7, wherein the middleware stores a plurality of preset error types and an error feedback page corresponding to each preset error type.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the page loading method according to any of claims 1 to 5 are implemented when the processor executes the program.
10. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the page loading method according to any one of claims 1 to 5.
CN202111424403.5A 2021-11-26 2021-11-26 Page loading method, device and container Pending CN114253624A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111424403.5A CN114253624A (en) 2021-11-26 2021-11-26 Page loading method, device and container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111424403.5A CN114253624A (en) 2021-11-26 2021-11-26 Page loading method, device and container

Publications (1)

Publication Number Publication Date
CN114253624A true CN114253624A (en) 2022-03-29

Family

ID=80793449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111424403.5A Pending CN114253624A (en) 2021-11-26 2021-11-26 Page loading method, device and container

Country Status (1)

Country Link
CN (1) CN114253624A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886015A (en) * 2014-02-20 2014-06-25 新浪网技术(中国)有限公司 Web server and page error feedback method based on webpage application
CN104111846A (en) * 2014-06-17 2014-10-22 贝壳网际(北京)安全技术有限公司 Page data loading method and device
CN109800025A (en) * 2018-12-13 2019-05-24 平安普惠企业管理有限公司 Page loading method, device, equipment and storage medium
CN110046077A (en) * 2018-01-17 2019-07-23 阿里巴巴集团控股有限公司 Information processing method, device, the page, electronic equipment and server
CN111752793A (en) * 2020-05-27 2020-10-09 中国平安财产保险股份有限公司 System abnormity monitoring method and device, computer equipment and storage medium
CN112417343A (en) * 2020-12-29 2021-02-26 中科院计算技术研究所大数据研究院 Method for caching data based on front-end Angular frame
CN113377563A (en) * 2021-06-01 2021-09-10 北京齐尔布莱特科技有限公司 Webpage monitoring method and computing device
CN113556391A (en) * 2021-07-16 2021-10-26 北京达佳互联信息技术有限公司 Page communication method and device, electronic equipment and readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103886015A (en) * 2014-02-20 2014-06-25 新浪网技术(中国)有限公司 Web server and page error feedback method based on webpage application
CN104111846A (en) * 2014-06-17 2014-10-22 贝壳网际(北京)安全技术有限公司 Page data loading method and device
CN110046077A (en) * 2018-01-17 2019-07-23 阿里巴巴集团控股有限公司 Information processing method, device, the page, electronic equipment and server
CN109800025A (en) * 2018-12-13 2019-05-24 平安普惠企业管理有限公司 Page loading method, device, equipment and storage medium
CN111752793A (en) * 2020-05-27 2020-10-09 中国平安财产保险股份有限公司 System abnormity monitoring method and device, computer equipment and storage medium
CN112417343A (en) * 2020-12-29 2021-02-26 中科院计算技术研究所大数据研究院 Method for caching data based on front-end Angular frame
CN113377563A (en) * 2021-06-01 2021-09-10 北京齐尔布莱特科技有限公司 Webpage monitoring method and computing device
CN113556391A (en) * 2021-07-16 2021-10-26 北京达佳互联信息技术有限公司 Page communication method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10325009B2 (en) Method and apparatus for using custom component parsing engine to parse tag of custom component
US20150301873A1 (en) Method and system for expanding webapp application function
CN113312037B (en) Data processing method, device, equipment and storage medium applied to micro-service
CN104809045B (en) Running method and device of monitoring script
US11890540B2 (en) User interface processing method and device
US20110191431A1 (en) Method and system for updating display screens
EP1906305B1 (en) Method and system for data preparation and communication between software applications
CN109783309B (en) Abnormality monitoring method and device for webpage loading
JP5936103B2 (en) System, computer, method and program for calling Java method on client
EP4119207A1 (en) Vibration control method and apparatus, and electronic device and computer-readable storage medium
CN103365546A (en) Browser window creating method and device
CN104378428B (en) A kind of method and apparatus for file download
CN112559222A (en) Message display method and device, computer equipment and storage medium
CN108197024B (en) Embedded browser debugging method, debugging terminal and computer readable storage medium
US8860735B2 (en) Aligning script animations with display refresh
CN111694620A (en) Interaction method, device and equipment of third-party service and computer storage medium
CN108228139B (en) Singlechip development system and device based on HTML5 browser frame
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
CN114253624A (en) Page loading method, device and container
CN115509531A (en) Micro front end implementation method, device, terminal and storage medium based on front end technology
CN108415715A (en) Method for upgrading software based on scene analysis suitable for automatic vending machine
CN114385124A (en) Independent page jumping method, device and equipment based on Vue framework
CN113297522A (en) Page rendering method and device, electronic equipment and readable storage medium
CN109640140B (en) Key processing method and device
CN112035339A (en) Page testing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination