CN110765379A - 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 PDF

Info

Publication number
CN110765379A
CN110765379A CN201910894244.1A CN201910894244A CN110765379A CN 110765379 A CN110765379 A CN 110765379A CN 201910894244 A CN201910894244 A CN 201910894244A CN 110765379 A CN110765379 A CN 110765379A
Authority
CN
China
Prior art keywords
page
file
animation
resource file
loading
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
Application number
CN201910894244.1A
Other languages
Chinese (zh)
Other versions
CN110765379B (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 Da Jia Ying Information Technology Co Ltd
Original Assignee
Suzhou Da Jia Ying 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 Da Jia Ying Information Technology Co Ltd filed Critical Suzhou Da Jia Ying Information Technology Co Ltd
Priority to CN201910894244.1A priority Critical patent/CN110765379B/en
Publication of CN110765379A publication Critical patent/CN110765379A/en
Application granted granted Critical
Publication of CN110765379B publication Critical patent/CN110765379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Abstract

The application relates to a method, a device, computer equipment and a storage medium for loading resource files, which respond to an operation instruction for loading or refreshing an application page to acquire page content to be displayed; 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 page content is acquired, stopping displaying the resource file in the application page, and displaying the page content. When the content of the application page is loaded and the rendering is not finished, the resource file is used for replacing 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 that the displayed content is single in fixation.

Description

Method and device for loading resource file, computer equipment and storage medium
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, and cannot attract the attention of a user.
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 for loading or refreshing an application page, and acquiring page content to be displayed; 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 page content is acquired, stopping displaying the resource file in the application page, and displaying the page 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; 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 operation instruction further 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 identifier and resource file configuration parameter according to the page routing address and the random parameter.
An apparatus to load a resource file, the apparatus comprising:
the page content acquisition module is used for responding to an operation instruction for loading or refreshing an application page and acquiring page content to be displayed; 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 stopping displaying the resource file in the application page and displaying the page content after the page content is obtained.
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 to be displayed is acquired by responding to the operation instruction for loading or refreshing 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 page content is acquired, stopping displaying the resource file in the application page, and displaying the page content. When the content of the application page is loaded and the rendering is not finished, the resource file is used for replacing the progress display in the traditional technology, 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 fixed singly, and the resource file is flexible and various in selection and can arouse the interest of users.
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. 2 is a flowchart illustrating a method for loading resource files in one embodiment;
FIG. 3 is a flowchart illustrating a method for loading resource files in one embodiment;
FIG. 4a is a diagram illustrating selection of a full page overlay to display an animation file, in accordance with an embodiment;
FIG. 4b is a diagram illustrating selection of a partial mask form for display of an animation file, in accordance with an 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, 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. 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 acquires the page content, the resource file is stopped being displayed in the application page, and the page content is displayed. 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. 2, 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:
s210, responding to an operation instruction for loading or refreshing an application page, and acquiring page content to be displayed;
s220, 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 S230, 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.
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. 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. And in the process that the user waits for the application page to display the page content, the resource file is displayed according to the resource file configuration parameters, so that the user experience is further improved.
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. 3, 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. 4a, the full page overlay may be implemented by placing a completely opaque overlay component within the entire application page and overlaying the animation file on the overlay component, with the completely 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. 4b, 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. 5, 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:
s510, determining an area of the opaque masking layer according to the transparency parameter and the position parameter;
s520, 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 S530, 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. 6, before updating the animation file in the local cache according to the new animation file identifier, the method further includes:
s610, 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:
s620, if yes, receiving a file address searched by the server according to the newly added animation file identifier;
s630, sending the searched file address to a cloud server;
and S640, 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 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 the operation instruction of loading or refreshing the application page, and acquiring the page content to be displayed.
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 page content is acquired, stopping displaying the resource file in the application page, and displaying the page content.
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 the operation instruction for loading or refreshing 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 page content is obtained, stopping displaying the animation file in the application page, and displaying the page content.
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 obtain page content to be displayed in response to an operation instruction for loading or refreshing an 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;
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, after the page content is obtained, stop displaying the resource file in the application page, and display the page content.
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 for loading or refreshing an application page, and acquiring page content to be displayed; 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 page content is acquired, stopping displaying the resource file in the application page, and displaying the page content.
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 claim 1, wherein the operation instruction further 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 identifier and resource file configuration parameter according to the page routing address and the random parameter.
8. An apparatus for loading a resource file, the apparatus comprising:
the page content acquisition module is used for responding to an operation instruction for loading or refreshing an application page and acquiring page content to be displayed; 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 stopping displaying the resource file in the application page and displaying the page content after the page content is obtained.
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.
CN201910894244.1A 2019-09-20 2019-09-20 Method, device, computer equipment and storage medium for loading resource file Active CN110765379B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910894244.1A CN110765379B (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
CN201910894244.1A CN110765379B (en) 2019-09-20 2019-09-20 Method, device, computer equipment and storage medium for loading resource file

Publications (2)

Publication Number Publication Date
CN110765379A true CN110765379A (en) 2020-02-07
CN110765379B CN110765379B (en) 2023-06-20

Family

ID=69330770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910894244.1A Active CN110765379B (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) CN110765379B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310632A (en) * 2020-02-10 2020-06-19 北京字节跳动网络技术有限公司 Terminal control method and device, terminal and storage medium
CN112073511A (en) * 2020-09-08 2020-12-11 北京中油瑞飞信息技术有限责任公司 Application page generation system and method
CN112306508A (en) * 2020-10-13 2021-02-02 武汉木仓科技股份有限公司 Configuration information file updating method and device and processing equipment
CN112434237A (en) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 Page loading method and device, electronic equipment and storage medium
CN114222151A (en) * 2021-12-08 2022-03-22 广州方硅信息技术有限公司 Display method and device for playing interactive animation and computer equipment
CN114661215A (en) * 2022-03-31 2022-06-24 北京达佳互联信息技术有限公司 Animation display method and device, electronic equipment, storage medium and program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780722A (en) * 2011-05-11 2012-11-14 北京磊友信息科技有限公司 Method and server for providing application programs for mobile terminals
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780722A (en) * 2011-05-11 2012-11-14 北京磊友信息科技有限公司 Method and server for providing application programs for mobile terminals
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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310632A (en) * 2020-02-10 2020-06-19 北京字节跳动网络技术有限公司 Terminal control method and device, terminal and storage medium
CN111310632B (en) * 2020-02-10 2023-08-18 北京字节跳动网络技术有限公司 Terminal control method, device, terminal and storage medium
CN112073511A (en) * 2020-09-08 2020-12-11 北京中油瑞飞信息技术有限责任公司 Application page generation system and method
CN112073511B (en) * 2020-09-08 2023-11-14 昆仑数智科技有限责任公司 System and method for generating application page
CN112306508A (en) * 2020-10-13 2021-02-02 武汉木仓科技股份有限公司 Configuration information file updating method and device and processing equipment
CN112434237A (en) * 2020-11-25 2021-03-02 平安普惠企业管理有限公司 Page loading method and device, electronic equipment and storage medium
CN114222151A (en) * 2021-12-08 2022-03-22 广州方硅信息技术有限公司 Display method and device for playing interactive animation and computer equipment
CN114661215A (en) * 2022-03-31 2022-06-24 北京达佳互联信息技术有限公司 Animation display method and device, electronic equipment, storage medium and program product

Also Published As

Publication number Publication date
CN110765379B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN110765379B (en) Method, device, computer equipment and storage medium for loading resource file
US10877826B2 (en) Message processing method and apparatus, storage medium, and computer device
CN108829485B (en) Application interface layout updating method and device, storage medium and computer equipment
CN110780939B (en) Method, device, computer equipment and storage medium for loading resource file
CN109542543B (en) Application page processing method and device, storage medium and computer equipment
CN114095741B (en) Page display method and device, electronic equipment and storage medium
CN112114913B (en) Application program interface updating method and device, computer equipment and storage medium
CN113158110A (en) Data processing method and equipment
CN113794894A (en) Information processing method, information processing device, electronic equipment and storage medium
CN113238823A (en) Information display method and device, electronic equipment and storage medium
US20230205401A1 (en) Interface interaction method, apparatus, computer device 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
CN114637935A (en) Page information display method and device, electronic equipment and storage medium
CN114924815A (en) Page rendering method and device, electronic equipment and storage medium
CN110780831B (en) View switching method, device, computer equipment and storage medium
CN111241438A (en) Cartoon picture display method and device, computer readable storage medium and computer equipment
CN112083852B (en) Recommendation bit layout method, device, equipment and medium for video application
CN114428899A (en) Multimedia resource pushing method and device, electronic equipment and storage medium
EP3835954A1 (en) Method and device for displaying interface, and storage medium
CN113641294A (en) Information display method and device, electronic equipment and storage medium
CN109948086B (en) Webpage data processing method and device, storage medium and computer equipment
CN111026491B (en) Interface display method, device, electronic equipment, server and storage medium
US20210191682A1 (en) Method and system for associating and displaying content and list of contents on dual screen
CN115934238A (en) Interface display method and device, computer 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