CN110780939A - Method and device for loading resource file, computer equipment and storage medium - Google Patents
Method and device for loading resource file, computer equipment and storage medium Download PDFInfo
- Publication number
- CN110780939A CN110780939A CN201910895109.9A CN201910895109A CN110780939A CN 110780939 A CN110780939 A CN 110780939A CN 201910895109 A CN201910895109 A CN 201910895109A CN 110780939 A CN110780939 A CN 110780939A
- Authority
- CN
- China
- Prior art keywords
- file
- animation
- page
- resource file
- application page
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
The application relates to a method, a device, computer equipment and a storage medium for loading a resource file, which are used for responding to an operation instruction generated on a preset label in an application page to acquire page content corresponding to the preset label; the operation instruction carries a page routing address and instructs the server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address; in the process of acquiring the page content, loading a corresponding resource file according to the resource file identifier, and displaying the resource file in an application page according to the resource file configuration parameters; and after the resource file is displayed, displaying the page content corresponding to the preset label in the application page. In the loading process of the application page content, the resource file is used for replacing progress display in the traditional technology, and the resource file is displayed in the application page according to the resource file configuration parameters so as to solve the problem that the displayed content is single in fixation.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for loading a resource file, a computer device, and a storage medium.
Background
With the development of internet technology, the amount of information contained in a page in an application program is also increasing, and the proportion of picture files in the web page is also increasing, however, the size of picture files is usually large, so that the loading speed of the web page is seriously affected by a large number of picture files.
However, in the conventional technology, before rendering of page loading is not completed, a progress presentation mode is adopted in a page to inform a user of the process of page loading. The transition mode of progress display has the technical problem of single fixed content. Especially, when the advertisement is displayed, the advertisement is displayed when the application program is opened, which results in poor user experience.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a computer device, and a storage medium for loading a resource file, aiming at the technical problem that a transition mode of progress presentation in the conventional technology has a single fixed content.
A method of loading a resource file, the method comprising:
responding to an operation instruction generated on a preset label in an application page, and acquiring page content corresponding to the preset label; the operation instruction carries a page routing address and instructs a server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address;
in the process of acquiring the page content, loading a corresponding resource file according to the resource file identifier, and displaying the resource file in the application page according to the resource file configuration parameters;
and after the resource file is displayed, displaying the page content corresponding to the preset label in the application page.
In one embodiment, the resource file comprises an animation file, the resource file identification comprises an animation file identification, and the resource file configuration parameters comprise animation configuration parameters; the loading the corresponding resource file according to the resource file identifier and displaying the resource file in the application page according to the resource file configuration parameter includes:
loading a corresponding animation file from a local cache according to the animation file identifier;
and selecting a full-page covering or partial covering mode according to the animation configuration parameters, and displaying the animation file in the application page.
In one embodiment, the animation configuration parameters comprise a transparency parameter and a corresponding location parameter; the step of displaying the animation file in the application page in a form of whole page coverage or partial covering according to the animation configuration parameter selection comprises the following steps:
determining the region of the opaque masking layer according to the transparency parameter and the position parameter;
if the area of the opaque masking layer covers the whole application page, selecting a whole page covering mode to display the animation file in the application page;
and if the region of the opaque masking layer covers a local application page, selecting a local masking layer form to display the animation file in the application page.
In one embodiment, the animation configuration parameters further comprise an animation style parameter and an animation type parameter; the displaying the animation file in the application page includes:
and displaying the animation file in the application page according to the animation style parameter and the animation type parameter.
In one embodiment, before the loading the corresponding animation file from the local cache according to the animation file identifier, the method further includes:
detecting whether a newly added animation file identifier exists in the server every preset time;
and if so, updating the animation file in the local cache according to the newly added animation file identifier.
In one embodiment, the animation file is provided with a corresponding file address; before the updating the animation file in the local cache according to the newly added animation file identifier, the method further includes:
detecting whether the current network condition meets a preset condition or not;
the updating the animation file in the local cache according to the newly added animation file identifier comprises the following steps:
if yes, receiving a file address searched by the server according to the newly added animation file identification;
sending the searched file address to a cloud server;
and receiving the animation file returned by the cloud server according to the searched file address, and updating the animation file in the local cache.
In one embodiment, the preset tag is a hot tag; the hot tag determination comprises:
counting the number of clicks respectively generated on each label in the application page;
and setting the label with the click times larger than a preset threshold value as the hot label.
An apparatus to load a resource file, the apparatus comprising:
the page content acquisition module is used for responding to an operation instruction generated on a preset label in an application page and acquiring the page content corresponding to the preset label; the operation instruction carries a page routing address and instructs a server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address;
the resource file display module is used for loading a corresponding resource file according to the resource file identifier and displaying the resource file in the application page according to the resource file configuration parameters in the process of acquiring the page content;
and the page content display module is used for displaying the page content corresponding to the preset tag in the application page after the resource file is displayed.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any of the above embodiments when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the method, the device, the computer equipment and the storage medium for loading the resource file, the page content corresponding to the preset label is obtained by responding to the operation instruction generated on the preset label in the application page; the operation instruction carries a page routing address and instructs the server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address; in the process of acquiring the page content, loading a corresponding resource file according to the resource file identifier, and displaying the resource file in an application page according to the resource file configuration parameters; and after the resource file is displayed, displaying the page content corresponding to the preset label in the application page. In the loading process of the application page content, the resource file is used for replacing progress display in the traditional technology, and the resource file is displayed in the application page according to the resource file configuration parameters so as to solve the problem of single fixation of the display content, and particularly, the advertisement content has better display time and display effect.
Drawings
FIG. 1a is a diagram illustrating an application page in the prior art;
FIG. 1b is a diagram of an application environment for a method of loading resource files, in accordance with an embodiment;
FIG. 2a is a flowchart illustrating a method for loading resource files according to an embodiment;
FIG. 2b is a flowchart illustrating a method for loading resource files according to an embodiment;
FIG. 3a is a flowchart illustrating a method for loading resource files according to an embodiment;
FIG. 3b is a diagram illustrating selection of a full page overlay to display an animation file, in one embodiment;
FIG. 3c is a diagram illustrating selection of a partial mask form for display of an animation file, in accordance with an embodiment;
FIG. 4 is a flowchart illustrating a method for loading resource files in one embodiment;
FIG. 5 is a flowchart illustrating a method for loading resource files in one embodiment;
FIG. 6 is a flowchart illustrating a method for loading resource files in one embodiment;
FIG. 7 is a flowchart illustrating a method for loading resource files in one embodiment;
FIG. 8 is a timing diagram of a method of loading a resource file in one embodiment;
FIG. 9 is a block diagram of an apparatus for loading resource files in one embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As background, in the conventional technology, as shown in fig. 1a, before rendering of a page load is not completed, a page is displayed in a progress manner to inform a user of a process of the page load. The transition mode of progress display has the technical problem of single fixed content. Based on this, the present application provides a method for loading resource files, which can be applied to the application environment shown in fig. 1 b. Wherein, the terminal 110 performs data interaction with the server 120 through the network. The terminal 110 may be configured to display an application page of an application program, receive an operation triggered by a user through the displayed application page, respond to an operation instruction for loading or refreshing the application page or an operation instruction occurring on a preset tag, send the operation instruction to the server 120 by the terminal 110, and obtain page content to be displayed from the server 120. The operation instruction carries a page routing address, and the server 120 searches for a corresponding resource file identifier and a resource file configuration parameter according to the page routing address, and returns the resource file identifier and the resource file configuration parameter to the terminal 110.
When responding to an operation instruction for loading or refreshing an application page, in the process of acquiring page content by the terminal 110, the terminal 110 loads a corresponding resource file according to the resource file identifier, and displays the resource file in the application page according to the resource file configuration parameters. After the terminal 110 acquires the page content, the resource file is stopped being displayed in the application page, and the page content is displayed.
When responding to an operation instruction generated on a preset tag in an application page, in the process of acquiring page content by the terminal 110, the terminal 110 loads a corresponding resource file according to a resource file identifier, and displays the resource file in the application page according to a resource file configuration parameter. After the terminal 110 finishes displaying the resource file, the page content corresponding to the preset tag is displayed in the application page.
The terminal 110 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the database server 120 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2a, the present application provides a method for loading a resource file, which is described by taking a terminal in an application environment of fig. 1b as an example, and includes the following steps:
s210a, responding to an operation instruction generated on a preset label in the application page, and acquiring page content corresponding to the preset label;
s220a, in the process of acquiring the page content, loading the corresponding resource file according to the resource file identifier, and displaying the resource file in the application page according to the resource file configuration parameters;
and S230a, after the resource file is displayed, displaying the page content corresponding to the preset label in the application page.
The preset tag is a specific tag set in the application page according to the user behavior data. The content of the page corresponding to the preset tag is the content which is expected to be displayed in the application page by a user and is not displayed currently. In order to see the page content corresponding to the preset tag in the application page, a user can trigger a corresponding operation instruction by clicking the preset tag in the application page. The operation instruction carries a page routing address. Page routing is the way front-end applications interact with a server. The page routing address is used to indicate a path for storing different page resources. Through different paths to request different page content from the server.
Specifically, the terminal displays an application page, a user clicks a preset tag in the application page to trigger a corresponding operation instruction, the terminal sends the operation instruction to the server, the operation instruction carries a page routing address, the server stores a corresponding relationship between the page routing address and page content, the server searches for corresponding page content according to the page routing, the searched page content is returned to the terminal, and the terminal acquires the page content to be displayed.
The resource file can be multimedia information such as animation, pictures, video, audio and the like. The resource file is provided with a corresponding resource file identifier and a resource file configuration parameter. The resource file identifier is used for uniquely identifying the resource file, and the resource file configuration parameter is a parameter for setting how to display the resource file in the application page, such as the display position, the display form, the display time and the like of the resource file in the application page. The server also stores the page routing address, the resource file identification, the resource file configuration parameter and the corresponding relationship among the three, and then the server searches the corresponding resource file identification and the resource file configuration parameter according to the page routing address. In the process of acquiring the page content, the server sends the searched resource file identifier and the resource file configuration parameter to the terminal, and the terminal loads the corresponding resource file according to the resource file identifier and displays the resource file in the application page according to the resource file configuration parameter. And after the resource file is displayed, displaying the acquired page content in the application page.
In this embodiment, the resource file is multimedia information, such as animation, pictures, videos, and audios, that may be interested by the user, set according to the behavior data of the user, and the resource file corresponds to the preset tag. The targeted resource files are displayed in the application page, so that the information which is really interested in the targeted resource files is provided for the user, and the information of the resource files is completely presented to the user. Even if the terminal acquires the page content and finishes rendering in the process of displaying the resource file on the application page, the acquired content cannot be displayed on the application page, and the application page does not start to display the page content of the preset label until the resource file is displayed on the application page, so that the user requirements are met more variously.
In one embodiment, as shown in fig. 2b, the method further comprises the steps of:
s210b, responding to an operation instruction for loading or refreshing an application page, and acquiring page content to be displayed;
s220b, in the process of acquiring the page content, loading the corresponding resource file according to the resource file identifier, and displaying the resource file in the application page according to the resource file configuration parameters;
s230b, after the page content is obtained, stopping displaying the resource file in the application page, and displaying the page content.
The page content to be displayed is content which is expected to be displayed in the application page by a user and is not displayed currently. In order to see the page content to be displayed in the application page, a user can trigger a corresponding operation instruction by operating a button in the application page, and can also trigger a corresponding operation instruction on the application page by performing operations such as sliding left and right, sliding up and down, double-clicking and the like. The operation instruction to load or refresh an application page may be triggered by pulling up the application page, pulling down the application page, or other operation. For example, the operation of loading the application page may be a pull-up, and the operation of refreshing the application page may be a pull-down. The operation instruction carries a page routing address. Page routing is the way front-end applications interact with a server. The page routing address is used to indicate a path for storing different page resources. Through different paths to request different page content from the server.
Specifically, the terminal displays an application page, a user sends an operation instruction for loading or refreshing the application page through the application page, and the terminal sends the operation instruction for loading or refreshing the application page to the server. The server stores the corresponding relation between the page routing address and the page content, and the operation instruction carries the page routing address, the server searches the corresponding page content according to the page routing, the searched page content is returned to the terminal, and the terminal acquires the page content to be displayed. In the process of acquiring the page content, the server sends the searched resource file identifier and the resource file configuration parameter to the terminal, and the terminal loads the corresponding resource file according to the resource file identifier and displays the resource file in the application page according to the resource file configuration parameter. After the terminal acquires the page content and finishes rendering, the content to be displayed needs to be displayed in the application page, the display of the resource file in the application page is stopped no matter whether the display of the resource file is finished, and the application page starts to display the page content to be displayed. In the embodiment, when the content of the application page is loaded and the rendering is not completed, the resource file is used for replacing the progress display in the traditional technology so as to improve the problem of single fixation of the display content.
In one embodiment, the resource file comprises an animation file, the resource file identification comprises an animation file identification, and the resource file configuration parameters comprise animation configuration parameters. As shown in fig. 3a, loading a corresponding resource file according to a resource file identifier, and displaying the resource file in an application page according to a resource file configuration parameter, includes the following steps:
s310, loading a corresponding animation file from a local cache according to the animation file identification;
and S320, selecting a full page coverage or partial covering mode according to the animation configuration parameters, and displaying the animation file in the application page.
The local cache means that a local physical memory of the terminal divides a part of space for storing data returned by the server. A skin layer is a component used to carry animation files. The whole page covering means that the whole application page is covered completely by adopting an opaque covering component. As shown in FIG. 3b, the full page overlay may be implemented by placing a fully opaque overlay component within the entire application page and overlaying the animation file on the overlay component, with the fully opaque overlay component overlaying the entire application page. The partial covering layer refers to a form that an application page is partially covered by a covering layer component to be partially opaque. As shown in fig. 3c, the partial covering layer may be implemented by setting a partial position of the application page to be completely opaque, and overlaying an animation file on the covering layer component, and a completely opaque portion covers the partial application page, while the covering layers corresponding to other portions in the application page have a certain transparency, and the content in the application page is seen through the partial covering layers. It is understood that the completely opaque portion may be anywhere in the application page, such as the top, middle, or bottom of the application page, and the like, and the application is not limited thereto.
Specifically, in order to shorten the time required for loading the animation file and reduce the waiting time of the user, the animation file may be cached locally in the terminal, and the terminal stores the correspondence between the animation file identifier and the animation file. And the terminal loads the corresponding animation file from the local cache according to the animation file identification. And if the animation configuration parameters determine the display form of the animation file in the application page, selecting a whole page covering form or a partial covering form according to the animation configuration parameters, and displaying the animation file in the application page according to the whole page covering form or the partial covering form.
In the embodiment, the time required for loading the animation file is shortened and the waiting time of the user is reduced by loading the corresponding animation file from the local cache according to the animation file identifier. And the animation file is displayed in different forms at different times by selecting the form of whole page coverage or partial covering according to the animation configuration parameters, so that the diversified requirements of users are met. It will be appreciated that the animation file may be a functional introduction associated with the application, promotional animation, etc. The animation file can also be advertisement animation, so that a corresponding product can be recommended to a user in the process of loading the page content, and the traditional technology that the advertisement is only displayed on the home page when the application program is opened is replaced.
In one embodiment, the animation configuration parameters include a transparency parameter and a corresponding position parameter. As shown in fig. 4, the method for displaying the animation file in the application page in the form of a whole page coverage or a partial covering layer according to the animation configuration parameter selection comprises the following steps:
s410, determining an area of the opaque masking layer according to the transparency parameter and the position parameter;
s420, if the region of the opaque masking layer covers the whole application page, selecting a whole page covering mode to display the animation file in the application page;
and S430, if the region of the opaque masking layer covers the local application page, selecting the form of the local masking layer to display the animation file in the application page.
The region of the opaque masking layer is a region that is completely opaque (transparency 0%). The cover component can be arranged with transparency and position according to the display requirements of the front end. The animation configuration parameters comprise a transparency parameter and a corresponding position parameter, the transparency parameter is used for setting the transparency of the covering layer area, and the position parameter is used for setting the position of the area of the opaque covering layer in the application page. Specifically, the server searches for corresponding animation file identification and animation configuration parameters according to the page routing address. And in the process of acquiring the page content, the server sends the searched animation file identification and animation configuration parameters to the terminal, and the terminal loads the corresponding animation file from the local cache according to the animation file identification. The animation configuration parameters comprise transparency parameters and corresponding position parameters, and the terminal determines the area of the opaque masking layer in the application page according to the transparency parameters and the position parameters, so that the form of the whole page coverage or the form of the partial masking layer is selected according to the area of the opaque masking layer. And if the area of the opaque mask layer covers the whole application page, namely the opaque mask layer covers the whole application page, selecting a form of covering the whole page to display the animation file in the application page. If the area of the opaque covering layer covers a partial application page, namely the partial covering layer of the application page covers the opaque covering layer, and the rest positions cover the transparent covering layer, the form of the partial covering layer is selected to display the animation file in the application page.
In one embodiment, the animation configuration parameters further include an animation style parameter and an animation type parameter. Displaying the animation file in an application page, comprising: and displaying the animation file in the application page according to the animation style parameter and the animation type parameter.
The animation style parameter is a style for setting the animation to enter the application page, exit from the application page or show the animation on the application page. Such as from left, right, etc. The animation type parameter is used to set a parameter of an animation file format. Specifically, the animation configuration parameters returned by the server to the terminal comprise an animation style parameter and an animation type parameter, and the terminal displays the animation file in the application page according to the animation style parameter and the animation type parameter.
In one embodiment, before loading the corresponding animation file from the local cache according to the animation file identification, the method further comprises: detecting whether a newly added animation file identifier exists in the server at preset time intervals; and if so, updating the animation file in the local cache according to the newly added animation file identifier.
Specifically, in order to present the latest animation to the user, the animation file cached locally at the terminal is updated according to the animation file stored by the server. The server stores the animation file and the corresponding relation between the animation file identification and the animation file. And if the animation file in the server is updated, generating a newly added animation file identifier in the server. Therefore, the terminal detects whether the server has a newly added animation file identifier every preset time, and if so, the terminal indicates that the animation file in the server is updated. The terminal can acquire the corresponding animation file from the server according to the newly added animation file identifier and update the animation file in the local cache of the terminal.
In one embodiment, the animation file is provided with a corresponding file address. As shown in fig. 5, before updating the animation file in the local cache according to the new animation file identifier, the method further includes:
s510, detecting whether the current network condition meets a preset condition;
updating the animation file in the local cache according to the newly added animation file identifier, comprising:
s520, if yes, receiving a file address searched by the server according to the newly added animation file identifier;
s530, sending the searched file address to a cloud server;
and S540, receiving the animation file returned by the cloud server according to the searched file address, and updating the animation file in the local cache.
When it is detected that the animation file in the server is updated, it is necessary to detect in advance whether the current network condition satisfies a preset condition. When the terminal accesses the internet through a mobile network, preloading of animation files causes waste of user traffic. Therefore, when the terminal accesses the internet through the wireless local area network, namely the current network condition meets the preset condition, the animation file in the local cache can be updated. Specifically, if the current network status is the wireless local area network, the terminal sends the detected new animation file identifier to the server. In order to reduce the hardware cost of the server, the animation file can be stored in the cloud server, and the server stores the corresponding relation between the identification of the animation file and the file address. Then, after the server receives the newly added animation file identifier, the file address is found according to the newly added animation file identifier. And the server sends the searched file address to the terminal, and the terminal receives the searched file address and sends the searched file address to the cloud server. And the cloud server receives the searched file address. And searching the corresponding animation file according to the searched file address, returning the corresponding animation file to the terminal, and updating the animation file in the local cache by the terminal.
In this embodiment, the animation file in the cloud server is updated every preset time, and the locally cached animation file is updated under the condition that the network condition allows, so that when the animation is loaded, the same application page is entered at different times to display different animation files, the animation in the application program is enriched, and the animation file is prevented from being unchanged.
In one embodiment, the preset tag is a hot tag. As shown in fig. 6, the determining of the hot tag includes the following steps:
s610, counting the number of clicks respectively generated on each label in the application page;
and S620, setting the label with the click times larger than a preset threshold value as a hot label.
Wherein, according to the behavior data of the user (such as the user click data), one or more tags in the application page can be set as hot tags. The behavior of clicking the hot tag by the user can reflect the requirements of the user, and the corresponding animation file is arranged aiming at the hot tag so as to provide interesting information for the user, namely the animation file is displayed in the application page in a targeted manner. Specifically, the number of clicks respectively occurring on each tag in the application page is counted, the counted number of clicks of each tag is compared with a preset threshold, and the tag with the number of clicks larger than the preset threshold is set as a hit tag. It should be noted that before the application is released, the operator can estimate the tags that are relatively popular, and then the development member sets the corresponding tags in the application as the popular tags according to the estimation of the operator, and stores the animation files that are really interested by the user in the server for the popular tags. In the embodiment, the hot tag and the animation file corresponding to the hot tag are set, so that a pointed animation file is provided for the user, the user is further guided, and the user requirements are met.
In one embodiment, the operation instruction also carries a random parameter. The operation instruction instructs the server to search the corresponding resource file identifier and resource file configuration parameter according to the page routing address, and the method comprises the following steps: and the operation instruction instructs the server to search the corresponding resource file identification and resource file configuration parameter according to the page routing address and the random parameter.
Specifically, the server stores a corresponding relationship among a page routing address, a resource file identifier, and a resource file configuration parameter. One page routing address can correspond to a plurality of resource file identifications, when trigger operation occurs, the terminal randomly generates a random parameter, and different random parameters correspond to different resource files. The operation instruction not only carries the page routing address, but also carries a random parameter. And the terminal sends the page routing address and the random parameter to the server. And the server searches the corresponding resource file identification and resource file configuration parameter according to the page routing address and the random parameter. Therefore, different resource files can be loaded when the same application page is accessed at different moments, and animations in the application program are enriched.
In one embodiment, a method of loading a resource file is provided herein. As shown in fig. 7, the method comprises the steps of:
s702, detecting whether a newly added resource file identifier exists in the server every preset time.
S704, if yes, detecting whether the current network condition meets a preset condition.
And S706, if yes, receiving the file address searched by the server according to the newly added resource file identifier.
And S708, sending the searched file address to a cloud server.
And S710, receiving the resource file returned by the cloud server according to the searched file address, and updating the resource file in the local cache.
And S712, responding to an operation instruction generated on a preset label in the application page, and acquiring the page content corresponding to the preset label.
The operation instruction carries a page routing address, and instructs the server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address. The resource file configuration parameters include a transparency parameter and a corresponding location parameter.
And S714, in the process of acquiring the page content, loading the corresponding resource file from the local cache according to the resource file identifier.
And S716, determining the area of the opaque masking layer according to the transparency parameter and the position parameter.
And S718, if the region of the opaque masking layer covers the whole application page, selecting a form of covering the whole page to display the resource file in the application page.
S720, if the region of the opaque masking layer covers the local application page, selecting the form of the local masking layer to display the resource file in the application page.
And S722, after the resource file is displayed, displaying the page content corresponding to the preset label in the application page.
In one embodiment, a method of loading a resource file is provided herein. The resource file of this embodiment is specifically described by taking an animation file as an example. As shown in fig. 8, the method includes the following steps 801 to 815. The specific process is as follows:
step 801, detecting whether a newly added animation file identifier exists in the server every preset time by the terminal.
Step 802, if yes, the terminal detects whether the current network condition meets a preset condition.
And 803, if yes, the terminal sends a newly added animation file identifier.
Step 804, the server searches the corresponding file address according to the newly added resource file.
Step 805, the server sends the searched file address to the terminal.
And step 806, the terminal sends the searched file address to a cloud server.
In step 807, the cloud server searches for a corresponding animation file according to the searched file address.
And 808, sending the animation file to the terminal by the cloud server.
And step 809, the terminal updates the animation file in the local cache.
Step 810, responding to an operation instruction generated on a preset tag in the application page, and sending the operation instruction to the server.
The operation instruction carries a page routing address and a random number.
Step 811, the server searches for the corresponding animation file identifier and animation configuration parameters according to the page routing address and the random number.
Step 812, the server sends the animation file identification and the animation configuration parameters to the terminal.
And step 813, the terminal loads the corresponding animation file from the local cache according to the animation file identifier.
And 814, displaying the animation file in the application page in a full-page covering or partial covering mode according to the animation configuration parameter selection.
The animation configuration parameters comprise transparency parameters and corresponding position parameters. And determining the area of the opaque masking layer according to the transparency parameter and the position parameter. And if the region of the opaque masking layer covers the whole application page, selecting a form of covering the whole page to display the resource file in the application page. And if the region of the opaque masking layer covers the local application page, selecting a local masking layer form to display the resource file in the application page.
And 815, after the resource file is displayed, displaying the page content corresponding to the preset tag in the application page.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the above-described flowcharts may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or the stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in FIG. 9, an apparatus for loading a resource file is provided. The loading device 900 includes a page content obtaining module 910, a resource file display module 920 and a page content display module 930. Wherein:
a page content obtaining module 910, configured to respond to an operation instruction occurring on a preset tag in an application page, and obtain page content corresponding to the preset tag; the operation instruction carries a page routing address and instructs the server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address;
a resource file display module 920, configured to load a corresponding resource file according to a resource file identifier and display the resource file in an application page according to a resource file configuration parameter in the process of acquiring the page content;
the page content display module 930 is configured to display the page content corresponding to the preset tag in the application page after the resource file is displayed.
For specific limitations of the apparatus for loading the resource file, reference may be made to the above limitations of the method for loading the resource file, which are not described herein again. The modules in the device for loading resource files may be implemented in whole or in part by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of loading a resource file. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method steps of the above embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the method steps of the above-mentioned embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method of loading a resource file, the method comprising:
responding to an operation instruction generated on a preset label in an application page, and acquiring page content corresponding to the preset label; the operation instruction carries a page routing address and instructs a server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address;
in the process of acquiring the page content, loading a corresponding resource file according to the resource file identifier, and displaying the resource file in the application page according to the resource file configuration parameters;
and after the resource file is displayed, displaying the page content corresponding to the preset label in the application page.
2. The method of claim 1, wherein the resource file comprises an animation file, wherein the resource file identification comprises an animation file identification, and wherein the resource file configuration parameters comprise animation configuration parameters; the loading the corresponding resource file according to the resource file identifier and displaying the resource file in the application page according to the resource file configuration parameter includes:
loading a corresponding animation file from a local cache according to the animation file identifier;
and selecting a full-page covering or partial covering mode according to the animation configuration parameters, and displaying the animation file in the application page.
3. The method of claim 2, wherein the animation configuration parameters include a transparency parameter and a corresponding location parameter; the step of displaying the animation file in the application page in a form of whole page coverage or partial covering according to the animation configuration parameter selection comprises the following steps:
determining the region of the opaque masking layer according to the transparency parameter and the position parameter;
if the area of the opaque masking layer covers the whole application page, selecting a whole page covering mode to display the animation file in the application page;
and if the region of the opaque masking layer covers a local application page, selecting a local masking layer form to display the animation file in the application page.
4. The method of claim 3, wherein the animation configuration parameters further comprise an animation style parameter and an animation type parameter; the displaying the animation file in the application page includes:
and displaying the animation file in the application page according to the animation style parameter and the animation type parameter.
5. The method of claim 2, wherein prior to said loading a corresponding animation file from a local cache according to said animation file identification, the method further comprises:
detecting whether a newly added animation file identifier exists in the server every preset time;
and if so, updating the animation file in the local cache according to the newly added animation file identifier.
6. The method of claim 5, wherein the animation file is provided with a corresponding file address; before the updating the animation file in the local cache according to the newly added animation file identifier, the method further includes:
detecting whether the current network condition meets a preset condition or not;
the updating the animation file in the local cache according to the newly added animation file identifier comprises the following steps:
if yes, receiving a file address searched by the server according to the newly added animation file identification;
sending the searched file address to a cloud server;
and receiving the animation file returned by the cloud server according to the searched file address, and updating the animation file in the local cache.
7. The method of any one of claims 1 to 6, wherein the predetermined label is a hot label; the hot tag determination comprises:
counting the number of clicks respectively generated on each label in the application page;
and setting the label with the click times larger than a preset threshold value as the hot label.
8. An apparatus for loading a resource file, the apparatus comprising:
the page content acquisition module is used for responding to an operation instruction generated on a preset label in an application page and acquiring the page content corresponding to the preset label; the operation instruction carries a page routing address and instructs a server to search a corresponding resource file identifier and a resource file configuration parameter according to the page routing address;
the resource file display module is used for loading a corresponding resource file according to the resource file identifier and displaying the resource file in the application page according to the resource file configuration parameters in the process of acquiring the page content;
and the page content display module is used for displaying the page content corresponding to the preset tag in the application page after the resource file is displayed.
9. A computer 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 method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910895109.9A CN110780939B (en) | 2019-09-20 | 2019-09-20 | Method, device, computer equipment and storage medium for loading resource file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910895109.9A CN110780939B (en) | 2019-09-20 | 2019-09-20 | Method, device, computer equipment and storage medium for loading resource file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110780939A true CN110780939A (en) | 2020-02-11 |
CN110780939B CN110780939B (en) | 2023-07-28 |
Family
ID=69383635
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910895109.9A Active CN110780939B (en) | 2019-09-20 | 2019-09-20 | Method, device, computer equipment and storage medium for loading resource file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110780939B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015482A (en) * | 2020-07-20 | 2020-12-01 | 北京达佳互联信息技术有限公司 | Page loading method and device and server |
CN112818143A (en) * | 2021-01-30 | 2021-05-18 | 北京达佳互联信息技术有限公司 | Page display method and device, electronic equipment and storage medium |
CN113420246A (en) * | 2021-05-14 | 2021-09-21 | 阿里巴巴新加坡控股有限公司 | Processing method and device for page transition animation and electronic equipment |
CN114491372A (en) * | 2022-02-08 | 2022-05-13 | 北京有竹居网络技术有限公司 | Page processing method and device, electronic equipment and storage medium |
CN118606592A (en) * | 2024-08-12 | 2024-09-06 | 深圳市智慧城市科技发展集团有限公司 | Tab page data loading method, terminal equipment and readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108228766A (en) * | 2017-12-27 | 2018-06-29 | 咪咕互动娱乐有限公司 | A kind of page generation method and device and storage medium |
CN109902248A (en) * | 2019-02-25 | 2019-06-18 | 百度在线网络技术(北京)有限公司 | Page display method, device, computer equipment and readable storage medium storing program for executing |
-
2019
- 2019-09-20 CN CN201910895109.9A patent/CN110780939B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108228766A (en) * | 2017-12-27 | 2018-06-29 | 咪咕互动娱乐有限公司 | A kind of page generation method and device and storage medium |
CN109902248A (en) * | 2019-02-25 | 2019-06-18 | 百度在线网络技术(北京)有限公司 | Page display method, device, computer equipment and readable storage medium storing program for executing |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015482A (en) * | 2020-07-20 | 2020-12-01 | 北京达佳互联信息技术有限公司 | Page loading method and device and server |
CN112818143A (en) * | 2021-01-30 | 2021-05-18 | 北京达佳互联信息技术有限公司 | Page display method and device, electronic equipment and storage medium |
CN112818143B (en) * | 2021-01-30 | 2022-03-25 | 北京达佳互联信息技术有限公司 | Page display method and device, electronic equipment and storage medium |
CN113420246A (en) * | 2021-05-14 | 2021-09-21 | 阿里巴巴新加坡控股有限公司 | Processing method and device for page transition animation and electronic equipment |
CN114491372A (en) * | 2022-02-08 | 2022-05-13 | 北京有竹居网络技术有限公司 | Page processing method and device, electronic equipment and storage medium |
CN114491372B (en) * | 2022-02-08 | 2023-09-08 | 北京有竹居网络技术有限公司 | Page processing method and device, electronic equipment and storage medium |
CN118606592A (en) * | 2024-08-12 | 2024-09-06 | 深圳市智慧城市科技发展集团有限公司 | Tab page data loading method, terminal equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110780939B (en) | 2023-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110765379B (en) | Method, device, computer equipment and storage medium for loading resource file | |
CN110780939B (en) | Method, device, computer equipment and storage medium for loading resource file | |
US20210073058A1 (en) | Message processing method and apparatus, storage medium, and computer device | |
CN110020292B (en) | Webpage content extraction method and terminal equipment | |
CN110134899B (en) | Page data carousel method, device, computer equipment and storage medium | |
CN114095741B (en) | Page display method and device, electronic equipment and storage medium | |
CN113238823A (en) | Information display method and device, electronic equipment and storage medium | |
CN107609199B (en) | Method, equipment and storage medium for processing and recovering page | |
CN113794894A (en) | Information processing method, information processing device, electronic equipment and storage medium | |
CN114938458B (en) | Object information display method and device, electronic equipment and storage medium | |
EP4075299A1 (en) | Method and apparatus for recommending multimedia resource | |
CN107657470B (en) | Information processing method and information processing apparatus | |
CN111277761A (en) | Video shooting method, device and system, electronic equipment and storage medium | |
CN111596911A (en) | Method and device for generating control, computer equipment and storage medium | |
CN110990700A (en) | Comment information display method, device, client, server and system | |
CN111131415B (en) | Information pushing method and device, computer equipment and storage medium | |
CN113641294B (en) | Information display method and device, electronic equipment and storage medium | |
CN112083852B (en) | Recommendation bit layout method, device, equipment and medium for video application | |
CN113438531A (en) | Object display method and device, electronic equipment and storage medium | |
WO2018036493A1 (en) | Information processing method and apparatus, display terminal, and storage medium | |
CN110780831B (en) | View switching method, device, computer equipment and storage medium | |
CN114428899B (en) | Multimedia resource pushing method and device, electronic equipment and storage medium | |
CN115658196A (en) | Page display method and device, electronic equipment and storage medium | |
CN105447197A (en) | Video downloading processing method and device, and intelligent terminal | |
CN115269529A (en) | Document processing method and device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |