Movatterモバイル変換


[0]ホーム

URL:


CN112698882A - Page component loading method and device - Google Patents

Page component loading method and device
Download PDF

Info

Publication number
CN112698882A
CN112698882ACN202011582838.8ACN202011582838ACN112698882ACN 112698882 ACN112698882 ACN 112698882ACN 202011582838 ACN202011582838 ACN 202011582838ACN 112698882 ACN112698882 ACN 112698882A
Authority
CN
China
Prior art keywords
component
page
client
resource
acquisition request
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.)
Withdrawn
Application number
CN202011582838.8A
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology 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 Beijing Sankuai Online Technology Co LtdfiledCriticalBeijing Sankuai Online Technology Co Ltd
Priority to CN202011582838.8ApriorityCriticalpatent/CN112698882A/en
Publication of CN112698882ApublicationCriticalpatent/CN112698882A/en
Withdrawnlegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本说明书公开了一种页面组件加载方法及装置,可先接收客户端发送的页面获取请求,并根据该页面获取请求中包含的页面标识,向客户端返回该页面的框架资源。之后再接收该客户端发送的组件获取请求,并根据该组件获取请求中包含的组件的组件标识,确定该组件对应的若干版本的组件资源,以及根据该组件获取请求中包含的该客户端的网络状态,从该组件对应的若干版本的组件资源中,确定对应该网络状态的组件资源。最后将确定出的组件资源返回至该客户端,以使该客户端根据接收到的组件资源,进行组件加载。基于客户端的网络状态,确定并下发对应版本的组件资源,提高了客户端中加载组件的速度。

Figure 202011582838

This specification discloses a page component loading method and device, which can first receive a page acquisition request sent by a client, and return the frame resource of the page to the client according to the page identifier contained in the page acquisition request. Then receive the component acquisition request sent by the client, and determine the component resources of several versions corresponding to the component according to the component identifier of the component included in the component acquisition request, and determine the client's network according to the component acquisition request included in the request. state, from the component resources of several versions corresponding to the component, determine the component resource corresponding to the network state. Finally, the determined component resource is returned to the client, so that the client can load the component according to the received component resource. Based on the network status of the client, the component resources of the corresponding version are determined and delivered, which improves the speed of loading components in the client.

Figure 202011582838

Description

Page component loading method and device
Technical Field
The application relates to the technical field of internet, in particular to a page component loading method and device.
Background
Generally, in the page loading process, the data volume of the loaded page is positively correlated with the loading duration of the page, and the larger the data volume of the page is, the longer the required loading time is. When a page with a large data volume is loaded, the waiting time needed by a user is often long, and bad experience is brought to the user.
In order to improve user experience, currently, when a page is developed, a page is generally split into a page frame and a plurality of components. In the page loading process, the client can load the page frame resources with less data volume in the page first and perform rendering display so as to reduce the waiting time of the user. And, while rendering the page frame, asynchronously loading components in the page.
Disclosure of Invention
The embodiment of the specification provides a page component loading method and device, which are used for partially solving the problem that in the prior art, when the network state of a client is not good, a page is still loaded slowly.
The embodiment of the specification adopts the following technical scheme:
the page component loading method provided by the specification comprises the following steps:
receiving a page acquisition request sent by a client, wherein the page acquisition request comprises a page identifier of a page to be loaded;
determining the frame resource of the page according to the page identifier contained in the page acquisition request, and returning the determined frame resource of the page to the client;
receiving an assembly obtaining request sent by the client, wherein the assembly obtaining request comprises an assembly identifier of the assembly and a network state of the client;
determining a plurality of versions of component resources corresponding to the component according to the component identifier of the component contained in the component acquisition request, wherein the component resources of different versions correspond to different network states;
determining component resources corresponding to the network state from a plurality of versions of component resources corresponding to the determined component according to the network state of the client contained in the component acquisition request;
and returning the determined component resources to the client so that the client carries out component loading according to the received component resources.
Optionally, the network status comprises a network speed;
determining a component resource corresponding to the network state from a plurality of versions of component resources corresponding to the determined component according to the network state of the client included in the component acquisition request, specifically including:
determining an interval range in which the network speed falls according to the network speed of the client contained in the component acquisition request;
and determining the component resources corresponding to the network speed from the component resources of the plurality of versions corresponding to the components according to the corresponding relation between each interval range and the component resources of each version.
Optionally, the method further comprises:
when a page updating request sent by the client is received, judging whether the network state of the client changes or not according to the network state in the page updating request and the network state in the latest received page acquisition request;
if so, determining the component resources corresponding to the network state from the component resources of the plurality of versions corresponding to the components again according to the network state in the page updating request, and returning to the client;
if not, returning appointed information to the client side so that the client side can load the components according to the component resources of the components, wherein the appointed information is used for representing that the component resources are not changed.
Another page component loading method provided by this specification includes:
sending a page acquisition request to a server, wherein the page acquisition request comprises a page identifier of a page to be loaded;
receiving a frame resource of the page returned by the server, wherein the frame resource comprises a component identifier of a component in the page;
sending a component acquisition request to the server according to the component identification of the component in the framework resource and the network state of the client;
receiving the component resources of the component returned by the server, wherein the component resources are determined by the server from the component resources of each version corresponding to the component according to the network state of the client, and the component resources of different versions correspond to different network states;
and loading the components according to the received component resources of the components.
Optionally, the framework resource further includes a component resource of a synchronization component;
the method further comprises the following steps:
and rendering and displaying the page frame of the page and the synchronous component according to the received frame resource of the page.
Optionally, the page includes a plurality of components;
the method further comprises the following steps:
sending a component acquisition request for acquiring each component in a page to the server, wherein the component acquisition request comprises a component identifier of the component and a network state of the client;
and receiving the component resource of the component returned by the server, and loading the component according to the received component resource of the component.
This specification provides a page component loading apparatus, including:
the first receiving module is used for receiving a page acquisition request sent by a client, wherein the page acquisition request comprises a page identifier of a page to be loaded;
the first determining module is used for determining the frame resources of the page according to the page identifier contained in the page acquisition request and returning the determined frame resources of the page to the client;
the second receiving module is used for receiving an assembly obtaining request sent by the client, wherein the assembly obtaining request comprises an assembly identifier of the assembly and the network state of the client;
a second determining module, configured to determine, according to the component identifier of the component included in the component acquisition request, component resources of multiple versions corresponding to the component, where the component resources of different versions correspond to different network states;
a third determining module, configured to determine, according to the network state of the client included in the component acquisition request, a component resource corresponding to the network state from among the determined component resources of the multiple versions corresponding to the component;
and the loading module returns the determined component resources to the client so that the client carries out component loading according to the received component resources.
This specification provides a page component loading apparatus, including:
the first sending module is used for sending a page obtaining request to a server, wherein the page obtaining request comprises a page identifier of a page to be loaded;
the first receiving module is used for receiving the frame resource of the page returned by the server, wherein the frame resource comprises the component identification of the component in the page;
the second sending module is used for sending a component acquisition request to the server according to the component identification of the component in the framework resource and the network state of the client;
the second receiving module is used for receiving the component resources of the components returned by the server, and the component resources are determined by the server from the component resources of each version corresponding to different network states according to the network state of the client;
and the loading module is used for loading the component according to the received component resource of the component.
The present specification provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the page component loading method.
The electronic device provided by the present specification includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the page component loading method when executing the program.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
in the component loading process in this specification, a page acquisition request sent by a client may be received first, and according to a page identifier included in the page acquisition request, a frame resource of the page may be returned to the client. And then receiving an assembly acquisition request sent by the client, determining a plurality of versions of assembly resources corresponding to the assembly according to the assembly identification of the assembly contained in the assembly acquisition request, and determining the assembly resources corresponding to the network state from the plurality of versions of assembly resources corresponding to the assembly according to the network state of the client contained in the assembly acquisition request. And finally, returning the determined component resources to the client so that the client carries out component loading according to the received component resources. And determining and issuing component resources of corresponding versions based on the network state of the client, so that the speed of loading components in the client is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic view illustrating a page component loading flow provided by an embodiment of the present specification;
FIG. 2 is a schematic diagram illustrating another page component loading flow provided by an embodiment of the present specification;
fig. 3 is a schematic structural diagram of a page component loading apparatus provided in an embodiment of the present specification;
fig. 4 is a schematic structural diagram of another page component loading apparatus provided in an embodiment of the present specification;
fig. 5 is a schematic view of an electronic device implementing a page component loading method according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art without making any inventive step based on the embodiments in the description belong to the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
At present, in order to increase the page loading speed and further improve the user experience, a page is generally split into a page frame and a plurality of components during page development. In the page loading process, the client can load the page frame of the page and render and display the page frame of the page, so that the waiting time of a user is reduced. And then sending a component acquisition request to a corresponding server according to the component identification of the component contained in the page frame so as to asynchronously acquire the component resource and carry out component loading.
But when the network state of the client is poor and the data volume of the component is large, the component loading speed is still slow. Therefore, the present specification provides a page component loading method, which is implemented by presetting component resources corresponding to a plurality of versions in different network states, so that in a component loading process, the component resources corresponding to the versions can be loaded according to the network state of a client, thereby increasing the loading speed of the component and improving the user experience.
Fig. 1 is a schematic view of a page component loading flow provided in an embodiment of the present specification, which specifically includes the following steps:
s100: and receiving a page acquisition request sent by a client.
S102: and determining the frame resource of the page according to the page identifier contained in the page acquisition request, and returning the determined frame resource of the page to the client.
The page component loading method provided by the present specification may be specifically executed by a server providing a page resource, where the server may be a single server, or a system composed of multiple servers, such as a distributed server, and the like.
Since the present specification is a method for loading components in a page loading process, in the present specification, the server may execute the page component loading method when receiving a page acquisition request sent by a client.
Specifically, the server may receive a page obtaining request sent by a user through a client, where the page obtaining request includes a page identifier of a page to be loaded.
Then, the server may determine, according to the page identifier included in the received page acquisition request, a frame resource of the page corresponding to the page identifier from stored frame resources of each page, where the frame resource of the page includes the page frame of the page and the component identifiers of each component in the page.
And finally, returning the determined frame resource of the page to the client, so that the client renders and displays the page frame of the page according to the frame resource of the page.
S104: and receiving a component acquisition request sent by the client.
In one or more embodiments of the present description, in order to increase the page loading speed, the server may determine which version of component resource needs to be issued in real time according to the network state of the client after issuing the frame resource of the page, so as to reduce the page loading duration and improve the user experience.
Therefore, the server can receive the component acquisition request sent by the client after issuing the frame resource of the page, and then issue the corresponding component resource. The component acquisition request comprises a component identifier of the component and a network state of the client. To determine, through subsequent steps, the component resources corresponding to the component identification and the network status.
S106: and determining a plurality of versions of component resources corresponding to the component according to the component identification of the component contained in the component acquisition request.
S108: and determining the component resources corresponding to the network state from the determined component resources of the plurality of versions corresponding to the component according to the network state of the client contained in the component acquisition request.
The page component loading method provided by the specification is characterized in that a plurality of versions of component resources corresponding to different network states are preset, so that the component resources corresponding to the versions can be issued to a client according to different network states of the client in the component loading process, and the loading speed of a page component is increased when the network state of the client is poor.
Therefore, in this specification, the server may store, for each component, several different versions of component resources corresponding to the component in advance. Wherein, the component resources of different versions can realize the same component function, corresponding to different network states respectively. The worse the network state, the worse the configuration of the corresponding component resources, the smaller the data volume. The component loading can be performed subsequently by the page component loading method provided by the present specification.
Specifically, the server may determine, according to the component identifier of the component included in the received component acquisition request, the component resources of the versions corresponding to the component from among the component resources of the versions corresponding to each component stored in advance.
Then, the server may determine, from the plurality of versions of component resources corresponding to the component, the component resource corresponding to the network state of the client according to the network state of the client included in the component acquisition request and a preset correspondence between each different network state and each different version of component resource.
For example, when a news page is loaded, if the network status of the client is the fourth generation communication technology (4G) or Wireless Fidelity (WIFI), the server may issue a video playing component to play video in the news page. If the network state of the client is 3G or 2G, the server can issue component resources for displaying pictures and characters so as to display the pictures and the character information in a news page.
Further, the network status included in the component acquisition request may be a network type in which the client is currently located, such as 2G, 3G, 4G, WIFI, and the like. Of course, the network information may be the current network speed of the client and the like for characterizing the current network condition of the client.
When the network state included in the component acquisition request is the current network speed of the client, the server may determine, according to the network speed of the client, an interval range within which the network speed of the client falls from preset interval ranges of the network speeds. And then, according to the corresponding relation between the preset interval range and the component resources of each version of the component, determining the component resource corresponding to the interval range from the component resources of a plurality of versions corresponding to the component, and using the component resource as the component resource corresponding to the network speed of the client.
S110: and returning the determined component resources to the client so that the client carries out component loading according to the received component resources.
In one or more embodiments of the present specification, after the server determines the component resource corresponding to the current network state of the client, the server may issue the determined component resource to the client, so that the client loads the component to complete page loading.
Specifically, the server may return the determined component resource to the client, so that the client loads the component according to the received component resource, and renders and displays the component in the page frame of the page. The component resource is adaptive to the current network state of the client, so that the loading speed of the component is more consistent with the current network state of the client and more consistent with the user requirement.
Based on the page component loading method shown in fig. 1, a page acquisition request sent by a client may be received first, and according to a page identifier included in the page acquisition request, a frame resource of the page may be returned to the client. And then receiving an assembly acquisition request sent by the client, determining a plurality of versions of assembly resources corresponding to the assembly according to the assembly identification of the assembly contained in the assembly acquisition request, and determining the assembly resources corresponding to the network state from the plurality of versions of assembly resources corresponding to the assembly according to the network state of the client contained in the assembly acquisition request. And finally, returning the determined component resources to the client so that the client carries out component loading according to the received component resources. And determining and issuing component resources of corresponding versions based on the network state of the client, so that the speed of loading the components in the client is improved, and the requirement of loading the components in the client is better met.
In another embodiment of this specification, when the server receives a page update request sent by the client, it may determine whether the network state of the client changes according to the network state in the page update request and the network state in the page acquisition request received last time. If the network state of the client changes, according to the network state in the page update request, determining the component resource corresponding to the network state in the update request from the component resources of the versions corresponding to the component determined in step S106 again, and returning the component resource to the client. So that the client renews the component according to the received component resource. If the network state of the client is not changed, returning specified information to the client, wherein the specified information is used for representing that the component resource is not changed. So that the client can perform component loading according to the component resource that received the component most recently.
Alternatively, in other embodiments of the present specification, after receiving again a page obtaining request sent by the client for obtaining the page, the server may also determine whether the network state of the client changes according to the network state included in the page obtaining request and the network state in the page obtaining request that is received last time for obtaining the page. If the network state of the client changes, according to the network state in the re-received page acquisition request, determining the component resource corresponding to the network state from the component resources of the versions corresponding to the component determined in step S106 again, and returning the component resource to the client. So that the client renews the component according to the received component resource. If the network state of the client is not changed, returning specified information to the client so that the client can load the component according to the component resource which receives the component last time.
Based on the page component loading method shown in fig. 1, the present specification also correspondingly provides a page component loading method executed on the client side. Another page component loading flow diagram provided in this specification, as shown in fig. 2, may specifically include the following steps:
s200: and sending a page acquisition request to the server.
S202: and receiving the frame resource of the page returned by the server.
In the page loading process in this specification, by separately loading the page frame in the page and each component in the page, on one hand, the waiting time of a user can be reduced, and the user experience can be improved, and on the other hand, the server can issue component resources having the same function but a smaller data volume according to the network state of the client, so as to improve the loading speed of the component.
Therefore, in this specification, when loading a page, the client may first send a page obtaining request to the server, where the page obtaining request includes a page identifier of the page to be loaded. And then, the client can receive the frame resource of the page returned by the server and render and display the page frame of the page according to the received frame resource of the page.
Further, in this specification, the frame resource of the page further includes a component identifier of a component in the page, and when the page includes a plurality of components, since not all the components may correspond to component resources of different versions in different network states, the data amount of some components is small, and it is not necessary to display component information of different versions in different network states. Therefore, for a component less affected by the network state, the component can be taken as a synchronization component and carried in the framework resource to be synchronously loaded to the client.
The client can render the page frame and the synchronization component for displaying the page according to the frame resource and the component resource of the synchronization component contained therein when receiving the frame resource returned by the server, so as to reduce the waiting time of the user.
S204: and sending a component acquisition request to the server according to the component identification of the component in the framework resource and the network state of the client.
According to the page component loading method provided by the specification, when the component resources are acquired, the client side can send the local network state to the server, so that the server issues the component resources of the corresponding version, and the loading speed of the component is improved.
Specifically, the client may determine the component identifier of the component to be loaded in the page according to the frame resource of the received page. In addition, since the network status of the local environment of the terminal may change, the client needs to detect the local network status information in real time. And then, determining a component acquisition request according to the component identifier of the component to be loaded in the page and the network state detected in real time, and sending the component acquisition request to the server to acquire the component resource of the component.
S206: and receiving the component resources of the components returned by the server.
S208: and loading the components according to the received component resources of the components.
In this specification, after sending a component acquisition request to a server, a component resource returned by the server may be received, so as to perform rendering display according to the received component resource.
Specifically, the client may receive the component resources of the component returned by the server. The component resources of the component are determined from the component resources of the plurality of versions corresponding to the component by the server according to the network state included in the component acquisition request, and the component resources of the plurality of versions corresponding to the component can realize the same function, but the data volume of the component resources of each version is different and respectively corresponds to different network states. When the network state of the client is better, the component resources with larger data volume can be loaded, and the components with better performance are displayed. When the network state of the client is poor, the component resource with small data volume can be loaded so as to ensure that the user normally uses the component to execute the service.
Then, the client can load the component according to the received component resource and render and display the component in the page frame of the page.
Based on the page component loading method shown in fig. 2, in the page loading process, a page acquisition request may be sent to the server first, so as to receive the frame resource of the page returned by the server. Then, according to the component identifier of the component in the framework resource and the network state where the client is located, a component acquisition request is sent to the server to receive the component resource of the component returned by the server, and finally, component loading is performed according to the received component resource of the component. The frame resources and the component resources of the page are loaded separately, and the component resources corresponding to the network state are obtained based on the network state of the client to load the components, so that the time for loading the components in the client is reduced.
In another embodiment of this specification, the page to be loaded may also include a plurality of components, and then the frame resource received in step S202 includes component identifiers of the components. Then, the client may send a component obtaining request for obtaining the component to the server for each component in the page, where the component obtaining request includes a component identifier of the component and a network state of the client. And then receiving the component resource of the component returned by the server, and loading the component according to the received component resource of the component.
In this specification, a server that provides a frame resource of a page and a server that provides a component resource may be the same server or different servers, and when the page includes a plurality of components, each component may be acquired from a different server. The specification does not limit this, and the setting can be specifically set as required.
In addition, in this specification, when a same component is set corresponding to a plurality of versions of component resources in different network states, the worse the network state is, the smaller the data amount of the component resource corresponding to the version is, so that the client can increase the loading speed of the component in the case of a bad network state. For example: and when the chat component in the chat interface is loaded, if the network state of the client is in 3G, loading the chat component of the text version. And if the network state of the client is in 4G, loading the voice chat component. And if the network state of the client is in the WIFI, loading the video chat component.
Or when the map display component in the map interface is loaded, if the network state of the client is in 3G, displaying the two-dimensional map and displaying the two-dimensional route. And if the network state of the client is 4G or WIFI, displaying a three-dimensional map and displaying a scene in Virtual Reality (VR). Of course, based on the difference of the application scenarios, component resources of a plurality of versions corresponding to different application scenarios may be set, which is described above by taking a chat scenario and a map display scenario as examples, and may be specifically set according to business needs, and this description does not limit this.
Based on the page component loading method shown in fig. 1, an embodiment of the present specification further provides a schematic structural diagram of a page component loading apparatus, as shown in fig. 3.
Fig. 3 is a schematic structural diagram of a page component loading apparatus provided in an embodiment of the present specification, where the apparatus includes:
thefirst receiving module 300 is configured to receive a page obtaining request sent by a client, where the page obtaining request includes a page identifier of a page to be loaded;
a first determiningmodule 302, configured to determine, according to a page identifier included in the page obtaining request, a frame resource of the page, and return the determined frame resource of the page to the client;
a second receiving module 304, configured to receive a component obtaining request sent by the client, where the component obtaining request includes a component identifier of the component and a network state of the client;
a second determining module 306, configured to determine, according to the component identifier of the component included in the component acquisition request, component resources of multiple versions corresponding to the component, where the component resources of different versions correspond to different network states;
a third determiningmodule 308, configured to determine, according to the network state of the client included in the component acquisition request, a component resource corresponding to the network state from among the determined component resources of the multiple versions corresponding to the component;
theloading module 310 returns the determined component resource to the client, so that the client performs component loading according to the received component resource.
Optionally, the network state includes a network speed, and the second determining module 306 is specifically configured to determine an interval range in which the network speed falls according to the network speed of the client included in the component acquisition request, and determine, according to a correspondence between each interval range and each version of component resources, a component resource corresponding to the network speed from among a plurality of versions of component resources corresponding to the component.
Optionally, the page component loading apparatus further includes anupdate module 312, where theupdate module 312 is specifically configured to, when a page update request sent by the client is received, determine whether the network state of the client changes according to the network state in the page update request and the network state in a page acquisition request received most recently, if so, determine component resources corresponding to the network state from component resources of multiple versions corresponding to the component again according to the network state in the page update request, and return the component resources to the client, and if not, return specified information to the client so that the client performs component loading according to the component resources of the component, where the specified information is used to represent that the component resources do not change.
Based on the page component loading method shown in fig. 2, an embodiment of the present specification further provides a schematic structural diagram of another page component loading apparatus, as shown in fig. 4.
Fig. 4 is a schematic structural diagram of another page component loading apparatus provided in an embodiment of the present specification, where the apparatus includes:
afirst sending module 400, configured to send a page obtaining request to a server, where the page obtaining request includes a page identifier of a page to be loaded;
afirst receiving module 402, configured to receive a frame resource of the page returned by the server, where the frame resource includes a component identifier of a component in the page;
asecond sending module 404, configured to send a component obtaining request to the server according to the component identifier of the component in the framework resource and a network state where the client is located;
asecond receiving module 406, configured to receive the component resource of the component returned by the server, where the component resource is determined by the server from component resources of different versions corresponding to different network states according to the network state where the client is located;
theloading module 408 loads the component according to the received component resource of the component.
Optionally, the frame resources further include component resources of a synchronization component, and thefirst receiving module 402 is further configured to render a page frame showing the page and the synchronization component according to the received frame resources of the page.
Optionally, the page includes multiple components, the page component loading apparatus further includes a multiple-component module 410, and the multiple-component module 410 is specifically configured to send, to each component in the page, a component acquisition request for acquiring the component to the server, where the component acquisition request includes a component identifier of the component and a network state of the client, receive a component resource of the component returned by the server, and load the component according to the received component resource of the component.
The present specification further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program may be used to execute the page component loading method provided in fig. 1 or fig. 2.
Based on the page component loading method shown in fig. 1 and fig. 2, the embodiment of the present specification further provides a schematic structural diagram of the electronic device shown in fig. 5. As shown in fig. 5, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads a corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the page component loading method shown in fig. 1 or fig. 2.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

Translated fromChinese
1.一种页面组件加载方法,其特征在于,包括:1. a page component loading method, is characterized in that, comprises:接收客户端发送的页面获取请求,所述页面获取请求中包含待加载页面的页面标识;receiving a page acquisition request sent by the client, where the page acquisition request includes the page identifier of the page to be loaded;根据所述页面获取请求中包含的页面标识,确定所述页面的框架资源,并将确定出的所述页面的框架资源返回至所述客户端;Determine the frame resource of the page according to the page identifier included in the page acquisition request, and return the determined frame resource of the page to the client;接收所述客户端发送的组件获取请求,所述组件获取请求中包含所述组件的组件标识以及所述客户端的网络状态;Receive a component acquisition request sent by the client, where the component acquisition request includes the component identifier of the component and the network status of the client;根据所述组件获取请求中包含的所述组件的组件标识,确定所述组件对应的若干版本的组件资源,其中,不同版本的组件资源对应不同的网络状态;Determine, according to the component identifier of the component contained in the component acquisition request, several versions of component resources corresponding to the component, wherein the component resources of different versions correspond to different network states;根据所述组件获取请求中包含的所述客户端的网络状态,从确定出的所述组件对应的若干版本的组件资源中,确定对应所述网络状态的组件资源;According to the network state of the client included in the component acquisition request, from the determined component resources of several versions corresponding to the component, determine the component resource corresponding to the network state;将确定出的组件资源返回至所述客户端,以使所述客户端根据接收到的组件资源,进行组件加载。Returning the determined component resource to the client, so that the client loads the component according to the received component resource.2.如权利要求1所述的方法,其特征在于,所述网络状态包含网络速度;2. The method of claim 1, wherein the network state comprises a network speed;根据所述组件获取请求中包含的所述客户端的网络状态,从确定出的所述组件对应的若干版本的组件资源中,确定对应所述网络状态的组件资源,具体包括:According to the network state of the client included in the component acquisition request, from the determined component resources of several versions corresponding to the component, determine the component resource corresponding to the network state, specifically including:根据所述组件获取请求中包含的所述客户端的网络速度,确定所述网络速度落入的区间范围;Determine the interval within which the network speed falls according to the network speed of the client included in the component acquisition request;根据各区间范围与各版本的组件资源的对应关系,从所述组件对应的若干版本的组件资源中,确定对应所述网络速度的组件资源。According to the correspondence between each interval range and each version of the component resource, the component resource corresponding to the network speed is determined from the component resources of several versions corresponding to the component.3.如权利要求1所述的方法,其特征在于,所述方法还包括:3. The method of claim 1, wherein the method further comprises:当接收到所述客户端发送的页面更新请求时,根据所述页面更新请求中的网络状态以及最近一次接收到的页面获取请求中的网络状态,判断所述客户端的网络状态是否发生变化;When receiving the page update request sent by the client, according to the network state in the page update request and the network state in the most recently received page acquisition request, determine whether the network state of the client has changed;若是,则根据所述页面更新请求中的网络状态,重新从所述组件对应的若干版本的组件资源中,确定对应所述网络状态的组件资源,并返回至所述客户端;If so, according to the network state in the page update request, re-determine the component resource corresponding to the network state from the component resources of several versions corresponding to the component, and return to the client;若否,则向所述客户端返回指定信息,以使所述客户端根据所述组件的组件资源进行组件加载,所述指定信息用于表征所述组件资源未发生变化。If not, return specified information to the client, so that the client loads the component according to the component resource of the component, and the specified information is used to indicate that the component resource has not changed.4.一种页面组件加载方法,其特征在于,包括:4. A method for loading page components, comprising:向服务器发送页面获取请求,所述页面获取请求中包含待加载页面的页面标识;sending a page acquisition request to the server, where the page acquisition request includes the page identifier of the page to be loaded;接收所述服务器返回的所述页面的框架资源,所述框架资源中包含所述页面中组件的组件标识;receiving the frame resource of the page returned by the server, where the frame resource includes the component identifier of the component in the page;根据所述框架资源中所述组件的组件标识以及客户端所处的网络状态,向所述服务器发送组件获取请求;Send a component acquisition request to the server according to the component identifier of the component in the framework resource and the network state where the client is located;接收所述服务器返回的所述组件的组件资源,所述组件资源由所述服务器根据所述客户端所处的网络状态,从所述组件对应的各版本的组件资源中确定的,其中,不同版本的组件资源对应不同的网络状态;Receive the component resource of the component returned by the server, the component resource is determined by the server from the component resources of each version corresponding to the component according to the network state where the client is located, wherein different Versions of component resources correspond to different network states;根据接收到的所述组件的组件资源,进行组件加载。Component loading is performed according to the received component resources of the component.5.如权利要求4所述的方法,其特征在于,所述框架资源中还包括同步组件的组件资源;5. The method according to claim 4, wherein the framework resource further comprises a component resource of a synchronization component;所述方法还包括:The method also includes:根据接收到的所述页面的框架资源,渲染展示所述页面的页面框架以及所述同步组件。According to the received frame resources of the page, the page frame for displaying the page and the synchronization component are rendered.6.如权利要求4所述的方法,其特征在于,所述页面中包含多个组件;6. The method of claim 4, wherein the page includes a plurality of components;所述方法还包括:The method also includes:针对页面中的每个组件,向所述服务器发送用于获取该组件的组件获取请求,其中,所述组件获取请求中包含该组件的组件标识以及所述客户端的网络状态;For each component in the page, send a component acquisition request for acquiring the component to the server, wherein the component acquisition request includes the component identification of the component and the network status of the client;接收所述服务器返回的该组件的组件资源,并根据接收到该组件的组件资源,加载该组件。Receive the component resource of the component returned by the server, and load the component according to the received component resource of the component.7.一种页面组件加载装置,其特征在于,具体包括:7. A page component loading device, characterized in that it specifically comprises:第一接收模块,接收客户端发送的页面获取请求,所述页面获取请求中包含待加载页面的页面标识;The first receiving module receives a page acquisition request sent by the client, where the page acquisition request includes a page identifier of the page to be loaded;第一确定模块,根据所述页面获取请求中包含的页面标识,确定所述页面的框架资源,并将确定出的所述页面的框架资源返回至所述客户端;a first determining module, which determines the frame resource of the page according to the page identifier included in the page acquisition request, and returns the determined frame resource of the page to the client;第二接收模块,接收所述客户端发送的组件获取请求,所述组件获取请求中包含所述组件的组件标识以及所述客户端的网络状态;The second receiving module receives a component acquisition request sent by the client, where the component acquisition request includes the component identifier of the component and the network status of the client;第二确定模块,根据所述组件获取请求中包含的所述组件的组件标识,确定所述组件对应的若干版本的组件资源,其中,不同版本的组件资源对应不同的网络状态;The second determining module determines, according to the component identifier of the component contained in the component acquisition request, several versions of component resources corresponding to the component, wherein the component resources of different versions correspond to different network states;第三确定模块,根据所述组件获取请求中包含的所述客户端的网络状态,从确定出的所述组件对应的若干版本的组件资源中,确定对应所述网络状态的组件资源;A third determining module, according to the network state of the client included in the component acquisition request, determines the component resource corresponding to the network state from the determined component resources of several versions corresponding to the component;加载模块,将确定出的组件资源返回至所述客户端,以使所述客户端根据接收到的组件资源,进行组件加载。The loading module returns the determined component resource to the client, so that the client loads the component according to the received component resource.8.一种页面组件加载装置,其特征在于,具体包括:8. A page component loading device, characterized in that it specifically comprises:第一发送模块,向服务器发送页面获取请求,所述页面获取请求中包含待加载页面的页面标识;The first sending module sends a page acquisition request to the server, where the page acquisition request includes the page identifier of the page to be loaded;第一接收模块,接收所述服务器返回的所述页面的框架资源,所述框架资源中包含所述页面中组件的组件标识;a first receiving module, receiving the frame resource of the page returned by the server, where the frame resource includes the component identifier of the component in the page;第二发送模块,根据所述框架资源中所述组件的组件标识以及客户端所处的网络状态,向所述服务器发送组件获取请求;The second sending module sends a component acquisition request to the server according to the component identifier of the component in the framework resource and the network state where the client is located;第二接收模块,接收所述服务器返回的所述组件的组件资源,所述组件资源由所述服务器根据所述客户端所处的网络状态,从不同网络状态对应的各版本的组件资源中确定的;The second receiving module receives the component resource of the component returned by the server, and the component resource is determined by the server from the component resources of various versions corresponding to different network states according to the network state of the client. of;加载模块,根据接收到的所述组件的组件资源,进行组件加载。The loading module performs component loading according to the received component resources of the component.9.一种计算机可读存储介质,其特征在于,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述权利要求1-3或权利要求4-6任一所述的方法。9. A computer-readable storage medium, characterized in that the storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above claims 1-3 or claims 4-6 is implemented method.10.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现上述权利要求1-3或权利要求4-6任一所述的方法。10. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the above claims 1-3 or the right when executing the program The method of any of claims 4-6.
CN202011582838.8A2020-12-282020-12-28Page component loading method and deviceWithdrawnCN112698882A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011582838.8ACN112698882A (en)2020-12-282020-12-28Page component loading method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011582838.8ACN112698882A (en)2020-12-282020-12-28Page component loading method and device

Publications (1)

Publication NumberPublication Date
CN112698882Atrue CN112698882A (en)2021-04-23

Family

ID=75511310

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011582838.8AWithdrawnCN112698882A (en)2020-12-282020-12-28Page component loading method and device

Country Status (1)

CountryLink
CN (1)CN112698882A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113867845A (en)*2021-10-142021-12-31北京齐尔布莱特科技有限公司Application data loading method and device and mobile terminal
CN115951946A (en)*2022-12-152023-04-11杭州华橙软件技术有限公司 A component calling method, device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20120192080A1 (en)*2011-01-212012-07-26Google Inc.Tailoring content based on available bandwidth
CN106294379A (en)*2015-05-182017-01-04阿里巴巴集团控股有限公司The loading method of a kind of page, device and system
CN108074137A (en)*2018-01-042018-05-25北京奇虎科技有限公司Mobile terminal and advertisement placement method and its control method, device
CN109992326A (en)*2019-03-282019-07-09武汉达梦数据库有限公司A kind of data access method and corresponding terminal
CN111309388A (en)*2020-02-032020-06-19杭州迪普科技股份有限公司Automatic rollback system and method for system software version of device
CN111639289A (en)*2020-05-132020-09-08北京三快在线科技有限公司Webpage loading method and device
CN111639278A (en)*2020-05-262020-09-08北京三快在线科技有限公司Webpage loading method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20120192080A1 (en)*2011-01-212012-07-26Google Inc.Tailoring content based on available bandwidth
CN106294379A (en)*2015-05-182017-01-04阿里巴巴集团控股有限公司The loading method of a kind of page, device and system
CN108074137A (en)*2018-01-042018-05-25北京奇虎科技有限公司Mobile terminal and advertisement placement method and its control method, device
CN109992326A (en)*2019-03-282019-07-09武汉达梦数据库有限公司A kind of data access method and corresponding terminal
CN111309388A (en)*2020-02-032020-06-19杭州迪普科技股份有限公司Automatic rollback system and method for system software version of device
CN111639289A (en)*2020-05-132020-09-08北京三快在线科技有限公司Webpage loading method and device
CN111639278A (en)*2020-05-262020-09-08北京三快在线科技有限公司Webpage loading method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113867845A (en)*2021-10-142021-12-31北京齐尔布莱特科技有限公司Application data loading method and device and mobile terminal
CN115951946A (en)*2022-12-152023-04-11杭州华橙软件技术有限公司 A component calling method, device and electronic equipment

Similar Documents

PublicationPublication DateTitle
CN111639278B (en) A web page loading method and device
CN111639289A (en)Webpage loading method and device
CN112364277A (en)Webpage loading method and device
CN110496395B (en)Component operation method, system and equipment for illusion engine
CN111796821A (en)Page updating method and device
CN107479868B (en) Interface loading method, device and device
CN111898056A (en)Webpage display method and device, storage medium and electronic equipment
CN107784090B (en)File sharing method and device and computer readable medium
CN112181979A (en)Data updating method and device, storage medium and electronic equipment
CN111008057A (en)Page display method and device and storage medium
CN110806847A (en)Distributed multi-screen display method, device, equipment and system
CN112698882A (en)Page component loading method and device
CN113672323A (en)Page display method and device
CN111538667A (en)Page testing method and device
CN110008358B (en)Resource information display method and system, client and server
CN118760430A (en) Page processing method, device, electronic device and storage medium
CN112307383A (en)Page loading method and device
CN113343136B (en)Method and device for displaying information
CN107402749B (en)Method and device for realizing picture loading library
CN115391185A (en)Applet pressure testing method, device and equipment
CN112306710A (en)Service processing system, interface calling method and device
CN114637568A (en)Equipment split screen adaptation processing method and device
CN113886228B (en)Compatibility detection method and device, storage medium and electronic equipment
CN111796881A (en)Method and device for loading form components
CN113779466B (en)Page display method and device, storage medium and electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
WW01Invention patent application withdrawn after publication

Application publication date:20210423

WW01Invention patent application withdrawn after publication

[8]ページ先頭

©2009-2025 Movatter.jp