CN116382787A - Method and device for loading animation in page, electronic equipment and readable storage medium - Google Patents
Method and device for loading animation in page, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN116382787A CN116382787A CN202310020916.2A CN202310020916A CN116382787A CN 116382787 A CN116382787 A CN 116382787A CN 202310020916 A CN202310020916 A CN 202310020916A CN 116382787 A CN116382787 A CN 116382787A
- Authority
- CN
- China
- Prior art keywords
- target
- target page
- uniform resource
- resource locator
- page
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000011068 loading method Methods 0.000 title claims abstract description 71
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000004590 computer program Methods 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 14
- 230000008569 process Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000006837 decompression Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present disclosure provides a method, apparatus, electronic device, and readable storage medium for loading an animation in a page. The method for loading the animation in the page comprises the following steps: acquiring a uniform resource locator corresponding to a target page; according to the uniform resource locator, target animation data corresponding to the target page is obtained locally; and loading the animation in the target page according to the target animation data. The method and the device can achieve the aim of obtaining the target animation data completely depending on the URL, and the animation data do not need to be stored in the package of the application program in advance, so that the package volume of the application program is greatly reduced, and the downloading of the application program is facilitated.
Description
Technical Field
The disclosure relates to the technical field of Internet, and provides a method, a device, electronic equipment and a readable storage medium for loading animation in a page.
Background
Prior art when loading animations in pages, two general approaches are used: local loading or network loading. Wherein, the local loading means that the animation data is pre-stored in the package of the application program, and then when the animation needs to be loaded, the animation data is loaded according to the pre-stored animation data; the network loading refers to that when the animation needs to be loaded, the animation data is obtained through the network according to the corresponding uniform resource locator, and then the animation data is loaded. The local loading method can result in a large volume of the application program, and the network loading method needs to acquire animation data through the network each time the animation is loaded.
Disclosure of Invention
According to a first aspect of the present disclosure, there is provided a method of loading an animation in a page, comprising: acquiring a uniform resource locator corresponding to a target page; according to the uniform resource locator, target animation data corresponding to the target page is obtained locally; and loading the animation in the target page according to the target animation data.
According to a second aspect of the present disclosure, there is provided an apparatus for loading an animation in a page, comprising: the acquisition unit is used for acquiring the uniform resource locator corresponding to the target page; the query unit is used for locally acquiring target animation data corresponding to the target page according to the uniform resource locator; and the loading unit is used for loading the animation in the target page according to the target animation data.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method as described above.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method as described above.
According to the technical scheme, the aim of obtaining the target animation data completely depending on the URL can be achieved, and the animation data do not need to be stored in the package of the application program in advance, so that the package volume of the application program is greatly reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 6 is a block diagram of an electronic device for implementing a method of loading an animation in a page in accordance with an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure. As shown in fig. 1, the method for loading an animation in a page of the present embodiment specifically includes the following steps:
s101, acquiring a uniform resource locator corresponding to a target page;
s102, locally acquiring target animation data corresponding to the target page according to the uniform resource locator;
s103, loading the animation in the target page according to the target animation data.
According to the method for loading the animation in the page, after the uniform resource locator (URL, uniform Resource Locator) corresponding to the target page is acquired, instead of acquiring the target animation data according to the URL through a network, the target animation data is acquired locally according to the URL, and then the animation is loaded in the target page according to the target animation data, the aim of acquiring the target animation data completely depending on the URL is fulfilled, and the animation data does not need to be stored in the package of the application program in advance, so that the package volume of the application program is greatly reduced.
The execution main body of the method for loading the animation in the page of the embodiment can be terminal equipment, and can also be a client corresponding to the application program in the terminal equipment; the method provided by the embodiment is suitable for various operating systems, and is particularly suitable for an iOS operating system.
In this embodiment, the number of URLs corresponding to the target page acquired in S101 may be one or more, and each URL corresponds to an animation to be loaded in the target page; in this embodiment, a correspondence between identification information of a page in an application program and a URL is stored in advance, and then the URL corresponding to the target page is obtained according to the correspondence.
In this embodiment, when S101 is executed to obtain the uniform resource locator corresponding to the target page, the optional implementation manner may be: under the condition that the application program is detected to load the target page, acquiring a uniform resource locator corresponding to the target page according to the identification information of the target page; in this embodiment, the identification information of the target page may be information such as a page name and a page type of the target page.
That is, the present embodiment can obtain the corresponding URL according to the identification information of the target page in the process of loading the target page by the application program, thereby achieving the purpose of obtaining the target animation data in real time in the process of loading the target page.
In addition, when S101 is executed to obtain the uniform resource locator corresponding to the target page, the present embodiment may adopt the following alternative implementation manners: under the condition that the starting of the application program is detected, determining target pages in the application program, wherein the page corresponding to the preset page name and/or the preset page type can be used as the target pages, and the number of the determined target pages can be one or a plurality of target pages; and acquiring a uniform resource locator corresponding to the target page according to the determined identification information of the target page.
That is, the present embodiment can also determine the target page in the application program in advance after the application program is started, and further acquire the corresponding URL according to the identification information of the target page, so as to achieve the purpose of acquiring the target animation data in advance before the loading process of the target page.
In the embodiment, after the step S101 of obtaining the uniform resource locator corresponding to the target page, the step S102 of obtaining the target animation data corresponding to the target page from the local place according to the uniform resource locator is performed; the target animation data obtained in the step S102 may be a JSON file, or may be a JSON file and a picture file, where the picture file includes a picture of the animation to be loaded.
In the embodiment, when executing S102, according to the uniform resource locator, the target animation data corresponding to the target page is obtained locally, which may be implemented as follows: determining a target storage path according to the uniform resource locator; determining a target folder positioned locally according to the target storage path; acquiring target animation data corresponding to a target page from the determined target folder; the target animation data stored in the target folder are downloaded according to the uniform resource locator at the historical moment.
That is, in this embodiment, the target animation data is obtained through the target folder located locally according to the URL corresponding to the target page, and since the target animation data included in the target folder is obtained by downloading according to the URL before, the method of obtaining the target animation data in this embodiment can greatly reduce the package volume of the application program, thereby facilitating the downloading of the application program.
In this embodiment, when executing S102 to determine the target storage path according to the url, the MD5 value of the url may be first obtained, and then the target storage path may be determined according to the MD5 value; the MD5 value of the url is unique, so that a unique target storage path can be acquired accordingly according to the MD5 value.
The present embodiment executes S103 to load an animation in a target page according to the acquired target animation data after executing S102 to acquire target animation data corresponding to the target page locally.
Since the method of the embodiment is divided into two modes of real-time acquisition and pre-acquisition when acquiring the target animation data, and the pre-acquired target animation data needs to be used in the loading process of the target page, the method of the embodiment can adopt the following alternative implementation modes when executing S103 to load the animation in the target page according to the acquired target animation data: and under the condition that the application program is detected to load the target page, loading the animation in the target page according to the acquired target animation data.
It can be understood that, in order to avoid the application program from being jammed when loading the animation, and improve the smoothness of the application program, the present embodiment may enable an asynchronous thread in the application program to perform the acquisition of the uniform resource locator and the acquisition of the target animation data (i.e. S101 and S102 are performed by the asynchronous thread), and further perform the loading of the animation according to the target animation data by the main thread in the application program (i.e. S103 is performed by the main thread).
In the embodiment, when executing S103, the Lottie tool may be called by the main thread, so as to achieve the purpose of loading the animation in the target page according to the target animation data.
Fig. 2 is a schematic diagram according to a second embodiment of the present disclosure. As shown in fig. 2, the method for loading an animation in a page according to the present embodiment may further include the following:
s201, downloading a compressed file corresponding to the target page according to the uniform resource locator under the condition that the target animation data corresponding to the target page is not acquired from the local;
s202, decompressing the compressed file to obtain the target animation data;
s203, storing the target animation data into a target folder corresponding to the uniform resource locator in the local area.
That is, when the target animation data cannot be obtained locally according to the URL, the embodiment can also download the compressed file corresponding to the target page in real time from the network according to the URL, and further obtain the target animation data according to the downloaded compressed file.
In this embodiment, when executing S201 to download the compressed file corresponding to the target page according to the url, the download request may be checked according to the MD5 value of the url, so as to avoid the problem of multiple downloads for the same url.
In the embodiment, when executing S201 to download the compressed file corresponding to the target page according to the uniform resource locator, the local compressed folder may be emptied first, and then the compressed file is downloaded to the compressed folder; the compressed file folder in this embodiment is used to store the downloaded compressed file.
In this embodiment, when executing S202 to decompress the downloaded compressed file, the following alternative implementation manners may be adopted: acquiring a file format of a compressed file; under the condition that the acquired file format is determined to be the preset file format, decompressing the downloaded compressed file; the preset file format in this embodiment may be a zip format.
That is, the present embodiment can achieve standardization in decompressing a compressed file by determining whether to decompress the downloaded compressed file by presetting a file format.
Preferably, the target animation data obtained by decompressing the compressed file in S202 includes a JSON file and a picture file, so that the purpose of loading a more cool animation in a target page is achieved through the JSON file and the picture file.
In the embodiment, when executing S203, a local target folder may be first determined according to a uniform resource locator, and then the target animation data obtained by decompression may be stored in the target folder, so that the target animation data may be obtained directly through the target folder when the animation is loaded in the target page next time.
Fig. 3 is a schematic diagram according to a third embodiment of the present disclosure. An effect diagram of loading an animation in a page according to the present embodiment is shown in fig. 3; the target page in fig. 3 is a small-say recommended page in the reading program, and the content in the solid line frame above the recommended page is a picture in the animation loaded on the small-say recommended page.
Fig. 4 is a schematic diagram according to a fourth embodiment of the present disclosure. FIG. 4 is a flow chart showing loading of animation in a page for the present embodiment of fire: enabling an asynchronous thread in an application program, and determining whether target animation data corresponding to a target page exists locally according to a uniform resource locator corresponding to the target page; if the target animation data exist, the target animation data are returned to the main thread of the application program after the target animation data are acquired locally, so that the loading of the animation is carried out; if the compressed file does not exist, the compressed file is downloaded after the local compressed file folder is emptied; after the downloading of the compressed file is completed, checking the file format of the compressed file; under the condition that the file format is determined to be the preset file format, decompressing the compressed file to obtain target animation data; returning the target animation data to the main thread of the application program to carry out animation loading; if the compressed file is not successfully downloaded or the decompression is not successfully performed, returning a message of failure in acquiring the target animation data to the main thread; and if the file format of the downloaded compressed file is not the preset file format, the compressed file is emptied, and a message of failure in acquiring the target animation data is returned to the main thread.
Fig. 5 is a schematic diagram according to a fifth embodiment of the present disclosure. As shown in fig. 5, the apparatus 500 for loading an animation in a page according to the present embodiment includes:
an obtaining unit 501, configured to obtain a uniform resource locator corresponding to a target page;
the query unit 502 is configured to obtain, locally, target animation data corresponding to the target page according to the uniform resource locator;
and the loading unit 503 is used for loading the animation in the target page according to the target animation data.
The number of URLs corresponding to the target page acquired by the acquiring unit 501 may be one or more, and each URL corresponds to an animation to be loaded in the target page; the obtaining unit 501 may pre-store the correspondence between the identification information of the page in the application program and the URL, and further obtain the URL corresponding to the target page according to the correspondence.
When the obtaining unit 501 obtains the uniform resource locator corresponding to the target page, the optional implementation manner may be: under the condition that the application program is detected to load the target page, acquiring a uniform resource locator corresponding to the target page according to the identification information of the target page; in this embodiment, the identification information of the target page may be information such as a page name and a page type of the target page.
That is, the acquiring unit 501 can acquire the corresponding URL according to the identification information of the target page in the process of loading the target page by the application program, thereby achieving the purpose of acquiring the target animation data in real time in the process of loading the target page.
In addition, when the obtaining unit 501 obtains the uniform resource locator corresponding to the target page, the alternative implementation manner may be: under the condition that the starting of the application program is detected, determining a target page in the application program; and acquiring a uniform resource locator corresponding to the target page according to the determined identification information of the target page.
That is, the acquiring unit 501 is also capable of determining a target page in the application program in advance after the application program is started, and further acquiring a corresponding URL according to the identification information of the target page, thereby achieving the purpose of acquiring the target animation data in advance before the loading process of the target page.
In this embodiment, after the obtaining unit 501 obtains the uniform resource locator corresponding to the target page, the query unit 502 obtains the target animation data corresponding to the target page from the local place according to the uniform resource locator; the target animation data obtained by the query unit 502 may be a JSON file, or may be a JSON file and an animation picture.
When the query unit 502 obtains the target animation data corresponding to the target page from the local according to the uniform resource locator, the following alternative implementation manners may be adopted: determining a target storage path according to the uniform resource locator; determining a target folder positioned locally according to the target storage path; acquiring target animation data corresponding to a target page from the determined target folder; the target animation data stored in the target folder are downloaded according to the uniform resource locator at the historical moment.
That is, the query unit 502 obtains the target animation data through the target folder located locally according to the URL corresponding to the target page, and since the target animation data included in the target folder is obtained by downloading according to the URL before, the package volume of the application program can be greatly reduced by the method of obtaining the target animation data according to the embodiment, so that the downloading of the application program is more convenient.
When determining the target storage path according to the uniform resource locator, the query unit 502 may first obtain the MD5 value of the uniform resource locator, and then determine the target storage path according to the MD5 value; the MD5 value of the url is unique, so that a unique target storage path can be acquired accordingly according to the MD5 value.
In the present embodiment, after target animation data corresponding to a target page is acquired from the local by the inquiry unit 502, an animation is loaded in the target page by the loading unit 503 based on the acquired target animation data.
Since the method of the present embodiment is divided into two modes, i.e. real-time acquisition and pre-acquisition, when acquiring the target animation data, and the pre-acquired target animation data needs to be used in the loading process of the target page, the loading unit 503 may adopt the following alternative implementation modes when loading the animation in the target page according to the acquired target animation data: and under the condition that the application program is detected to load the target page, loading the animation in the target page according to the acquired target animation data.
It can be understood that, in order to avoid the application program from being jammed when loading the animation, and improve the smoothness of the application program, the present embodiment may enable an asynchronous thread in the application program to perform the acquisition of the uniform resource locator and the acquisition of the target animation data (i.e. the operations performed by the acquisition unit 501 and the query unit 502), and further perform the loading of the animation according to the target animation data (i.e. the operations performed by the loading unit 503) through the main thread in the application program.
The loading unit 503 may call the Lottie tool through the main thread, thereby achieving the purpose of loading the animation in the target page according to the target animation data.
The apparatus 500 for loading an animation in a page according to the present embodiment may further include a downloading unit 504, configured to perform the following: downloading the compressed file corresponding to the target page according to the uniform resource locator under the condition that the target animation data corresponding to the target page is not acquired from the local; decompressing the compressed file to obtain target animation data; and storing the target animation data into a target folder corresponding to the uniform resource locator in the local area.
That is, in this embodiment, when the target animation data cannot be obtained locally according to the URL, the downloading unit 504 may further download the compressed file corresponding to the target page from the network in real time according to the URL, and further obtain the target animation data according to the downloaded compressed file, where the downloading unit 504 may ensure that the corresponding animation is loaded in the target page, thereby improving the success rate of animation loading, and store the target animation data obtained by downloading to the local target folder, so that the target animation data can be obtained through the local target folder when the animation is loaded in the target page next time, and further improve the efficiency of animation loading.
When downloading the compressed file corresponding to the target page according to the uniform resource locator, the downloading unit 504 may also verify the downloading request according to the MD5 value of the uniform resource locator, so as to avoid the problem of downloading for the same uniform resource locator multiple times.
When the downloading unit 504 downloads the compressed file corresponding to the target page according to the uniform resource locator, the local compressed file folder may be emptied first, and then the compressed file is downloaded to the compressed file folder; the compressed file folder in this embodiment is used to store the downloaded compressed file.
The download unit 504 may adopt the following alternative implementation manners when decompressing the downloaded compressed file: acquiring a file format of a compressed file; under the condition that the acquired file format is determined to be the preset file format, decompressing the downloaded compressed file; the preset file format in this embodiment may be a zip format.
That is, the downloading unit 504 determines whether to decompress the downloaded compressed file by presetting the file format, and can achieve standardization in decompressing the compressed file.
The downloading unit 504 may first determine a target folder located locally according to the uniform resource locator, and then store the decompressed target animation data to the target folder, so as to obtain the target animation data directly through the target folder when the animation is loaded in the target page next time.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
As shown in fig. 6, is a block diagram of an electronic device of a method of loading an animation in a page according to an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. At the position of
In the RAM603, various programs and data required for the operation of the apparatus 600 can also be stored. The computing unit 601, ROM602, and RAM603 are connected to each other by a bus 604. An input/output (I/O) interface 6055 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like;
a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609, e.g. network card, modulation
Demodulators, wireless communication transceivers, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet 0, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various runners
A computing unit for a model learning algorithm, a Digital Signal Processor (DSP), any suitable 5-processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods described above
And processes such as loading animations in pages. For example, in some embodiments, the method of loading an animation in a page may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608.
In some embodiments, part or all of the computer program may be loaded and/or installed onto device 600 via ROM602 and/or 0 or communication unit 609. When the computer program is loaded into
RAM603, and executed by computing unit 601, may perform one or more steps of the method of loading animations in pages described above. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the method of loading the animation in the page in any other suitable manner (e.g., by means of firmware).
5 various implementations of the systems and techniques described here can be implemented in digital electronic circuitry, a set of digital electronic circuitry
Implemented in circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may
To include: implemented in one or more computer programs, the one or more computer programs 0 may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other device programmable to load animation in pages, such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram block or blocks to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a presentation device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for presenting information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (17)
1. A method of loading an animation in a page, comprising:
acquiring a uniform resource locator corresponding to a target page;
according to the uniform resource locator, target animation data corresponding to the target page is obtained locally;
and loading the animation in the target page according to the target animation data.
2. The method of claim 1, wherein the obtaining a uniform resource locator corresponding to a target page comprises:
and under the condition that the application program is detected to load the target page, acquiring the uniform resource locator according to the identification information of the target page.
3. The method of claim 1, wherein the obtaining a uniform resource locator corresponding to a target page comprises:
under the condition that the starting of the application program is detected, determining a target page in the application program;
and acquiring the uniform resource locator according to the identification information of the target page.
4. The method of claim 1, wherein the locally obtaining, according to the uniform resource locator, target animation data corresponding to the target page comprises:
determining a target storage path according to the uniform resource locator;
determining a target folder positioned locally according to the target storage path;
and acquiring the target animation data from the target folder.
5. The method of claim 1, further comprising,
downloading a compressed file corresponding to the target page according to the uniform resource locator under the condition that the target animation data corresponding to the target page is not acquired from the local;
decompressing the compressed file to obtain the target animation data;
and storing the target animation data into a target folder corresponding to the uniform resource locator in the local area.
6. The method of claim 5, wherein decompressing the compressed file comprises:
acquiring a file format of the compressed file;
and decompressing the compressed file under the condition that the file format is determined to be the preset file format.
7. A method according to claim 3, wherein said loading a motion picture in said target page in accordance with said target animation data comprises:
and under the condition that the application program is detected to load the target page, loading the animation in the target page according to the target animation data.
8. An apparatus for loading an animation in a page, comprising:
the acquisition unit is used for acquiring the uniform resource locator corresponding to the target page;
the query unit is used for locally acquiring target animation data corresponding to the target page according to the uniform resource locator;
and the loading unit is used for loading the animation in the target page according to the target animation data.
9. The apparatus of claim 8, wherein the obtaining unit, when obtaining the uniform resource locator corresponding to the target page, specifically performs:
and under the condition that the application program is detected to load the target page, acquiring the uniform resource locator according to the identification information of the target page.
10. The apparatus of claim 8, wherein the obtaining unit, when obtaining the uniform resource locator corresponding to the target page, specifically performs:
under the condition that the starting of the application program is detected, determining a target page in the application program;
and acquiring the uniform resource locator according to the identification information of the target page.
11. The apparatus of claim 8, wherein the query unit, when locally acquiring the target animation data corresponding to the target page according to the uniform resource locator, specifically performs:
determining a target storage path according to the uniform resource locator;
determining a target folder positioned locally according to the target storage path;
and acquiring the target animation data from the target folder.
12. The apparatus of claim 8, further comprising a download unit to perform:
downloading a compressed file corresponding to the target page according to the uniform resource locator under the condition that the target animation data corresponding to the target page is not acquired from the local;
decompressing the compressed file to obtain the target animation data;
and storing the target animation data into a target folder corresponding to the uniform resource locator in the local area.
13. The apparatus of claim 12, wherein the downloading unit, when decompressing the compressed file, specifically performs:
acquiring a file format of the compressed file;
and decompressing the compressed file under the condition that the file format is determined to be the preset file format.
14. The apparatus according to claim 10, wherein the loading unit, when loading an animation in the target page according to the target animation data, specifically performs:
and under the condition that the application program is detected to load the target page, loading the animation in the target page according to the target animation data.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310020916.2A CN116382787A (en) | 2023-01-06 | 2023-01-06 | Method and device for loading animation in page, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310020916.2A CN116382787A (en) | 2023-01-06 | 2023-01-06 | Method and device for loading animation in page, electronic equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116382787A true CN116382787A (en) | 2023-07-04 |
Family
ID=86975697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310020916.2A Pending CN116382787A (en) | 2023-01-06 | 2023-01-06 | Method and device for loading animation in page, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116382787A (en) |
-
2023
- 2023-01-06 CN CN202310020916.2A patent/CN116382787A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113342345A (en) | Operator fusion method and device of deep learning framework | |
CN112540806A (en) | Applet page rendering method and device, electronic equipment and storage medium | |
CN112506581B (en) | Method, apparatus, electronic device and readable storage medium for rendering applet | |
CN113378855A (en) | Method for processing multitask, related device and computer program product | |
CN114389969B (en) | Method and device for testing client, electronic equipment and storage medium | |
CN114025037B (en) | Cloud mobile phone overhaul method and device, electronic equipment and storage medium | |
CN114418086A (en) | Method and device for compressing neural network model | |
CN113836462A (en) | Page description file generation method, device, equipment and storage medium | |
CN112732312A (en) | Method and device for updating application program, electronic equipment and medium | |
CN112671892A (en) | Data transmission method, data transmission device, electronic equipment, medium and computer program product | |
CN114666319B (en) | Data downloading method, device, electronic equipment and readable storage medium | |
CN114138397B (en) | Page display method and device, electronic equipment and storage medium | |
CN114218166A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN116382787A (en) | Method and device for loading animation in page, electronic equipment and readable storage medium | |
CN113747423B (en) | Cloud mobile phone state synchronization method, device, equipment, storage medium and program product | |
CN115617800A (en) | Data reading method and device, electronic equipment and storage medium | |
CN114386577A (en) | Method, apparatus, and storage medium for executing deep learning model | |
CN114237755A (en) | Application running method and device, electronic equipment and storage medium | |
CN113326038A (en) | Method, apparatus, device, storage medium and program product for providing service | |
CN115080205B (en) | Task execution method, device, electronic equipment and readable storage medium | |
CN114579520B (en) | Mirror image data processing method, mirror image data loading method and device | |
CN114301975B (en) | Method, device, equipment and storage medium for processing push information in application | |
CN117075920A (en) | Optimization method and device for application program installation package | |
CN115840604B (en) | Data processing method, device, electronic equipment and computer readable storage medium | |
CN113407329B (en) | Task execution method, device, 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 |