CN110765379B - 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
CN110765379B
CN110765379B CN201910894244.1A CN201910894244A CN110765379B CN 110765379 B CN110765379 B CN 110765379B CN 201910894244 A CN201910894244 A CN 201910894244A CN 110765379 B CN110765379 B CN 110765379B
Authority
CN
China
Prior art keywords
file
resource file
page
animation
resource
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
CN201910894244.1A
Other languages
Chinese (zh)
Other versions
CN110765379A (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 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a method, a device, computer equipment and a storage medium for loading a resource file, wherein page content to be displayed is obtained by responding 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; 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 stopping displaying the resource file in the application page after the page content is acquired, and displaying the page content. When the loading of the content of the application page is not finished, the progress display in the traditional technology is replaced by the resource file, 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 display content is fixed and single.

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, and cannot attract the attention of users.
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 of 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 stopping displaying the resource file in the application page after the page content is acquired, and displaying the page content.
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 operation instruction further carries a random parameter; the operation instruction instructs the server to search the corresponding resource file identifier and the resource file configuration parameter according to the page routing address, and the operation instruction comprises the following steps:
and the operation instruction instructs the server to search the corresponding resource file identifier and the resource file configuration parameter according to the page routing address and the random parameter.
An apparatus for loading a resource file, the apparatus comprising:
the page content acquisition module is used for responding to an operation instruction of loading or refreshing the 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 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 stopping displaying the resource file in the application page after the page content is acquired and displaying the page content.
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.
The method, the device, the computer equipment and the storage medium for loading the resource file acquire page contents to be displayed by responding to the operation instruction of 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 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 stopping displaying the resource file in the application page after the page content is acquired, and displaying the page content. When the loading of the content of the application page is not finished, the progress display in the traditional technology is replaced by the resource file, the resource file is displayed in the application page according to the resource file configuration parameters, so that the problem of single fixed display content is solved, the selection of the resource file is flexible and various, and the user interest can be induced.
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. 2 is a flow diagram of a method of loading resource files in one embodiment;
FIG. 3 is a flow diagram of a method of loading resource files in one embodiment;
FIG. 4a is a diagram of an embodiment of selecting a full page overlay to display an animation file;
FIG. 4b is a schematic diagram of selecting a partial mask form to display an animation file according to 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, where the terminal 110 sends the operation instruction to the server 120, and obtains, from the server 120, page content to be displayed. 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. In the process that the terminal 110 obtains the page content, 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 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. 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. 2, 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:
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 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 S230, 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.
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. 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. 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 configuration parameters of the resource file, 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, 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. 4a, 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. 4b, the local mask may be implemented by setting the local position of the application page to be completely opaque, and superimposing an animation file on the mask component, where the completely opaque portion covers the local application page, and the mask corresponding to the other portion in the application page has a certain transparency, and the content in the application page is seen through the mask of the portion. 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. 5, 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:
s510, determining the area of the opaque mask layer according to the transparency parameter and the position parameter;
s520, 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 S530, 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. 6, before updating the animation file in the local cache according to the newly added 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, including:
s620, if the animation file identification is met, the receiving server searches the file address according to the newly added animation file identification;
s630, sending the found file address to the cloud server;
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.
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 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 for loading or refreshing the application page, and acquiring page contents to be displayed.
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, stopping displaying the resource file in the application page after the page content is acquired, and displaying the page content.
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, in response to the operation instruction of loading or refreshing the application page, sending the operation instruction to the 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 obtaining the page content, stopping displaying the resource 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, 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 to be displayed in response to an operation instruction of 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;
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 stop displaying the resource file in the application page and display the page content after the page content is acquired.
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 (9)

1. A method of loading a resource file, the method comprising:
responding to an operation instruction for loading or refreshing an application page, acquiring page content to be displayed, wherein the operation instruction carries a page routing address and random parameters, and indicating a server to search corresponding resource file identifiers and resource file configuration parameters according to the page routing address and the random parameters, and different random parameters correspond to different resource files; the server stores the page routing address, the resource file identification, the resource file configuration parameters and the corresponding relation among the three, wherein one page routing address corresponds to a plurality of resource file identifications;
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, wherein the resource file comprises multimedia information, the resource file configuration parameters are parameters for setting how to display the resource file in the application page, and the resource file configuration parameters comprise the display position, the display form and the display time of the resource file in the application page;
and stopping displaying the resource file in the application page after the page content is acquired, and displaying the page content.
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. 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, acquiring page content to be displayed, wherein the operation instruction carries a page routing address and random parameters, and indicating a server to search corresponding resource file identifiers and resource file configuration parameters according to the page routing address and the random parameters, and different random parameters correspond to different resource files; the server stores the page routing address, the resource file identification, the resource file configuration parameters and the corresponding relation among the three, wherein one page routing address corresponds to a plurality of resource file identifications;
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, wherein the resource file comprises multimedia information, the resource file configuration parameters are parameters for setting how to display the resource file in the application page, and the resource file configuration parameters comprise the display position, the display form and the display time of the resource file in the application page;
and the page content display module is used for stopping displaying the resource file in the application page after the page content is acquired and displaying the page content.
8. 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 6 when the computer program is executed.
9. 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 6.
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 CN110765379A (en) 2020-02-07
CN110765379B true 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)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310632B (en) * 2020-02-10 2023-08-18 北京字节跳动网络技术有限公司 Terminal control method, device, terminal and storage medium
CN112035114A (en) * 2020-09-02 2020-12-04 平安普惠企业管理有限公司 Page rollback method, device, equipment and medium
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
CN114661215B (en) * 2022-03-31 2024-06-11 北京达佳互联信息技术有限公司 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

Also Published As

Publication number Publication date
CN110765379A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
CN110765379B (en) Method, device, computer equipment and storage medium for loading resource file
CN110780939B (en) Method, device, computer equipment and storage medium for loading resource file
KR102436987B1 (en) Method and terminal device for extracting web page content
US10877826B2 (en) Message processing method and apparatus, storage medium, and computer device
CN110990105B (en) Interface display method and device, electronic equipment and storage medium
US11210119B2 (en) Method and device for displaying interface, electronic equipment, server, and storage medium
CN106528587B (en) Page display method and device in composite webpage system
CN107590228B (en) Page content processing method and mobile terminal
CN110019464B (en) Page processing method and device
CN110020300B (en) Browser page synthesis method and terminal
US20230205401A1 (en) Interface interaction method, apparatus, computer device and storage medium
KR20160138345A (en) Method and apparatus for providing information based on webpage
CN111596911A (en) Method and device for generating control, computer equipment and storage medium
CN110990700A (en) Comment information display method, device, client, server and system
CN113886707A (en) Encyclopedic information determination method, display method, device, equipment and medium
CN111367518A (en) Page layout method and device, computing equipment and computer storage medium
US20170118135A1 (en) Responsive Action in a Resource Management System
US11507633B2 (en) Card data display method and apparatus, and storage medium
CN110780831B (en) View switching method, device, computer equipment and storage medium
CN115729544A (en) Desktop component generation method and device, electronic equipment and readable storage medium
CN115658196A (en) Page display method and device, electronic equipment and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN109948086B (en) Webpage data processing method and device, storage medium and computer equipment
US11330338B2 (en) Method and system of displaying video comments, computing device, and readable storage medium
CN107145314B (en) Display processing method and device for display processing

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