WO2019101043A1 - Image processing method, terminal, computer storage medium and computer program - Google Patents

Image processing method, terminal, computer storage medium and computer program Download PDF

Info

Publication number
WO2019101043A1
WO2019101043A1 PCT/CN2018/116245 CN2018116245W WO2019101043A1 WO 2019101043 A1 WO2019101043 A1 WO 2019101043A1 CN 2018116245 W CN2018116245 W CN 2018116245W WO 2019101043 A1 WO2019101043 A1 WO 2019101043A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
gif
image
data corresponding
format data
Prior art date
Application number
PCT/CN2018/116245
Other languages
French (fr)
Chinese (zh)
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 WO2019101043A1 publication Critical patent/WO2019101043A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • G06F3/0641De-duplication techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files

Definitions

  • the present invention relates to the field of intelligent terminal technologies, and in particular, to an image processing method, a terminal, a computer storage medium, and a computer program.
  • the terminal needs to decode the GIF picture every time the user requests the terminal to load the same GIF picture.
  • the decoding operation takes a certain amount of time, which causes the terminal to load the GIF picture for a long time.
  • the embodiment of the invention provides an image processing method, a terminal, a computer storage medium and a computer program, which can shorten the playing time of the image, improve the image playing efficiency, improve the user experience, and can save the GIF in the memory when the deletion condition is met.
  • Bitmap (BMP) format data corresponding to the image is deleted to avoid occupying too much memory resources.
  • an embodiment of the present invention provides an image processing method, where the method includes:
  • the terminal in response to the first request, acquiring bitmap BMP format data corresponding to the GIF image from a memory of the terminal, where the BMP format data is data obtained by decoding the GIF image;
  • the terminal plays BMP format data corresponding to the GIF image
  • the BMP format data corresponding to the GIF image saved in the memory of the terminal is deleted.
  • the terminal when the terminal receives the request for playing the GIF image sent by the user, the bitmap corresponding to the image is directly obtained from the memory of the terminal, instead of repeatedly decoding the GIF image, because the entire playback process reduces the repetition.
  • the decoding operation can shorten the playback time of the image, improve the image playback efficiency, and improve the user experience.
  • the terminal when the GIF image is not requested by the user for a certain period of time, the terminal can delete the BMP data corresponding to the GIF image saved in the memory, thereby reducing memory consumption and avoiding the terminal being stuck.
  • the terminal before the receiving, by the terminal, the first request for playing the image interchange format GIF image sent by the user, the terminal further includes:
  • the terminal in response to the third request, reads GIF format data corresponding to the GIF image from a disk of the terminal;
  • the terminal saves BMP format data corresponding to the GIF image in a memory of the terminal and a disk of the terminal.
  • the terminal when the terminal receives the request for playing the GIF image sent by the user, if the BMP format data corresponding to the GIF image is not stored in the memory of the terminal, the terminal decodes the GIF image to obtain the corresponding BMP format data, and Save it in the memory.
  • the terminal receives the request for playing the GIF image sent by the user, the BMP format data corresponding to the GIF image can be directly obtained from the memory without decoding the GIF image again. Reduce the playback time of the image.
  • the terminal in response to the fourth request, acquiring BMP format data corresponding to the GIF image from a disk of the terminal;
  • the terminal saves BMP format data corresponding to the GIF image in a memory of the terminal.
  • the terminal when receiving the request for playing the GIF image sent by the user, if the BMP format data corresponding to the GIF image in the memory of the terminal is deleted when the preset duration is reached, the terminal obtains the disk from the terminal.
  • the BMP format data corresponding to the GIF image is saved in the memory of the terminal without repeatedly decoding the GIF image, thereby shortening the playing time of the image and improving the image playing efficiency.
  • the terminal the GIF format data corresponding to the GIF image is read from the disk of the terminal, including:
  • the terminal reads the GIF format data corresponding to the GIF image from the disk of the terminal in a read manner.
  • the GIF image includes the GIF image downloaded by the terminal through the server, and the terminal processes the GIF image (such as, but not limited to, cropping, bordering, de-frame, etc.), and then saves the GIF format data corresponding to the GIF image on the disk.
  • the terminal reads the GIF image by using the read mode
  • the GIF format data corresponding to the GIF image saved in the disk is first read into the kernel buffer, and the GIF format data corresponding to the GIF image is buffered from the kernel. The area is copied to memory.
  • the terminal the GIF format data corresponding to the GIF image is read from the disk of the terminal, including:
  • the terminal reads the GIF format data corresponding to the GIF image from the disk of the terminal by using a memory mapping manner.
  • the terminal reads the GIF image from the disk of the terminal by using the memory mapping manner, and reads the GIF image in the memory mapping manner without reading the data of the kernel buffer to the memory.
  • the terminal directly reads the GIF format data corresponding to the GIF image saved in the disk into the memory, thereby shortening the reading process time, thereby shortening the time for playing the GIF image, thereby shortening the time for playing the GIF image, thereby Can improve the efficiency of playing images.
  • the terminal in the GIF format data corresponding to the GIF image, includes:
  • the terminal decodes the GIF format data corresponding to the GIF image by using a user interface (UI) thread.
  • UI user interface
  • the terminal in the GIF format data corresponding to the GIF image, includes:
  • the terminal decodes the GIF format data corresponding to the GIF image by using a background thread.
  • the terminal decodes the target image by using a background thread, which can reduce the CPU consumption generated by the UI thread and avoid the jam of the UI thread, compared to decoding the GIF image by using the UI thread. .
  • the seventh implementation manner of the first aspect before the terminal plays the BMP format data corresponding to the GIF image, also includes:
  • the terminal closes the N applications, and performs the step of playing the BMP format data corresponding to the GIF image, where N is a positive integer, and the terminal closes the N applications after the terminal
  • the memory is greater than or equal to the memory required to play the BMP format data corresponding to the GIF image.
  • the terminal when the current memory of the terminal is less than the BMP format data corresponding to the GIF image, the terminal releases the memory resource by closing the application program, so as to meet the requirement of the user requesting to play the GIF image, so that the terminal currently has remaining memory.
  • the requirement to play the BMP format data corresponding to the GIF image is satisfied.
  • an embodiment of the present invention provides a terminal, where the terminal includes a module or unit for performing the image processing method described in the first aspect.
  • an embodiment of the present invention provides another terminal, including a processor and a memory, where the processor and the memory are connected to each other, wherein the memory is used to store a support terminal to perform the image processing method described in the first aspect.
  • Application code the processor being configured to perform the image processing method described in the first aspect.
  • an embodiment of the present invention provides a computer readable storage medium, where the computer storage medium stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processing The image processing method described in the first aspect is performed.
  • an embodiment of the present invention provides a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the image processing method described in the first aspect.
  • the terminal when the terminal receives the request for playing the GIF image sent by the user for the first time, the terminal may decode the GIF image, and save the BMP bitmap format data corresponding to the decoded GIF image in the decoding.
  • the terminal when the terminal subsequently receives the request for the GIF image sent by the user again, the BMP format data corresponding to the GIF image can be directly obtained from the memory, and the BMP format data corresponding to the GIF image is directly played, and the GIF image is not needed again.
  • the decoding operation saves the decoding process of the terminal, shortens the time for the terminal to play the GIF image, improves the image playing efficiency, improves the user's experience of viewing the image, and can correspond to the GIF image saved in the memory when the deletion condition is satisfied.
  • Delete BMP format data to avoid taking up too much memory resources.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention.
  • FIG. 2A is a schematic diagram of a chat interface of a WeChat application according to an embodiment of the present invention.
  • 2B is a schematic diagram of an expression interface according to an embodiment of the present invention.
  • 2C is a schematic diagram of a chat interface of another WeChat application according to an embodiment of the present invention.
  • 2D is a schematic diagram of another expression interface provided by an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of another image processing method according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of another image processing method according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart diagram of another image processing method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes, but is not limited to, the following steps S101-S104:
  • the terminal receives a first request for playing an image interchange format GIF image sent by a user.
  • the terminal may include a mobile phone, a tablet computer, a desktop computer, a personal digital assistant (PDA), a mobile internet device (MID), a smart wearable device (such as a smart watch, a smart bracelet), and the like.
  • PDA personal digital assistant
  • MID mobile internet device
  • smart wearable device such as a smart watch, a smart bracelet
  • the terminal may install multiple social applications, such as QQ, WeChat, Momo, MSN, YY, and the like.
  • the scenes applicable to the embodiments of the present invention include, but are not limited to, displaying a GIF animation thumbnail corresponding to the virtual gift in the YY channel, and the user can click the GIF animation thumbnail to trigger the terminal to play the GIF animation; in the instant messaging software (including but not limited to QQ, WeChat, Momo, MSN, etc.) display the GIF emoticon thumbnail in the chat interface, the user can click the GIF emoticon thumbnail to trigger the terminal to play the GIF emoticon.
  • the terminal may have a touch screen, and the touch screen may receive a click operation of the user.
  • the operation page of the application can be displayed, and the thumbnail corresponding to the multiple GIF images can be displayed on the operation page, and the user can trigger the playback of the GIF image by clicking the thumbnail corresponding to a certain GIF image.
  • the terminal receives the click operation of the user, that is, receives the first request sent by the user.
  • the thumbnail can also be displayed by the user.
  • FIG. 2A is a schematic diagram of a chat interface of a WeChat application according to an embodiment of the present invention. As shown in FIG.
  • FIG. 2A it is a schematic diagram of an expression interface provided by an embodiment of the present invention.
  • 204 is an expression interface.
  • a thumbnail corresponding to a plurality of GIF images can be displayed. For example, in FIG.
  • the expression interface 204 displays 8 GIF expressions, respectively, a GIF expression 1-GIF expression 8, assuming User A wants to send GIF expression 3 to user B, then user A can click GIF expression 3. After receiving the operation of user A clicking GIF expression 3, the terminal sends GIF expression 3 to user B. At this time, on chat interface 20 The animation of GIF Expression 3 will be played dynamically.
  • chat interface 20 The animation of GIF Expression 3 will be played dynamically.
  • the click operation as the first request sent by the user.
  • the form in which the user sends the first request may not be limited to the click operation.
  • the user may send a first request to play the GIF image to the terminal according to a thumbnail triggering operation corresponding to the GIF image, a sliding operation, or the like, or the user may also send the first playback of the GIF image to the terminal by voice or the like.
  • a request may be sent.
  • the terminal may not have a touch screen, and the user may click the mouse pointer to select a thumbnail corresponding to the GIF image displayed on the terminal display, thereby triggering the terminal to play the GIF image.
  • the terminal receives the mouse click operation, that is, receives the first request sent by the user.
  • the thumbnail can also be displayed by the user.
  • FIG. 2C is a schematic diagram of a chat interface of another WeChat application provided by an embodiment of the present invention. As shown in FIG.
  • FIG. 2C it is another schematic diagram of the expression interface provided by the embodiment of the present invention.
  • 204 is an expression interface, and a thumbnail image corresponding to a plurality of GIF images can be displayed in the expression interface 204. For example, in FIG.
  • the expression interface 204 displays 16 GIF expressions, respectively, a GIF expression 1-GIF expression 16, assuming User A wants to send GIF expression 3 to user B. User A can click GIF expression 3 with the mouse pointer. After receiving the operation of user A clicking GIF expression 3, the terminal sends GIF expression 3 to user B. At this time, chat The animation of GIF Expression 3 is dynamically played on the interface 20. It should be noted that the above chat interface and the expression interface are only examples. In a specific application, the manner in which the chat interface and the expression interface are presented and the displayed content may not be limited to the above examples.
  • the above is exemplified by the click operation of the mouse pointer as the first request sent by the user.
  • the click operation of the mouse by the user may include a click operation and a double-click operation, which are not specifically limited in the embodiment of the present invention.
  • the form in which the user sends the first request may not be limited to the click operation, and the user may also move the mouse pointer to send the first request for playing the GIF image to the terminal on the thumbnail corresponding to the GIF image.
  • the terminal obtains bitmap BMP format data corresponding to the GIF image from the memory of the terminal in response to the first request, where the BMP format data is data obtained by decoding the GIF image.
  • the memory of the terminal refers to the storage space of the corresponding operating system in the memory of the terminal, and the function thereof is to temporarily store the operation data of the CPU. All applications in the terminal are run in memory. For each application, there is storage space corresponding to the application in memory.
  • the terminal After receiving the request sent by the user to play a certain GIF image, the terminal acquires the bitmap BMP format data corresponding to the GIF image from the memory of the terminal in response to the request.
  • the acquisition operation is substantially a request for the terminal to play the GIF image in response to the user, and the bitmap BMP format data corresponding to the GIF image is obtained from the storage space corresponding to the application.
  • the user A clicks the thumbnail corresponding to the GIF expression 3 in the WeChat chat interface, and the terminal acquires the BMP format data corresponding to the GIF expression 3 from the storage space corresponding to the WeChat application in the memory.
  • the terminal plays BMP format data corresponding to the GIF image.
  • the terminal After acquiring the BMP format data corresponding to the GIF image, the terminal plays the BMP format data corresponding to the GIF image. For example, referring to FIG. 2B, after acquiring the BMP format data corresponding to the GIF expression 3 from the storage space corresponding to the WeChat application in the memory, the terminal plays the BMP format data corresponding to the GIF expression 3.
  • the timing can be started, and when the second request for playing the GIF image sent by the user has not been received when the timing reaches the preset duration, And deleting the BMP format data corresponding to the GIF image saved in the memory of the terminal.
  • the terminal may start timing, and when the second time request for playing the GIF image sent by the user has not been received when the timing reaches the preset duration, the The BMP format data corresponding to the GIF image saved in the memory of the terminal is deleted.
  • the second request is different from the first request, and the GIF image for the second request is the same as the GIF image for the first request, and the specific implementation of the second request may refer to the first request. Related descriptions are not described here.
  • the preset duration may be set by default by the terminal system, or may be set by the terminal user, which is not specifically limited in the embodiment of the present invention.
  • the preset duration can be 10 minutes.
  • the terminal receives the first request for playing the GIF expression 3 sent by the user, the time is 8 o'clock, and the preset duration is started from 8 o'clock, and ends at 8:10. If the preset time length arrives, that is, the time point reaches 8:10, the terminal has not received the second request sent by the user to play the GIF expression 3. At this time, the GIF expression saved in the memory of the terminal is deleted. The corresponding BMP format data, that is, the memory occupied by the BMP format data corresponding to the GIF expression 3 is released.
  • the terminal when the terminal receives the request for the GIF image sent by the user, the BMP format data corresponding to the GIF image is directly obtained from the memory, and the BMP format data corresponding to the GIF image is directly played, and the GIF is not needed.
  • the image is decoded, which saves the process of decoding the terminal, shortens the time for the terminal to play the GIF image, improves the image playing efficiency, improves the user's experience of viewing the image, and does not require the user to request the GIF image when the preset time is reached.
  • the terminal deletes the BMP format data corresponding to the GIF image from the memory, thereby avoiding occupying too much memory resources, thereby avoiding the jam phenomenon of the APP.
  • the terminal may further perform steps S105-S108 before performing the foregoing step S101.
  • steps S105-S108 are described in detail below.
  • the terminal receives a third request sent by the user to play the GIF image.
  • the GIF image for the third request is the same as the GIF image for the first request, and the third request may be understood as the user first triggering the play request for the GIF image.
  • the third request may also be triggered by the user clicking on a thumbnail of the GIF image.
  • the terminal in response to the third request, reads GIF format data corresponding to the GIF image from a disk of the terminal.
  • the terminal needs to read the GIF format data corresponding to the GIF image from the disk, and then The GIF format data corresponding to the GIF image is decoded to obtain BMP format data corresponding to the GIF image.
  • the terminal can read the GIF format data corresponding to the GIF image from the disk of the terminal by using a read mode.
  • the process is specifically: the terminal downloads the GIF image through the server, and the terminal processes the GIF image (such as, but not limited to, cropping, bordering, de-frame, etc.), and then saves the GIF format data corresponding to the GIF image on the disk.
  • the terminal After the terminal reads the GIF image by using the read mode, the GIF format data corresponding to the GIF image saved in the disk is first read into the kernel buffer, and the GIF format data corresponding to the GIF image is buffered from the kernel. The area is copied to memory.
  • the terminal may also use the memory mapping manner to read the GIF format data corresponding to the GIF image from the disk of the terminal.
  • the memory mapping manner reads the GIF image without going through the data copy of the kernel buffer.
  • the process of going to the memory that is, the terminal directly reads the GIF format data corresponding to the GIF image saved in the disk into the memory, thereby shortening the reading process time and shortening the time for playing the GIF image. , which can improve the efficiency of playing images.
  • S107 The terminal decodes GIF format data corresponding to the GIF image to obtain BMP format data corresponding to the GIF image; and the terminal plays BMP format data corresponding to the GIF image.
  • the terminal may use the UI thread to decode the GIF format data corresponding to the GIF image.
  • the terminal may also use the background thread to decode the GIF format data corresponding to the GIF image, and decode the GIF format data corresponding to the GIF image by using the background thread compared with the UI thread to decode the GIF format data corresponding to the GIF image.
  • the background thread can reduce the CPU consumption generated by the UI thread and avoid the jam of the UI thread.
  • the terminal saves BMP format data corresponding to the GIF image in a memory of the terminal and a disk of the terminal.
  • the terminal saves the BMP format data corresponding to the GIF image on the disk of the terminal, and the purpose is that after the terminal deletes the BMP format data corresponding to the GIF image from the memory, the terminal can directly obtain the GIF image corresponding to the GIF image from the disk.
  • the BMP format data is stored in the memory, and the GIF format data corresponding to the GIF image is obtained from the disk again, and decoded to obtain the BMP format data corresponding to the GIF image, thereby shortening the BMP format corresponding to the GIF image.
  • the time of the data in turn, can shorten the time for playing the image.
  • steps S101-S104 in FIG. 3 For the specific implementation of the steps S101-S104 in FIG. 3, reference may be made to the steps S101-S104 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
  • the terminal when the terminal receives the request for playing the GIF image sent by the user, if the BMP format data corresponding to the GIF image is not stored in the memory of the terminal, the terminal decodes the GIF image to obtain the corresponding BMP format data. And storing the same in the memory, when the terminal subsequently receives the request for playing the target image sent by the user again, the BMP format data corresponding to the GIF image can be directly obtained from the memory, without performing the decoding operation on the GIF image again, Reduce the playback time of the image.
  • the terminal may further perform steps S109-S111.
  • steps S109-S111 are described in detail below.
  • the terminal receives a fourth request sent by the user to play the GIF image.
  • the GIF image for the fourth request is the same as the GIF image for the first request, and the fourth request may be understood as the user triggering the play request for the GIF image again.
  • the fourth request may also be triggered by the user clicking on a thumbnail of the GIF image.
  • the terminal in response to the fourth request, acquires BMP format data corresponding to the GIF image from a disk of the terminal, and the terminal plays BMP format data corresponding to the GIF image.
  • the user triggers the play request again for a certain GIF image. Since the request does not occur within the time period when the preset time length arrives, the BMP format data corresponding to the GIF image originally saved in the memory of the terminal has been deleted. At this time, the terminal directly obtains the BMP format data corresponding to the GIF image from the disk, and does not need to decode the format data of the GIF image obtained from the disk of the terminal to obtain the BMP format data corresponding to the GIF image, that is, the number is reduced. Decoding operation.
  • the terminal saves BMP format data corresponding to the GIF image in a memory of the terminal.
  • steps S101-S104 in FIG. 4 For the specific implementation of the steps S101-S104 in FIG. 4, reference may be made to the steps S101-S104 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
  • the terminal when the terminal receives the request for playing the GIF image sent by the user, the BMP corresponding to the GIF image originally saved in the memory of the terminal occurs because the request does not occur within the time period when the preset time is reached.
  • the format data has been deleted.
  • the terminal directly obtains the BMP format data corresponding to the GIF image from the disk, and saves the data in the memory, thereby avoiding acquiring the GIF format data corresponding to the GIF image from the disk again, and decoding to obtain the BMP format data corresponding to the GIF image.
  • the time for acquiring the BMP format data corresponding to the GIF image is shortened, and the time for playing the image can be shortened.
  • the image processing method may further include steps S105-S108, S101-S104, and S109-S111.
  • steps S105-S108, S101-S104, and S109-S111 For specific implementations of the steps, reference may be made to related descriptions in the foregoing embodiments, and details are not described herein again.
  • the terminal may further perform the steps S112-S113 before performing the foregoing step S103.
  • FIG. 5 it is a schematic flowchart of another image processing method according to an embodiment of the present invention. Steps S112-S113 are described in detail below.
  • step S112 The terminal determines whether the current memory of the terminal is greater than or equal to the memory required to play the BMP format data corresponding to the GIF image. If yes, step S103 is performed; if no, step S113 is performed.
  • the memory required to play the BMP format data corresponding to the GIF image may be the memory required to play the BMP format data corresponding to the GIF image in the terminal history record, or may be the default GIF playback of the terminal.
  • the memory required for the BMP format data corresponding to the image, the terminal may also know the memory required to play the BMP format data corresponding to the GIF image by other means.
  • the memory required for playing the BMP format data corresponding to the GIF image of the terminal default device is 200K. If the current memory of the current terminal is greater than or equal to 200K, step S103 is performed; otherwise, step S113 is performed.
  • the terminal closes N applications, and then performs step S103, where N is a positive integer. After the terminal closes the N applications, the memory of the terminal is greater than or equal to playing the BMP format data corresponding to the GIF image. The memory required.
  • steps S101-S104 in FIG. 5 For the specific implementation of the steps S101-S104 in FIG. 5, reference may be made to the steps S101-S104 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
  • the terminal when the current memory of the terminal is less than the BMP format data corresponding to a certain GIF image, the terminal releases the memory resource by closing the application to meet the requirement of the user requesting to play the GIF image, so that the terminal currently The remaining memory satisfies the requirements of the BMP format data corresponding to the GIF image.
  • the image processing method may further include steps S105-S108, S101-S104, S112-S113; may also include S101-S104, S109-S111, S112-S113; and may also include S105-S108, S101 - S104, S109-S111, S112-S113, the specific implementation of these steps can refer to the related description in the foregoing embodiment, and details are not described herein again.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal 600 may include: a first receiving unit 610, a first obtaining unit 620, a playing unit 630, and a deleting unit 640, where
  • a first receiving unit 610 configured to receive a first request for playing an image interchange format GIF image sent by a user
  • the first obtaining unit 620 is configured to obtain bitmap BMP format data corresponding to the GIF image from the memory of the terminal, where the BMP format data is data obtained by decoding the GIF image, in response to the first request;
  • the playing unit 630 is configured to play BMP format data corresponding to the GIF image.
  • the deleting unit 640 is configured to delete the BMP format data corresponding to the GIF image saved in the memory of the terminal when the second request for playing the GIF image sent by the user has not been received when the preset time length arrives .
  • the terminal 600 further includes a second receiving unit, a reading unit, a decoding unit, and a first saving unit;
  • a second receiving unit configured to receive, by the first receiving unit 610, a third request for playing the GIF image sent by the user, before receiving the first request for playing the image interchange format GIF image sent by the user;
  • a reading unit configured to read GIF format data corresponding to the GIF image from a disk of the terminal in response to the third request;
  • a decoding unit configured to decode GIF format data corresponding to the GIF image, to obtain BMP format data corresponding to the GIF image;
  • a saving unit configured to save BMP format data corresponding to the GIF image in a memory of the terminal and a disk of the terminal.
  • the terminal 600 further includes a third receiving unit, a second acquiring unit, and a second saving unit:
  • a third receiving unit configured to receive a fourth request sent by the user to play the GIF image
  • a second acquiring unit configured to acquire, according to the fourth request, BMP format data corresponding to the GIF image from a disk of the terminal;
  • a second saving unit configured to save the BMP format data corresponding to the GIF image in a memory of the terminal.
  • the reading unit is configured to read the GIF format data corresponding to the GIF image from the disk of the terminal, where the GIF image is read from the disk of the terminal by using a memory mapping manner. GIF format data.
  • the decoding unit is configured to decode the GIF format data corresponding to the GIF image, and is specifically used to decode the GIF format data corresponding to the GIF image by using a background thread.
  • the terminal 600 further includes a determining unit and a closing unit;
  • a determining unit before the playing unit 630 plays the BMP format data corresponding to the GIF image, determining whether the current remaining memory of the terminal is greater than or equal to the memory required for playing the BMP format data corresponding to the GIF image;
  • the triggering playing unit 630 plays the BMP format data corresponding to the GIF image
  • the triggering unit closes the N applications, and the triggering playing unit 630 plays the BMP format data corresponding to the GIF image, where N is a positive integer, and the closing unit closes the N applications after the terminal is closed.
  • the memory is greater than or equal to the memory required to play the BMP format data corresponding to the GIF image.
  • FIG. 7 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
  • the terminal 70 shown in FIG. 7 includes: a radio frequency (RF) circuit 701, a memory 702 storing one or more computer programs, an input device 703, an output device 704, a sensor 703, an audio circuit 706, and wireless fidelity. (Wireless Fidelity, WiFi) module 707, processor 708 including one or more processing cores, and power supply 709 and the like.
  • RF radio frequency
  • FIG. 7 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
  • the RF circuit 701 can be used for receiving and transmitting signals during and after receiving or transmitting information, in particular, receiving downlink information of the base station and then processing it by one or more processors 708; in addition, transmitting data related to the uplink to the base station .
  • RF circuit 701 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, and a Low Noise Amplifier (LNA). , duplexer, etc.
  • SIM Subscriber Identity Module
  • LNA Low Noise Amplifier
  • the RF circuit 701 can also communicate with the network and other terminal devices through wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code). Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • Code Division Multiple Access Code Division Multiple Access
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • E-mail Short Messaging Service
  • the memory 702 can be used to store computer programs and modules, and the processor 708 executes various functional applications and data processing by running computer programs and modules stored in the memory 702.
  • the memory 702 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the terminal 70 (such as photographed photos, audio data, video data, etc.) and the like.
  • memory 702 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 702 may also include a memory controller to provide access to memory 702 by processor 708 and input device 703.
  • Input device 703 can be used to receive input numeric or character information, as well as to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input device 703 can include touch-sensitive surface 7031 and other input devices 7032.
  • Touch-sensitive surface 7031 also referred to as a touch display panel or trackpad, can collect touch operations on or near the user (eg, the user uses a finger, stylus, etc., on any touch-sensitive surface 7031 or on the touch-sensitive surface 7031 The pressing operation in the vicinity of the touch-sensitive surface 7031) drives the corresponding connecting device according to a preset program.
  • the touch sensitive surface 7031 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 708 is provided and can receive commands from the processor 708 and execute them.
  • the touch sensitive surface 7031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input device 703 can also include other input devices 7032.
  • other input devices 7032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • Output device 704 can be used to display information entered by the user or information provided to the user and various graphical user interfaces of terminal 70, which can be constructed from graphics, text, icons, video, and any combination thereof.
  • the output device 704 can include a display panel 7041.
  • the display panel 7041 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch-sensitive surface 7031 can cover the display panel 7041, and when the touch-sensitive surface 7031 detects a touch operation thereon or nearby, it is transmitted to the processor 708 to determine the type of the touch event, and then the processor 708 is based on the touch event.
  • the type provides a corresponding visual output on display panel 7041.
  • touch-sensitive surface 7031 and display panel 7041 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 7031 can be integrated with display panel 7041 for input. And output function.
  • Terminal 70 may also include at least one type of sensor 703, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 7041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 7041 when the terminal 70 moves to the ear. / or backlight and so on.
  • the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and the magnitude and direction of gravity can be detected at rest, which can be used to identify the attitude of the terminal 70 (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as well as other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which can be configured in the terminal 70, here No longer.
  • Audio circuit 706, speaker 7061, and microphone 7062 can provide an audio interface between the user and terminal 70.
  • the audio circuit 706 can transmit the converted electrical data of the received audio data to the speaker 7061, and convert it into a sound signal output by the speaker 7061; on the other hand, the microphone 7062 converts the collected sound signal into an electrical signal, and the audio circuit 706 After receiving, it is converted into audio data, and then processed by the audio data output processor 708, transmitted to the terminal, for example, via the RF circuit 701, or outputted to the memory 702 for further processing.
  • the audio circuit 706 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 70.
  • WiFi is a short-range wireless transmission technology
  • the terminal 70 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 707, which provides wireless broadband Internet access for users.
  • FIG. 7 shows the WiFi module 707, it can be understood that it does not belong to the essential configuration of the terminal 70, and may be omitted as needed within the scope of not changing the essence of the invention.
  • Processor 708 is the control center of terminal 70, which connects various portions of the entire terminal 70 using various interfaces and lines, by running or executing computer programs and/or modules stored in memory 702, and recalling data stored in memory 702. The various functions and processing data of the terminal 70 are executed to perform overall monitoring of the terminal 70.
  • the processor 708 may include one or more processing cores; preferably, the processor 708 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 708.
  • the terminal 70 also includes a power source 709 (such as a battery) that supplies power to the various components.
  • the power source can be logically coupled to the processor 708 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the power supply 709 can also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal 70 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the output device 704 (or the input device 703) of the terminal is a touch screen display
  • the terminal 70 further includes a memory 702, a processor 708, and one or more computer programs, wherein the one or more computers
  • the program is stored in the memory 702, and the processor 708 is configured to call the program instructions stored in the memory 702 to execute the image processing methods shown in FIG. 1, FIG. 3, FIG. 4, and FIG.
  • the steps of the method or algorithm described in connection with the disclosure of the embodiments of the present invention may be implemented in a hardware manner, or may be implemented by a processor executing software program instructions.
  • the software program instructions may be composed of corresponding software modules, which may be stored in RAM, flash memory, ROM, Erasable Programmable ROM (EPROM), and electrically erasable programmable read only memory (Electrically EPROM). , EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor to enable the processor to read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in the terminal.
  • the processor and the storage medium can also exist as discrete components in the terminal device.
  • the functions described in the embodiments of the present invention may be implemented in hardware, software, firmware, or any combination thereof.
  • the functions may be stored in a computer readable medium or transmitted as one or more program instructions or code on a computer readable medium.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

An image processing method, a terminal, a computer storage medium and a computer program. The method comprises: the terminal receives a first request sent from a user for playing a GIF image (S101); in response to the first request, the terminal acquires, from its memory, bitmap BMP formatted data corresponding to the GIF image, the BMP formatted data being data obtained by decoding the GIF image (S102); the terminal plays the BMP formatted data corresponding to the GIF image (S103); and when the terminal does not receive within a preset duration a second request sent from the user for playing the GIF image, the BMP formatted data corresponding to the GIF image, stored in the memory of the terminal, is deleted (S104). According to the method, the image playing time can be shortened, the image playing efficiency can be improved and user experience can be enhanced; and when a deletion condition is satisfied, the bitmap formatted data corresponding to the GIF images, stored in the memory of the terminal, can be deleted, thus, occupation of excessive memory resources is avoided.

Description

图像处理方法、终端、计算机存储介质及计算机程序Image processing method, terminal, computer storage medium, and computer program 技术领域Technical field
本发明涉及智能终端技术领域,尤其涉及一种图像处理方法、终端、计算机存储介质及计算机程序。The present invention relates to the field of intelligent terminal technologies, and in particular, to an image processing method, a terminal, a computer storage medium, and a computer program.
背景技术Background technique
信息时代的到来,智能化产品如雨后春笋般的涌现出来,导致各类应用及用户量与日俱增,其中尤以社交类产品应用深受广大用户的推崇使用。在使用中,我们可以发现,为了使得社交类的应用更能丰富人们的生活方式,增强交互、提高用户体验,往往都使用了大量的图像(例如图片或动画)。然而,在多个图像重复加载的过程中,经常会出现图像加载过程耗时长的问题,此时,加载图像的流畅度低,用户体验较差。With the advent of the information age, intelligent products have sprung up, resulting in an increasing number of applications and users. Among them, the application of social products is highly praised by users. In use, we can find that in order to make social applications more enrich people's lifestyles, enhance interactions, and improve user experience, often use a large number of images (such as pictures or animations). However, in the process of repeated loading of multiple images, the problem that the image loading process takes a long time often occurs. At this time, the smoothness of the loaded image is low, and the user experience is poor.
例如,用户因为个人喜好,重复加载同一图像互换格式(Graphics Interchange Format,GIF)图片,现有技术中,用户每次请求终端加载同一GIF图片时,终端都需要对该GIF图片进行解码操作,解码操作会占用一定的时间,因此导致终端加载GIF图片的时间较长。For example, the user repeatedly loads the same image interchange format (GIF) picture because of personal preference. In the prior art, the terminal needs to decode the GIF picture every time the user requests the terminal to load the same GIF picture. The decoding operation takes a certain amount of time, which causes the terminal to load the GIF picture for a long time.
发明内容Summary of the invention
本发明实施例提供一种图像处理方法、终端、计算机存储介质及计算机程序,可以缩短图像的播放时间,提高图像播放效率,提高用户体验,并且,可以在满足删除条件时将内存中保存的GIF图像对应的位图(Bitmap,BMP)格式数据删除,避免占用过多的内存资源。The embodiment of the invention provides an image processing method, a terminal, a computer storage medium and a computer program, which can shorten the playing time of the image, improve the image playing efficiency, improve the user experience, and can save the GIF in the memory when the deletion condition is met. Bitmap (BMP) format data corresponding to the image is deleted to avoid occupying too much memory resources.
第一方面,本发明实施例提供了一种图像处理方法,该方法包括:In a first aspect, an embodiment of the present invention provides an image processing method, where the method includes:
终端接收用户发送的播放图像互换格式GIF图像的第一请求;Receiving, by the terminal, a first request for playing an image interchange format GIF image sent by the user;
所述终端响应所述第一请求,从所述终端的内存中获取所述GIF图像对应的位图BMP格式数据,所述BMP格式数据为对所述GIF图像进行解码得到的数据;And the terminal, in response to the first request, acquiring bitmap BMP format data corresponding to the GIF image from a memory of the terminal, where the BMP format data is data obtained by decoding the GIF image;
所述终端播放所述GIF图像对应的BMP格式数据;The terminal plays BMP format data corresponding to the GIF image;
当在预设时长到达时还未接收到用户发送的播放所述GIF图像的第二请求时,将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除。When the second request for playing the GIF image sent by the user has not been received when the preset duration arrives, the BMP format data corresponding to the GIF image saved in the memory of the terminal is deleted.
通过本发明实施例,当终端接收到用户发送的播放GIF图像的请求时,直接从终端的内存中获取该图像对应的位图,而非对GIF图像进行重复解码,由于整个播放过程减少了重复解码操作,因此可缩短图像的播放时间,提高图像播放效率,提高用户体验。此外,在GIF图像在一定时间内没有被用户要求播放时,终端可以将内存中保存的该GIF图像对应的BMP数据删除,从而减少内存的消耗,避免终端出现卡顿。According to the embodiment of the present invention, when the terminal receives the request for playing the GIF image sent by the user, the bitmap corresponding to the image is directly obtained from the memory of the terminal, instead of repeatedly decoding the GIF image, because the entire playback process reduces the repetition. The decoding operation can shorten the playback time of the image, improve the image playback efficiency, and improve the user experience. In addition, when the GIF image is not requested by the user for a certain period of time, the terminal can delete the BMP data corresponding to the GIF image saved in the memory, thereby reducing memory consumption and avoiding the terminal being stuck.
结合第一方面,在第一方面的第一种实现方式中,所述终端接收用户发送的播放图像互换格式GIF图像的第一请求之前,还包括:In conjunction with the first aspect, in a first implementation manner of the first aspect, before the receiving, by the terminal, the first request for playing the image interchange format GIF image sent by the user, the terminal further includes:
终端接收用户发送的播放所述GIF图像的第三请求;Receiving, by the terminal, a third request sent by the user to play the GIF image;
所述终端响应所述第三请求,从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据;The terminal, in response to the third request, reads GIF format data corresponding to the GIF image from a disk of the terminal;
所述终端对所述GIF图像对应的GIF格式数据进行解码,得到所述GIF图像对应的BMP格式数据;Decoding, by the terminal, the GIF format data corresponding to the GIF image, to obtain BMP format data corresponding to the GIF image;
所述终端将所述GIF图像对应的BMP格式数据保存在所述终端的内存中以及所述终端的磁盘中。The terminal saves BMP format data corresponding to the GIF image in a memory of the terminal and a disk of the terminal.
通过本发明实施例,终端在接收到用户发送的播放GIF图像的请求时,若终端的内存中没有保存该GIF图像对应的BMP格式数据,终端将GIF图像进行解码得到对应的BMP格式数据,并将其保存在内存中,当终端后续再次接收到用户发送的播放该GIF图像的请求时,可以直接从内存中获取GIF图像对应的BMP格式数据,而无需再次对该GIF图像进行解码操作,可以缩减图像的播放时间。According to the embodiment of the present invention, when the terminal receives the request for playing the GIF image sent by the user, if the BMP format data corresponding to the GIF image is not stored in the memory of the terminal, the terminal decodes the GIF image to obtain the corresponding BMP format data, and Save it in the memory. When the terminal receives the request for playing the GIF image sent by the user, the BMP format data corresponding to the GIF image can be directly obtained from the memory without decoding the GIF image again. Reduce the playback time of the image.
结合第一方面或第一方面的第一种实现方式,在第一方面的第二种实现方式中,所述将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除之后,还包括:With the first aspect or the first implementation of the first aspect, in a second implementation manner of the first aspect, after the BMP format data corresponding to the GIF image saved in the memory of the terminal is deleted, Also includes:
终端接收用户发送的播放所述GIF图像的第四请求;Receiving, by the terminal, a fourth request sent by the user to play the GIF image;
所述终端响应所述第四请求,从所述终端的磁盘中获取所述GIF图像对应的BMP格式数据;And the terminal, in response to the fourth request, acquiring BMP format data corresponding to the GIF image from a disk of the terminal;
所述终端将所述GIF图像对应的BMP格式数据保存在所述终端的内存中。The terminal saves BMP format data corresponding to the GIF image in a memory of the terminal.
通过本发明实施例,终端在接收到用户发送的播放GIF图像的请求时,若终端的内存中该GIF图像对应的BMP格式数据在预设时长达到时已被删除,终端从终端的磁盘中获取该GIF图像对应的BMP格式数据,并将其保存到终端的内存中,而无需将GIF图像进行重复解码,可缩短图像的播放时间,提高图像播放效率。According to the embodiment of the present invention, when receiving the request for playing the GIF image sent by the user, if the BMP format data corresponding to the GIF image in the memory of the terminal is deleted when the preset duration is reached, the terminal obtains the disk from the terminal. The BMP format data corresponding to the GIF image is saved in the memory of the terminal without repeatedly decoding the GIF image, thereby shortening the playing time of the image and improving the image playing efficiency.
结合第一方面的第一种实现方式,在第一方面的第三种实现方式中,所述终端从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据,包括:With reference to the first implementation manner of the first aspect, in a third implementation manner of the first aspect, the terminal, the GIF format data corresponding to the GIF image is read from the disk of the terminal, including:
所述终端采用read方式从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据。The terminal reads the GIF format data corresponding to the GIF image from the disk of the terminal in a read manner.
GIF图像包括终端通过服务器下载的GIF图像,终端将该GIF图像进行处理(例如但不限于裁剪,加边框、去边框等)之后,将该GIF图像对应的GIF格式数据保存在磁盘中。之后,所述终端在使用read方式读取GIF图像时,需要先将磁盘中保存的该GIF图像对应的GIF格式数据读入到内核缓冲区,再将该GIF图像对应的GIF格式数据从内核缓冲区复制到内存中。The GIF image includes the GIF image downloaded by the terminal through the server, and the terminal processes the GIF image (such as, but not limited to, cropping, bordering, de-frame, etc.), and then saves the GIF format data corresponding to the GIF image on the disk. After the terminal reads the GIF image by using the read mode, the GIF format data corresponding to the GIF image saved in the disk is first read into the kernel buffer, and the GIF format data corresponding to the GIF image is buffered from the kernel. The area is copied to memory.
结合第一方面的第一种实现方式,在第一方面的第四种实现方式中,所述终端从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据,包括:With reference to the first implementation of the first aspect, in a fourth implementation manner of the first aspect, the terminal, the GIF format data corresponding to the GIF image is read from the disk of the terminal, including:
所述终端采用内存映射方式从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据。The terminal reads the GIF format data corresponding to the GIF image from the disk of the terminal by using a memory mapping manner.
通过本发明实施例,终端采用内存映射方式从终端的磁盘中读取GIF图像,相较于采用read方式读取GIF图像,内存映射方式读取GIF图像无需经历将内核缓冲区的数据复制到内存中这一过程,也即是说,终端直接将磁盘中保存的该GIF图像对应的GIF格式数据读入到内存中,因此缩短了读取过程的时间,进而缩短了播放GIF图像的时间,从而可以提高播放图像的效率。According to the embodiment of the present invention, the terminal reads the GIF image from the disk of the terminal by using the memory mapping manner, and reads the GIF image in the memory mapping manner without reading the data of the kernel buffer to the memory. In this process, that is, the terminal directly reads the GIF format data corresponding to the GIF image saved in the disk into the memory, thereby shortening the reading process time, thereby shortening the time for playing the GIF image, thereby shortening the time for playing the GIF image, thereby Can improve the efficiency of playing images.
结合第一方面的第一种实现方式,在第一方面的第五种实现方式中,所述终端对所述GIF图像对应的GIF格式数据进行解码,包括:With reference to the first implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the terminal, in the GIF format data corresponding to the GIF image, includes:
所述终端采用用户界面(User Interface,UI)线程对所述GIF图像对应的GIF格式数据进行解码。The terminal decodes the GIF format data corresponding to the GIF image by using a user interface (UI) thread.
结合第一方面的第一种实现方式,在第一方面的第六种实现方式中,所述终端对所述GIF图像对应的GIF格式数据进行解码,包括:With reference to the first implementation manner of the first aspect, in a sixth implementation manner of the first aspect, the terminal, in the GIF format data corresponding to the GIF image, includes:
所述终端采用后台线程对所述GIF图像对应的GIF格式数据进行解码。The terminal decodes the GIF format data corresponding to the GIF image by using a background thread.
通过本发明实施例,终端采用后台线程对所述目标图像进行解码,相比于采用UI线程对所述GIF图像进行解码来说,可降低UI线程产生的CPU的消耗,避免UI线程 的卡顿。According to the embodiment of the present invention, the terminal decodes the target image by using a background thread, which can reduce the CPU consumption generated by the UI thread and avoid the jam of the UI thread, compared to decoding the GIF image by using the UI thread. .
结合第一方面,或第一方面的第一种至第六种任一种实现方式,在第一方面的第七种实现方式中,所述终端播放所述GIF图像对应的BMP格式数据之前,还包括:With reference to the first aspect, or the first to sixth implementation manners of the first aspect, in the seventh implementation manner of the first aspect, before the terminal plays the BMP format data corresponding to the GIF image, Also includes:
所述终端判断所述终端当前剩余内存是否大于或等于播放所述GIF图像对应的BMP格式数据所需的内存;Determining, by the terminal, whether the current remaining memory of the terminal is greater than or equal to a memory required for playing BMP format data corresponding to the GIF image;
若是,则执行所述播放所述GIF图像对应的BMP格式数据的步骤;If yes, performing the step of playing the BMP format data corresponding to the GIF image;
若否,则所述终端关闭N个应用程序,并执行所述播放所述GIF图像对应的BMP格式数据的步骤,N为正整数,所述终端关闭所述N个应用程序后所述终端的内存大于或等于播放所述GIF图像对应的BMP格式数据所需的内存。If not, the terminal closes the N applications, and performs the step of playing the BMP format data corresponding to the GIF image, where N is a positive integer, and the terminal closes the N applications after the terminal The memory is greater than or equal to the memory required to play the BMP format data corresponding to the GIF image.
通过本发明实施例,终端在终端当前剩余内存小于所述GIF图像对应的BMP格式数据的情况下,通过关闭应用程序,释放内存资源,以满足用户请求播放GIF图像的需求,使得终端当前剩余内存满足播放所述GIF图像对应的BMP格式数据的要求。According to the embodiment of the present invention, when the current memory of the terminal is less than the BMP format data corresponding to the GIF image, the terminal releases the memory resource by closing the application program, so as to meet the requirement of the user requesting to play the GIF image, so that the terminal currently has remaining memory. The requirement to play the BMP format data corresponding to the GIF image is satisfied.
第二方面,本发明实施例提供了一种终端,该终端包括用于执行第一方面所描述的图像处理方法的模块或单元。In a second aspect, an embodiment of the present invention provides a terminal, where the terminal includes a module or unit for performing the image processing method described in the first aspect.
第三方面,本发明实施例提供了另一种终端,包括处理器和存储器,所述处理器和存储器相互连接,其中,所述存储器用于存储支持终端执行第一方面所描述的图像处理方法的应用程序代码,所述处理器被配置用于执行第一方面所描述的图像处理方法。In a third aspect, an embodiment of the present invention provides another terminal, including a processor and a memory, where the processor and the memory are connected to each other, wherein the memory is used to store a support terminal to perform the image processing method described in the first aspect. Application code, the processor being configured to perform the image processing method described in the first aspect.
第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行第一方面所描述的图像处理方法。In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where the computer storage medium stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processing The image processing method described in the first aspect is performed.
第五方面,本发明实施例提供了一种计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行第一方面所描述的图像处理方法。In a fifth aspect, an embodiment of the present invention provides a computer program, the computer program comprising program instructions that, when executed by a processor, cause the processor to perform the image processing method described in the first aspect.
实施本发明方法实施例,终端在第一次接收到用户发送的播放GIF图像的请求时,可以对该GIF图像进行解码,并将解码后得到的该GIF图像对应的BMP位图格式数据保存在内存中。因此,当终端后续再次接收到用户发送的GIF图像的请求时,可以直接从内存中获取该GIF图像对应的BMP格式数据,进而直接播放该GIF图像对应的BMP格式数据,无需再次对该GIF图像进行解码操作,节省了终端解码的过程,缩短了终端播放该GIF图像的时间,提高了图像播放效率,提高用户观看图像的体验,并且,可以在满足删除条件时将内存中保存的GIF图像对应的BMP格式数据删除,避免占用过多的内存资源。In the embodiment of the method of the present invention, when the terminal receives the request for playing the GIF image sent by the user for the first time, the terminal may decode the GIF image, and save the BMP bitmap format data corresponding to the decoded GIF image in the decoding. In memory. Therefore, when the terminal subsequently receives the request for the GIF image sent by the user again, the BMP format data corresponding to the GIF image can be directly obtained from the memory, and the BMP format data corresponding to the GIF image is directly played, and the GIF image is not needed again. The decoding operation saves the decoding process of the terminal, shortens the time for the terminal to play the GIF image, improves the image playing efficiency, improves the user's experience of viewing the image, and can correspond to the GIF image saved in the memory when the deletion condition is satisfied. Delete BMP format data to avoid taking up too much memory resources.
附图说明DRAWINGS
为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below.
图1是本发明实施例提供的一种图像处理方法的流程示意图;1 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
图2A是本发明实施例提供的一种微信应用的聊天界面示意图;2A is a schematic diagram of a chat interface of a WeChat application according to an embodiment of the present invention;
图2B是本发明实施例提供的一种表情界面示意图;2B is a schematic diagram of an expression interface according to an embodiment of the present invention;
图2C是本发明实施例提供的另一种微信应用的聊天界面示意图;2C is a schematic diagram of a chat interface of another WeChat application according to an embodiment of the present invention;
图2D是本发明实施例提供的另一种表情界面示意图;2D is a schematic diagram of another expression interface provided by an embodiment of the present invention;
图3是本发明实施例提供的另一种图像处理方法的流程示意图;3 is a schematic flowchart of another image processing method according to an embodiment of the present invention;
图4是本发明实施例提供的另一种图像处理方法的流程示意图;4 is a schematic flowchart of another image processing method according to an embodiment of the present invention;
图5是本发明实施例提供的另一种图像处理方法的流程示意图;FIG. 5 is a schematic flowchart diagram of another image processing method according to an embodiment of the present disclosure;
图6是本发明实施例提供的一种终端的结构示意图;FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure;
图7是本发明实施例提供的另一种终端的结构示意图。FIG. 7 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
参见图1,是本发明实施例提供一种图像处理方法的示意流程图,如图1所示,该方法包括但不限于如下步骤S101-S104:FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes, but is not limited to, the following steps S101-S104:
S101、终端接收用户发送的播放图像互换格式GIF图像的第一请求。S101. The terminal receives a first request for playing an image interchange format GIF image sent by a user.
其中,终端可以包括移动手机、平板电脑、台式电脑、个人数字助理(Personal Digital Assistant,PDA)、移动互联网设备(Mobile Internet Device,MID)、智能穿戴设备(如智能手表、智能手环)等各种用户可以使用的终端设备,本发明实施例不作限定。The terminal may include a mobile phone, a tablet computer, a desktop computer, a personal digital assistant (PDA), a mobile internet device (MID), a smart wearable device (such as a smart watch, a smart bracelet), and the like. The terminal device that can be used by the user is not limited in the embodiment of the present invention.
在一些可能的实现方式中,终端可以安装多个社交类应用程序,例如:QQ、微信、陌陌、MSN、YY等。本发明实施例可以应用的场景包括但不限于:在YY频道中显示虚拟礼物对应的GIF动画缩略图,用户可以点击GIF动画缩略图触发终端播放该GIF动画;在即时通信软件(包括但不限于QQ、微信、陌陌、MSN等)聊天界面中显示GIF表情缩略图,用户可以点击GIF表情缩略图触发终端播放该GIF表情。In some possible implementations, the terminal may install multiple social applications, such as QQ, WeChat, Momo, MSN, YY, and the like. The scenes applicable to the embodiments of the present invention include, but are not limited to, displaying a GIF animation thumbnail corresponding to the virtual gift in the YY channel, and the user can click the GIF animation thumbnail to trigger the terminal to play the GIF animation; in the instant messaging software (including but not limited to QQ, WeChat, Momo, MSN, etc.) display the GIF emoticon thumbnail in the chat interface, the user can click the GIF emoticon thumbnail to trigger the terminal to play the GIF emoticon.
在一种实现方式中,终端可以具有触控屏,该触控屏可以接收到用户的点击操作。终端开启社交类的应用程序后,可以显示该应用程序的操作页面,操作页面上可以显示多个GIF图像对应的缩略图,用户可以通过点击某一GIF图像对应的缩略图来触发播放该GIF图像,这种情况下,终端接收到该用户的点击操作也即接收到用户发送的第一请求。其中,缩略图也可以是由用户触发显示的。例如,针对微信应用来说,参见图2A,是本发明实施例提供的一种微信应用的聊天界面示意图。如图2A所示,用户A通过微信与用户B进行即时通信,20为聊天界面,聊天界面20上显示有用户B的昵称201、用户A向用户B发送的信息202以及输入法编辑界面203,用户A可以点击输入法编辑界面203中的表情
Figure PCTCN2018116245-appb-000001
按钮触发终端显示表情界面,参见图2B,是本发明实施例提供的一种表情界面示意图。204为表情界面,在表情界面204中可以显示有多个GIF图像对应的缩略图,例如,在图2B中,表情界面204显示有8个GIF表情,分别为GIF表情1-GIF表情8,假设用户A想要向用户B发送GIF表情3,则用户A可以点击GIF表情3,终端接收到用户A点击GIF表情3的操作后,将GIF表情3发送给用户B,此时,聊天界面20上会动态播放GIF表情3的动画。需要说明的是,上述聊天界面以及表情界面均只是作为一种示例,在具体应用中,聊天界面以及表情界面的呈现方式以及显示的内容可以不限于上述示例。
In an implementation manner, the terminal may have a touch screen, and the touch screen may receive a click operation of the user. After the terminal opens the social application, the operation page of the application can be displayed, and the thumbnail corresponding to the multiple GIF images can be displayed on the operation page, and the user can trigger the playback of the GIF image by clicking the thumbnail corresponding to a certain GIF image. In this case, the terminal receives the click operation of the user, that is, receives the first request sent by the user. Among them, the thumbnail can also be displayed by the user. For example, for a WeChat application, refer to FIG. 2A, which is a schematic diagram of a chat interface of a WeChat application according to an embodiment of the present invention. As shown in FIG. 2A, user A performs instant communication with user B through WeChat, 20 is a chat interface, and nickname 201 of user B, information 202 sent by user A to user B, and input method editing interface 203 are displayed on the chat interface 20. User A can click on the expression in the input method editing interface 203.
Figure PCTCN2018116245-appb-000001
The button triggering terminal displays an expression interface. Referring to FIG. 2B, it is a schematic diagram of an expression interface provided by an embodiment of the present invention. 204 is an expression interface. In the expression interface 204, a thumbnail corresponding to a plurality of GIF images can be displayed. For example, in FIG. 2B, the expression interface 204 displays 8 GIF expressions, respectively, a GIF expression 1-GIF expression 8, assuming User A wants to send GIF expression 3 to user B, then user A can click GIF expression 3. After receiving the operation of user A clicking GIF expression 3, the terminal sends GIF expression 3 to user B. At this time, on chat interface 20 The animation of GIF Expression 3 will be played dynamically. It should be noted that the above chat interface and the expression interface are only examples. In a specific application, the manner in which the chat interface and the expression interface are presented and the displayed content may not be limited to the above examples.
以上是以点击操作作为用户发送的第一请求来进行举例的,在具体应用中,用户发送第一请求的形式可以不限于点击操作。例如,用户可以针对GIF图像对应的缩略图触发按压操作、滑动操作等方式来向终端发送播放该GIF图像的第一请求,或者,用户还可以通过语音等方式向终端发送播放该GIF图像的第一请求。The above is exemplified by the click operation as the first request sent by the user. In a specific application, the form in which the user sends the first request may not be limited to the click operation. For example, the user may send a first request to play the GIF image to the terminal according to a thumbnail triggering operation corresponding to the GIF image, a sliding operation, or the like, or the user may also send the first playback of the GIF image to the terminal by voice or the like. A request.
在另一种实现方式中,终端也可以不具备触控屏,用户可以借助鼠标指针来点选终端显示屏上显示的GIF图像对应的缩略图,从而触发终端播放该GIF图像,这种情况下,终端接收到鼠标点击操作也即接收到用户发送的第一请求。其中,缩略图也可以是由用户触发显示的。例如,针对微信应用来说,参见图2C,是本发明实施例提供的另一种微信应用的聊天界面示意图。如图2C所示,用户A通过微信与用户B进行即时通信,20为聊天界面,聊天界面20上显示有用户B的昵称201、用户A向用户B 发送的信息202、输入法编辑界面203以及缩小功能键205、放大功能键206、关闭功能键207,用户A可以借助鼠标指针点击输入法编辑界面203中的表情
Figure PCTCN2018116245-appb-000002
按钮触发终端显示表情界面204,参见图2D,是本发明实施例提供的另一种表情界面示意图。204为表情界面,在表情界面204中可以显示有多个GIF图像对应的缩略图,例如,在图2D中,表情界面204显示有16个GIF表情,分别为GIF表情1-GIF表情16,假设用户A想要向用户B发送GIF表情3,则用户A可以借助鼠标指针点击GIF表情3,终端接收到用户A点击GIF表情3的操作后,将GIF表情3发送给用户B,此时,聊天界面20上会动态播放GIF表情3的动画。需要说明的是,上述聊天界面以及表情界面均只是作为一种示例,在具体应用中,聊天界面以及表情界面的呈现方式以及显示的内容可以不限于上述示例。
In another implementation manner, the terminal may not have a touch screen, and the user may click the mouse pointer to select a thumbnail corresponding to the GIF image displayed on the terminal display, thereby triggering the terminal to play the GIF image. In this case, The terminal receives the mouse click operation, that is, receives the first request sent by the user. Among them, the thumbnail can also be displayed by the user. For example, for a WeChat application, see FIG. 2C, which is a schematic diagram of a chat interface of another WeChat application provided by an embodiment of the present invention. As shown in FIG. 2C, user A performs instant communication with user B through WeChat, 20 is a chat interface, and nickname 201 of user B, information 202 sent by user A to user B, input method editing interface 203, and The function key 205, the zoom function key 206, and the close function key 207 are reduced, and the user A can click the input method to edit the expression in the interface 203 by means of the mouse pointer.
Figure PCTCN2018116245-appb-000002
The button triggering terminal displays the expression interface 204. Referring to FIG. 2D, it is another schematic diagram of the expression interface provided by the embodiment of the present invention. 204 is an expression interface, and a thumbnail image corresponding to a plurality of GIF images can be displayed in the expression interface 204. For example, in FIG. 2D, the expression interface 204 displays 16 GIF expressions, respectively, a GIF expression 1-GIF expression 16, assuming User A wants to send GIF expression 3 to user B. User A can click GIF expression 3 with the mouse pointer. After receiving the operation of user A clicking GIF expression 3, the terminal sends GIF expression 3 to user B. At this time, chat The animation of GIF Expression 3 is dynamically played on the interface 20. It should be noted that the above chat interface and the expression interface are only examples. In a specific application, the manner in which the chat interface and the expression interface are presented and the displayed content may not be limited to the above examples.
以上是以鼠标指针的点击操作作为用户发送的第一请求来进行举例的,用户借助鼠标的点击操作可以包括单击操作、双击操作,本发明实施例不做具体限定。在具体应用中,用户发送第一请求的形式可以不限于点击操作,用户还可以移动鼠标指针使其处于GIF图像对应的缩略图上向终端发送播放该GIF图像的第一请求。The above is exemplified by the click operation of the mouse pointer as the first request sent by the user. The click operation of the mouse by the user may include a click operation and a double-click operation, which are not specifically limited in the embodiment of the present invention. In a specific application, the form in which the user sends the first request may not be limited to the click operation, and the user may also move the mouse pointer to send the first request for playing the GIF image to the terminal on the thumbnail corresponding to the GIF image.
S102、终端响应第一请求,从终端的内存中获取GIF图像对应的位图BMP格式数据,BMP格式数据为对GIF图像进行解码得到的数据。S102. The terminal obtains bitmap BMP format data corresponding to the GIF image from the memory of the terminal in response to the first request, where the BMP format data is data obtained by decoding the GIF image.
本发明实施例中,终端的内存是指终端的存储器中对应操作系统的存储空间,其作用在于暂时存放CPU的运算数据。终端中所有应用程序的运行都是在内存中进行的,对于每个应用程序来说,在内存中均有该应用程序对应的存储空间。In the embodiment of the present invention, the memory of the terminal refers to the storage space of the corresponding operating system in the memory of the terminal, and the function thereof is to temporarily store the operation data of the CPU. All applications in the terminal are run in memory. For each application, there is storage space corresponding to the application in memory.
终端接收到用户发送的播放某一GIF图像的请求之后,终端响应其请求,从终端的内存中获取该GIF图像对应的位图BMP格式数据。如果针对具体的某一应用程序来说,这一获取操作实质上为终端响应用户播放GIF图像的请求,从该应用程序所对应的存储空间内获取该GIF图像对应的位图BMP格式数据。例如,参见图2B,用户A在微信聊天界面中点击GIF表情3对应的缩略图,则终端从内存中对应微信应用的存储空间中获取GIF表情3对应的BMP格式数据。After receiving the request sent by the user to play a certain GIF image, the terminal acquires the bitmap BMP format data corresponding to the GIF image from the memory of the terminal in response to the request. For a specific application, the acquisition operation is substantially a request for the terminal to play the GIF image in response to the user, and the bitmap BMP format data corresponding to the GIF image is obtained from the storage space corresponding to the application. For example, referring to FIG. 2B, the user A clicks the thumbnail corresponding to the GIF expression 3 in the WeChat chat interface, and the terminal acquires the BMP format data corresponding to the GIF expression 3 from the storage space corresponding to the WeChat application in the memory.
S103、终端播放GIF图像对应的BMP格式数据。S103. The terminal plays BMP format data corresponding to the GIF image.
终端获取到GIF图像对应的BMP格式数据之后,播放GIF图像对应的BMP格式数据。例如,参见图2B,终端从内存中对应微信应用的存储空间中获取到GIF表情3对应的BMP格式数据后,播放GIF表情3对应的BMP格式数据。After acquiring the BMP format data corresponding to the GIF image, the terminal plays the BMP format data corresponding to the GIF image. For example, referring to FIG. 2B, after acquiring the BMP format data corresponding to the GIF expression 3 from the storage space corresponding to the WeChat application in the memory, the terminal plays the BMP format data corresponding to the GIF expression 3.
S104、当在预设时长到达时还未接收到用户发送的播放所述GIF图像的第二请求时,将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除。S104. When the second request for playing the GIF image sent by the user is not received when the preset duration arrives, the BMP format data corresponding to the GIF image saved in the memory of the terminal is deleted.
在一些可能的实现方式中,当终端播放了上述GIF图像对应的BMP格式数据时即可以开始计时,在计时达到预设时长时还未接收到用户发送的播放所述GIF图像的第二请求时,将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除。或者,当终端接收到用户发送的播放GIF图像的第一请求时即可以开始计时,在计时达到预设时长时还未接收到用户发送的播放所述GIF图像的第二请求时,将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除。这里,第二请求与第一请求是不同的两次请求,第二请求针对的GIF图像与上述第一请求针对的GIF图像为同一个,第二请求的具体实现形式可以参考上述第一请求的相关描述,此处不再赘述。In some possible implementation manners, when the terminal plays the BMP format data corresponding to the GIF image, the timing can be started, and when the second request for playing the GIF image sent by the user has not been received when the timing reaches the preset duration, And deleting the BMP format data corresponding to the GIF image saved in the memory of the terminal. Alternatively, when the terminal receives the first request for playing the GIF image sent by the user, the terminal may start timing, and when the second time request for playing the GIF image sent by the user has not been received when the timing reaches the preset duration, the The BMP format data corresponding to the GIF image saved in the memory of the terminal is deleted. Here, the second request is different from the first request, and the GIF image for the second request is the same as the GIF image for the first request, and the specific implementation of the second request may refer to the first request. Related descriptions are not described here.
可选的,预设时长可以是由终端系统默认设置的,也可以是由终端用户自主设置的,本发明实施例不作具体限定。例如,预设时长可以是10分钟。Optionally, the preset duration may be set by default by the terminal system, or may be set by the terminal user, which is not specifically limited in the embodiment of the present invention. For example, the preset duration can be 10 minutes.
例如,终端接收到用户发送的播放GIF表情3的第一请求的时间为8点整,那么预设时长是从8点整开始计时,一直到8点10分结束。若在预设时长到达,即时刻点到达8点10分的这段时间内,终端未曾接收过用户发送的播放GIF表情3的第二请求,此时,删除终端的内存中保存的GIF表情3对应的BMP格式数据,即GIF表情3对应的BMP格式数据占用的内存被释放。For example, when the terminal receives the first request for playing the GIF expression 3 sent by the user, the time is 8 o'clock, and the preset duration is started from 8 o'clock, and ends at 8:10. If the preset time length arrives, that is, the time point reaches 8:10, the terminal has not received the second request sent by the user to play the GIF expression 3. At this time, the GIF expression saved in the memory of the terminal is deleted. The corresponding BMP format data, that is, the memory occupied by the BMP format data corresponding to the GIF expression 3 is released.
通过实施本发明实施例,当终端接收到用户发送的GIF图像的请求时,直接从内存中获取该GIF图像对应的BMP格式数据,进而直接播放该GIF图像对应的BMP格式数据,无需对该GIF图像进行解码操作,节省了终端解码的过程,缩短了终端播放该GIF图像的时间,提高了图像播放效率,提高用户观看图像的体验,并且,若GIF图像在预设时长达到时没有被用户要求再次播放,终端会将该GIF图像对应的BMP格式数据从内存中删除,避免占用过多内存资源,从而避免APP出现卡顿现象。By implementing the embodiment of the present invention, when the terminal receives the request for the GIF image sent by the user, the BMP format data corresponding to the GIF image is directly obtained from the memory, and the BMP format data corresponding to the GIF image is directly played, and the GIF is not needed. The image is decoded, which saves the process of decoding the terminal, shortens the time for the terminal to play the GIF image, improves the image playing efficiency, improves the user's experience of viewing the image, and does not require the user to request the GIF image when the preset time is reached. After playing again, the terminal deletes the BMP format data corresponding to the GIF image from the memory, thereby avoiding occupying too much memory resources, thereby avoiding the jam phenomenon of the APP.
可选的,终端在执行上述步骤S101之前,还可以执行步骤S105-S108,具体的,参见图3,是本发明实施例提供的另一种图像处理方法的流程示意图。以下对步骤S105-S108进行详细描述。Optionally, the terminal may further perform steps S105-S108 before performing the foregoing step S101. Specifically, refer to FIG. 3, which is a schematic flowchart of another image processing method according to an embodiment of the present invention. Steps S105-S108 are described in detail below.
S105、终端接收用户发送的播放所述GIF图像的第三请求。S105. The terminal receives a third request sent by the user to play the GIF image.
本发明实施例中,第三请求针对的GIF图像与上述第一请求针对的GIF图像为同一个,第三请求可以理解为用户第一次针对该GIF图像触发播放请求。第三请求的具体实现方式可以参考上述第一请求的相关描述,此处不再赘述。例如,第三请求也可以是通过用户点击GIF图像的缩略图触发的。In the embodiment of the present invention, the GIF image for the third request is the same as the GIF image for the first request, and the third request may be understood as the user first triggering the play request for the GIF image. For a specific implementation manner of the third request, refer to the related description of the foregoing first request, and details are not described herein again. For example, the third request may also be triggered by the user clicking on a thumbnail of the GIF image.
S106、所述终端响应所述第三请求,从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据。S106. The terminal, in response to the third request, reads GIF format data corresponding to the GIF image from a disk of the terminal.
由于用户针对某一GIF图像第一次触发播放请求时,终端的内存中没有保存该GIF图像对应的BMP格式数据,因此,终端需要从磁盘中读取该GIF图像对应的GIF格式数据,进而对所述GIF图像对应的GIF格式数据进行解码,得到所述GIF图像对应的BMP格式数据。When the user first triggers a play request for a certain GIF image, the BMP format data corresponding to the GIF image is not stored in the memory of the terminal. Therefore, the terminal needs to read the GIF format data corresponding to the GIF image from the disk, and then The GIF format data corresponding to the GIF image is decoded to obtain BMP format data corresponding to the GIF image.
可选的,终端可以采用read方式从终端的磁盘中读取GIF图像对应的GIF格式数据。该过程具体为:终端通过服务器下载GIF图像,终端将该GIF图像进行处理(例如但不限于裁剪,加边框、去边框等等)之后,将该GIF图像对应的GIF格式数据保存在磁盘中。之后,所述终端在使用read方式读取GIF图像时,需要先将磁盘中保存的该GIF图像对应的GIF格式数据读入到内核缓冲区,再将该GIF图像对应的GIF格式数据从内核缓冲区复制到内存中。Optionally, the terminal can read the GIF format data corresponding to the GIF image from the disk of the terminal by using a read mode. The process is specifically: the terminal downloads the GIF image through the server, and the terminal processes the GIF image (such as, but not limited to, cropping, bordering, de-frame, etc.), and then saves the GIF format data corresponding to the GIF image on the disk. After the terminal reads the GIF image by using the read mode, the GIF format data corresponding to the GIF image saved in the disk is first read into the kernel buffer, and the GIF format data corresponding to the GIF image is buffered from the kernel. The area is copied to memory.
可选的,终端也可以采用内存映射方式从终端的磁盘中读取GIF图像对应的GIF格式数据,与read读取方式相比,内存映射方式读取GIF图像无需经历将内核缓冲区的数据复制到内存中这一过程,也即是说,终端直接将磁盘中保存的该GIF图像对应的GIF格式数据读入到内存中,因此缩短了读取过程的时间,进而缩短了播放GIF图像的时间,从而可以提高播放图像的效率。Optionally, the terminal may also use the memory mapping manner to read the GIF format data corresponding to the GIF image from the disk of the terminal. Compared with the read reading mode, the memory mapping manner reads the GIF image without going through the data copy of the kernel buffer. The process of going to the memory, that is, the terminal directly reads the GIF format data corresponding to the GIF image saved in the disk into the memory, thereby shortening the reading process time and shortening the time for playing the GIF image. , which can improve the efficiency of playing images.
S107、所述终端对所述GIF图像对应的GIF格式数据进行解码,得到所述GIF图像对应的BMP格式数据;所述终端播放所述GIF图像对应的BMP格式数据。S107: The terminal decodes GIF format data corresponding to the GIF image to obtain BMP format data corresponding to the GIF image; and the terminal plays BMP format data corresponding to the GIF image.
可选的,终端可以采用UI线程对GIF图像对应的GIF格式数据进行解码。Optionally, the terminal may use the UI thread to decode the GIF format data corresponding to the GIF image.
可选的,终端也可以采用后台线程对GIF图像对应的GIF格式数据进行解码,与UI线程对GIF图像对应的GIF格式数据进行解码相比,采用后台线程对GIF图像对应的GIF格式数据进行解码,可降低UI线程产生的CPU的消耗,避免UI线程的卡顿。Optionally, the terminal may also use the background thread to decode the GIF format data corresponding to the GIF image, and decode the GIF format data corresponding to the GIF image by using the background thread compared with the UI thread to decode the GIF format data corresponding to the GIF image. Can reduce the CPU consumption generated by the UI thread and avoid the jam of the UI thread.
S108、所述终端将所述GIF图像对应的BMP格式数据保存在所述终端的内存中以及所述终端的磁盘中。S108. The terminal saves BMP format data corresponding to the GIF image in a memory of the terminal and a disk of the terminal.
终端将所述GIF图像对应的BMP格式数据保存在所述终端的磁盘中,目的在于,终端将该GIF图像对应的BMP格式数据从内存中删除后,可以直接从磁盘中获取该GIF图像对应的BMP格式数据,进而保存在内存中,避免了再次从磁盘中获取该GIF图像对应的GIF格式数据,进行解码,以获取该GIF图像对应的BMP格式数据,缩短了获取该GIF图像对应的BMP格式数据的时间,进而能够缩短播放图像的时间。The terminal saves the BMP format data corresponding to the GIF image on the disk of the terminal, and the purpose is that after the terminal deletes the BMP format data corresponding to the GIF image from the memory, the terminal can directly obtain the GIF image corresponding to the GIF image from the disk. The BMP format data is stored in the memory, and the GIF format data corresponding to the GIF image is obtained from the disk again, and decoded to obtain the BMP format data corresponding to the GIF image, thereby shortening the BMP format corresponding to the GIF image. The time of the data, in turn, can shorten the time for playing the image.
图3中的步骤S101-S104的具体实现可以参考上述图1所示实施例中的步骤S101-S104,此处不再赘述。For the specific implementation of the steps S101-S104 in FIG. 3, reference may be made to the steps S101-S104 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
通过实施本发明实施例,终端在接收到用户发送的播放GIF图像的请求时,若终端的内存中没有保存该GIF图像对应的BMP格式数据,终端将GIF图像进行解码得到对应的BMP格式数据,并将其保存在内存中,当终端后续再次接收到用户发送的播放目标图像的请求时,可以直接从内存中获取GIF图像对应的BMP格式数据,而无需再次对该GIF图像进行解码操作,可以缩减图像的播放时间。By implementing the embodiment of the present invention, when the terminal receives the request for playing the GIF image sent by the user, if the BMP format data corresponding to the GIF image is not stored in the memory of the terminal, the terminal decodes the GIF image to obtain the corresponding BMP format data. And storing the same in the memory, when the terminal subsequently receives the request for playing the target image sent by the user again, the BMP format data corresponding to the GIF image can be directly obtained from the memory, without performing the decoding operation on the GIF image again, Reduce the playback time of the image.
可选的,终端在执行上述步骤S104之后,还可以执行步骤S109-S111,具体的,参见图4,是本发明实施例提供的另一种图像处理方法的流程示意图。以下对步骤S109-S111进行详细描述。Optionally, after performing the foregoing step S104, the terminal may further perform steps S109-S111. Specifically, referring to FIG. 4, it is a schematic flowchart of another image processing method according to an embodiment of the present invention. Steps S109-S111 are described in detail below.
S109、终端接收用户发送的播放所述GIF图像的第四请求。S109. The terminal receives a fourth request sent by the user to play the GIF image.
本发明实施例中,第四请求针对的GIF图像与上述第一请求针对的GIF图像为同一个,第四请求可以理解为用户再次针对该GIF图像触发播放请求。第四请求的具体实现方式可以参考上述第一请求的相关描述,此处不再赘述。例如,第四请求也可以是通过用户点击GIF图像的缩略图触发的。In the embodiment of the present invention, the GIF image for the fourth request is the same as the GIF image for the first request, and the fourth request may be understood as the user triggering the play request for the GIF image again. For a specific implementation manner of the fourth request, refer to the related description of the foregoing first request, and details are not described herein again. For example, the fourth request may also be triggered by the user clicking on a thumbnail of the GIF image.
S110、所述终端响应所述第四请求,从所述终端的磁盘中获取所述GIF图像对应的BMP格式数据,所述终端播放所述GIF图像对应的BMP格式数据。S110. The terminal, in response to the fourth request, acquires BMP format data corresponding to the GIF image from a disk of the terminal, and the terminal plays BMP format data corresponding to the GIF image.
用户针对某一GIF图像再次触发播放请求,由于该请求未在预设时长到达时的时间段内发生,终端的内存中原先保存的该GIF图像对应的BMP格式数据已被删除。此时,终端直接从磁盘中获取该GIF图像对应的BMP格式数据,而无需对从终端的磁盘中获取到的该GIF图像的格式数据进行解码得到该GIF图像对应的BMP格式数据,即减少了解码操作。The user triggers the play request again for a certain GIF image. Since the request does not occur within the time period when the preset time length arrives, the BMP format data corresponding to the GIF image originally saved in the memory of the terminal has been deleted. At this time, the terminal directly obtains the BMP format data corresponding to the GIF image from the disk, and does not need to decode the format data of the GIF image obtained from the disk of the terminal to obtain the BMP format data corresponding to the GIF image, that is, the number is reduced. Decoding operation.
S111、所述终端将所述GIF图像对应的BMP格式数据保存在所述终端的内存中。S111. The terminal saves BMP format data corresponding to the GIF image in a memory of the terminal.
图4中的步骤S101-S104的具体实现可以参考上述图1所示实施例中的步骤S101-S104,此处不再赘述。For the specific implementation of the steps S101-S104 in FIG. 4, reference may be made to the steps S101-S104 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
通过实施本发明实施例,终端在接收到用户发送的播放GIF图像的请求时,由于该请求未在预设时长到达时的时间段内发生,终端的内存中原先保存的该GIF图像对应的BMP格式数据已被删除。终端直接从磁盘中获取该GIF图像对应的BMP格式数据,进而保存在内存中,避免了再次从磁盘中获取该GIF图像对应的GIF格式数据,进行解码,以获取该GIF图像对应的BMP格式数据,缩短了获取该GIF图像对应的BMP格式数据的时间,进而能够缩短播放图像的时间。By implementing the embodiment of the present invention, when the terminal receives the request for playing the GIF image sent by the user, the BMP corresponding to the GIF image originally saved in the memory of the terminal occurs because the request does not occur within the time period when the preset time is reached. The format data has been deleted. The terminal directly obtains the BMP format data corresponding to the GIF image from the disk, and saves the data in the memory, thereby avoiding acquiring the GIF format data corresponding to the GIF image from the disk again, and decoding to obtain the BMP format data corresponding to the GIF image. The time for acquiring the BMP format data corresponding to the GIF image is shortened, and the time for playing the image can be shortened.
在一种实现方式中,图像处理方法还可以包括步骤S105-S108、S101-S104、S109-S111,这些步骤的具体实现可以参考上述实施例中的相关描述,此处不再赘述。In an implementation manner, the image processing method may further include steps S105-S108, S101-S104, and S109-S111. For specific implementations of the steps, reference may be made to related descriptions in the foregoing embodiments, and details are not described herein again.
可选的,终端在执行上述步骤S103之前,还可以执行步骤S112-S113,具体的,参见图5,是本发明实施例提供的另一种图像处理方法的流程示意图。以下对步骤 S112-S113进行详细描述。Optionally, the terminal may further perform the steps S112-S113 before performing the foregoing step S103. Specifically, referring to FIG. 5, it is a schematic flowchart of another image processing method according to an embodiment of the present invention. Steps S112-S113 are described in detail below.
S112、所述终端判断所述终端当前剩余内存是否大于或等于播放所述GIF图像对应的BMP格式数据所需的内存,若是,执行步骤S103;若否,执行步骤S113。S112. The terminal determines whether the current memory of the terminal is greater than or equal to the memory required to play the BMP format data corresponding to the GIF image. If yes, step S103 is performed; if no, step S113 is performed.
本发明实施例中,播放所述GIF图像对应的BMP格式数据所需的内存可以是终端历史记录的播放所述GIF图像对应的BMP格式数据所需的内存,也可以是终端默认设置的播放GIF图像对应的BMP格式数据所需的内存,所述终端还可以通过其他方式获知播放所述GIF图像对应的BMP格式数据所需的内存。例如,终端默认设备的播放GIF图像对应的BMP格式数据所需的内存为200K,若当前终端剩余内存大于或等于200K,则执行步骤S103,否则,执行步骤S113。In the embodiment of the present invention, the memory required to play the BMP format data corresponding to the GIF image may be the memory required to play the BMP format data corresponding to the GIF image in the terminal history record, or may be the default GIF playback of the terminal. The memory required for the BMP format data corresponding to the image, the terminal may also know the memory required to play the BMP format data corresponding to the GIF image by other means. For example, the memory required for playing the BMP format data corresponding to the GIF image of the terminal default device is 200K. If the current memory of the current terminal is greater than or equal to 200K, step S103 is performed; otherwise, step S113 is performed.
S113、所述终端关闭N个应用程序,之后执行步骤S103,N为正整数,所述终端关闭所述N个应用程序后所述终端的内存大于或等于播放所述GIF图像对应的BMP格式数据所需的内存。S113. The terminal closes N applications, and then performs step S103, where N is a positive integer. After the terminal closes the N applications, the memory of the terminal is greater than or equal to playing the BMP format data corresponding to the GIF image. The memory required.
图5中的步骤S101-S104的具体实现可以参考上述图1所示实施例中的步骤S101-S104,此处不再赘述。For the specific implementation of the steps S101-S104 in FIG. 5, reference may be made to the steps S101-S104 in the foregoing embodiment shown in FIG. 1, and details are not described herein again.
通过实施本发明实施例,终端在终端当前剩余内存小于某一GIF图像对应的BMP格式数据的情况下,通过关闭应用程序,释放内存资源,以满足用户请求播放该GIF图像的需求,使得终端当前剩余内存满足该GIF图像对应的BMP格式数据的要求。By implementing the embodiment of the present invention, when the current memory of the terminal is less than the BMP format data corresponding to a certain GIF image, the terminal releases the memory resource by closing the application to meet the requirement of the user requesting to play the GIF image, so that the terminal currently The remaining memory satisfies the requirements of the BMP format data corresponding to the GIF image.
在一种实现方式中,图像处理方法还可以包括步骤S105-S108、S101-S104、S112-S113;也可以包括S101-S104、S109-S111、S112-S113;也还可以包括S105-S108、S101-S104、S109-S111、S112-S113,这些步骤的具体实现可以参考上述实施例中的相关描述,此处不再赘述。In an implementation manner, the image processing method may further include steps S105-S108, S101-S104, S112-S113; may also include S101-S104, S109-S111, S112-S113; and may also include S105-S108, S101 - S104, S109-S111, S112-S113, the specific implementation of these steps can refer to the related description in the foregoing embodiment, and details are not described herein again.
参见图6,是本发明实施例提供的一种终端的结构示意图。如图6所示,终端600可以包括:第一接收单元610、第一获取单元620、播放单元630和删除单元640,其中,FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 6, the terminal 600 may include: a first receiving unit 610, a first obtaining unit 620, a playing unit 630, and a deleting unit 640, where
第一接收单元610,用于接收用户发送的播放图像互换格式GIF图像的第一请求;a first receiving unit 610, configured to receive a first request for playing an image interchange format GIF image sent by a user;
第一获取单元620,用于响应第一请求,从终端的内存中获取GIF图像对应的位图BMP格式数据,所述BMP格式数据为对所述GIF图像进行解码得到的数据;The first obtaining unit 620 is configured to obtain bitmap BMP format data corresponding to the GIF image from the memory of the terminal, where the BMP format data is data obtained by decoding the GIF image, in response to the first request;
播放单元630,用于播放所述GIF图像对应的BMP格式数据。The playing unit 630 is configured to play BMP format data corresponding to the GIF image.
删除单元640,用于当在预设时长到达时还未接收到用户发送的播放所述GIF图像的第二请求时,将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除。The deleting unit 640 is configured to delete the BMP format data corresponding to the GIF image saved in the memory of the terminal when the second request for playing the GIF image sent by the user has not been received when the preset time length arrives .
可选的,所述终端600还包括第二接收单元、读取单元、解码单元和第一保存单元;Optionally, the terminal 600 further includes a second receiving unit, a reading unit, a decoding unit, and a first saving unit;
第二接收单元,用于第一接收单元610接收用户发送的播放图像互换格式GIF图像的第一请求之前,接收用户发送的播放所述GIF图像的第三请求;a second receiving unit, configured to receive, by the first receiving unit 610, a third request for playing the GIF image sent by the user, before receiving the first request for playing the image interchange format GIF image sent by the user;
读取单元,用于响应所述第三请求,从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据;a reading unit, configured to read GIF format data corresponding to the GIF image from a disk of the terminal in response to the third request;
解码单元,用于对所述GIF图像对应的GIF格式数据进行解码,得到所述GIF图像对应的BMP格式数据;a decoding unit, configured to decode GIF format data corresponding to the GIF image, to obtain BMP format data corresponding to the GIF image;
保存单元,用于将所述GIF图像对应的BMP格式数据保存在所述终端的内存中以及所述终端的磁盘中。And a saving unit, configured to save BMP format data corresponding to the GIF image in a memory of the terminal and a disk of the terminal.
可选的,所述终端600还包括第三接收单元、第二获取单元和第二保存单元:Optionally, the terminal 600 further includes a third receiving unit, a second acquiring unit, and a second saving unit:
第三接收单元,用于接收用户发送的播放所述GIF图像的第四请求;a third receiving unit, configured to receive a fourth request sent by the user to play the GIF image;
第二获取单元,用于响应所述第四请求,从所述终端的磁盘中获取所述GIF图像对应的BMP格式数据;a second acquiring unit, configured to acquire, according to the fourth request, BMP format data corresponding to the GIF image from a disk of the terminal;
第二保存单元,用于将所述GIF图像对应的BMP格式数据保存在所述终端的内存中。And a second saving unit, configured to save the BMP format data corresponding to the GIF image in a memory of the terminal.
可选的,读取单元,用于从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据,具体用于采用内存映射方式从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据。Optionally, the reading unit is configured to read the GIF format data corresponding to the GIF image from the disk of the terminal, where the GIF image is read from the disk of the terminal by using a memory mapping manner. GIF format data.
可选的,解码单元,用于对所述GIF图像对应的GIF格式数据进行解码,具体用于采用后台线程对所述GIF图像对应的GIF格式数据进行解码。Optionally, the decoding unit is configured to decode the GIF format data corresponding to the GIF image, and is specifically used to decode the GIF format data corresponding to the GIF image by using a background thread.
可选的,所述终端600还包括判断单元和关闭单元;Optionally, the terminal 600 further includes a determining unit and a closing unit;
判断单元,用于播放单元630播放所述GIF图像对应的BMP格式数据之前,判断所述终端当前剩余内存是否大于或等于播放所述GIF图像对应的BMP格式数据所需的内存;a determining unit, before the playing unit 630 plays the BMP format data corresponding to the GIF image, determining whether the current remaining memory of the terminal is greater than or equal to the memory required for playing the BMP format data corresponding to the GIF image;
若是,则触发播放单元630播放所述GIF图像对应的BMP格式数据;If yes, the triggering playing unit 630 plays the BMP format data corresponding to the GIF image;
若否,则触发关闭单元关闭N个应用程序,以及触发播放单元630播放所述GIF图像对应的BMP格式数据,其中,N为正整数,关闭单元关闭所述N个应用程序后所述终端的内存大于或等于播放所述GIF图像对应的BMP格式数据所需的内存。If not, the triggering unit closes the N applications, and the triggering playing unit 630 plays the BMP format data corresponding to the GIF image, where N is a positive integer, and the closing unit closes the N applications after the terminal is closed. The memory is greater than or equal to the memory required to play the BMP format data corresponding to the GIF image.
可以理解的是,本实施例的终端600的各功能单元的功能可根据上述图1、图3、图4、图5所示方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。It can be understood that the functions of the functional units of the terminal 600 of the present embodiment can be specifically implemented according to the method in the foregoing method embodiments shown in FIG. 1 , FIG. 3 , FIG. 4 , and FIG. 5 , and the specific implementation process can refer to the foregoing method. The related description of the embodiments is not described herein again.
请参见图7,是本发明实施例提供的另一种终端的结构示意图。如图7所示的终端70包括:射频(Radio Frequency,RF)电路701、存储有一个或多个计算机程序的存储器702、输入装置703、输出装置704、传感器703、音频电路706、无线保真(Wireless Fidelity,WiFi)模块707、包括有一个或多个处理核心的处理器708、以及电源709等部件。本领域技术人员可以理解,图7中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:FIG. 7 is a schematic structural diagram of another terminal according to an embodiment of the present invention. The terminal 70 shown in FIG. 7 includes: a radio frequency (RF) circuit 701, a memory 702 storing one or more computer programs, an input device 703, an output device 704, a sensor 703, an audio circuit 706, and wireless fidelity. (Wireless Fidelity, WiFi) module 707, processor 708 including one or more processing cores, and power supply 709 and the like. It will be understood by those skilled in the art that the terminal structure shown in FIG. 7 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
RF电路701可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或多个处理器708处理;另外,将涉及上行的数据发送给基站。通常,RF电路701包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路701还可以通过无线通信与网络和其他终端设备进行通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 701 can be used for receiving and transmitting signals during and after receiving or transmitting information, in particular, receiving downlink information of the base station and then processing it by one or more processors 708; in addition, transmitting data related to the uplink to the base station . Generally, RF circuit 701 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, and a Low Noise Amplifier (LNA). , duplexer, etc. In addition, the RF circuit 701 can also communicate with the network and other terminal devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code). Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
存储器702可用于存储计算机程序以及模块,处理器708通过运行存储在存储器702的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器702可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端70的使用所创建的数据(比如拍摄的照片、音频数据、视频数据等)等。此外,存储器702可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个 磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器702还可以包括存储器控制器,以提供处理器708和输入装置703对存储器702的访问。The memory 702 can be used to store computer programs and modules, and the processor 708 executes various functional applications and data processing by running computer programs and modules stored in the memory 702. The memory 702 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the terminal 70 (such as photographed photos, audio data, video data, etc.) and the like. Moreover, memory 702 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 702 may also include a memory controller to provide access to memory 702 by processor 708 and input device 703.
输入装置703可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入装置703可包括触敏表面7031以及其他输入设备7032。触敏表面7031,也称为触摸显示面板或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面7031上或在触敏表面7031附近的按压操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面7031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器708,并能接收处理器708发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面7031。除了触敏表面7031,输入装置703还可以包括其他输入设备7032。具体地,其他输入设备7032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。 Input device 703 can be used to receive input numeric or character information, as well as to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. In particular, input device 703 can include touch-sensitive surface 7031 and other input devices 7032. Touch-sensitive surface 7031, also referred to as a touch display panel or trackpad, can collect touch operations on or near the user (eg, the user uses a finger, stylus, etc., on any touch-sensitive surface 7031 or on the touch-sensitive surface 7031 The pressing operation in the vicinity of the touch-sensitive surface 7031) drives the corresponding connecting device according to a preset program. Alternatively, the touch sensitive surface 7031 can include two portions of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 708 is provided and can receive commands from the processor 708 and execute them. In addition, the touch sensitive surface 7031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 7031, the input device 703 can also include other input devices 7032. Specifically, other input devices 7032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
输出装置704可用于显示由用户输入的信息或提供给用户的信息以及终端70的各种图形用户界面,这些图形用户界面可以由图形、文本、图标、视频和其任意组合来构成。输出装置704可包括显示面板7041,可选的,显示面板7041可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置。进一步的,触敏表面7031可覆盖显示面板7041,当触敏表面7031检测到在其上或附近的触摸操作后,传送给处理器708以确定触摸事件的类型,随后处理器708根据触摸事件的类型在显示面板7041上提供相应的视觉输出。虽然在图7中,触敏表面7031与显示面板7041是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面7031与显示面板7041集成而实现输入和输出功能。 Output device 704 can be used to display information entered by the user or information provided to the user and various graphical user interfaces of terminal 70, which can be constructed from graphics, text, icons, video, and any combination thereof. The output device 704 can include a display panel 7041. Alternatively, the display panel 7041 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch-sensitive surface 7031 can cover the display panel 7041, and when the touch-sensitive surface 7031 detects a touch operation thereon or nearby, it is transmitted to the processor 708 to determine the type of the touch event, and then the processor 708 is based on the touch event. The type provides a corresponding visual output on display panel 7041. Although in FIG. 7, touch-sensitive surface 7031 and display panel 7041 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 7031 can be integrated with display panel 7041 for input. And output function.
终端70还可包括至少一种传感器703,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板7041的亮度,接近传感器可在终端70移动到耳边时,关闭显示面板7041和/或背光等。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别终端70姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端70还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,此处不再赘述。 Terminal 70 may also include at least one type of sensor 703, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 7041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 7041 when the terminal 70 moves to the ear. / or backlight and so on. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and the magnitude and direction of gravity can be detected at rest, which can be used to identify the attitude of the terminal 70 (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as well as other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which can be configured in the terminal 70, here No longer.
音频电路706、扬声器7061,传声器7062可提供用户与终端70之间的音频接口。音频电路706可将接收到的音频数据转换后的电信号,传输到扬声器7061,由扬声器7061转换为声音信号输出;另一方面,传声器7062将收集的声音信号转换为电信号,由音频电路706接收后转换为音频数据,再将音频数据输出处理器708处理后,经RF电路701以发送给比如另一终端,或者将音频数据输出至存储器702以便进一步处理。音频电路706还可能包括耳塞插孔,以提供外设耳机与终端70的通信。 Audio circuit 706, speaker 7061, and microphone 7062 can provide an audio interface between the user and terminal 70. The audio circuit 706 can transmit the converted electrical data of the received audio data to the speaker 7061, and convert it into a sound signal output by the speaker 7061; on the other hand, the microphone 7062 converts the collected sound signal into an electrical signal, and the audio circuit 706 After receiving, it is converted into audio data, and then processed by the audio data output processor 708, transmitted to the terminal, for example, via the RF circuit 701, or outputted to the memory 702 for further processing. The audio circuit 706 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 70.
WiFi属于短距离无线传输技术,终端70通过WiFi模块707可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图7示出了WiFi模块707,但是可以理解的是,其并不属于终端70的必须构成,完全 可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the terminal 70 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 707, which provides wireless broadband Internet access for users. Although FIG. 7 shows the WiFi module 707, it can be understood that it does not belong to the essential configuration of the terminal 70, and may be omitted as needed within the scope of not changing the essence of the invention.
处理器708是终端70的控制中心,利用各种接口和线路连接整个终端70的各个部分,通过运行或执行存储在存储器702内的计算机程序和/或模块,以及调用存储在存储器702内的数据,执行终端70的各种功能和处理数据,从而对终端70进行整体监控。可选的,处理器708可包括一个或多个处理核心;优选的,处理器708可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器708中。 Processor 708 is the control center of terminal 70, which connects various portions of the entire terminal 70 using various interfaces and lines, by running or executing computer programs and/or modules stored in memory 702, and recalling data stored in memory 702. The various functions and processing data of the terminal 70 are executed to perform overall monitoring of the terminal 70. Optionally, the processor 708 may include one or more processing cores; preferably, the processor 708 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 708.
终端70还包括给各个部件供电的电源709(比如电池),优选的,电源可以通过电源管理系统与处理器708逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源709还可以包括一个或多个直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal 70 also includes a power source 709 (such as a battery) that supplies power to the various components. Preferably, the power source can be logically coupled to the processor 708 through a power management system to manage functions such as charging, discharging, and power management through the power management system. The power supply 709 can also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
尽管未示出,终端70还可以包括摄像头、蓝牙模块等,此处不再赘述。具体在本发明实施例中,终端的输出装置704(或输入装置703)是触摸屏显示器,终端70还包括有存储器702、处理器708、以及一个或多个的计算机程序,其中一个或多个计算机程序存储于存储器702中,处理器708用于调用存储器702中存储的程序指令,执行上述图1、图3、图4、图5所示的图像处理方法。Although not shown, the terminal 70 may further include a camera, a Bluetooth module, and the like, and details are not described herein again. Specifically, in the embodiment of the present invention, the output device 704 (or the input device 703) of the terminal is a touch screen display, and the terminal 70 further includes a memory 702, a processor 708, and one or more computer programs, wherein the one or more computers The program is stored in the memory 702, and the processor 708 is configured to call the program instructions stored in the memory 702 to execute the image processing methods shown in FIG. 1, FIG. 3, FIG. 4, and FIG.
结合本发明实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件程序指令的方式来实现。软件程序指令可以由相应的软件模块组成,软件模块可以被存放于RAM、闪存、ROM、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于终端中。当然,处理器和存储介质也可以作为分立组件存在于终端设备中。The steps of the method or algorithm described in connection with the disclosure of the embodiments of the present invention may be implemented in a hardware manner, or may be implemented by a processor executing software program instructions. The software program instructions may be composed of corresponding software modules, which may be stored in RAM, flash memory, ROM, Erasable Programmable ROM (EPROM), and electrically erasable programmable read only memory (Electrically EPROM). , EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor to enable the processor to read information from, and write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in the terminal. Of course, the processor and the storage medium can also exist as discrete components in the terminal device.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个程序指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should appreciate that in one or more of the above examples, the functions described in the embodiments of the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored in a computer readable medium or transmitted as one or more program instructions or code on a computer readable medium. Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage medium may be any available media that can be accessed by a general purpose or special purpose computer.
以上的具体实施方式,对本发明实施例的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明实施例的具体实施方式而已,并不用于限定本发明实施例的保护范围,凡在本发明实施例的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明实施例的保护范围之内。The specific embodiments of the present invention have been described in detail with reference to the embodiments of the present invention. The scope of the present invention is to be construed as being limited to the scope of the embodiments of the present invention.

Claims (10)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, comprising:
    终端接收用户发送的播放图像互换格式GIF图像的第一请求;Receiving, by the terminal, a first request for playing an image interchange format GIF image sent by the user;
    所述终端响应所述第一请求,从所述终端的内存中获取所述GIF图像对应的位图BMP格式数据,所述BMP格式数据为对所述GIF图像进行解码得到的数据;And the terminal, in response to the first request, acquiring bitmap BMP format data corresponding to the GIF image from a memory of the terminal, where the BMP format data is data obtained by decoding the GIF image;
    所述终端播放所述GIF图像对应的BMP格式数据;The terminal plays BMP format data corresponding to the GIF image;
    当在预设时长到达时还未接收到用户发送的播放所述GIF图像的第二请求时,将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除。When the second request for playing the GIF image sent by the user has not been received when the preset duration arrives, the BMP format data corresponding to the GIF image saved in the memory of the terminal is deleted.
  2. 根据权利要求1所述的方法,其特征在于,所述终端接收用户发送的播放图像互换格式GIF图像的第一请求之前,还包括:The method according to claim 1, wherein before the terminal receives the first request for playing the image interchange format GIF image sent by the user, the method further includes:
    终端接收用户发送的播放所述GIF图像的第三请求;Receiving, by the terminal, a third request sent by the user to play the GIF image;
    所述终端响应所述第三请求,从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据;The terminal, in response to the third request, reads GIF format data corresponding to the GIF image from a disk of the terminal;
    所述终端对所述GIF图像对应的GIF格式数据进行解码,得到所述GIF图像对应的BMP格式数据;Decoding, by the terminal, the GIF format data corresponding to the GIF image, to obtain BMP format data corresponding to the GIF image;
    所述终端将所述GIF图像对应的BMP格式数据保存在所述终端的内存中以及所述终端的磁盘中。The terminal saves BMP format data corresponding to the GIF image in a memory of the terminal and a disk of the terminal.
  3. 根据权利要求1或2所述的方法,其特征在于,所述将所述终端的内存中保存的所述GIF图像对应的BMP格式数据删除之后,还包括:The method according to claim 1 or 2, wherein after deleting the BMP format data corresponding to the GIF image saved in the memory of the terminal, the method further includes:
    终端接收用户发送的播放所述GIF图像的第四请求;Receiving, by the terminal, a fourth request sent by the user to play the GIF image;
    所述终端响应所述第四请求,从所述终端的磁盘中获取所述GIF图像对应的BMP格式数据;And the terminal, in response to the fourth request, acquiring BMP format data corresponding to the GIF image from a disk of the terminal;
    所述终端将所述GIF图像对应的BMP格式数据保存在所述终端的内存中。The terminal saves BMP format data corresponding to the GIF image in a memory of the terminal.
  4. 根据权利要求2所述的方法,其特征在于,所述终端从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据,包括:The method according to claim 2, wherein the terminal reads the GIF format data corresponding to the GIF image from the disk of the terminal, including:
    所述终端采用内存映射方式从所述终端的磁盘中读取所述GIF图像对应的GIF格式数据。The terminal reads the GIF format data corresponding to the GIF image from the disk of the terminal by using a memory mapping manner.
  5. 根据权利要求2所述的方法,其特征在于,所述终端对所述GIF图像对应的GIF格式数据进行解码,包括:The method according to claim 2, wherein the decoding, by the terminal, the GIF format data corresponding to the GIF image comprises:
    所述终端采用后台线程对所述GIF图像对应的GIF格式数据进行解码。The terminal decodes the GIF format data corresponding to the GIF image by using a background thread.
  6. 根据权利要求1至4任一项所述的方法,其特征在于,所述终端播放所述GIF图像对应的BMP格式数据之前,还包括:The method according to any one of claims 1 to 4, wherein before the terminal plays the BMP format data corresponding to the GIF image, the method further includes:
    所述终端判断所述终端当前剩余内存是否大于或等于播放所述GIF图像对应的BMP格式数据所需的内存;Determining, by the terminal, whether the current remaining memory of the terminal is greater than or equal to a memory required for playing BMP format data corresponding to the GIF image;
    若是,则执行所述播放所述GIF图像对应的BMP格式数据的步骤;If yes, performing the step of playing the BMP format data corresponding to the GIF image;
    若否,则所述终端关闭N个应用程序,并执行所述播放所述GIF图像对应的BMP格式数据的步骤,N为正整数,所述终端关闭所述N个应用程序后所述终端的内存大于或等于播放所述GIF图像对应的BMP格式数据所需的内存。If not, the terminal closes the N applications, and performs the step of playing the BMP format data corresponding to the GIF image, where N is a positive integer, and the terminal closes the N applications after the terminal The memory is greater than or equal to the memory required to play the BMP format data corresponding to the GIF image.
  7. 一种终端,其特征在于,所述终端包括用于执行权利要求1-6任一项所述图像处理方法的单元。A terminal, characterized in that the terminal comprises means for performing the image processing method according to any one of claims 1-6.
  8. 一种终端,其特征在于,所述终端包括:处理器和存储器,所述存储器用于存 储程序指令和/或数据,所述处理器用于调用所述存储器存储的程序指令执行权利要求1-6任一项所述图像处理方法。A terminal, characterized in that the terminal comprises: a processor for storing program instructions and/or data, the processor for calling the program instructions stored in the memory to execute claims 1-6 Any of the image processing methods described.
  9. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行权利要求1-6任一项所述图像处理方法。A computer storage medium, characterized in that the computer storage medium stores a computer program, the computer program comprising program instructions, the program instructions, when executed by a processor, causing the processor to perform any of claims 1-6 An image processing method as described.
  10. 一种计算机程序,其特征在于,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行权利要求1-6任一项所述图像处理方法。A computer program, comprising: program instructions, which, when executed by a processor, cause the processor to perform the image processing method of any of claims 1-6.
PCT/CN2018/116245 2017-11-21 2018-11-19 Image processing method, terminal, computer storage medium and computer program WO2019101043A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711172708.5A CN107943417A (en) 2017-11-21 2017-11-21 Image processing method, terminal, computer-readable storage medium and computer program
CN201711172708.5 2017-11-21

Publications (1)

Publication Number Publication Date
WO2019101043A1 true WO2019101043A1 (en) 2019-05-31

Family

ID=61929810

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116245 WO2019101043A1 (en) 2017-11-21 2018-11-19 Image processing method, terminal, computer storage medium and computer program

Country Status (2)

Country Link
CN (1) CN107943417A (en)
WO (1) WO2019101043A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943417A (en) * 2017-11-21 2018-04-20 广州市百果园网络科技有限公司 Image processing method, terminal, computer-readable storage medium and computer program
CN108769806B (en) * 2018-06-19 2020-05-05 聚好看科技股份有限公司 Media content display method and device
CN109284183A (en) * 2018-10-17 2019-01-29 广州市百果园信息技术有限公司 Cardon playback method, device, computer storage medium and terminal
CN109886861B (en) * 2019-01-08 2023-04-11 北京城市网邻信息技术有限公司 High-efficiency image file format HEIF image loading method and device
CN110677699B (en) * 2019-10-10 2022-03-08 上海依图网络科技有限公司 Video stream and/or picture stream data sharing method and device and electronic equipment
CN111949330B (en) * 2020-08-11 2022-06-24 深圳市前海手绘科技文化有限公司 Method for loading hand-drawing draft
CN113326086B (en) * 2021-05-18 2022-08-23 翱捷科技股份有限公司 GIF picture display method and device based on LVGL

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136208A (en) * 2011-11-23 2013-06-05 腾讯科技(深圳)有限公司 Method for displaying images and device for displaying images
CN104461661A (en) * 2014-12-30 2015-03-25 中科创达软件股份有限公司 Image resource loading method and system
CN106383880A (en) * 2016-09-13 2017-02-08 广州视睿电子科技有限公司 GIF file playing method and system
CN107943417A (en) * 2017-11-21 2018-04-20 广州市百果园网络科技有限公司 Image processing method, terminal, computer-readable storage medium and computer program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336124B1 (en) * 1998-10-01 2002-01-01 Bcl Computers, Inc. Conversion data representing a document to other formats for manipulation and display
CN107247676A (en) * 2017-05-18 2017-10-13 深圳市小牛在线互联网信息咨询有限公司 Dynamic Graph player method, device, storage medium and computer equipment
CN107193446B (en) * 2017-07-10 2020-07-10 北京小米移动软件有限公司 Image processing method, device, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136208A (en) * 2011-11-23 2013-06-05 腾讯科技(深圳)有限公司 Method for displaying images and device for displaying images
CN104461661A (en) * 2014-12-30 2015-03-25 中科创达软件股份有限公司 Image resource loading method and system
CN106383880A (en) * 2016-09-13 2017-02-08 广州视睿电子科技有限公司 GIF file playing method and system
CN107943417A (en) * 2017-11-21 2018-04-20 广州市百果园网络科技有限公司 Image processing method, terminal, computer-readable storage medium and computer program

Also Published As

Publication number Publication date
CN107943417A (en) 2018-04-20

Similar Documents

Publication Publication Date Title
WO2019101043A1 (en) Image processing method, terminal, computer storage medium and computer program
US11003331B2 (en) Screen capturing method and terminal, and screenshot reading method and terminal
WO2017206916A1 (en) Method for determining kernel running configuration in processor and related product
RU2616536C2 (en) Method, device and terminal device to display messages
WO2018010512A1 (en) Method and device for uploading phtograph file
WO2016045226A1 (en) Information processing method and apparatus
CN107562539B (en) Application program processing method and device, computer equipment and storage medium
CN105630846B (en) Head portrait updating method and device
WO2017193496A1 (en) Application data processing method and apparatus, and terminal device
TW201911066A (en) Folder sending method, sending terminal, receiving terminal and storage medium
WO2017050090A1 (en) Method and device for generating gif file, and computer readable storage medium
US11314703B2 (en) Method and apparatus for processing timedly-published data
CN110377235B (en) Data processing method and device, mobile terminal and computer readable storage medium
WO2015081905A1 (en) Data update method, user terminal, and data update system
WO2019071424A1 (en) Application function control method and terminal
TW201541337A (en) Method, device and system for displaying messages in mobile terminal
WO2019076250A1 (en) Push message management method and related products
US10136115B2 (en) Video shooting method and apparatus
CN109660445B (en) Message processing method, device and storage medium
CN105513098B (en) Image processing method and device
KR101876394B1 (en) Method and device for playing media data on a terminal
WO2018145539A1 (en) Streaming media data processing method and mobile terminal
CN108021298B (en) Method and device for pasting information by using shear plate
CN106230919B (en) File uploading method and device
US20160196030A1 (en) Method and electronic device for displaying electronic document

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18880178

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18880178

Country of ref document: EP

Kind code of ref document: A1