CN110780939B - Method, device, computer equipment and storage medium for loading resource file - Google Patents

Method, device, computer equipment and storage medium for loading resource file Download PDF

Info

Publication number
CN110780939B
CN110780939B CN201910895109.9A CN201910895109A CN110780939B CN 110780939 B CN110780939 B CN 110780939B CN 201910895109 A CN201910895109 A CN 201910895109A CN 110780939 B CN110780939 B CN 110780939B
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.)
Active
Application number
CN201910895109.9A
Other languages
Chinese (zh)
Other versions
CN110780939A (en
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.)
Suzhou Dajiaying Information Technology Co Ltd
Original Assignee
Suzhou Dajiaying Information 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 Suzhou Dajiaying Information Technology Co Ltd filed Critical Suzhou Dajiaying Information Technology Co Ltd
Priority to CN201910895109.9A priority Critical patent/CN110780939B/en
Publication of CN110780939A publication Critical patent/CN110780939A/en
Application granted granted Critical
Publication of CN110780939B publication Critical patent/CN110780939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a method, a device, computer equipment and a storage medium for loading a resource file, wherein page contents corresponding to preset labels are obtained by responding to operation instructions generated on the preset labels in application pages; 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 page content, 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; 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 content of the application page, the resource file is utilized to replace the 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 fixed display content.

Description

Method, device, computer equipment and storage medium for loading resource file
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for loading a resource file.
Background
With the development of internet technology, the information content of the pages in the application program is larger and larger, the proportion of the picture files in the web pages is larger and larger, however, the sizes of the picture files are usually larger, so that the loading speed of the web pages is seriously affected by a large number of picture files.
However, in the conventional technology, before the rendering of the page loading is not completed, a progress display mode is adopted in the page to inform a user of the process of the page loading. The transition mode of progress display has the technical problem of single content fixation. Particularly, when advertisement is displayed, the advertisement is displayed when an application program is opened, so that the user experience is poor.
Disclosure of Invention
Based on this, 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 the content is fixed and single in the transition mode of adopting progress display in the conventional technology.
A method of loading a resource file, the method comprising:
responding to an operation instruction which occurs 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 identifier comprises an animation file identifier, and the resource file configuration parameter comprises an animation configuration parameter; 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 corresponding animation files from a local cache according to the animation file identifications;
and selecting to display the animation file in the application page in the form of whole page coverage or partial covering according to the animation configuration parameters.
In one embodiment, the animation configuration parameters include a transparency parameter and a corresponding position parameter; the step of selecting to display the animation file in the application page in the form of whole page coverage or partial cover according to the animation configuration parameters comprises the following steps:
Determining a region of the opaque mask layer according to the transparency parameter and the position parameter;
if the area of the opaque mask layer covers the whole application page, selecting a whole page coverage form to display the animation file in the application page;
and if the area of the opaque mask covers a local application page, selecting a local mask form 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; the displaying the animation file in the application page comprises the following steps:
and displaying 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 identifier, the method further includes:
detecting whether a newly added animation file identifier exists in the server at intervals of preset time;
and if the animation file exists, 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 animation file in the local cache is updated according to the newly added animation file identifier, the method further comprises:
Detecting whether the current network condition meets a preset condition;
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 determining of the hot tag comprises the following steps:
counting the clicking times respectively occurring on each label in the application page;
and setting the labels with the clicking times larger than a preset threshold value as the hot labels.
An apparatus for loading a resource file, the apparatus comprising:
the page content acquisition module is used for responding to an operation instruction which occurs 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;
The resource file display module is used for loading a corresponding resource file according to the resource file identifier in the process of acquiring the page content and displaying the resource file in the application page according to the resource file configuration parameters;
and the page content display module is used for displaying the page content corresponding to the preset label 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 embodiments described above when the computer program is executed.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method described in any of the embodiments above.
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 page content, 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; 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 content of the application page, the resource file is utilized to replace the 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 fixed display content, and particularly has better display time and display effect on the advertisement content.
Drawings
FIG. 1a is a schematic diagram of an application page in the prior art;
FIG. 1b is an application environment diagram of a method of loading resource files in one embodiment;
FIG. 2a is a flow diagram of a method of loading resource files in one embodiment;
FIG. 2b is a flow diagram of a method of uploading resource files in one embodiment;
FIG. 3a is a flow diagram of a method of loading resource files in one embodiment;
FIG. 3b is a diagram of selecting a full page overlay form to display an animation file, according to one embodiment;
FIG. 3c is a schematic diagram of selecting a partial mask form to display an animation file according to one embodiment;
FIG. 4 is a flow diagram of a method of loading resource files in one embodiment;
FIG. 5 is a flow diagram of a method of loading resource files in one embodiment;
FIG. 6 is a flow diagram of a method of loading resource files in one embodiment;
FIG. 7 is a flow diagram of a method of loading resource files in one embodiment;
FIG. 8 is a timing diagram of a method of loading resource files in one embodiment;
FIG. 9 is a block diagram of an apparatus for loading resource files in one embodiment;
fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
As background art, in the conventional technology, as shown in fig. 1a, before the rendering of the page loading is not completed, a progress display manner is adopted in the page to inform the user of the process of the page loading. The transition mode of progress display has the technical problem of single content fixation. Based on this, the application provides a method for loading a resource file, 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 a 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, and respond to an operation instruction for loading or refreshing the application page or an operation instruction occurring on a preset tag, where the terminal 110 sends the operation instruction to the server 120, and obtains the 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 to the terminal 110.
When responding to the operation instruction of loading or refreshing the application page, in the process of acquiring the page content by the terminal 110, the terminal 110 loads the corresponding resource file according to the resource file identification, 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 display of the resource file in the application page is stopped, and the page content is displayed.
When responding to the operation instruction occurring on the preset label in the application page, in the process of acquiring the page content by the terminal 110, the terminal 110 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 110 completes displaying the resource file, displaying the page content corresponding to the preset tag in the application page.
The terminal 110 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the database server 120 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers.
In one 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 the application environment of fig. 1b as an example, and includes the following steps:
S210a, responding to an operation instruction on a preset label in an application page, and acquiring page content corresponding to the preset label;
s220a, loading a corresponding resource file according to the resource file identifier in the process of acquiring page content, and displaying the resource file in an 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 labels are specific labels set in the application page according to the user behavior data. The page content corresponding to the preset tag is content which is triggered by a user to be displayed in the application page and is not displayed currently. In order to see the page content corresponding to the preset label in the application page, the user can trigger a corresponding operation instruction by clicking the preset label in the application page. The operation instruction carries a page routing address. Page routing is the way front-end applications interact with servers. The page routing address is used to represent a path storing different page resources. Through different paths to request different page content from the server.
Specifically, the terminal displays an application page, the 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 route address, the corresponding relation between the page route address and page contents is stored in the server, the server searches the corresponding page contents according to the page route, the searched page contents are returned to the terminal, and the terminal acquires the page contents to be displayed.
The resource file may be multimedia information such as animation, pictures, video, audio, etc. The resource file is provided with a corresponding resource file identifier and a resource file configuration parameter. The resource file identification 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 a display position, a presentation form, a presentation time, and the like of the resource file in the application page. The server also stores the page route address, the resource file identification, the resource file configuration parameters and the corresponding relation among the three, and searches the corresponding resource file identification and resource file configuration parameters according to the page route address. In the process of acquiring page content, the server sends the searched resource file identification and resource file configuration parameters to the terminal, and the terminal loads the corresponding resource file according to the resource file identification and displays the resource file in the application page according to the resource file configuration parameters. 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, picture, video, audio, etc. that may be of interest to the user and is set according to behavior data of the user, and the resource file corresponds to a preset tag. The information really interested by the user is provided for the user by displaying the targeted resource file in the application page, and the information of the resource file 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 is not displayed on the application page, but the application page starts 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 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 S230b, stopping displaying the resource file in the application page after the page content is acquired, and displaying the page content.
The page content to be displayed is content which is expected to be displayed in the application page by the user and is not displayed currently. In order to see the page content to be displayed in the application page, the user can trigger the corresponding operation instruction by operating a button in the application page, and also can trigger the corresponding operation instruction by sliding left and right, sliding up and down, double clicking and other operations on the application page. The operation instruction to load or refresh the application page may be triggered by a pull-up application page, a pull-down 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 servers. The page routing address is used to represent a path storing different page resources. Through different paths to request different page content from the server.
Specifically, the terminal displays the application page, the 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 corresponding relation between the page route address and the page content is stored in the server, and the operation instruction carries the page route address, so that the server searches the corresponding page content according to the page route, and returns the searched page content to the terminal, and the terminal acquires the page content to be displayed. In the process of acquiring page content, the server sends the searched resource file identification and resource file configuration parameters to the terminal, and the terminal loads the corresponding resource file according to the resource file identification and displays the resource file in the application page according to the resource file configuration parameters. After the terminal acquires the page content and finishes rendering, the content to be displayed needs to be displayed in the application page, whether the display of the resource file is finished or not, the display of the resource file in the application page is stopped, and the application page starts to display the page content to be displayed. In this embodiment, when the application page content loading does not complete the rendering, the resource file is used to replace the progress display in the conventional technology, so as to solve the problem of single fixed 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, including the following steps:
s310, loading corresponding animation files from a local cache according to the animation file identifications;
s320, selecting to display the animation file in the application page in a whole page coverage or partial covering mode according to the animation configuration parameters.
The local cache refers to that a part of space is divided from a physical memory local to the terminal and used for storing data returned by the server. The cover layer is a component for carrying the animation file. Full page coverage refers to the form of covering the entire application page with an opaque cover component. As shown in FIG. 3b, the full page overlay can be achieved by placing a fully opaque mask assembly within the entire application page and superimposing an animation file over the mask assembly, with the fully opaque mask assembly overlaying the entire application page. Local masking refers to the form of locally overlaying an application page with a masking component to make it locally opaque. As shown in fig. 3c, the local mask layer may be implemented by setting the local position of the application page to be completely opaque, and superimposing an animation file on the mask layer component, where the completely opaque part covers the local application page, and the mask layer corresponding to the other part in the application page has a certain transparency, and the content in the application page is seen through the mask layer of the part. It will be appreciated that the fully opaque portions may be anywhere in the application page, such as the top, middle, or bottom of the application page, etc., as the application is not limited in this regard.
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 at 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. The animation configuration parameters determine the display form of the animation file in the application page, the whole page coverage form or the local mask form is selected according to the animation configuration parameters, and the animation file is displayed in the application page according to the whole page coverage form or the local mask form.
In this 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 occasions by selecting the form of whole page coverage or partial cover layer according to the animation configuration parameters, so as to meet the diversified demands of users. It will be appreciated that the animation file may be a functional description of the application, a promotional animation, etc. The animation file can also be advertisement animation, so that corresponding products can be recommended to a user in the process of loading page contents, and the advertisement is only shown on the top page when an application program is opened in the traditional technology.
In one embodiment, the animation configuration parameters include transparency parameters and corresponding position parameters. As shown in fig. 4, the animation file is displayed in the application page in the form of a whole page overlay or a partial mask according to the animation configuration parameter selection, which comprises the following steps:
s410, determining the area of the opaque mask layer according to the transparency parameter and the position parameter;
s420, if the area of the opaque mask layer covers the whole application page, selecting a whole page coverage form to display the animation file in the application page;
s430, if the area of the opaque mask layer covers the local application page, selecting the local mask layer form to display the animation file in the application page.
The opaque mask layer region refers to a region that is completely opaque (transparency 0%). The cover assembly may be set in transparency and position according to the display requirements of the front end. The animation configuration parameters include transparency parameters for setting transparency of the mask region and corresponding position parameters for setting a position of the region of the opaque mask within the application page. Specifically, the server searches the corresponding animation file identification and animation configuration parameters according to the page route address. In the process of acquiring page content, the server sends the found 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 mask layer in the application page according to the transparency parameters and the position parameters, so that the form of whole page coverage or the form of partial mask layer is selected according to the area of the opaque mask layer. If the area of the opaque mask covers the entire application page, i.e., the opaque mask is covered on the entire application page, the animation file is displayed in the application page in the form of a full page overlay. If the area of the opaque mask covers a local application page, i.e. the application page is partially covered with the opaque mask and the rest of the area is covered with the transparent mask, the form of the local mask is selected 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. Displaying the animation file in the application page comprises the following steps: 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 be displayed on the application page. Such as left swipe in, right swipe out, etc. The animation type parameter is used to set parameters of the animation file format. Specifically, the animation configuration parameters returned to the terminal by the server include 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 or not at preset time intervals; if the animation file exists, 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 locally cached by the terminal is updated according to the animation file stored by the server. The server stores the corresponding relation between the animation file identification and the animation file. 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 newly added animation file identifier exists in the server 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 newly added 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, including:
s520, if the animation file identification is satisfied, the receiving server searches the file address according to the newly added animation file identification;
s530, sending the searched file address to a cloud server;
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.
Wherein, because the animation file is bigger, when detecting that the animation file in the server is updated, it is necessary to detect in advance whether the current network condition satisfies the preset condition. When a terminal accesses the internet through a mobile network, preloading the animation file 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 condition is a wireless local area network, the terminal sends the detected newly added animation file identifier to the server. In order to reduce the hardware cost of the server, the animation file may be stored in a cloud server, and the correspondence between the animation file identifier and the file address is stored in the server. Then, after the server receives the newly added animation file identification, the file address is searched according to the newly added animation file identification. 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 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 allowed by the network condition, so that when the animation is loaded, different animation files are displayed by entering the same application page in different time, the animation in the application program is enriched, and the animation file is prevented from becoming 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 clicking times respectively occurring on each label in the application page;
s620, setting the labels with the clicking times larger than a preset threshold value as hot labels.
Wherein, according to the behavior data of the user (such as the click data of the user), one or a plurality of labels in the application page can be set as hot labels. The action of clicking the hot label by the user can reflect the requirement of the user, and the corresponding animation file is arranged aiming at the hot label, so that the user can provide interested information, namely the animation file is displayed in the application page in a targeted manner. Specifically, statistics is performed on the number of clicks respectively occurring on each label in the application page, the number of clicks counted by each label is compared with a preset threshold, and the label with the number of clicks larger than the preset threshold is set as a hot label. It should be noted that before the application is released, an operator may estimate the popular label, and then the development member sets the corresponding label as the popular label in the application according to the estimate of the operator, and stores the animation file really interested by the user in the server according to the popular label. In this embodiment, through setting the hot tag and the animation file corresponding to the hot tag, a targeted animation file is provided for the user, so that the user is further guided and the user requirement is met.
In one embodiment, the operation instructions also carry random parameters. The operation instruction instructs the server to search the corresponding resource file identification and the resource file configuration parameter according to the page route address, and the operation instruction comprises the following steps: the operation instruction instructs the server to search the corresponding resource file identification and resource file configuration parameters according to the page routing address and the random parameters.
Specifically, the corresponding relation among the page routing address, the resource file identifier and the resource file configuration parameter is stored in the server. One page route address can correspond to a plurality of resource file identifiers, and when trigger operation occurs, the terminal randomly generates a random parameter, and different random parameters correspond to different resource files. The operation instruction carries not only the page routing address but also random parameters. And the terminal sends the page route address and the random parameters to the server. And the server searches the corresponding resource file identification and resource file configuration parameters according to the page routing address and the random parameters. Therefore, different resource files can be loaded when the same application page is accessed at different moments, and animation in the application program is enriched.
In one embodiment, a method of loading a resource file is provided herein. As shown in fig. 7, the method includes the steps of:
S702, detecting whether a newly added resource file identifier exists in the server at intervals of preset time.
S704, if yes, detecting whether the current network condition meets the preset condition.
S706, if yes, the receiving server identifies the searched file address according to the newly added resource file.
S708, sending the searched file address to the cloud server.
S710, receiving a resource file returned by the cloud server according to the searched file address, and updating the resource file in the local cache.
S712, 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 the server to search the corresponding resource file identifier and the resource file configuration parameter according to the page routing address. The resource file configuration parameters include transparency parameters and corresponding location parameters.
S714, in the process of acquiring page content, loading the corresponding resource file from the local cache according to the resource file identification.
S716, determining the area of the opaque mask layer according to the transparency parameter and the position parameter.
S718, if the area of the opaque mask layer covers the whole application page, selecting a whole page coverage form to display the resource file in the application page.
And S720, if the area of the opaque mask layer covers the local application page, selecting a local mask layer form to display the resource file in the application page.
And S722, displaying the page content corresponding to the preset label in the application page after the resource file is displayed.
In one embodiment, a method of loading a resource file is provided herein. The resource file of the present embodiment is specifically described 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 a server or not by a terminal at intervals of preset time.
Step 802, if yes, the terminal detects whether the current network condition meets a preset condition.
Step 803, if yes, the terminal sends the newly added animation file identification.
Step 804, the server searches the corresponding file address according to the newly added resource file.
Step 805, the server sends the found file address to the terminal.
And step 806, the terminal sends the searched file address to the cloud server.
And step 807, the cloud server searches the corresponding animation file according to the searched file address.
Step 808, the cloud server sends the animation file to the terminal.
Step 809, the terminal updates the animation file in the local cache.
Step 810, responding to an operation instruction generated on a preset label in an application page, and sending the operation instruction to a server.
The operation instruction carries a page routing address and a random number.
Step 811, the server searches the corresponding animation file identification 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.
Step 813, the terminal loads the corresponding animation file from the local cache according to the animation file identifier.
Step 814, displaying the animation file in the application page in the form of a whole page overlay or a partial mask according to the animation configuration parameter selection.
Wherein the animation configuration parameters include transparency parameters and corresponding position parameters. The area of the opaque mask is determined based on the transparency parameter and the position parameter. And if the area of the opaque mask layer covers the whole application page, selecting a whole page coverage form to display the resource file in the application page. If the area of the opaque mask covers a local application page, selecting a local mask form to display the resource file in the application page.
Step 815, after the resource file is displayed, displaying the page content corresponding to the preset label 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, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described above may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with at least a part of the sub-steps or stages of other steps or 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 acquisition module 910, a resource file display module 920, and a page content display module 930. Wherein:
The page content obtaining module 910 is configured to obtain page content corresponding to a preset tag in response to an operation instruction that occurs on the preset tag 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;
the resource file display module 920 is configured to load a corresponding resource file according to the resource file identifier and display the resource file in the application page according to the resource file configuration parameter in the process of acquiring the page content;
and the page content display module 930 is configured to display, after the resource file finishes displaying, page content corresponding to the preset tag in the application page.
For specific limitations on the means for loading the resource file, reference may be made to the above limitation on the method for loading the resource file, and no further description is given here. The above-described means for loading resource files may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof 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 includes a non-volatile 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 the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of loading resource files. 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, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than 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 the computer program is executed.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, implements the method steps of the above embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method of loading a resource file, the method comprising:
responding to an operation instruction which occurs 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; the preset labels are specific labels set in the application page according to behavior data of a user;
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; the resource file is set according to behavior data of a user, and corresponds to the preset tag;
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, the resource file identification comprises an animation file identification, and the resource file configuration parameter comprises an animation configuration parameter; 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 corresponding animation files from a local cache according to the animation file identifications;
and selecting to display the animation file in the application page in the form of whole page coverage or partial covering according to the animation configuration parameters.
3. The method of claim 2, wherein the animation configuration parameters include a transparency parameter and a corresponding position parameter; the step of selecting to display the animation file in the application page in the form of whole page coverage or partial cover according to the animation configuration parameters comprises the following steps:
Determining a region of the opaque mask layer according to the transparency parameter and the position parameter;
if the area of the opaque mask layer covers the whole application page, selecting a whole page coverage form to display the animation file in the application page;
and if the area of the opaque mask covers a local application page, selecting a local mask 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 comprises the following steps:
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 the corresponding animation file from the local cache based on the animation file identification, the method further comprises:
detecting whether a newly added animation file identifier exists in the server at intervals of preset time;
and if the animation file exists, 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 animation file in the local cache is updated according to the newly added animation file identifier, the method further comprises:
detecting whether the current network condition meets a preset condition;
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 according to any one of claims 1 to 6, wherein the preset label is a hot label; the determining of the hot tag comprises the following steps:
counting the clicking times respectively occurring on each label in the application page;
and setting the labels with the clicking times larger than a preset threshold value as the hot labels.
8. An apparatus for loading a resource file, the apparatus comprising:
The page content acquisition module is used for responding to an operation instruction which occurs 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; the preset labels are specific labels set in the application page according to behavior data of a user;
the resource file display module is used for loading a corresponding resource file according to the resource file identifier in the process of acquiring the page content and displaying the resource file in the application page according to the resource file configuration parameters; the resource file is set according to behavior data of a user, and corresponds to the preset tag;
and the page content display module is used for displaying the page content corresponding to the preset label 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 processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN201910895109.9A 2019-09-20 2019-09-20 Method, device, computer equipment and storage medium for loading resource file Active CN110780939B (en)

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 CN110780939A (en) 2020-02-11
CN110780939B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015482A (en) * 2020-07-20 2020-12-01 北京达佳互联信息技术有限公司 Page loading method and device and server
CN112818143B (en) * 2021-01-30 2022-03-25 北京达佳互联信息技术有限公司 Page display 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

Citations (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN110780939A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
CN110765379B (en) Method, device, computer equipment and storage medium for loading resource file
US11314568B2 (en) Message processing method and apparatus, storage medium, and computer device
KR102436987B1 (en) Method and terminal device for extracting web page content
TWI690812B (en) Method, device and client for dynamic layout of page elements
CN110780939B (en) Method, device, computer equipment and storage medium for loading resource file
CN108549567B (en) Animation display method, device, terminal, server and storage medium
CN106528587B (en) Page display method and device in composite webpage system
US20210160553A1 (en) Method and system of displaying a video
CN107038194B (en) Page jump method and device
CN105630792B (en) Information display and push method and device
CN110019464B (en) Page processing method and device
CN110990700A (en) Comment information display method, device, client, server and system
CN111596911A (en) Method and device for generating control, computer equipment and storage medium
CN111046265B (en) Card data display method, device, equipment and storage medium
CN110780831B (en) View switching method, device, computer equipment and storage medium
CN107862728B (en) Picture label adding method and device and computer readable storage medium
KR101261753B1 (en) Method and system for generating and managing annotation on electronic book
CN114428899A (en) Multimedia resource pushing method and device, electronic equipment and storage medium
CN109948086B (en) Webpage data processing method and device, storage medium and computer equipment
CN113608737A (en) Page generation method, device, equipment and medium
CN107145314B (en) Display processing method and device for display processing
US11330338B2 (en) Method and system of displaying video comments, computing device, and readable storage medium
CN111815340B (en) Popularization information determination method, device, equipment and readable storage medium
CN110287397B (en) Content searching method and device based on screen saver and electronic equipment
CN114546194A (en) Information display 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