WO2019114158A1 - 实时动画显示方法、装置、电子终端及可读存储介质 - Google Patents

实时动画显示方法、装置、电子终端及可读存储介质 Download PDF

Info

Publication number
WO2019114158A1
WO2019114158A1 PCT/CN2018/082458 CN2018082458W WO2019114158A1 WO 2019114158 A1 WO2019114158 A1 WO 2019114158A1 CN 2018082458 W CN2018082458 W CN 2018082458W WO 2019114158 A1 WO2019114158 A1 WO 2019114158A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
image
pictures
array
download
Prior art date
Application number
PCT/CN2018/082458
Other languages
English (en)
French (fr)
Inventor
汪刚
陈少杰
张文明
Original Assignee
武汉斗鱼网络科技有限公司
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 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2019114158A1 publication Critical patent/WO2019114158A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • 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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9558Details of hyperlinks; Management of linked annotations
    • 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

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to a real-time animation display method, apparatus, electronic terminal, and readable storage medium.
  • the corresponding application installation package is generally downloaded from the server, and the installation package includes a picture corresponding to the dynamic picture that needs to be dynamically displayed in the application.
  • the dynamic display can be displayed in the application.
  • the screen when the dynamic picture in the application needs to be updated, the electronic terminal needs to download the updated installation package from the server to update the dynamic picture.
  • the application may not be updated in real time, which may result in the electronic terminal not displaying the latest dynamic picture after the dynamic picture in the corresponding application of the server is updated.
  • the way to download all dynamic pictures to the local area of the electronic terminal through the installation package will occupy a large storage space.
  • an object of embodiments of the present disclosure includes providing a real-time animation display method, apparatus, electronic terminal, and readable storage medium.
  • a real-time animation display method provided by an embodiment of the present disclosure includes:
  • an embodiment of the present disclosure further provides a real-time animation display method, which is applied to an electronic terminal, and the method includes:
  • the download address of the plurality of pictures corresponding to the dynamic picture that needs to be displayed in the current interface is obtained from the designated location of the electronic terminal;
  • the picture and the download address of the picture are associated and stored in the picture dictionary;
  • the plurality of pictures in the picture dictionary are arranged in the order in which the download addresses of the plurality of pictures are stored in the specified position, to obtain a picture to be displayed. sequence;
  • the pictures in the sequence of pictures to be displayed are sequentially displayed to form an animation effect.
  • the embodiment of the present disclosure further provides a real-time animation display device, which is applied to an electronic terminal, and the device includes:
  • Obtaining a module configured to: when the electronic terminal starts an interface, acquire, from a specified location of the electronic terminal, a download address of a plurality of pictures corresponding to the dynamic picture that needs to be displayed in the current interface;
  • the sending module is configured to sequentially send, to the server, a plurality of image download requests respectively corresponding to the plurality of pictures according to a storage order of the download addresses of the plurality of pictures in the specified location;
  • the storage module is configured to: when the image corresponding to any image download request is obtained, associate the image with the download address of the image and store the image in the graph dictionary;
  • a sorting module configured to arrange a plurality of pictures in the picture dictionary according to a storage address of the plurality of pictures in a storage order of the specified position when the plurality of pictures are stored in the picture dictionary, Obtaining a sequence of pictures to be displayed;
  • the display module is configured to sequentially display the pictures in the sequence of pictures to be displayed to form an animation effect.
  • the embodiment of the present disclosure further provides a real-time animation display device, where the real-time animation display device includes:
  • the acquiring module is configured to acquire an image link of a link array formed by multiple pictures corresponding to the dynamic picture to be displayed in the current interface when the interface is started;
  • a sending module configured to send a picture download request to the server according to the obtained image link
  • a storage module configured to receive multiple pictures corresponding to the download request, and store the downloaded multiple pictures in a graph dictionary
  • Generating a module configured to generate an image array for storing a plurality of downloaded images
  • a re-storing module configured to acquire a picture in the graph dictionary in an order corresponding to the link array, and store the image in the image array;
  • the display module is configured to dynamically display a plurality of images in the image array in the current interface to form an animation effect.
  • an embodiment of the present disclosure further provides an electronic terminal, including:
  • a real-time animation display device provided by a fourth aspect of the embodiments of the present disclosure is stored in the memory and controlled by the processor.
  • an embodiment of the present disclosure further provides an electronic terminal, including a processor and a machine readable storage medium, where the machine readable storage medium stores machine executable instructions, and the machine executable instructions are processed
  • the real-time animation display method provided by the second aspect of the present disclosure is implemented when the device is executed.
  • an embodiment of the present disclosure further provides a readable storage medium having a computer program stored thereon, the computer program implementing the real-time animation display method described above when executed.
  • the real-time animation display method, the device, the electronic terminal and the readable storage medium provided by the embodiments of the present disclosure can acquire the picture corresponding to the dynamic picture from the server in real time when the dynamic picture needs to be displayed. Displaying, avoiding the installation of a fixed version in the electronic terminal to form a local dynamic picture, and the latest dynamic picture provided by the server cannot be displayed in real time.
  • the size of the installation package of the application in which the dynamic picture is installed can be reduced.
  • the electronic terminal does not need to download the installation package of the application to update, and can display a new dynamic screen. Further, the downloaded pictures are re-stored for sorting, so that the electronic terminal can initiate the download request to the server and the download speed does not need to consider the order of the picture links in the link array to improve the download speed.
  • FIG. 1 is a schematic diagram of a server interacting with an electronic terminal according to an embodiment of the present disclosure.
  • FIG. 2 is a schematic block diagram of an electronic terminal according to an embodiment of the present disclosure.
  • FIG. 3 is a flowchart of a real-time animation display method according to an embodiment of the present disclosure.
  • FIG. 4 is a detailed flowchart of step S104 of the real-time animation display method according to an embodiment of the present disclosure.
  • FIG. 5 is a detailed flowchart of step S105 of the real-time animation display method according to an embodiment of the present disclosure.
  • FIG. 6 is a detailed flowchart of step S106 of the real-time animation display method provided by the embodiment of the present disclosure.
  • FIG. 7 is still another flowchart of a real-time animation display method according to an embodiment of the present disclosure.
  • FIG. 8 is a functional block diagram of a real-time animation display device provided in real time according to the present disclosure.
  • FIG. 9 is a schematic diagram of still another functional module of the real-time animation display device provided by the embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of functional modules of a re-storing module of a real-time animation display device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of functional modules of a display module of a real-time animation display device according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram of interaction between the server 200 and the electronic terminal 100 according to an embodiment of the present disclosure.
  • the server 200 is in communication with one or more electronic terminals over a network for data communication or interaction.
  • the server 200 can be a web server, a database server, or the like.
  • the electronic terminal 100 can be a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), or the like.
  • PC personal computer
  • PDA personal digital assistant
  • an application such as a browser or other APP, that can display a dynamic image is installed in the electronic terminal 100.
  • the electronic terminal 100 activates an interface with a dynamic screen, the electronic terminal 100 acquires a picture required for the dynamic picture from the server 200 for dynamic display.
  • FIG. 2 shows a block schematic diagram of the electronic terminal 100.
  • the electronic terminal includes a real-time animation display device 110, a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input and output unit 115, and a display unit 116.
  • the structure shown in FIG. 2 is merely illustrative and does not limit the structure of the electronic terminal 100.
  • the electronic terminal 100 may also include more or less components than those shown in FIG. 2, or have a different configuration than that shown in FIG. 2.
  • the components of the memory 111, the memory controller 112, the processor 113, the peripheral interface 114, the input and output unit 115, and the display unit 116 are electrically connected directly or indirectly to each other to implement data transmission or interaction.
  • the components can be electrically connected to one another via one or more communication buses or signal lines.
  • the real-time animation display device 110 includes at least one software function module that can be stored in the memory 111 or solidified in an operating system (OS) of the electronic terminal 100 in the form of software or firmware.
  • the processor 113 is configured to execute an executable module stored in a memory, such as a software function module or a computer program included in the real-time animation display device 110.
  • the memory 111 can be, but not limited to, a random access memory (RAM), a read only memory (ROM), and a programmable read-only memory (PROM). Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), and the like.
  • the memory 111 is configured to store a program, and the processor 113 executes the program after receiving the execution instruction.
  • the method executed by the electronic terminal 100 defined by the process disclosed in any embodiment of the present disclosure may be applied to the processing. In the device 113, or implemented by the processor 113.
  • the processor 113 may be an integrated circuit chip with signal processing capabilities.
  • the processor 113 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP processor, etc.), or a digital signal processor (DSP), an application specific integrated circuit. (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
  • CPU central processing unit
  • NP processor network processor
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA Field Programmable Gate Array
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • peripheral interface 114 couples various input/input devices to the processor 113 and the memory 111.
  • peripheral interface 114, processor 113, and memory controller 112 can be implemented in a single chip. In other instances, they can be implemented by separate chips.
  • the input and output unit 115 is configured to provide input data to a user.
  • the input and output unit 115 may be, but not limited to, a mouse, a keyboard, and the like.
  • the audio unit provides an audio interface to the user, which may include one or more microphones, one or more speakers, and audio circuitry.
  • the display unit 116 provides an interactive interface (such as a user operation interface) between the electronic terminal 100 and the user or for displaying image data to the user for reference.
  • the display unit may be a liquid crystal display or a touch display.
  • a touch display it can be a capacitive touch screen or a resistive touch screen that supports single-point and multi-touch operations. Supporting single-point and multi-touch operations means that the touch display can sense the simultaneous touch operation from one or more positions on the touch display, and the touch operation is performed by the processor. Calculation and processing.
  • FIG. 3 is a flowchart of a real-time animation display method applied to the electronic terminal 100 shown in FIG. 2 according to an embodiment of the present disclosure. The specific flow shown in FIG. 3 will be described in detail below.
  • step S101 when an interface is started, a picture link of a link array formed by a plurality of pictures corresponding to the dynamic picture to be displayed in the current interface is acquired.
  • the interface may be an interface of an application or an interface launched in a browser.
  • the electronic terminal 100 launches an application, and the display interface of the application includes a dynamic picture.
  • the image terminal of the plurality of pictures corresponding to the dynamic picture is stored in the electronic terminal, where the picture link is a download address of the picture, such as a URL (Uniform Resource Locator) address.
  • the picture links of the plurality of pictures are stored in a display array in the order in which they are displayed, and the link arrays may be stored at designated locations of the electronic terminal 100.
  • the electronic terminal 100 acquires the linked array from a specified location of the electronic terminal when the application is launched.
  • Step S102 Send a picture download request to the server according to the acquired picture link.
  • the electronic terminal 100 sequentially sends a download request to the server according to the image link in the link array.
  • the electronic terminal 100 may sequentially send, to the server 200, a plurality of picture download requests according to the sequence of the picture links of the plurality of pictures in the link array, where the plurality of picture download requests are respectively used for downloading Said multiple pictures.
  • the linked array can be represented by a urlArray.
  • the above transmission process can be implemented using a for loop.
  • the electronic terminal 100 defines a for loop for sending a download request.
  • the number of for loops is the number of elements in the link array urlArray.
  • the image link imageUrl corresponding to the order of the current loop index may be defined as: when the loop index corresponds to the nth loop, the corresponding image link is also located in the nth bit in the urlArray.
  • the electronic terminal 100 cyclically sends a download request to the server 200, and does not need to wait for the previous download to complete, and then sends the subsequent image download request. That is, the electronic terminal 100 asynchronously downloads the plurality of pictures from the server 200, which is equivalent to downloading the plurality of pictures at one time, greatly saving the download time, so that the animation display can be started very quickly.
  • each time the picture download request is independent of each other each time the picture download is performed separately by establishing an independent picture download management class.
  • a picture management class is created in the electronic terminal 100, and a single instance method and a picture download method are defined in the picture management class.
  • the electronic terminal 100 obtains a picture management object of the picture management class by calling the singleton method of the picture management class; and calling a picture download method of the picture management object to send a download request to the server to download the The image corresponding to the image link.
  • the singleton method refers to a class in which the picture management class including the singleton method is a single class that is created only once.
  • the process of downloading the picture by the electronic terminal may be described as follows: creating a picture management class ImageManager through an electronic terminal, and defining a singleton method in the picture management class to make the created picture management class be a separate one and A class that can only be created once.
  • the electronic terminal After obtaining the picture management object by the singleton method of the image management class ImageManager, the electronic terminal calls the defined image downloading method: downloadImageWithURL, and the image downloading method has a parameter and a callback after the function is executed.
  • one parameter included in the picture downloading method is a picture download address.
  • the callback after the function is completed may include a picture.
  • Step S103 Receive a plurality of pictures corresponding to the download request, and store the downloaded multiple pictures in the picture dictionary.
  • a graph dictionary imageDic for storing a downloaded image may be created in advance in the electronic terminal 100, wherein the graph dictionary imageDic is a dictionary object of a variable dictionary type, and may be created by creating a dictionary function dictionaryWithCapacity, The number of elements included in the graph dictionary imageDic is not less than the number of image links in the linked array.
  • the order in which the plurality of pictures are downloaded in the picture dictionary imageDic to obtain the plurality of pictures is consistent.
  • the order in which the plurality of pictures in the picture dictionary imageDic are stored may be different from the order in which the pictures of the plurality of pictures stored in the link array are linked, such that the plurality of pictures in the picture dictionary imageDic
  • the order in which the pictures are stored is not the order in which the plurality of pictures are displayed.
  • Step S104 generating an image array for storing the downloaded plurality of pictures.
  • step S104 may be performed after step S103, or may be performed after step S101, and may also be performed before step S101. It can be understood that step S104 is only required to be generated before use.
  • the number of elements in the picture array may be the same as the number of picture links included in the link array, or may be larger than the number of picture links in the link array.
  • Step S105 Acquire a picture in the graph dictionary according to an order corresponding to the link array, and store the image in the image array.
  • the electronic terminal 100 acquires the pictures in the picture dictionary according to the order of the picture links in the link array, and stores the pictures in the picture array in the order of acquiring the pictures to implement the ordering of the pictures. .
  • Step S106 Dynamically displaying a plurality of pictures in the image array in the current interface to form an animation effect.
  • the step S104 may be performed after step S103. As shown in FIG. 4, the step S104 may include: step S1041 and step S1042.
  • step S1041 each time the picture is successfully downloaded and stored in the picture dictionary, the preset counter is incremented by one.
  • Step S1042 When the increment of the value of the counter is the number of elements of the link array, an image array having the same number of the linked arrays is generated.
  • a counter count for counting is pre-stored in the electronic terminal 100, wherein the counter count may be a global variable.
  • the counter count can be marked with a code block type, and the variable can be modified in the code block only by using the code block type flag.
  • the image download method has a parameter and a callback after the function has been executed.
  • the parameter is a download link of an image.
  • the download link is an object of type NSUrl, and needs to be constructed as an object of type NSUrl by using an image link imageUrl string.
  • the method of constructing an object is to use the constructor function URLWithString.
  • the function needs a function return value.
  • the return value of the function is a code block.
  • the code block contains two pieces of information. The first information is the image of the downloaded UIImage type. Image, the second parameter is the error object of type NSError. After downloading the picture through url, the downloaded picture first determines whether the downloaded picture exists.
  • the downloaded picture is stored in the image dictionary imageDic.
  • the key value key stored in the graph dictionary imageDic may be a picture link imageUrl, and the value storing the large picture dictionary is a successfully downloaded picture image, each time after storing the downloaded picture to the picture dictionary, The counter count is incremented by 1. When the number of count increments is equal to the number of linked array urlArrays, a variable array image array is created. In one embodiment, the number of elements of the image array imageArray may be the same as the number of elements of the linked array urlArray.
  • the step S103 includes: when storing the downloaded multiple pictures to the picture dictionary, storing each picture in a key-value pair of each picture according to the order corresponding to the picture links in the link array.
  • the key of the key-value pair is a picture link
  • the value of the key-value pair is the picture corresponding to the picture link.
  • the step S105 may include step S1051 and step S1052.
  • Step S1051 Acquire a corresponding key value according to the sequence corresponding to the link array, and obtain a corresponding picture according to the key value.
  • the key value may be a picture link of the corresponding picture, and the picture link is used as a key to search for a value corresponding to the key in the picture dictionary, and the found value is used as a picture corresponding to the picture link.
  • the key may also be an identifier that is sorted according to the linked array.
  • the key value may be a numerical identifier such as 1, 2, or 3, or may be a letter identifier or the like.
  • Step S1052 storing the found picture in the picture array.
  • Step S1051 and step S1052 are executed cyclically until all the corresponding pictures in the link array are stored in the picture array.
  • the image array can be represented by an imageArray.
  • the steps included in step S105 may be performed by a for loop.
  • a for loop In the link array urlArray, including a plurality of urlimages arranged in order, a for loop can be defined, and the number of loops of the for loop is the same as the number of urlimages included in the urlArray.
  • the picture corresponding to the address is downloaded, and the picture is stored in the same element in the picture array corresponding to the order of the loop.
  • the value of the key-value pair is the picture corresponding to urlimage1, and the picture is stored in image1.
  • the key value pair with the key urlimage2 is looked up in the image dictionary imageArray.
  • the value of the key value pair is the picture corresponding to urlimage2, and the picture is stored in image2.
  • the key dictionary pair with the key urlimage3 is searched in the graph dictionary.
  • the value of the key value pair is the image corresponding to urlimage3, and the image is stored in image3.
  • the order of urlimage1 in urlArray, the loop with loop index 0, and the order of image1 in imageArray are the same, all ranked first; the order of urlimage2 in urlArray, loop with loop index of 1, and image2 The order of the imageArray is the same, and both are ranked second; the order of urlimage3 in urlArray, the loop with loop index of 2, and the order of image3 in imageArray are the same, all ranked third.
  • the step S106 includes step S1061, step S1062, and step S1063.
  • Step S1061 Load multiple images in the image array onto the animation view frame of the current interface.
  • the animation view box may be a view component on the interface to be displayed of the electronic terminal 100.
  • Step S1062 setting display parameters of each picture.
  • the display parameters may include a display position, a display duration, a display size, and the like.
  • the display duration of a picture is the duration of the picture being presented on the view component.
  • the display duration may be set by a setAnimationDuration() function.
  • Step S1063 dynamically displaying a plurality of pictures in the picture array in the animation view box of the current interface according to display parameters of each picture by an animation start function to form an animation effect.
  • the animation start function may be animationActionMain().
  • the pictures in the picture array may also be animated for display in the current interface.
  • the real-time animation display method provided by the embodiment of the present disclosure can obtain the picture corresponding to the dynamic picture in real time from the server for display when the dynamic picture needs to be displayed, thereby avoiding installing a fixed version in the electronic terminal to form a local dynamic picture. This will result in the inability to display the latest dynamic images provided by the server in real time.
  • the size of the installation package of the application in which the dynamic picture is installed can be reduced.
  • the electronic terminal does not need to download the installation package of the application to update, and can display a new dynamic picture.
  • the downloaded pictures are re-stored for sorting, so that the electronic terminal can initiate the download request to the server and the download speed does not need to consider the order of the picture links in the link array to improve the download speed.
  • FIG. 7 is still another flowchart of the real-time animation display method provided by the embodiment of the present application.
  • the real-time animation display method can be applied to the electronic terminal 100 shown in FIG. 2 .
  • the real-time animation display method includes the following steps:
  • step S701 when the electronic terminal 100 starts an interface, the download address of the plurality of pictures corresponding to the dynamic picture to be displayed in the current interface is acquired from the designated position of the electronic terminal.
  • the download address may be the above URL address, and the download address of the multiple pictures may be stored in the urlArray array.
  • Step S702 Send a plurality of picture download requests corresponding to the plurality of pictures to the server 200 in sequence according to the storage order of the download addresses of the plurality of pictures in the specified position.
  • step S702 may include the following sub-steps:
  • a download address of a picture is obtained, a single instance method in the picture management class is called to obtain a picture management object, the download address of the picture is transmitted to the picture download method of the picture management object, and the picture download method is invoked to A picture download request for downloading the picture is sent to the server 200.
  • the plurality of pictures can be downloaded asynchronously, and the download speed is improved.
  • the picture downloading method of the picture management object has a function return value.
  • the real-time animation display method may further include the following steps:
  • step S702 is similar to the detailed implementation of step S102 shown in FIG. 3, and reference may be made to the detailed description of step S102 shown in FIG. 3 in the above content.
  • Step S703 When obtaining a picture corresponding to any picture download request, the picture and the download address of the picture are associated and stored in the picture dictionary.
  • the key value pair may be stored in the graph dictionary by using the download address of the picture as a key and using the picture as a value.
  • Step S704 when the plurality of pictures are all stored in the picture dictionary, the plurality of pictures in the picture dictionary are arranged in the order in which the download addresses of the plurality of pictures are stored in the specified position, and are obtained. The sequence of pictures shown.
  • the plurality of pictures are asynchronously downloaded, it is undefined when each picture is downloaded, and the plurality of pictures are sequentially stored in the picture dictionary according to the order in which the download is completed. Therefore, the order in which the plurality of pictures are stored in the map dictionary is generally different from the actual display order of the plurality of pictures, and therefore, the plurality of pictures stored in the picture dictionary need to be re-executed
  • the sorting can be specifically implemented by the above step S704.
  • a counter with an initial value being a preset value may be set in the electronic terminal 100, and the counter may be a global variable.
  • the real-time animation display method provided by this embodiment may include the following steps:
  • the current value of the counter is updated to be the sum of the current value of the counter and 1;
  • the preset value may be 0, so that when the value of the counter is the same as the number of download addresses stored in the specified location, it may be determined that the multiple pictures are stored in the In the graph dictionary.
  • the electronic terminal 100 includes an image array, and the number of elements included in the image array is not less than the number of download addresses stored in the specified location.
  • the step S704 may include the following sub-steps:
  • step S704 is similar to the step S105 shown in FIG. 3 .
  • step S105 shown in FIG. 3 refers to the detailed description of step S105 shown in FIG. 3 .
  • Step S705 sequentially displaying the pictures in the sequence of pictures to be displayed to form an animation effect.
  • step S705 is similar to the detailed implementation of the step S106 shown in FIG. 3 .
  • step S106 shown in FIG. 3 For details, refer to the detailed description of the step S106 shown in FIG. 3 .
  • FIG. 8 is a functional block diagram of a real-time animation display device 110 according to an embodiment of the present disclosure.
  • the real-time animation display device 110 includes an acquisition module 801, a transmission module 802, a storage module 803, a sorting module 804, and a display module 805.
  • the obtaining module 801 is configured to acquire, when the electronic terminal starts an interface, the download address of the plurality of pictures corresponding to the dynamic picture that needs to be displayed in the current interface from the designated position of the electronic terminal.
  • the step S701 shown in FIG. 7 in the above content may be referred to, that is, the step S701 may be performed by the obtaining module 801.
  • the sending module 802 is configured to sequentially send, to the server, a plurality of picture download requests respectively corresponding to the plurality of pictures according to a storage order of the download addresses of the plurality of pictures in the specified location.
  • step S702 can be performed by the sending module 802.
  • the storage module 803 is configured to associate and store the picture and the download address of the picture into the picture dictionary when the picture corresponding to any picture download request is obtained.
  • step S703 can be performed by the storage module 803.
  • the sorting module 804 is configured to arrange a plurality of pictures in the picture dictionary according to a storage address of the plurality of pictures in a storage order of the specified position when the plurality of pictures are stored in the picture dictionary, Get the sequence of pictures to be displayed.
  • step S704 can be performed by the sorting module 804.
  • the display module 805 is configured to sequentially display the pictures in the sequence of pictures to be displayed to form an animation effect.
  • the description about the display module 805 can be specifically referred to the detailed description of the step S705 shown in FIG. 7, that is, the step S705 can be performed by the display module 805.
  • FIG. 9 is a functional block diagram of the real-time animation display device 110 illustrated in FIG. 2 according to an embodiment of the present disclosure.
  • the various modules and units in the real-time animation display device 110 of the present embodiment are configured to perform the various steps in the above method embodiments.
  • the real-time animation display device 110 includes the acquisition module 1101, the transmission module 1102, the storage module 1103, the generation module 1104, the re-storage module 1105, and the display module 1106.
  • the acquiring module 1101 is configured to acquire a picture link of a link array formed by a plurality of pictures corresponding to the dynamic picture to be displayed in the current interface when the interface is started.
  • the sending module 1102 is configured to send a picture download request to the server according to the acquired picture link.
  • the storage module 1103 is configured to receive a plurality of pictures corresponding to the download request, and store the downloaded multiple pictures in a graph dictionary.
  • the generating module 1104 is configured to generate a picture array for storing the downloaded plurality of pictures.
  • the re-storage module 1105 is configured to acquire the pictures in the graph dictionary in the order corresponding to the link array, and store the images in the image array.
  • the display module 1106 is configured to dynamically display a plurality of pictures in the image array in the current interface to form an animation effect.
  • the storage module 1103 is further configured to store the downloaded multiple pictures into the graph dictionary, and store each picture in a key sequence corresponding to the picture links in the link array.
  • the re-storage module 1105 includes: a picture obtaining unit 11051 and a picture storage unit 11052.
  • the picture obtaining unit 11051 is configured to acquire a corresponding key value according to the sequence corresponding to the link array, and obtain a corresponding picture according to the key value.
  • the picture storage unit 11052 is configured to store the acquired picture in the picture array.
  • the display module 1106 includes a loading unit 11061, a setting unit 11062, and a display unit 11063.
  • the loading unit 11061 is configured to load a plurality of pictures in the picture array onto an animated view frame of the current interface.
  • the setting unit 11062 is configured to set display parameters of each picture.
  • the display unit 11063 is configured to dynamically display a plurality of pictures in the picture array in the animation view box of the current interface according to display parameters of each picture by an animation start function to form an animation effect.
  • the sending module 1102 includes a creating unit, an obtaining unit, and a request sending unit.
  • the creating unit is configured to create a picture management class, and the single picture method and the picture downloading method are defined in the picture management class.
  • the obtaining unit is configured to obtain a picture management object of the picture management class by using the singleton method.
  • the request sending unit is configured to invoke a picture downloading method of the picture management object to send a download request to the server to download a picture corresponding to the picture link.
  • the generating module 1104 may include: a counting unit and an array generating unit.
  • the counting unit is configured to increment the preset counter by one after each successful download of the picture and storage into the picture dictionary.
  • the array generating unit is configured to generate an image array having the same number of the number of linked arrays when the increment of the value of the counter is the number of elements of the linked array.
  • the real-time animation display device can acquire the picture corresponding to the dynamic picture in real time from the server for display when the dynamic picture needs to be displayed, thereby avoiding installing a fixed version in the electronic terminal to form a local dynamic picture. This will result in the inability to display the latest dynamic images provided by the server in real time.
  • the size of the installation package of the application in which the dynamic picture is installed can be reduced.
  • the electronic terminal does not need to download the installation package of the application to update, and can display a new dynamic picture.
  • the downloaded pictures are re-stored for sorting, so that the electronic terminal can initiate the download request to the server and the download speed does not need to consider the order of the picture links in the link array to improve the download speed.
  • An embodiment of the present disclosure provides a readable storage medium having stored thereon a computer program that, when executed, implements the real-time animation display method provided by the above embodiments.
  • Embodiments of the present disclosure also provide an electronic terminal including a processor and a machine readable storage medium having stored thereon machine executable instructions that, when executed, implement the present disclosure
  • the real-time animation display method shown in Fig. 7 is shown.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in various embodiments of the present disclosure may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • a computer readable storage medium including: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like.
  • the real-time animation display method, the device, the electronic terminal and the readable storage medium provided by the disclosure avoid the installation of a fixed version in the electronic terminal to form a local dynamic picture, and the real-time display of the latest dynamic picture provided by the server cannot be displayed, and the installation can be reduced.
  • the size of the installation package of the application where the dynamic screen is located, and the download speed is improved by asynchronous downloading.

Landscapes

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

Abstract

本公开实施例提供一种实时动画显示方法、装置、电子终端及可读存储介质。所述实时动画显示方法包括:在启动一界面时,获取当前界面中需要显示的动态画面对应的多张图片形成的链接数组的图片链接;根据获取的图片链接向服务器发送图片下载请求;接收所述下载请求对应的多张图片,并将下载的多张图片分别存储到图字典中;生成用于存储下载的多张图片的图片数组;按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中;以及在当前界面中对所述图片数组中的多张图片进行动态显示,形成动画效果。

Description

实时动画显示方法、装置、电子终端及可读存储介质
相关申请的交叉引用
本申请要求于2017年12月11日提交中国专利局的申请号为2017113106277,名称为“实时动画显示方法、装置、电子终端及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及计算机技术领域,具体而言,涉及一种实时动画显示方法、装置、电子终端及可读存储介质。
背景技术
随着计算机技术的发展,电子终端中的应用程序也得到了快速发展,使应用程序的功能越来越多,其中包括在应用程序中显示动态画面。现有技术中,一般是从服务器下载对应的应用程序安装包,安装包中包括了需要在应用程序中动态显示的动态画面对应的图片,安装该应用程序后,可以在该应用程序中显示动态画面,当在应用程序中的动态画面需要更新时,所述电子终端需要从服务器中下载更新的安装包以更新所述动态画面。然而,对用户来说,可能并不会实时对应用程序进行更新,这样就会导致当服务器对应应用程序中的动态画面进行更新后,电子终端无法显示最新的动态画面。另外,通过安装包将所有的动态画面下载到电子终端本地的方式,会占用较大存储空间。
发明内容
有鉴于此,本公开实施例的目的包括提供一种实时动画显示方法、装置、电子终端及可读存储介质。
第一方面,本公开实施例提供的一种实时动画显示方法,所述实时动画显示方法包括:
在启动一界面时,获取当前界面中需要显示的动态画面对应的多张图片形成的链接数组的图片链接;
根据获取的图片链接向服务器发送图片下载请求;
接收所述下载请求对应的多张图片,并将下载的多张图片分别存储到图字典中;
生成用于存储下载的多张图片的图片数组;
按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中;以及
在当前界面中对所述图片数组中的多张图片进行动态显示,形成动画效果。
第二方面,本公开实施例还提供一种实时动画显示方法,应用于电子终端,所述方法包括:
当在所述电子终端启动一界面时,从所述电子终端的指定位置获取当前界面中需要显示的动态画面所对应的多张图片的下载地址;
按照所述多张图片的下载地址在所述指定位置的存储顺序,依次向所述服务器发送与所述多张图片 分别对应的多个图片下载请求;
当获得任一图片下载请求对应的图片时,将该图片及该图片的下载地址关联并存储到图字典中;
当所述多张图片均被存储到所述图字典中时,将所述图字典中的多张图片按照该多张图片的下载地址在所述指定位置的存储顺序排列,得到待显示的图片序列;
依次显示所述待显示的图片序列中的图片,形成动画效果。
第三方面,本公开实施例还提供一种实时动画显示装置,应用于电子终端,所述装置包括:
获取模块,配置成当在所述电子终端启动一界面时,从所述电子终端的指定位置获取当前界面中需要显示的动态画面所对应的多张图片的下载地址;
发送模块,配置成按照所述多张图片的下载地址在所述指定位置的存储顺序,依次向所述服务器发送与所述多张图片分别对应的多个图片下载请求;
存储模块,配置成当获得任一图片下载请求对应的图片时,将该图片及该图片的下载地址关联并存储到图字典中;
排序模块,配置成当所述多张图片均被存储到所述图字典中时,将所述图字典中的多张图片按照该多张图片的下载地址在所述指定位置的存储顺序排列,得到待显示的图片序列;
显示模块,配置成依次显示所述待显示的图片序列中的图片,形成动画效果。
第四方面,本公开实施例还提供一种实时动画显示装置,所述实时动画显示装置包括:
获取模块,配置成在启动一界面时,获取当前界面中需要显示的动态画面对应的多张图片形成的链接数组的图片链接;
发送模块,配置成根据获取的图片链接向服务器发送图片下载请求;
存储模块,配置成接收所述下载请求对应的多张图片,并将下载的多张图片分别存储到图字典中;
生成模块,配置成生成用于存储下载的多张图片的图片数组;
重存模块,配置成按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中;以及
显示模块,配置成在当前界面中对所述图片数组中的多张图片进行动态显示,形成动画效果。
第五方面,本公开实施例还提供一种电子终端,包括:
存储器;
处理器;
本公开实施例第四方面提供的实时动画显示装置,该实时动画显示装置存储于所述存储器并由所述处理器控制执行。
第五方面,本公开实施例还提供一种电子终端,包括处理器及机器可读存储介质,所述机器可读存储介质上存储有机器可执行指令,所述机器可执行指令被所述处理器执行时实现本公开实时第二方面提 供的实时动画显示方法。
第六方面,本公开实施例还提供一种可读存储介质,其上存储有计算机程序,所述计算机程序在执行时实现上述的实时动画显示方法。
与现有技术相比,本公开实施例提供的实时动画显示方法、装置、电子终端及可读存储介质,可在需要显示的动态画面时,再从服务器实时地获取所述动态画面对应的图片进行显示,避免了在电子终端中安装固定版本形成本地动态画面而导致不能够实时显示服务器提供的最新动态画面。
另外,通过需要显示动态画面时再从所述服务器中获取图片,可以减少在安装所述动态画面所在的应用程序的安装包的大小。此外,在所述服务器对动态画面有更新时,所述电子终端也不需要再下载所述应用程序的安装包进行更新就能够显示新的动态画面。进一步地,将下载的图片再进行重新存储以排序,可以使电子终端在向服务器发起下载请求及下载速度不需要考虑链接数组中的图片链接的次序,以提高下载速度。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1为本公开实施例提供的服务器与电子终端进行交互的示意图。
图2为本公开实施例提供的电子终端的方框示意图。
图3为本公开实施例提供的实时动画显示方法的一种流程图。
图4为本公开实施例提供的实时动画显示方法的步骤S104的详细流程图。
图5为本公开实施例提供的实时动画显示方法的步骤S105的详细流程图。
图6为本公开实施例提供的实时动画显示方法的步骤S106的详细流程图。
图7为本公开实施例提供的实时动画显示方法的又一种流程图。
图8为本公开实时提供的实时动画显示装置的一种功能模块框图。
图9本公开实施例提供的实时动画显示装置的又一种功能模块示意图。
图10为本公开实施例提供的实时动画显示装置的重存模块的功能模块示意图。
图11为本公开实施例提供的实时动画显示装置的显示模块的功能模块示意图。
具体实施方式
下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公 开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本公开的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
如图1所示,是本公开实施例提供的服务器200与电子终端100进行交互的示意图。所述服务器200通过网络与一个或多个电子终端进行通信连接,以进行数据通信或交互。所述服务器200可以是网络服务器、数据库服务器等。所述电子终端100可以是个人电脑(personal computer,PC)、平板电脑、智能手机、个人数字助理(personal digital assistant,PDA)等。
本实施例中,所述电子终端100中安装有可以显示动态图像的应用程序(Application,APP),如浏览器或者其他APP。在一种实施方式中,所述电子终端100在启动有动态画面的界面时,从所述服务器200中获取该动态画面所需图片进行动态显示。
图2示出了电子终端100的方框示意图。所述电子终端包括实时动画显示装置110、存储器111、存储控制器112、处理器113、外设接口114、输入输出单元115、显示单元116。图2所示的结构仅为示意,其并不对电子终端100的结构造成限定。例如,电子终端100还可包括比图2中所示更多或者更少的组件,或者具有与图2所示不同的配置。
所述存储器111、存储控制器112、处理器113、外设接口114、输入输出单元115及显示单元116各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。所述实时动画显示装置110包括至少一个可以软件或固件(firmware)的形式存储于所述存储器111中或固化在所述电子终端100的操作系统(Operating System,OS)中的软件功能模块。所述处理器113配置成执行存储器中存储的可执行模块,例如所述实时动画显示装置110包括的软件功能模块或计算机程序。
其中,所述存储器111可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,存储器111配置成存储程序,所述处理器113在接收到执行指令后,执行所述程序,本公开实施例任一实施例揭示的过程定义的电子终端100所执行的方法可以应用于处理器113中,或者由处理器113实现。
所述处理器113可能是一种集成电路芯片,具有信号的处理能力。上述的处理器113可以是通用处 理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本公开实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述外设接口114将各种输入/输入装置耦合至处理器113以及存储器111。在一些实施例中,外设接口114,处理器113以及存储控制器112可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片实现。
所述输入输出单元115配置成提供给用户输入数据。所述输入输出单元115可以是,但不限于,鼠标和键盘等。音频单元向用户提供音频接口,其可包括一个或多个麦克风、一个或者多个扬声器以及音频电路。
所述显示单元116在所述电子终端100与用户之间提供一个交互界面(例如用户操作界面)或用于显示图像数据给用户参考。在本实施例中,所述显示单元可以是液晶显示器或触控显示器。若为触控显示器,其可为支持单点和多点触控操作的电容式触控屏或电阻式触控屏等。支持单点和多点触控操作是指触控显示器能感应到来自该触控显示器上一个或多个位置处同时产生的触控操作,并将该感应到的触控操作交由处理器进行计算和处理。
请参阅图3,是本公开实施例提供的应用于图2所示的电子终端100的实时动画显示方法的一种流程图。下面将对图3所示的具体流程进行详细阐述。
步骤S101,在启动一界面时,获取当前界面中需要显示的动态画面对应的多张图片形成的链接数组的图片链接。
所述界面可以是应用程序的一界面,也可以是在浏览器中启动的某一界面。
在一种实施方式中,所述电子终端100启动一应用程序,所述应用程序的显示界面中包括有动态画面。所述电子终端中存储有所述动态画面对应的多张图片的图片链接,其中,所述图片链接即为图片的下载地址,如URL(Uniform Resource Locator,统一资源定位符)地址。所述多张图片的图片链接按其显示顺序存储在一链接数组中,所述链接数组可以存储在所述电子终端100的指定位置。在一个实例中,所述电子终端100启动所述应用程序时从电子终端的指定位置获取所述链接数组。
步骤S102,根据获取的图片链接向服务器发送图片下载请求。
本实施例中,所述电子终端100依次根据所述链接数组中的图片链接向所述服务器发送下载请求。可选地,电子终端100可以按照所述多张图片的图片链接在所述链接数组中的顺序依次向所述服务器200发送多个图片下载请求,所述多个图片下载请求分别用于下载所述多张图片。
在一个实例中,所述链接数组可以以urlArray表示。
在一个实例中,上述发送过程可以采用for循环实现。详细地,所述电子终端100中定义一个用于 发送下载请求的for循环,for循环的次数是链接数组urlArray中的元素的个数,for循环的每一次执行下述操作:a.获取for循环的循环索引,通过循环索引从链接数组urlArray数组中获得下载图片的图片链接imageUrl,即在所述链接数组urlArray中确定与当前的循环索引的顺序对应相同的图片链接imageUrl,并获取该图片链接imageUrl;b.根据所述图片链接imageUrl向服务器发送下载请求。
其中,与当前的循环索引的顺序对应相同的图片链接imageUrl可以限定为:当循环索引对应的是第n次循环时,其对应的图片链接在urlArray中也位于第n位。
本实施例中,所述电子终端100循环向所述服务器200发送下载请求,不需要等待前一次下载完成后,再发送后面一次的图片下载请求。即,电子终端100是从服务器200异步地下载所述多张图片,相当于一次性地下载所述多张图片,大大地节约了下载时间,从而可以非常快速地开始动画显示。
本实施例中,每次的图片下载请求相互独立,每次图片下载均通过建立独立的图片下载管理类单独执行下载动作。
本实施例中,所述电子终端100中创建有图片管理类,所述图片管理类中定义有单例方法和图片下载方法。实施时,电子终端100通过调用该图片管理类的所述单例方法获得该图片管理类的图片管理对象;调用所述图片管理对象的图片下载方法向所述服务器发送下载请求,以下载所述图片链接对应的图片。所述单例方法是指包括该单例方法的图片管理类是一个单独的并且只被创建一次对象的类。
详细地,所述电子终端下载所述图片的过程可以描述如下:通过电子终端创建一个图片管理类ImageManager,该图片管理类中定义有一个单例方法以使创建的图片管理类是一个单独的并且只能够被创建一次对象的类。所述电子终端通过图片管理类ImageManager的单例方法获得图片管理对象之后,调用定义的图片下载方法:downloadImageWithURL,该图片下载方法有一个参数和一个函数执行完毕之后的回调。本实施方式中,所述图片下载方法所包含的一个参数为图片下载地址。本实施例中,所述函数执行完毕之后的回调中可包含有图片。
步骤S103,接收所述下载请求对应的多张图片,并将下载的多张图片分别存储到图字典中。
本实施例中,所述电子终端100中可以预先创建有用于存储下载图片的图字典imageDic,其中,所述图字典imageDic为可变字典类型的字典对象,具体可以通过创建字典函数dictionaryWithCapacity创建,该图字典imageDic包括的元素的数量不小于所述链接数组中的图片链接的数量。本实施例中,由于本实施例中所述多张图片是异步下载得到的,而所述多张图片在所述图字典imageDic中的存储顺序下载得到所述多张图片的顺序是一致的,也即所述图字典imageDic中的所述多张图片的存储顺序与所述链接数组存储的所述多张图片的图片链接的顺序可能不同,从而使得所述图字典imageDic中的所述多张图片的存储顺序并非是所述多张图片的显示顺序。
步骤S104,生成用于存储下载的多张图片的图片数组。
本实施例中,所述步骤S104可以在步骤S103之后执行,也可以在步骤S101之后执行,还可以在 步骤S101之前执行。可以理解的是,步骤S104只要在使用之前被生成就行。
本实施例中,所述图片数组中的元素的个数与所述链接数组中包括的图片链接的个数可以相同,也可以比所述链接数组中的图片链接的个数多。
步骤S105,按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中。
本实施例中,所述电子终端100按照所述链接数组中图片链接的排列顺序获取所述图字典中的图片,将图片按照获取图片的顺序存储在所述图片数组中,以实现图片的排序。
步骤S106,在当前界面中对所述图片数组中的多张图片进行动态显示,形成动画效果。
本实施例中,所述步骤S104可以在步骤S103之后执行。如图4所示,所述步骤S104可以包括:步骤S1041及步骤S1042。
步骤S1041,每次成功下载图片并存储到所述图字典中后,将预设的计数器加一。
步骤S1042,当所述计数器的值的增量为所述链接数组的元素个数时,生成与所述链接数组数量相同的图片数组。
在一个实例中,所述电子终端100中预先存储有用于计数的计数器count,其中所述计数器count可以是一个全局变量。本实施例中,可以将所述计数器count使用代码块类型标记,只有使用代码块类型标记才可以在代码块中修改这个变量。
在一个实例中,通过调用图片下载方法:downloadImageWithURL,该图片下载方法有一个参数和一个函数执行完毕之后的回调。所述参数是一个图片的下载链接,这个下载链接是一个NSUrl类型的对象,需要使用图片链接imageUrl字符串构造为一个NSUrl类型的对象。本实例中,构造对象的方法是使用构造对象函数URLWithString,该函数需要一个函数返回值,该函数返回值是一个代码块这个代码块包含两个信息,第一信息是下载成功的图像UIImage类型的image,第二个参数是NSError类型的error对象,每一次通过url去下载图片之后,拿到下载的图片首先判断下载的图片是否存在,如果存在将下载的图片存储到图字典imageDic中。在一种实施方式中,存储到图字典imageDic中的键值key是可以是图片链接imageUrl,存储大图片字典的value是下载成功的图片image,每一次为将下载的图片存储至图字典之后将计数器count增加1,当count增加的数量和链接数组urlArray的个数相等时,创建一个可变数组图片数组。在一种实施方式中,图片数组imageArray的元素个数可以与所述链接数组urlArray的元素数量相同。
本实施例中,所述步骤S103包括:将下载的多张图片存储到图字典时,将每张图片按照链接数组中图片链接对应的顺序存储每张图片的键值(key-value)对,该键值对的键(key)为图片链接,该键值对的值(value)为该图片链接对应的图片。
本实施例中,如图5所示,所述步骤S105可包括步骤S1051和步骤S1052。
步骤S1051,按照所述链接数组对应的顺序获取对应的键值,根据该键值获取对应的图片。
本实施例中,所述键值可以为对应图片的图片链接,以该图片链接为键在所述图字典中查找与该键对应的值,将查找到的值作为与该图片链接对应的图片;所述键还可以是按照所述链接数组对应的排序的标识。例如,所述键值可以是1、2、3等数值标识,也可以是字母标识等。
步骤S1052,将查找到的图片存储在所述图片数组中。
循环执行步骤S1051和步骤S1052直到所述链接数组中对应的图片全部存储至所述图片数组中。
本实施例中,所述图片数组可以用imageArray表示。
在一种实施方式中,可通过一个for循环执行步骤S105所包括的步骤。具体描述如下:在链接数组urlArray中包括顺序排列的多个urlimage,可以定义一for循环,该for循环的循环次数与urlArray中包括urlimage的数量相同。在该for循环的每一次循环中,确定与该次循环的顺序对应相同的下载地址,以该下载地址为键在所述图字典imageDic中获取与该键对应的值,获得的值即为该下载地址对应的图片,并将该图片存储到所述图片数组中与该次循环的顺序对应相同的元素中。
例如,链接数组urlArray中依次存储有urlimage1、urlimage2和urlimage3,对应有for循环for(i=0;i<3;i++),图片数组imageArray中包括image1、image2和image3三个元素,则当i=0(循环索引为0)时,在图字典imageArray中查找键为urlimage1的键值对,该键值对的值即为urlimage1对应的图片,将该图片存放至image1中。当i=1(循环索引为1)时,在图字典imageArray中查找键为urlimage2的键值对,该键值对的值即为urlimage2对应的图片,将该图片存放至image2中。当i=2(循环索引为2)时,在图字典中查找键为urlimage3的键值对,该键值对的值即为与urlimage3对应的图片,将该图片存放至image3中。
其中,urlimage1在urlArray中的顺序、循环索引为0的循环、image1在imageArray中的顺序三者对应相同,都排在第一位;urlimage2在urlArray中的顺序、循环索引为1的循环、image2在imageArray中的顺序三者对应相同,都排在第二位;urlimage3在urlArray中的顺序、循环索引为2的循环、image3在imageArray中的顺序三者对应相同,都排在第三位。
通过上述循环,可以将根据所述链接数组urlArray中的图片链接下载至图字典imageDic中的图片全部存储至所述图片数组imageArray中。将图字典imageDic中的图片全部存储至所述图片数组imageArray中相当于将图片进行了一次重排的操作,确保链接数组urlArray中的图片和imageArray中的图像的关系是一一对应,从而使图片数组中的图片的存放顺序与图片的实际显示顺序一致,如此可以直接将图片数组作为待显示的图片序列进行显示。
本实施例中,如图6所示,所述步骤S106包括步骤S1061、步骤S1062及步骤S1063。
步骤S1061,将所述图片数组中的多张图片加载到当前界面的动画视图框上。
其中,所述动画视图框可以是所述电子终端100的待显示界面上的一个视图(view)组件。
步骤S1062,设置每张图片的显示参数。
本实施例中,所述显示参数可以包括显示位置、显示时长、显示尺寸等。其中,一张图片的显示时长为该图片在所述视图组件上呈现的时长。可选地,所述显示时长可以通过setAnimationDuration()函数进行设置。
步骤S1063,通过动画启动函数按照每张图片的显示参数在当前界面的所述动画视图框中动态显示所述图片数组中的多张图片,形成动画效果。
可选地,所述动画启动函数可以为animationActionMain()。
在其它实施例中,也可以将图片数组中的图片生成动画,以在当前界面中显示。
本公开实施例提供的实时动画显示方法,可在需要显示的动态画面时,再从服务器实时地获取所述动态画面对应的图片进行显示,避免了在电子终端中安装固定版本形成本地动态画面而导致不能够实时显示服务器提供的最新动态画面。另外,通过需要显示动态画面时再从所述服务器中获取图片,可以减少在安装所述动态画面所在的应用程序的安装包的大小。此外,在所述服务器对动态画面有更新的时,所述电子终端也不需要再下载所述应用程序的安装包进行更新就能够显示新的动态画面。进一步地,将下载的图片再进行重新存储以排序,可以使电子终端在向服务器发起下载请求及下载速度不需要考虑链接数组中的图片链接的次序,以提高下载速度。
请参阅图7,是本申请实施例提供的实时动画显示方法的又一种流程图,该实时动画显示方法可以应用于图2所示的电子终端100。所述实时动画显示方法包括以下步骤:
步骤S701,当在所述电子终端100启动一界面时,从所述电子终端的指定位置获取当前界面中需要显示的动态画面所对应的多张图片的下载地址。
其中,所述下载地址可以是上述的URL地址,所述多张图片的下载地址可以存储在上述的urlArray数组中。
步骤S702,按照所述多张图片的下载地址在所述指定位置的存储顺序,依次向所述服务器200发送与所述多张图片分别对应的多个图片下载请求。
可选地,在本实施例中,步骤S702可以包括如下子步骤:
按照存储顺序依次获取所述指定位置存储的多个张图片的下载地址;
每获取到一张图片的下载地址,调用图片管理类中的单例方法获得图片管理对象,将该图片的下载地址传递给所述图片管理对象的图片下载方法,并调用该图片下载方法,以向所述服务器200发送用于下载该图片的图片下载请求。
通过上述方式,可以异步地下载所述多张图片,提高下载速度。
在本实施例中,所述图片管理对象的图片下载方法具有一函数返回值,基于此,所述实时动画显示方法还可以包括以下步骤:
在获得所述图片下载方法的函数返回值时,判断该函数返回值的类型;
当该函数返回值中包括UIImage类型的图片时,确定获得与所述图片下载请求对应的图片。
否则,可以判定所述图片下载请求对应的图片不存在。
在本实施例中,步骤S702的详细实现方式与图3所示步骤S102的详细实现方式类似,可以参考上述内容中对图3所示步骤S102的详细描述。
步骤S703,当获得任一图片下载请求对应的图片时,将该图片及该图片的下载地址关联并存储到图字典中。
其中,可以以该图片的下载地址为键、以该图片为值形成一键值对,将所述键值对存储到所述图字典中。
步骤S704,当所述多张图片均被存储到所述图字典中时,将所述图字典中的多张图片按照该多张图片的下载地址在所述指定位置的存储顺序排列,得到待显示的图片序列。
在本实施例中,由于所述多张图片是异步下载的,各张图片何时下载完成是不确定的,而所述多张图片是按照其下载完成的顺序来依次存储到所述图字典中的,因此,所述多张图片在所述图字典中的存储顺序通常与所述多张图片的实际显示顺序不同,因此,需要对所述图字典中存储的所述多张图片重新进行排序,具体可以通过上述步骤S704实现。
可选地,电子终端100中可以设置有一初始值为预设值的计数器,该计数器可以是一个全局变量。基于此,本实施例提供的实时动画显示方法可以包括以下步骤:
在将任一图片下载请求对应的图片及该图片的下载地址关联并存储到所述图字典中时,将所述计数器的当前值更新为该计数器的当前值与1的和;
当所述计数器的值的增量与所述指定位置存储的下载地址的数量相同时,确定所述多张图片均被存储到所述图字典中。
在一种具体实施方式中,所述预设值可以为0,如此,可以在所述计数器的值与所述指定位置存储的下载地址的数量相同时,确定所述多张图片被存储到所述图字典中。
可选地,所述电子终端100中包括一图片数组,该图片数组包括的元素的数量不小于所述指定位置存储的下载地址的数量。对应地,所述步骤S704可以包括如下子步骤:
按照所述多张图片的下载地址在所述指定位置的存储顺序,依次从所述图字典中获取每一下载地址所关联的图片;
按照获取顺序将从所述图字典中获取到的图片依次存储到所述图片数组中,使所述多张图片在所述图片数组中的存储顺序与所述多张图片的下载地址在所述指定位置的存储顺序一致。
其中,步骤S704的详细实现方式与图3所示的步骤S105类似,具体可以参考上述内容中对图3所示步骤S105的详细描述。
步骤S705,依次显示所述待显示的图片序列中的图片,形成动画效果。
在本实施例中,步骤S705的详细实现方式与图3所示的步骤S106的详细实现方式类似,具体可以参考上述内容中对图3所示步骤S106的详细阐述。
通过上述过程,可以在需要显示动态画面时再从服务器200获取动态画面对应的多张图片,确保了电子终端100显示的动态画面始终是最新的;而通过异步下载的方式,提高了下载速度,确保了动态画面能够快速地在电子终端100进行显示。
请参阅图8,是本公开实施例提供的一种实时动画显示装置110的功能模块框图。该实时动画显示装置110包括获取模块801、发送模块802、存储模块803、排序模块804及显示模块805。
其中,获取模块801配置成当在所述电子终端启动一界面时,从所述电子终端的指定位置获取当前界面中需要显示的动态画面所对应的多张图片的下载地址。
在本实施例中,关于获取模块801的描述具体可参考上述内容中对图7所示步骤S701的详细描述,即步骤S701可以有获取模块801执行。
发送模块802配置成按照所述多张图片的下载地址在所述指定位置的存储顺序,依次向所述服务器发送与所述多张图片分别对应的多个图片下载请求。
在本实施例中,关于发送模块802的描述具体可参考对图7所示步骤S702的详细描述,即步骤S702可以由所述发送模块802执行。
存储模块803配置成当获得任一图片下载请求对应的图片时,将该图片及该图片的下载地址关联并存储到图字典中。
在本实施例中,关于存储模块803的描述具体可参考对图7所示步骤S703的详细描述,即步骤S703可以由存储模块803执行。
排序模块804配置成当所述多张图片均被存储到所述图字典中时,将所述图字典中的多张图片按照该多张图片的下载地址在所述指定位置的存储顺序排列,得到待显示的图片序列。
在本实施例中,关于排序模块804的描述具体可参考对图7所示步骤S704的详细描述,即步骤S704可以由排序模块804执行。
显示模块805配置成依次显示所述待显示的图片序列中的图片,形成动画效果。
在本实施例中,关于显示模块805的描述具体可参考对图7所示步骤S705的详细描述,即步骤S705可以由显示模块805执行。
请参阅图9,是本公开实施例提供的图2所示的实时动画显示装置110的功能模块示意图。本实施例的实时动画显示装置110中的各个模块及单元配置成执行上述方法实施例中的各个步骤。所述实时动画显示装置110包括所述获取模块1101、发送模块1102、存储模块1103、生成模块1104、重存模块1105以及显示模块1106。
所述获取模块1101,配置成在启动一界面时,获取当前界面中需要显示的动态画面对应的多张图片 形成的链接数组的图片链接。
所述发送模块1102,配置成根据获取的图片链接向服务器发送图片下载请求。
所述存储模块1103,配置成接收所述下载请求对应的多张图片,并将下载的多张图片分别存储到图字典中。
所述生成模块1104,配置成生成用于存储下载的多张图片的图片数组。
所述重存模块1105,配置成按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中。
所述显示模块1106,配置成在当前界面中对所述图片数组中的多张图片进行动态显示,形成动画效果。
本实施例中,所述存储模块1103包括还配置成将下载的多张图片存储到图字典中,并将每张图片按照链接数组中图片链接对应的顺序存储每张图片的键值。
本实施例中,如图10所示,所述重存模块1105包括:图片获取单元11051以及图片存储单元11052。
所述图片获取单元11051,配置成按照所述链接数组对应的顺序获取对应的键值,根据该键值获取对应的图片。
所述图片存储单元11052,配置成将获取的图片存储在所述图片数组。
本实施例中,如图11所示,所述显示模块1106包括:加载单元11061、设置单元11062以及显示单元11063。
所述加载单元11061,配置成将所述图片数组中的多张图片加载到当前界面的动画视图框上。
所述设置单元11062,配置成设置每张图片的显示参数。
所述显示单元11063,配置成通过动画启动函数按照每张图片的显示参数在当前界面的所述动画视图框中动态显示所述图片数组中的多张图片,形成动画效果。
本实施例中,所述发送模块1102包括创建单元、获得单元及请求发送单元。
所述创建单元,配置成创建图片管理类,所述图片管理类中定义有单例方法和图片下载方法。
所述获得单元,配置成通过所述单例方法获得该图片管理类的图片管理对象。
所述请求发送单元,配置成调用所述图片管理对象的图片下载方法向所述服务器发送下载请求,以下载所述图片链接对应的图片。
本实施例中,所述生成模块1104可包括:计数单元及数组生成单元。
计数单元,配置成每次成功下载图片并存储到所述图字典中后,将预设的计数器加一。
数组生成单元,配置成当所述计数器的值的增量为所述链接数组的元素个数时,生成与所述链接数组数量相同的图片数组。
关于本实施例的其它细节可以进一步地参考上述方法实施例中的描述,在此不再赘述。
本公开实施例提供的实时动画显示装置,可在需要显示的动态画面时,再从服务器实时地获取所述动态画面对应的图片进行显示,避免了在电子终端中安装固定版本形成本地动态画面而导致不能够实时显示服务器提供的最新动态画面。另外,通过需要显示动态画面时再从所述服务器中获取图片,可以减少在安装所述动态画面所在的应用程序的安装包的大小。此外,在所述服务器对动态画面有更新的时,所述电子终端也不需要再下载所述应用程序的安装包进行更新就能够显示新的动态画面。进一步地,将下载的图片再进行重新存储以排序,可以使电子终端在向服务器发起下载请求及下载速度不需要考虑链接数组中的图片链接的次序,以提高下载速度。
本公开实施例提供一种可读存储介质,其上存储有计算机程序,所述计算机程序在执行时实现上述实施例提供的实时动画显示方法。
本公开实施例还提供一种电子终端,该电子终端包括处理器和机器可读存储介质,该机器可读存储介质上存储有机器可执行指令,该机器可执行指令被执行时实现本公开实施例图7所示的实时动画显示方法。
在本公开所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本公开的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本公开各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者 顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。
工业实用性
本公开提供的实时动画显示方法、装置、电子终端及可读存储介质,避免了在电子终端中安装固定版本形成本地动态画面而导致不能够实时显示服务器提供的最新动态画面,可以减少在安装所述动态画面所在的应用程序的安装包的大小,并通过异步下载的方式提高了下载速度。

Claims (17)

  1. 一种实时动画显示方法,其特征在于,所述实时动画显示方法包括:
    启动一界面时,获取当前界面中需要显示的动态画面对应的多张图片形成的链接数组的图片链接;
    根据获取的图片链接向服务器发送图片下载请求;
    接收所述下载请求对应的多张图片,并将下载的多张图片分别存储到图字典中;
    生成用于存储下载的多张图片的图片数组;
    按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中;以及
    在当前界面中对所述图片数组中的多张图片进行动态显示,形成动画效果。
  2. 如权利要求1所述的实时动画显示方法,其特征在于,所述将下载的多张图片分别存储到图字典中的步骤包括:
    将下载的多张图片存储到图字典时,将每张图片按照链接数组中图片链接对应的顺序存储每张图片的键值对,该键值对中的键为图片链接,该键值对中的值为该图片链接对应的图片;
    所述按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中的步骤包括:
    a.按照所述链接数组对应的顺序获取对应的图片链接,以该图片链接为键在所述图字典中查找与该键对应的值,将查找到的值作为与该图片链接对应的图片;
    b.将查找到的图片存储在所述图片数组中;
    循环执行步骤a和b直到将所述链接数组中对应的图片全部存储至所述图片数组中。
  3. 如权利要求1所述的实时动画显示方法,其特征在于,所述根据获取的图片链接向服务器发送图片下载请求的步骤包括:
    通过调用图片管理类的单例方法获得该图片管理类的图片管理对象;
    调用所述图片管理对象的图片下载方法向所述服务器发送下载请求,以下载所述图片链接对应的图片。
  4. 如权利要求1所述的实时动画显示方法,其特征在于,所述生成用于存储所述链接数组对应的多张图片的图片数组的步骤包括:
    每次成功下载图片并存储到所述图字典中后,将预设的计数器的值加一;
    当所述计数器的值的增量为所述链接数组的元素个数时,生成与所述链接数组数量相同的图片数组。
  5. 如权利要求1所述的实时动画显示方法,其特征在于,所述在当前界面中显示所述图片数组中的多张图片形成的动画的步骤包括:
    将所述图片数组中的多张图片加载到当前界面的动画视图框上;
    设置每张图片的显示参数;
    通过动画启动函数按照每张图片的显示参数在当前界面的所述动画视图框中动态显示所述图片数组中的多张图片,形成动画效果。
  6. 一种实时动画显示方法,其特征在于,应用于电子终端,所述方法包括:
    当在所述电子终端启动一界面时,从所述电子终端的指定位置获取当前界面中需要显示的动态画面所对应的多张图片的下载地址;
    按照所述多张图片的下载地址在所述指定位置的存储顺序,依次向所述服务器发送与所述多张图片分别对应的多个图片下载请求;
    当获得任一图片下载请求对应的图片时,将该图片及该图片的下载地址关联并存储到图字典中;
    当所述多张图片均被存储到所述图字典中时,将所述图字典中的多张图片按照该多张图片的下载地址在所述指定位置的存储顺序排列,得到待显示的图片序列;
    依次显示所述待显示的图片序列中的图片,形成动画效果。
  7. 如权利要求6所述的实时动画显示方法,其特征在于,按照所述多张图片的下载地址在所述指定位置的存储顺序,依次向所述服务器发送与所述多张图片分别对应的多个图片下载请求,包括:
    按照存储顺序依次获取所述指定位置存储的多个张图片的下载地址;
    每获取到一张图片的下载地址,调用图片管理类中的单例方法获得图片管理对象,将该图片的下载地址传递给所述图片管理对象的图片下载方法,并调用该图片下载方法,以向所述服务器发送用于下载该图片的图片下载请求。
  8. 如权利要求7所述的实时动画显示方法,其特征在于,所述图片下载方法具有一函数返回值,所述方法还包括:
    在获得所述图片下载方法的函数返回值时,判断该函数返回值的类型;
    当该函数返回值中包括UIImage类型的图片时,确定获得与所述图片下载请求对应的图片。
  9. 如权利要求6-8中任一项所述的实时动画显示方法,其特征在于,所述电子终端中包括一初始值为预设值的计数器;所述方法还包括:
    在将任一图片下载请求对应的图片及该图片的下载地址关联并存储到所述图字典中时,将所述计数器的当前值更新为该计数器的当前值与1的和;
    当所述计数器的值的增量与所述指定位置存储的下载地址的数量相同时,确定所述多张图片均被存储到所述图字典中。
  10. 如权利要求6-9中任一项所述的实时动画显示方法,其特征在于,所述电子终端中包括一图片数组,该图片数组包括的元素的数量不小于所述指定位置存储的下载地址的数量;
    将所述图字典中的多张图片按照该多张图片的下载地址在所述指定位置的存储顺序排列,得到待显示的图片序列,包括:
    按照所述多张图片的下载地址在所述指定位置的存储顺序,依次从所述图字典中获取每一下载地址所关联的图片;
    按照获取顺序将从所述图字典中获取到的图片依次存储到所述图片数组中,使所述多张图片在所述图片数组中的存储顺序与所述多张图片的下载地址在所述指定位置的存储顺序一致。
  11. 一种实时动画显示装置,其特征在于,应用于电子终端,所述装置包括:
    获取模块,配置成当在所述电子终端启动一界面时,从所述电子终端的指定位置获取当前界面中需要显示的动态画面所对应的多张图片的下载地址;
    发送模块,配置成按照所述多张图片的下载地址在所述指定位置的存储顺序,依次向所述服务器发送与所述多张图片分别对应的多个图片下载请求;
    存储模块,配置成当获得任一图片下载请求对应的图片时,将该图片及该图片的下载地址关联并存储到图字典中;
    排序模块,配置成当所述多张图片均被存储到所述图字典中时,将所述图字典中的多张图片按照该多张图片的下载地址在所述指定位置的存储顺序排列,得到待显示的图片序列;
    显示模块,配置成依次显示所述待显示的图片序列中的图片,形成动画效果。
  12. 一种实时动画显示装置,其特征在于,所述实时动画显示装置包括:
    获取模块,配置成在启动一界面时,获取当前界面中需要显示的动态画面对应的多张图片形成的链接数组的图片链接;
    发送模块,配置成根据获取的图片链接向服务器发送图片下载请求;
    存储模块,配置成接收所述下载请求对应的多张图片,并将下载的多张图片分别存储到图字典中;
    生成模块,配置成生成用于存储下载的多张图片的图片数组;
    重存模块,配置成按照所述链接数组对应的顺序获取所述图字典中的图片,并存储在所述图片数组中;以及
    显示模块,配置成在当前界面中对所述图片数组中的多张图片进行动态显示,形成动画效果。
  13. 如权利要求12所述的实时动画显示装置,其特征在于,所述存储模块还配置成将下载的多张图片存储到图字典中时,将每张图片按照链接数组中图片链接对应的顺序存储每张图片的键值对,该键值对的键为图片链接,该键值对的值为该图片链接对应的图片;
    所述重存模块包括:图片获取单元以及图片存储单元;
    所述图片获取单元配置成按照所述链接数组对应的顺序获取对应的图片链接,以该图片链接为键在所述图字典中查找与该键对应的值,将查找到的值作为与该图片链接对应的图片;
    所述图片存储单元配置成将查找到的图片存储在所述图片数组中。
  14. 如权利要求12或13所述的实时动画显示装置,其特征在于,所述显示模块包括:
    加载单元,配置成将所述图片数组中的多张图片加载到当前界面的动画视图框上;
    设置单元,配置成设置每张图片的显示参数;以及
    显示单元,配置成通过动画启动函数按照每张图片的显示参数在当前界面的所述动画视图框中动态显示所述图片数组中的多张图片,形成动画效果。
  15. 一种电子终端,其特征在于,包括:
    存储器;
    处理器;
    权利要求12-14任一项所述的实时动画显示装置,该实时动画显示装置存储于所述存储器并由所述处理器控制执行。
  16. 一种电子终端,其特征在于,包括处理器及机器可读存储介质,所述机器可读存储介质上存储有机器可执行指令,所述机器可执行指令被所述处理器执行时实现权利要求6-10中任一项所述的实时动画显示方法。
  17. 一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序在执行时实现上述权利要求1-5中任意一项所述的实时动画显示方法。
PCT/CN2018/082458 2017-12-11 2018-04-10 实时动画显示方法、装置、电子终端及可读存储介质 WO2019114158A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711310627.7A CN108073698B (zh) 2017-12-11 2017-12-11 实时动画显示方法、装置、电子终端及可读存储介质
CN201711310627.7 2017-12-11

Publications (1)

Publication Number Publication Date
WO2019114158A1 true WO2019114158A1 (zh) 2019-06-20

Family

ID=62158107

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/082458 WO2019114158A1 (zh) 2017-12-11 2018-04-10 实时动画显示方法、装置、电子终端及可读存储介质

Country Status (2)

Country Link
CN (1) CN108073698B (zh)
WO (1) WO2019114158A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111107420B (zh) * 2018-10-25 2022-08-16 武汉斗鱼网络科技有限公司 一种直播app的勋章加载方法、存储介质、电子设备及系统
CN112202865A (zh) * 2020-09-25 2021-01-08 北京微步在线科技有限公司 一种图片下载方法及装置
CN112181524A (zh) * 2020-09-29 2021-01-05 北京有竹居网络技术有限公司 组件控制方法及装置、电子设备和计算机可读存储介质
CN113010715B (zh) * 2021-03-30 2023-06-23 通威太阳能(金堂)有限公司 硅片电致发光图片分拣方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076104A (en) * 1997-09-04 2000-06-13 Netscape Communications Corp. Video data integration system using image data and associated hypertext links
CN101221580A (zh) * 2008-01-03 2008-07-16 中兴通讯股份有限公司 一种提高嵌入式浏览器页面显示性能的方法
CN103544207A (zh) * 2013-08-19 2014-01-29 Tcl集团股份有限公司 一种图片加载显示的方法与系统
CN104463932A (zh) * 2013-09-22 2015-03-25 北大方正集团有限公司 实现动画效果的方法和装置
US9032086B2 (en) * 2011-10-28 2015-05-12 Rhythm Newmedia Inc. Displaying animated images in a mobile browser

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092655B (zh) * 2017-03-21 2020-01-03 武汉斗鱼网络科技有限公司 用于Android宽屏设备中组图的循环展示方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076104A (en) * 1997-09-04 2000-06-13 Netscape Communications Corp. Video data integration system using image data and associated hypertext links
CN101221580A (zh) * 2008-01-03 2008-07-16 中兴通讯股份有限公司 一种提高嵌入式浏览器页面显示性能的方法
US9032086B2 (en) * 2011-10-28 2015-05-12 Rhythm Newmedia Inc. Displaying animated images in a mobile browser
CN103544207A (zh) * 2013-08-19 2014-01-29 Tcl集团股份有限公司 一种图片加载显示的方法与系统
CN104463932A (zh) * 2013-09-22 2015-03-25 北大方正集团有限公司 实现动画效果的方法和装置

Also Published As

Publication number Publication date
CN108073698B (zh) 2019-08-23
CN108073698A (zh) 2018-05-25

Similar Documents

Publication Publication Date Title
US10990644B2 (en) Systems and methods for contextual vocabularies and customer segmentation
US11106816B2 (en) Database public interface
WO2020119485A1 (zh) 一种页面显示方法、装置、设备及存储介质
WO2019114158A1 (zh) 实时动画显示方法、装置、电子终端及可读存储介质
US20180196665A1 (en) Managing, using, and updating application resources
WO2018176960A1 (zh) 显示网络图片的方法、装置以及用户终端
US20170161511A1 (en) Database public interface
US9325717B1 (en) Web-store restriction of external libraries
US9483571B2 (en) Persisting the state of visual control elements in uniform resource locator (URL)-generated web pages
JP6404351B2 (ja) 商品情報を通信および提示するための方法、装置、および、システム
WO2016110202A1 (zh) 一种显示页面的方法、客户端及设备
CN109471626B (zh) 页面逻辑结构、页面生成方法、页面数据处理方法及装置
JP6440828B2 (ja) デジタルコンテンツの可視性の検出
CN110221899B (zh) 一种用户界面的调节方法、装置及系统
CN110019024B (zh) 一种目录查询方法、系统及电子设备和存储介质
US11580294B2 (en) Techniques for web framework detection
WO2019041441A1 (zh) 列表视图的更新装置、方法及计算机可读存储介质
CN110837366A (zh) 一种表单生成方法、电子装置及计算机可读存储介质
US11675479B2 (en) List display method and apparatus, computer device and computer-readable medium
WO2017143747A1 (zh) 一种移动终端网络请求方法及系统
CN112650804B (zh) 大数据接入方法、装置、系统及存储介质
CN111367606A (zh) 一种应用程序页面的显示方法、装置、终端及介质
CN107341038B (zh) 兼容性处理方法、装置及电子设备
CN114816389B (zh) 一种基于元模型的管理系统搭建方法、装置、设备及介质
CN107609119B (zh) 文件处理方法、移动终端及计算机可读存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18888376

Country of ref document: EP

Kind code of ref document: A1